Follow-up to #12381: Scheduler: BLOB database fields may not be NOT NULL
[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 $LANG->includeLLFile('EXT:lang/locallang_show_rechis.xml');
56 require_once ('class.show_rechis.inc');
57
58
59
60
61
62
63
64
65
66 /**
67 * Script Class for showing the history module of TYPO3s backend
68 *
69 * @author Kasper Skaarhoj <kasperYYYY@typo3.com>
70 * @package TYPO3
71 * @subpackage core
72 * @see class.show_rechis.inc
73 */
74 class SC_show_rechis {
75
76 // Internal:
77 var $content;
78
79 /**
80 * Document template object
81 *
82 * @var mediumDoc
83 */
84 var $doc;
85
86 /**
87 * Initialize the module output
88 *
89 * @return void
90 */
91 function init() {
92 global $LANG;
93
94 // Create internal template object:
95 $this->doc = t3lib_div::makeInstance('template');
96 $this->doc->backPath = $GLOBALS['BACK_PATH'];
97 $this->doc->setModuleTemplate('templates/show_rechis.html');
98
99 // Start the page header:
100 $this->content.=$this->doc->header($LANG->getLL('title'));
101 $this->content.=$this->doc->spacer(5);
102 }
103
104 /**
105 * Generate module output
106 *
107 * @return void
108 */
109 function main() {
110 global $LANG;
111
112 // Start history object
113 $historyObj = t3lib_div::makeInstance('recordHistory');
114
115 // Get content:
116 $this->content .= $historyObj->main();
117
118 // Setting up the buttons and markers for docheader
119 $docHeaderButtons = $this->getButtons();
120 $markers['CONTENT'] = $this->content;
121 $markers['CSH'] = $docHeaderButtons['csh'];
122
123 // Build the <body> for the module
124 $this->content = $this->doc->startPage($LANG->getLL('title'));
125 $this->content.= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
126 }
127
128 /**
129 * Outputting the accumulated content to screen
130 *
131 * @return void
132 */
133 function printContent() {
134 $this->content.=$this->doc->spacer(8);
135 $this->content.= $this->doc->endPage();
136 $this->content = $this->doc->insertStylesAndJS($this->content);
137 echo $this->content;
138 }
139
140 /**
141 * Create the panel of buttons for submitting the form or otherwise perform operations.
142 *
143 * @return array all available buttons as an assoc. array
144 */
145 protected function getButtons() {
146 $buttons = array(
147 'csh' => '',
148 'back' => ''
149 );
150
151 // CSH
152 $buttons['csh'] = t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'history_log', $GLOBALS['BACK_PATH'], '', TRUE);
153
154 // Start history object
155 $historyObj = t3lib_div::makeInstance('recordHistory');
156
157 if ($historyObj->returnUrl) {
158 $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>';
159 }
160
161 return $buttons;
162 }
163 }
164
165
166 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/show_rechis.php']) {
167 include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/show_rechis.php']);
168 }
169
170
171
172 // Make instance:
173 $SOBE = t3lib_div::makeInstance('SC_show_rechis');
174 $SOBE->init();
175 $SOBE->main();
176 $SOBE->printContent();
177
178 ?>