[TASK] Remove "Page Information"
[Packages/TYPO3.CMS.git] / typo3 / sysext / cms / web_info / class.tx_cms_webinfo.php
1 <?php
2 /***************************************************************
3 * Copyright notice
4 *
5 * (c) 1999-2011 Kasper Skårhøj (kasperYYYY@typo3.com)
6 * All rights reserved
7 *
8 * This script is part of the TYPO3 project. The TYPO3 project is
9 * free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * The GNU General Public License can be found at
15 * http://www.gnu.org/copyleft/gpl.html.
16 * A copy is found in the textfile GPL.txt and important notices to the license
17 * from the author is found in LICENSE.txt distributed with these scripts.
18 *
19 *
20 * This script is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
24 *
25 * This copyright notice MUST APPEAR in all copies of the script!
26 ***************************************************************/
27 /**
28 * Contains a class with functions for page related statistics added to the backend Info module
29 *
30 * Revised for TYPO3 3.6 5/2003 by Kasper Skårhøj
31 *
32 * @author Kasper Skårhøj <kasperYYYY@typo3.com>
33 */
34
35 require_once(t3lib_extMgm::extPath('cms').'layout/class.tx_cms_layout.php');
36
37
38 /**
39 * Class for displaying page information (records, page record properties)
40 *
41 * @author Kasper Skårhøj <kasperYYYY@typo3.com>
42 * @package TYPO3
43 * @subpackage tx_cms
44 */
45 class tx_cms_webinfo_page extends t3lib_extobjbase {
46
47 /**
48 * Returns the menu array
49 *
50 * @return array
51 */
52 function modMenu() {
53 global $LANG;
54 return array (
55 'pages' => array (
56 0 => $LANG->getLL('pages_0'),
57 2 => $LANG->getLL('pages_2'),
58 1 => $LANG->getLL('pages_1')
59 ),
60 'stat_type' => array(
61 0 => $LANG->getLL('stat_type_0'),
62 1 => $LANG->getLL('stat_type_1'),
63 2 => $LANG->getLL('stat_type_2'),
64 ),
65 'depth' => array(
66 0 => $LANG->getLL('depth_0'),
67 1 => $LANG->getLL('depth_1'),
68 2 => $LANG->getLL('depth_2'),
69 3 => $LANG->getLL('depth_3'),
70 999 => $LANG->sL('LLL:EXT:lang/locallang_core.xml:labels.depth_infi'),
71 )
72 );
73 }
74
75 /**
76 * MAIN function for page information display
77 *
78 * @return string Output HTML for the module.
79 */
80 function main() {
81 global $BACK_PATH,$LANG,$SOBE;
82
83 $dblist = t3lib_div::makeInstance('tx_cms_layout');
84 $dblist->descrTable = '_MOD_'.$GLOBALS['MCONF']['name'];
85 $dblist->backPath = $BACK_PATH;
86 $dblist->thumbs = 0;
87 $dblist->script = 'index.php';
88 $dblist->showIcon = 0;
89 $dblist->setLMargin = 0;
90 $dblist->agePrefixes=$LANG->sL('LLL:EXT:lang/locallang_core.php:labels.minutesHoursDaysYears');
91
92 $dblist->pI_showUser = 1;
93
94 // PAGES:
95 $this->pObj->MOD_SETTINGS['pages_levels']=$this->pObj->MOD_SETTINGS['depth']; // ONLY for the sake of dblist module which uses this value.
96
97 $h_func = t3lib_BEfunc::getFuncMenu($this->pObj->id, 'SET[depth]', $this->pObj->MOD_SETTINGS['depth'], $this->pObj->MOD_MENU['depth'], 'index.php');
98 $h_func .= t3lib_BEfunc::getFuncMenu($this->pObj->id, 'SET[pages]', $this->pObj->MOD_SETTINGS['pages'], $this->pObj->MOD_MENU['pages'], 'index.php');
99 $dblist->start($this->pObj->id, 'pages', 0);
100 $dblist->generateList();
101
102 // CSH
103 $theOutput .= $this->pObj->doc->header($LANG->getLL('page_title'));
104 $theOutput .= $this->pObj->doc->section('',
105 t3lib_BEfunc::cshItem($dblist->descrTable, 'pagetree_overview', $GLOBALS['BACK_PATH'], '|<br />') . // CSH
106 $h_func.
107 $dblist->HTMLcode,
108 0,
109 1
110 );
111
112 // SYS_NOTES:
113 if (t3lib_extMgm::isLoaded('sys_note')) {
114 $dblist->start($this->pObj->id, 'sys_note', 0);
115 $dblist->generateList();
116 if ($dblist->HTMLcode) {
117 $theOutput.=$this->pObj->doc->spacer(10);
118 $theOutput.=$this->pObj->doc->section($LANG->getLL('page_sysnote'),
119 $dblist->HTMLcode,
120 0,
121 1
122 );
123 }
124 }
125
126 return $theOutput;
127 }
128 }
129 ?>