[BUGFIX] Re-Introduce removed API method and mark it deprecated
authorHelmut Hummel <helmut.hummel@typo3.org>
Sat, 2 Jul 2011 12:54:44 +0000 (14:54 +0200)
committerDmitry Dulepov <dmitry@typo3.org>
Mon, 4 Jul 2011 14:22:53 +0000 (16:22 +0200)
After the refactoring of the form protection framework the API method persitTokens()
has been removed.

To not break existing extensions, re-introduce this method and
mark it as deprecated.

Change-Id: I2ef23724a3be8d3266d884506b066c587e332d9b
Fixes: #27809
Related: #25359
Releases: 4.6, 4.5
Reviewed-on: http://review.typo3.org/3016
Reviewed-by: Oliver Klee
Reviewed-by: Stefan Neufeind
Reviewed-by: Dmitry Dulepov
Tested-by: Dmitry Dulepov
t3lib/formprotection/class.t3lib_formprotection_backendformprotection.php
t3lib/formprotection/class.t3lib_formprotection_disabledformprotection.php
t3lib/formprotection/class.t3lib_formprotection_installtoolformprotection.php

index 045a043..315598b 100644 (file)
@@ -153,6 +153,7 @@ class t3lib_formprotection_BackendFormProtection extends t3lib_formprotection_Ab
         * Saves the tokens so that they can be used by a later incarnation of this
         * class.
         *
+        * @access private
         * @return void
         */
        public function persistSessionToken() {
@@ -160,6 +161,16 @@ class t3lib_formprotection_BackendFormProtection extends t3lib_formprotection_Ab
        }
 
        /**
+        * This method was once used for persisting all tokens.
+        *
+        * @deprecated since TYPO3 4.5.3, will be removed in TYPO3 4.7
+        * @return void
+        */
+       public function persistTokens() {
+               t3lib_div::logDeprecatedFunction();
+       }
+
+       /**
         * Sets the session token for the user from the registry
         * and returns it additionally.
         *
index dff5a89..9412bae 100644 (file)
@@ -83,6 +83,16 @@ class t3lib_formprotection_DisabledFormProtection extends t3lib_formprotection_A
        public function persistSessionToken() {
                // Do nothing.
        }
+
+       /**
+        * This method was once used for persisting all tokens.
+        *
+        * @deprecated since TYPO3 4.5.3, will be removed in TYPO3 4.7
+        * @return void
+        */
+       public function persistTokens() {
+               t3lib_div::logDeprecatedFunction();
+       }
 }
 
 if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['t3lib/formprotection/class.t3lib_formprotection_backendformprotection.php'])) {
index 0921633..b3c4169 100644 (file)
@@ -136,6 +136,16 @@ class t3lib_formprotection_InstallToolFormProtection extends t3lib_formProtectio
        public function persistSessionToken() {
                $_SESSION['installToolFormToken'] = $this->sessionToken;
        }
+
+       /**
+        * This method was once used for persisting all tokens.
+        *
+        * @deprecated since TYPO3 4.5.3, will be removed in TYPO3 4.7
+        * @return void
+        */
+       public function persistTokens() {
+               t3lib_div::logDeprecatedFunction();
+       }
 }
 
 if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/install/mod/class.tx_install_formprotection.php'])) {