2 /***************************************************************
5 * (c) 1999-2011 Kasper Skårhøj (kasperYYYY@typo3.com)
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.
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.
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.
25 * This copyright notice MUST APPEAR in all copies of the script!
26 ***************************************************************/
28 * Shows information about a database or file item
30 * Revised for TYPO3 3.6 November/2003 by Kasper Skårhøj
33 * @author Kasper Skårhøj <kasperYYYY@typo3.com>
36 * [CLASS/FUNCTION INDEX of SCRIPT]
40 * 76: class SC_show_rechis
42 * 105: function main()
43 * 131: function printContent()
46 * (This index is automatically created/updated by the extension "extdeveval")
52 require ($BACK_PATH.'init.php');
53 require ($BACK_PATH.'template.php');
54 $LANG->includeLLFile('EXT:lang/locallang_show_rechis.xml');
55 require_once ('class.show_rechis.inc');
66 * Script Class for showing the history module of TYPO3s backend
68 * @author Kasper Skårhøj <kasperYYYY@typo3.com>
71 * @see class.show_rechis.inc
73 class SC_show_rechis
{
79 * Document template object
86 * Initialize the module output
92 // Create internal template object:
93 $this->doc
= t3lib_div
::makeInstance('template');
94 $this->doc
->backPath
= $GLOBALS['BACK_PATH'];
95 $this->doc
->setModuleTemplate('templates/show_rechis.html');
97 // Start the page header:
98 $this->content
.=$this->doc
->header($GLOBALS['LANG']->getLL('title'));
99 $this->content
.=$this->doc
->spacer(5);
103 * Generate module output
109 // Start history object
110 $historyObj = t3lib_div
::makeInstance('recordHistory');
113 $this->content
.= $historyObj->main();
115 // Setting up the buttons and markers for docheader
116 $docHeaderButtons = $this->getButtons();
117 $markers['CONTENT'] = $this->content
;
118 $markers['CSH'] = $docHeaderButtons['csh'];
120 // Build the <body> for the module
121 $this->content
= $this->doc
->startPage($GLOBALS['LANG']->getLL('title'));
122 $this->content
.= $this->doc
->moduleBody($this->pageinfo
, $docHeaderButtons, $markers);
126 * Outputting the accumulated content to screen
130 function printContent() {
131 $this->content
.=$this->doc
->spacer(8);
132 $this->content
.= $this->doc
->endPage();
133 $this->content
= $this->doc
->insertStylesAndJS($this->content
);
138 * Create the panel of buttons for submitting the form or otherwise perform operations.
140 * @return array all available buttons as an assoc. array
142 protected function getButtons() {
149 $buttons['csh'] = t3lib_BEfunc
::cshItem('xMOD_csh_corebe', 'history_log', $GLOBALS['BACK_PATH'], '', TRUE
);
151 // Start history object
152 $historyObj = t3lib_div
::makeInstance('recordHistory');
154 if ($historyObj->returnUrl
) {
155 $buttons['back']= '<a href="' . htmlspecialchars($historyObj->returnUrl
) . '" class="typo3-goBack">' . t3lib_iconWorks
::getSpriteIcon('actions-view-go-back') . '</a>';
163 if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE
]['XCLASS']['typo3/show_rechis.php'])) {
164 include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE
]['XCLASS']['typo3/show_rechis.php']);
170 $SOBE = t3lib_div
::makeInstance('SC_show_rechis');
173 $SOBE->printContent();