removed newline at EOF
[Packages/TYPO3.CMS.git] / typo3 / sysext / info / mod1 / index.php
index 888ee3a..308c1b7 100755 (executable)
@@ -2,7 +2,7 @@
 /***************************************************************
 *  Copyright notice
 *
-*  (c) 1999-2010 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
  * Presents various page related information from extensions
  *
  * $Id$
- * Revised for TYPO3 3.6 November/2003 by Kasper Skaarhoj
+ * Revised for TYPO3 3.6 November/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]
@@ -62,7 +62,7 @@ $BE_USER->modAccess($MCONF,1);
  * Script Class for the Web > Info module
  * This class creates the framework to which other extensions can connect their sub-modules
  *
- * @author     Kasper Skaarhoj <kasperYYYY@typo3.com>
+ * @author     Kasper Skårhøj <kasperYYYY@typo3.com>
  * @package TYPO3
  * @subpackage core
  */
@@ -145,22 +145,21 @@ class SC_mod_web_info_index extends t3lib_SCbase {
                        );
 
                                // Build the <body> for the module
-                       $this->content = $this->doc->startPage($LANG->getLL('title'));
-                       $this->content.= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
-                       $this->content.= $this->doc->endPage();
-                       $this->content = $this->doc->insertStylesAndJS($this->content);
+                       $this->content = $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
                } else {
                                // If no access or if ID == zero
                        $this->doc = t3lib_div::makeInstance('mediumDoc');
                        $this->doc->backPath = $BACK_PATH;
 
-                       $this->content.=$this->doc->startPage($LANG->getLL('title'));
-                       $this->content.=$this->doc->header($LANG->getLL('title'));
-                       $this->content.=$this->doc->spacer(5);
-                       $this->content.=$this->doc->spacer(10);
-                       $this->content.= $this->doc->endPage();
-                       $this->content = $this->doc->insertStylesAndJS($this->content);
+                       $this->content = $this->doc->header($LANG->getLL('title'));
+                       $this->content .= $this->doc->spacer(5);
+                       $this->content .= $this->doc->spacer(10);
                }
+               // Renders the module page
+               $this->content = $this->doc->render(
+                       $LANG->getLL('title'),
+                       $this->content
+               );
        }
 
        /**
@@ -201,19 +200,21 @@ class SC_mod_web_info_index extends t3lib_SCbase {
                }
 
                        // If access to Web>List for user, then link to that module.
-               if ($BE_USER->check('modules','web_list'))      {
-                       $href = $BACK_PATH . 'db_list.php?id=' . $this->pageinfo['uid'] . '&returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'));
-                       $buttons['record_list'] = '<a href="' . htmlspecialchars($href) . '" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showList', 1) . '">' .
-                                               t3lib_iconWorks::getSpriteIcon('actions-system-list-open') .
-                                       '</a>';
-               }
+               $buttons['record_list'] = t3lib_BEfunc::getListViewLink(
+                       array(
+                               'id' => $this->pageinfo['uid'],
+                               'returnUrl' => t3lib_div::getIndpEnv('REQUEST_URI'),
+                       ),
+                       $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showList')
+               );
+
                return $buttons;
        }
 
 }
 
-if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/mod/web/info/index.php'])   {
-       include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/mod/web/info/index.php']);
+if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/mod/web/info/index.php'])) {
+       include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/mod/web/info/index.php']);
 }
 
 
@@ -232,5 +233,6 @@ $SOBE->checkSubExtObj();    // Checking second level external objects
 
 $SOBE->main();
 $SOBE->printContent();
+t3lib_formprotection_Factory::get('t3lib_formprotection_BackendFormProtection')->persistTokens();
 
 ?>
\ No newline at end of file