[TASK] TSFE - Add hook after BE_USER init to clean up workspace functionality
authorBenjamin Mack <benni@typo3.org>
Sat, 8 Oct 2011 10:17:22 +0000 (12:17 +0200)
committerXavier Perseguers <xavier@typo3.org>
Sat, 8 Oct 2011 18:01:28 +0000 (20:01 +0200)
In order to move workspace logic out of the TYPO3 core and into
versioning/workspaces extensions, a new hook is required first.
The hook will be placed after the backend authorization, and in
a followup issue the hook will be used for further cleanups of the
TSFE issue.

Change-Id: Ica08ce0c9d3802c6e9cd1b97d91f3d7a4efebd0f
Resolves: #30646
Releases: 4.6
Reviewed-on: http://review.typo3.org/5631
Reviewed-by: Steffen Gebert
Tested-by: Steffen Gebert
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers
typo3/sysext/cms/tslib/class.tslib_fe.php

index 4a7db7f..0fecac8 100644 (file)
                if (is_array($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/index_ts.php']['preBeUser'])) {
                        foreach($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/index_ts.php']['preBeUser'] as $_funcRef) {
                                $_params = array();
-                               t3lib_div::callUserFunction($_funcRef, $_params, $_params);
+                               t3lib_div::callUserFunction($_funcRef, $_params, $this);
                        }
                }
 
                        }
                }
 
+               // *****************
+               // POST BE_USER HOOK
+               // *****************
+               if (is_array($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/index_ts.php']['postBeUser'])) {
+                       $_params = array(
+                               'BE_USER' => &$BE_USER
+                       );
+                       foreach($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/index_ts.php']['postBeUser'] as $_funcRef) {
+                               t3lib_div::callUserFunction($_funcRef, $_params, $this);
+                       }
+               }
+
                return $BE_USER;
        }