[BUGFIX] Re-Introduce removed API method and mark it deprecated
authorHelmut Hummel <helmut.hummel@typo3.org>
Sat, 2 Jul 2011 13:12:21 +0000 (15:12 +0200)
committerDmitry Dulepov <dmitry@typo3.org>
Tue, 5 Jul 2011 09:35:13 +0000 (11:35 +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/3017
Reviewed-by: Philipp Gampe
Tested-by: Philipp Gampe
Reviewed-by: Dmitry Dulepov
Reviewed-by: Oliver Klee
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 00d9a7a..0387952 100644 (file)
@@ -155,6 +155,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() {
@@ -162,6 +163,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.
         *
@@ -236,4 +247,4 @@ class t3lib_formprotection_BackendFormProtection extends t3lib_formprotection_Ab
 if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['t3lib/formprotection/class.t3lib_formprotection_backendformprotection.php'])) {
        include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['t3lib/formprotection/class.t3lib_formprotection_backendformprotection.php']);
 }
-?>
\ No newline at end of file
+?>
index 571f2f6..ed71996 100644 (file)
@@ -85,6 +85,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 7e2da2b..d6941e7 100644 (file)
@@ -138,9 +138,19 @@ 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'])) {
        include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/install/mod/class.tx_install_formprotection.php']);
 }
-?>
\ No newline at end of file
+?>