[TASK] Change "true" into "TRUE"
[Packages/TYPO3.CMS.git] / typo3 / alt_intro.php
old mode 100755 (executable)
new mode 100644 (file)
index 9f20368..5e88fa5
@@ -2,7 +2,7 @@
 /***************************************************************
 *  Copyright notice
 *
-*  (c) 1999-2004 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
  * Will display the list of main- and sub-modules available to the user.
  * Each module will be show with description and a link to the module.
  *
- * $Id$
- * Revised for TYPO3 3.6 2/2003 by Kasper Skaarhoj
+ * Revised for TYPO3 3.6 2/2003 by Kasper Skårhøj
  * XHTML compliant
  *
- * @author     Kasper Skaarhoj <kasperYYYY@typo3.com>
+ * @author     Kasper Skårhøj <kasperYYYY@typo3.com>
  */
 /**
  * [CLASS/FUNCTION INDEX of SCRIPT]
@@ -42,8 +41,8 @@
  *
  *   75: class SC_alt_intro
  *   84:     function init()
- *   97:     function main()
- *  150:     function printContent()
+ *   98:     function main()
+ *  148:     function printContent()
  *
  * TOTAL FUNCTIONS: 3
  * (This index is automatically created/updated by the extension "extdeveval")
@@ -53,8 +52,6 @@
 
 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');
 $LANG->includeLLFile('EXT:lang/locallang_alt_intro.xml');
 
@@ -68,11 +65,17 @@ $LANG->includeLLFile('EXT:lang/locallang_alt_intro.xml');
 /**
  * Script Class for the introduction screen, alias "About > Modules" which shows the description of each available module for the user.
  *
- * @author     Kasper Skaarhoj <kasperYYYY@typo3.com>
+ * @author     Kasper Skårhøj <kasperYYYY@typo3.com>
  * @package TYPO3
  * @subpackage core
  */
 class SC_alt_intro {
+
+       /**
+        * Object for backend modules.
+        *
+        * @var t3lib_loadModules
+        */
        var $loadModules;
        var $content;
 
@@ -86,6 +89,7 @@ class SC_alt_intro {
 
                        // Loads the available backend modules so we can create the description overview.
                $this->loadModules = t3lib_div::makeInstance('t3lib_loadModules');
+               $this->loadModules->observeWorkspaces = TRUE;
                $this->loadModules->load($TBE_MODULES);
        }
 
@@ -95,29 +99,26 @@ class SC_alt_intro {
         * @return      void
         */
        function main() {
-               global $BE_USER,$LANG,$TYPO3_CONF_VARS;
                global $TBE_TEMPLATE;
 
                $alt_menuObj = t3lib_div::makeInstance('alt_menu_functions');
 
-               $TBE_TEMPLATE->docType = 'xhtml_trans';
-               $TBE_TEMPLATE->divClass = $TBE_TEMPLATE->bodyTagId;
-               $this->content.= $TBE_TEMPLATE->startPage('About modules');
+               $TBE_TEMPLATE->divClass = $GLOBALS['TBE_TEMPLATE']->bodyTagId;
 
-               $this->content.= sprintf('
-                       <h1>%s<br />%s</h1>
+               $this->content = '
+                       <div id="typo3-docheader">
+                               <div id="typo3-docheader-row1">&nbsp;</div>
+                       </div>
+                       <div id="typo3-alt-intro-php-sub">
+                       <h1>TYPO3 ' . TYPO3_version . '<br />' . $GLOBALS['LANG']->getLL('introtext') . '</h1>
 
-                       <p>%s</p>
-                       <p>&nbsp;%s</p>
-                       <p>%s</p>',
-                       'TYPO3 '.TYPO3_version,
-                       $LANG->getLL('introtext'),
-                       t3lib_BEfunc::TYPO3_copyRightNotice(),
-                       $this->displayWarningIfPasswordIsDefault(),
-                       $LANG->getLL('introtext2')
-                       );
+                       <p>'.t3lib_BEfunc::TYPO3_copyRightNotice().'</p>';
 
+               $this->content .= '
+                       '.t3lib_BEfunc::displayWarningMessages();
 
+               $this->content .= '
+                       <h3>' . $GLOBALS['LANG']->getLL('introtext2') . '</h3>';
 
 
                        // Printing the description of the modules available
@@ -125,22 +126,14 @@ class SC_alt_intro {
                $this->content.='<br />';
 
                        // end text: 'Features may vary depending on your website and permissions'
-               $this->content.='<p class="c-features"><em>('.$LANG->getLL('endText').')</em></p>';
-               $this->content.='<hr />';
-
-                       // Logged in user, eg: 'You're logged in as user: admin (John Doe, john@doe.email)'
-               $this->content.='<p class="c-user">'.
-                               htmlspecialchars($LANG->getLL('userInfo')).
-                               sprintf(' <strong>%s</strong> (%s)',
-                                               $BE_USER->user['username'],
-                                               (implode(', ',array($BE_USER->user['realName'],$BE_USER->user['email'])))
-                                               ).
-                               '</p>
-                               <br />
-                               <br />';
-
-                       // End page
-               $this->content.= $TBE_TEMPLATE->endPage();
+               $this->content .= '<p class="c-features"><em>(' . $GLOBALS['LANG']->getLL('endText') . ')</em></p>';
+               $this->content .= '<br /></div>';
+
+                       // Renders the module page
+               $this->content = $TBE_TEMPLATE->render(
+                       'About modules',
+                       $this->content
+               );
        }
 
        /**
@@ -151,38 +144,12 @@ class SC_alt_intro {
        function printContent() {
                echo $this->content;
        }
-
-       /**
-        * Display a warning message if the Install Tool Password is still the default: joh316
-        * The warning is only displayed to admin users
-        *
-        * @return      void
-        */
-       function displayWarningIfPasswordIsDefault()    {
-               if($GLOBALS['BE_USER']->isAdmin() && $GLOBALS['TYPO3_CONF_VARS']['BE']['installToolPassword']==md5('joh316')) {
-                       return '&nbsp;</p>
-                       <p class="typo3-red" style="font-weight: bold;">Security warning: The password of your install tool is still "joh316" which is the default.<br />
-                       It is highly recommended to change this immediately.<br />
-                       &nbsp;';
-               } else {
-                       return '';
-               }
-       }
 }
 
-// Include extension?
-if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/alt_intro.php'])    {
-       include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/alt_intro.php']);
-}
-
-
-
-
-
-
-
-
 
+if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/alt_intro.php'])) {
+       include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/alt_intro.php']);
+}
 
 
 
@@ -191,4 +158,5 @@ $SOBE = t3lib_div::makeInstance('SC_alt_intro');
 $SOBE->init();
 $SOBE->main();
 $SOBE->printContent();
+
 ?>
\ No newline at end of file