[BUGFIX] Better condition in versionOL of t3lib_tstemplate
authorMario Rimann <typo3-coding@rimann.org>
Sun, 11 Mar 2012 11:54:13 +0000 (12:54 +0100)
committerSteffen Ritter <info@rs-websystems.de>
Mon, 12 Mar 2012 16:32:15 +0000 (17:32 +0100)
Changes the condition to determine whether we're in the
frontend or in the backend.

Change-Id: I989359e25c6f05e3075b2a2403a5ba2487b45c90
Related: #25144
Resolves: #31139
Releases: 4.5
Reviewed-on: http://review.typo3.org/7043
Reviewed-by: Susanne Moog
Tested-by: Susanne Moog
Reviewed-by: Oliver Klee
Reviewed-by: Markus Klein
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter
t3lib/class.t3lib_tstemplate.php

index e41f032..2fec259 100644 (file)
@@ -749,7 +749,7 @@ class t3lib_TStemplate {
         * @return      void            Row is passed by reference.
         */
        function versionOL(&$row) {
-               if (is_object($GLOBALS['TSFE'])) { // Frontend:
+               if (TYPO3_MODE === 'FE') { // Frontend:
                        $GLOBALS['TSFE']->sys_page->versionOL('sys_template', $row);
                } else { // Backend:
                        t3lib_BEfunc::workspaceOL('sys_template', $row);