[BUGFIX] Warning in list module
[Packages/TYPO3.CMS.git] / typo3 / alt_menu.php
old mode 100755 (executable)
new mode 100644 (file)
index dccda10..6ea459a
@@ -2,7 +2,7 @@
 /***************************************************************
 *  Copyright notice
 *
-*  (c) 1999-2008 Kasper Skaarhoj (kasperYYYY@typo3.com)
+*  (c) 1999-2011 Kasper Skårhøj (kasperYYYY@typo3.com)
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is
  * Displays the vertical menu in the left most frame of TYPO3s backend
  *
  * $Id$
- * Revised for TYPO3 3.6 2/2003 by Kasper Skaarhoj
+ * Revised for TYPO3 3.6 2/2003 by Kasper Skårhøj
  * XHTML-trans compliant
  *
- * @author     Kasper Skaarhoj <kasperYYYY@typo3.com>
- * @co-author Sebastian Kurfuerst <sebastian@garbage-group.de>
+ * @author     Kasper Skårhøj <kasperYYYY@typo3.com>
+ * @co-author Sebastian Kurfürst <sebastian@garbage-group.de>
  */
 /**
  * [CLASS/FUNCTION INDEX of SCRIPT]
  * TOTAL FUNCTIONS: 3
  * (This index is automatically created/updated by the extension "extdeveval")
  *
+ * @deprecated since TYPO3 4.5, this file will be removed in TYPO3 4.7. The TYPO3 backend is using typo3/backend.php with less frames, which makes this file obsolete.
  */
 
 
 require ('init.php');
 require ('template.php');
-require_once (PATH_t3lib.'class.t3lib_loadmodules.php');
-require_once (PATH_t3lib.'class.t3lib_basicfilefunc.php');
 require_once ('class.alt_menu_functions.inc');
 
 
+t3lib_div::deprecationLog('alt_palette.php is deprecated since TYPO3 4.5, this file will be removed in TYPO3 4.7. The TYPO3 backend is using typo3/backend.php with less frames, which makes this file obsolete.');
 
 
 
@@ -72,8 +72,8 @@ require_once ('class.alt_menu_functions.inc');
 /**
  * Script Class for rendering the vertical menu in the left side of the backend frameset
  *
- * @author     Kasper Skaarhoj <kasperYYYY@typo3.com>
- * @co-author Sebastian Kurfuerst <sebastian@garbage-group.de>
+ * @author     Kasper Skårhøj <kasperYYYY@typo3.com>
+ * @co-author Sebastian Kurfürst <sebastian@garbage-group.de>
  * @package TYPO3
  * @subpackage core
  */
@@ -120,7 +120,6 @@ class SC_alt_menu {
        function main() {
                global $BE_USER,$TYPO3_CONF_VARS,$TBE_TEMPLATE;
 
-               $TBE_TEMPLATE->docType='xhtml_trans';
                $TBE_TEMPLATE->divClass='vertical-menu';
                $TBE_TEMPLATE->bodyTagAdditions = 'onload="top.restoreHighlightedModuleMenuItem()"';
 
@@ -152,7 +151,7 @@ class SC_alt_menu {
                                // Header: Admin functions
                        $this->content.='
                                        <tr class="c-mainitem">
-                                               <td colspan="2"><span class="c-label"><b>'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:rm.adminFunctions',1).'</b>&nbsp;</span><span class="c-iconCollapse"></span></td>
+                                               <td colspan="2"><span class="c-label"><strong>'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:rm.adminFunctions',1).'</strong>&nbsp;</span><span class="c-iconCollapse"></span></td>
                                        </tr>';
 
                        $rows=array();
@@ -183,11 +182,13 @@ class SC_alt_menu {
 
                        // superuser mode
                if($BE_USER->user['ses_backuserid']) {
-                       $username = '<p id="username" class="typo3-red-background">[SU: '.htmlspecialchars($BE_USER->user['username']).']</p>';
+                       $username = '<p id="username" class="typo3-red-background">[' .
+                               $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_misc.xml:switchtousershort') . ' ' .
+                               htmlspecialchars($BE_USER->user['username']) . ']</p>';
                } else {
-                       $username = '<p id="username">['.htmlspecialchars($BE_USER->user['username']).']</p>';
+                       $username = '<p id="username">[' . htmlspecialchars($BE_USER->user['username']) . ']</p>';
                }
-                       // Printing bottons (logout button)
+                       // Printing buttons (logout button)
                $this->content.='
 
 
@@ -211,19 +212,10 @@ class SC_alt_menu {
        }
 }
 
-// Include extension?
-if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/alt_menu.php'])     {
-       include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/alt_menu.php']);
-}
-
-
-
-
-
-
-
-
 
+if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/alt_menu.php'])) {
+       include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/alt_menu.php']);
+}
 
 
 
@@ -232,4 +224,5 @@ $SOBE = t3lib_div::makeInstance('SC_alt_menu');
 $SOBE->init();
 $SOBE->main();
 $SOBE->printContent();
-?>
\ No newline at end of file
+
+?>