Changed private declarations to protected
[Packages/TYPO3.CMS.git] / typo3 / show_rechis.php
1 <?php
2 /***************************************************************
3 * Copyright notice
4 *
5 * (c) 1999-2008 Kasper Skaarhoj (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 * Shows information about a database or file item
29 *
30 * $Id$
31 * Revised for TYPO3 3.6 November/2003 by Kasper Skaarhoj
32 * XHTML Compliant
33 *
34 * @author Kasper Skaarhoj <kasperYYYY@typo3.com>
35 */
36 /**
37 * [CLASS/FUNCTION INDEX of SCRIPT]
38 *
39 *
40 *
41 * 76: class SC_show_rechis
42 * 87: function init()
43 * 105: function main()
44 * 131: function printContent()
45 *
46 * TOTAL FUNCTIONS: 3
47 * (This index is automatically created/updated by the extension "extdeveval")
48 *
49 */
50
51
52 $BACK_PATH='';
53 require ($BACK_PATH.'init.php');
54 require ($BACK_PATH.'template.php');
55 require_once (PATH_t3lib.'class.t3lib_diff.php');
56 require_once (PATH_t3lib.'class.t3lib_tcemain.php');
57 $LANG->includeLLFile('EXT:lang/locallang_show_rechis.xml');
58 require_once ('class.show_rechis.inc');
59
60
61
62
63
64
65
66
67
68 /**
69 * Script Class for showing the history module of TYPO3s backend
70 *
71 * @author Kasper Skaarhoj <kasperYYYY@typo3.com>
72 * @package TYPO3
73 * @subpackage core
74 * @see class.show_rechis.inc
75 */
76 class SC_show_rechis {
77
78 // Internal:
79 var $content;
80
81 /**
82 * Document template object
83 *
84 * @var mediumDoc
85 */
86 var $doc;
87
88 /**
89 * Initialize the module output
90 *
91 * @return void
92 */
93 function init() {
94 global $LANG;
95
96 // Create internal template object:
97 $this->doc = t3lib_div::makeInstance('template');
98 $this->doc->backPath = $GLOBALS['BACK_PATH'];
99 $this->doc->docType = 'xhtml_trans';
100 $this->doc->setModuleTemplate('templates/show_rechis.html');
101
102 // Start the page header:
103 $this->content.=$this->doc->header($LANG->getLL('title'));
104 $this->content.=$this->doc->spacer(5);
105 }
106
107 /**
108 * Generate module output
109 *
110 * @return void
111 */
112 function main() {
113 global $LANG;
114
115 // Start history object
116 $historyObj = t3lib_div::makeInstance('recordHistory');
117
118 // Get content:
119 $this->content .= $historyObj->main();
120
121 // Setting up the buttons and markers for docheader
122 $docHeaderButtons = $this->getButtons();
123 $markers['CONTENT'] = $this->content;
124 $markers['CSH'] = $docHeaderButtons['csh'];
125
126 // Build the <body> for the module
127 $this->content = $this->doc->startPage($LANG->getLL('title'));
128 $this->content.= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
129 }
130
131 /**
132 * Outputting the accumulated content to screen
133 *
134 * @return void
135 */
136 function printContent() {
137 $this->content.=$this->doc->spacer(8);
138 $this->content.= $this->doc->endPage();
139 $this->content = $this->doc->insertStylesAndJS($this->content);
140 echo $this->content;
141 }
142
143 /**
144 * Create the panel of buttons for submitting the form or otherwise perform operations.
145 *
146 * @return array all available buttons as an assoc. array
147 */
148 protected function getButtons() {
149 $buttons = array(
150 'csh' => '',
151 'back' => ''
152 );
153
154 // CSH
155 $buttons['csh'] = t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'history_log', $GLOBALS['BACK_PATH'], '');
156
157 // Start history object
158 $historyObj = t3lib_div::makeInstance('recordHistory');
159
160 if ($historyObj->returnUrl) {
161 $buttons['back']= '<a href="' . htmlspecialchars($historyObj->returnUrl) . '" class="typo3-goBack"><img' . t3lib_iconWorks::skinImg('', 'gfx/goback.gif') . ' alt="" title="' . $GLOBALS['LANG']->getLL('returnLink', 1) . '" /></a>';
162 }
163
164 return $buttons;
165 }
166 }
167
168 // Include extension?
169 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/show_rechis.php']) {
170 include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/show_rechis.php']);
171 }
172
173
174
175
176
177
178
179
180
181
182
183
184 // Make instance:
185 $SOBE = t3lib_div::makeInstance('SC_show_rechis');
186 $SOBE->init();
187 $SOBE->main();
188 $SOBE->printContent();
189 ?>