[BUGFIX] Add label for title of "Edit metadata" link
[Packages/TYPO3.CMS.git] / typo3 / show_rechis.php
old mode 100755 (executable)
new mode 100644 (file)
index 198f8e3..23d4dc6
 <?php
-/***************************************************************
-*  Copyright notice
-*  
-*  (c) 1999-2003 Kasper Skårhøj (kasper@typo3.com)
-*  All rights reserved
-*
-*  This script is part of the TYPO3 project. The TYPO3 project is 
-*  free software; you can redistribute it and/or modify
-*  it under the terms of the GNU General Public License as published by
-*  the Free Software Foundation; either version 2 of the License, or
-*  (at your option) any later version.
-* 
-*  The GNU General Public License can be found at
-*  http://www.gnu.org/copyleft/gpl.html.
-*  A copy is found in the textfile GPL.txt and important notices to the license 
-*  from the author is found in LICENSE.txt distributed with these scripts.
-*
-* 
-*  This script is distributed in the hope that it will be useful,
-*  but WITHOUT ANY WARRANTY; without even the implied warranty of
-*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-*  GNU General Public License for more details.
-*
-*  This copyright notice MUST APPEAR in all copies of the script!
-***************************************************************/
-/** 
- * Shows information about a database or file item
+/**
+ * This file is part of the TYPO3 CMS project.
  *
- * HTTP_GET_VARS:
- * $table      :               Record table (or filename)
- * $uid        :               Record uid  (or "" when filename)
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
  *
- * @author     Kasper Skårhøj <kasper@typo3.com>
- * @package TYPO3
- * @subpackage core
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
  *
+ * The TYPO3 project - inspiring people to share!
  */
 
-$BACK_PATH="";
-require ($BACK_PATH."init.php");
-require ($BACK_PATH."template.php");
-require_once (PATH_t3lib."class.t3lib_diff.php");
-require_once (PATH_t3lib."class.t3lib_tcemain.php");
-require ("sysext/lang/locallang_show_rechis.php");
-require ("class.show_rechis.inc");
-
-
-// ***************************
-// Script Classes
-// ***************************
-class SC_show_rechis {
-       var $content;
-       var $doc;       
-       
-       function init() {
-               global $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$HTTP_GET_VARS,$HTTP_POST_VARS,$CLIENT,$TYPO3_CONF_VARS;
-
-               $this->doc = t3lib_div::makeInstance("mediumDoc");
-               
-               $this->content.=$this->doc->startPage($LANG->getLL("title"));
-               $this->content.=$this->doc->header($LANG->getLL("title"));
-               $this->content.=$this->doc->spacer(5);
-       }
-       function main() {
-               global $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$HTTP_GET_VARS,$HTTP_POST_VARS,$CLIENT,$TYPO3_CONF_VARS;
-
-               $historyObj = t3lib_div::makeInstance("recordHistory");
-               
-               // **********************************************************
-               // If link from sys log:
-               // sh_uid is the id-number of the sys_history log item
-               // **********************************************************
-               if (t3lib_div::GPvar("sh_uid")) {
-                       $this->content.=$historyObj->displaySysHistoryEntry(t3lib_div::GPvar("sh_uid"));
-               }
-               
-               // **********************************************************
-               // If link to element:
-               // **********************************************************
-               if (t3lib_div::GPvar("element"))        {
-                       if (t3lib_div::GPvar("revert") && t3lib_div::GPvar("sumUp"))    {
-                               $this->content.=$historyObj->revertToPreviousValues(t3lib_div::GPvar("element"),t3lib_div::GPvar("revert"));
-                       }
-                       if (t3lib_div::GPvar("saveState"))      {
-                               $this->content.=$historyObj->saveState(t3lib_div::GPvar("element"),t3lib_div::GPvar("saveState"));
-                       }
-                       $this->content.=$historyObj->displayHistory(t3lib_div::GPvar("element"));
-               }
-               
-               // **********************************************************
-               // Return link:
-               // **********************************************************
-               $this->content.=t3lib_div::GPvar("returnUrl") ? $this->doc->section($LANG->getLL("return"),'<a href="'.t3lib_div::GPvar("returnUrl").'" class="typo3-goBack"><img src="gfx/goback.gif" width="14" height="14" hspace="2" border="0" align="top" alt=""><strong>'.$LANG->getLL("returnLink").'</strong></a>',0,1) : "";
-       }
-       function printContent() {
-               global $SOBE;
-
-               $this->content.=$this->doc->spacer(8);
-               $this->content.=$this->doc->middle();
-               $this->content.=$this->doc->endPage();
-               echo $this->content;
-       }
-       
-       // ***************************
-       // OTHER FUNCTIONS:     
-       // ***************************
-}
-
-// Include extension?
-if (defined("TYPO3_MODE") && $TYPO3_CONF_VARS[TYPO3_MODE]["XCLASS"]["typo3/show_rechis.php"])  {
-       include_once($TYPO3_CONF_VARS[TYPO3_MODE]["XCLASS"]["typo3/show_rechis.php"]);
-}
-
-
-
-
-
-
-
-
-
-
+/**
+ * Shows information about a database or file item
+ *
+ * @author     Kasper Skårhøj <kasperYYYY@typo3.com>
+ */
+require __DIR__ . '/init.php';
 
+\TYPO3\CMS\Core\Utility\GeneralUtility::deprecationLog('The history of a record was moved to a separate module. Please use BackendUtility::getModuleUrl() to link to this script. This script will be removed two versions after 6.2.');
 
-// Make instance:
-$SOBE = t3lib_div::makeInstance("SC_show_rechis");
-$SOBE->init();
-$SOBE->main();
-$SOBE->printContent();
-?>
\ No newline at end of file
+$elementHistoryController = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Controller\\ContentElement\\ElementHistoryController');
+$elementHistoryController->main();
+$elementHistoryController->printContent();