removed newline at EOF
[Packages/TYPO3.CMS.git] / typo3 / sysext / info / mod1 / index.php
index 11513d8..308c1b7 100755 (executable)
@@ -2,7 +2,7 @@
 /***************************************************************
 *  Copyright notice
 *
-*  (c) 1999-2010 Kasper Skårhøj (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
@@ -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,18 +200,21 @@ class SC_mod_web_info_index extends t3lib_SCbase {
                }
 
                        // If access to Web>List for user, then link to that module.
-               $buttons['record_list'] = t3lib_extMgm::createListViewLink(
-                       $this->pageinfo['uid'],
-                       '&returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI')),
-                       $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showList', TRUE)
+               $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']);
 }
 
 
@@ -231,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