[TASK] Remove unsupported functionality related to workspaces
[Packages/TYPO3.CMS.git] / typo3 / show_rechis.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 * Shows information about a database or file item
29 *
30 * Revised for TYPO3 3.6 November/2003 by Kasper Skårhøj
31 * XHTML Compliant
32 *
33 * @author Kasper Skårhøj <kasperYYYY@typo3.com>
34 */
35
36
37 $BACK_PATH='';
38 require ($BACK_PATH.'init.php');
39 require ($BACK_PATH.'template.php');
40 $LANG->includeLLFile('EXT:lang/locallang_show_rechis.xml');
41 require_once ('class.show_rechis.inc');
42
43
44
45
46
47
48
49
50
51 /**
52 * Script Class for showing the history module of TYPO3s backend
53 *
54 * @author Kasper Skårhøj <kasperYYYY@typo3.com>
55 * @package TYPO3
56 * @subpackage core
57 * @see class.show_rechis.inc
58 */
59 class SC_show_rechis {
60
61 // Internal:
62 var $content;
63
64 /**
65 * Document template object
66 *
67 * @var mediumDoc
68 */
69 var $doc;
70
71 /**
72 * Initialize the module output
73 *
74 * @return void
75 */
76 function init() {
77
78 // Create internal template object:
79 $this->doc = t3lib_div::makeInstance('template');
80 $this->doc->backPath = $GLOBALS['BACK_PATH'];
81 $this->doc->setModuleTemplate('templates/show_rechis.html');
82
83 // Start the page header:
84 $this->content.=$this->doc->header($GLOBALS['LANG']->getLL('title'));
85 $this->content.=$this->doc->spacer(5);
86 }
87
88 /**
89 * Generate module output
90 *
91 * @return void
92 */
93 function main() {
94
95 // Start history object
96 $historyObj = t3lib_div::makeInstance('recordHistory');
97
98 // Get content:
99 $this->content .= $historyObj->main();
100
101 // Setting up the buttons and markers for docheader
102 $docHeaderButtons = $this->getButtons();
103 $markers['CONTENT'] = $this->content;
104 $markers['CSH'] = $docHeaderButtons['csh'];
105
106 // Build the <body> for the module
107 $this->content = $this->doc->startPage($GLOBALS['LANG']->getLL('title'));
108 $this->content.= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
109 }
110
111 /**
112 * Outputting the accumulated content to screen
113 *
114 * @return void
115 */
116 function printContent() {
117 $this->content.=$this->doc->spacer(8);
118 $this->content.= $this->doc->endPage();
119 $this->content = $this->doc->insertStylesAndJS($this->content);
120 echo $this->content;
121 }
122
123 /**
124 * Create the panel of buttons for submitting the form or otherwise perform operations.
125 *
126 * @return array all available buttons as an assoc. array
127 */
128 protected function getButtons() {
129 $buttons = array(
130 'csh' => '',
131 'back' => ''
132 );
133
134 // CSH
135 $buttons['csh'] = t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'history_log', $GLOBALS['BACK_PATH'], '', TRUE);
136
137 // Start history object
138 $historyObj = t3lib_div::makeInstance('recordHistory');
139
140 if ($historyObj->returnUrl) {
141 $buttons['back']= '<a href="' . htmlspecialchars($historyObj->returnUrl) . '" class="typo3-goBack">' . t3lib_iconWorks::getSpriteIcon('actions-view-go-back') . '</a>';
142 }
143
144 return $buttons;
145 }
146 }
147
148
149 if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/show_rechis.php'])) {
150 include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/show_rechis.php']);
151 }
152
153
154
155 // Make instance:
156 $SOBE = t3lib_div::makeInstance('SC_show_rechis');
157 $SOBE->init();
158 $SOBE->main();
159 $SOBE->printContent();
160
161 ?>