Follow up to #10320 (again): t3lib_extMgm::addStaticFile() call did not reflect chang...
[Packages/TYPO3.CMS.git] / typo3 / show_rechis.php
1 <?php
2 /***************************************************************
3 * Copyright notice
4 *
5 * (c) 1999-2009 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->setModuleTemplate('templates/show_rechis.html');
100
101 // Start the page header:
102 $this->content.=$this->doc->header($LANG->getLL('title'));
103 $this->content.=$this->doc->spacer(5);
104 }
105
106 /**
107 * Generate module output
108 *
109 * @return void
110 */
111 function main() {
112 global $LANG;
113
114 // Start history object
115 $historyObj = t3lib_div::makeInstance('recordHistory');
116
117 // Get content:
118 $this->content .= $historyObj->main();
119
120 // Setting up the buttons and markers for docheader
121 $docHeaderButtons = $this->getButtons();
122 $markers['CONTENT'] = $this->content;
123 $markers['CSH'] = $docHeaderButtons['csh'];
124
125 // Build the <body> for the module
126 $this->content = $this->doc->startPage($LANG->getLL('title'));
127 $this->content.= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
128 }
129
130 /**
131 * Outputting the accumulated content to screen
132 *
133 * @return void
134 */
135 function printContent() {
136 $this->content.=$this->doc->spacer(8);
137 $this->content.= $this->doc->endPage();
138 $this->content = $this->doc->insertStylesAndJS($this->content);
139 echo $this->content;
140 }
141
142 /**
143 * Create the panel of buttons for submitting the form or otherwise perform operations.
144 *
145 * @return array all available buttons as an assoc. array
146 */
147 protected function getButtons() {
148 $buttons = array(
149 'csh' => '',
150 'back' => ''
151 );
152
153 // CSH
154 $buttons['csh'] = t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'history_log', $GLOBALS['BACK_PATH'], '', TRUE);
155
156 // Start history object
157 $historyObj = t3lib_div::makeInstance('recordHistory');
158
159 if ($historyObj->returnUrl) {
160 $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>';
161 }
162
163 return $buttons;
164 }
165 }
166
167
168 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/show_rechis.php']) {
169 include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/show_rechis.php']);
170 }
171
172
173
174 // Make instance:
175 $SOBE = t3lib_div::makeInstance('SC_show_rechis');
176 $SOBE->init();
177 $SOBE->main();
178 $SOBE->printContent();
179
180 ?>