Added the media field for page type "Shortcut" as well
[Packages/TYPO3.CMS.git] / typo3 / show_rechis.php
index fb40be0..408febe 100755 (executable)
@@ -2,7 +2,7 @@
 /***************************************************************
 *  Copyright notice
 *
-*  (c) 1999-2004 Kasper Skaarhoj (kasper@typo3.com)
+*  (c) 1999-2005 Kasper Skaarhoj (kasperYYYY@typo3.com)
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is
@@ -31,7 +31,7 @@
  * Revised for TYPO3 3.6 November/2003 by Kasper Skaarhoj
  * XHTML Compliant
  *
- * @author     Kasper Skaarhoj <kasper@typo3.com>
+ * @author     Kasper Skaarhoj <kasperYYYY@typo3.com>
  */
 /**
  * [CLASS/FUNCTION INDEX of SCRIPT]
@@ -41,7 +41,7 @@
  *   76: class SC_show_rechis
  *   87:     function init()
  *  105:     function main()
- *  126:     function printContent()
+ *  131:     function printContent()
  *
  * TOTAL FUNCTIONS: 3
  * (This index is automatically created/updated by the extension "extdeveval")
@@ -55,7 +55,7 @@ require ($BACK_PATH.'template.php');
 require_once (PATH_t3lib.'class.t3lib_diff.php');
 require_once (PATH_t3lib.'class.t3lib_tcemain.php');
 $LANG->includeLLFile('EXT:lang/locallang_show_rechis.xml');
-require ('class.show_rechis.inc');
+require_once ('class.show_rechis.inc');
 
 
 
@@ -68,7 +68,7 @@ require ('class.show_rechis.inc');
 /**
  * Script Class for showing the history module of TYPO3s backend
  *
- * @author     Kasper Skaarhoj <kasper@typo3.com>
+ * @author     Kasper Skaarhoj <kasperYYYY@typo3.com>
  * @package TYPO3
  * @subpackage core
  * @see class.show_rechis.inc
@@ -77,6 +77,12 @@ class SC_show_rechis {
 
                // Internal:
        var $content;
+
+       /**
+        * Document template object
+        *
+        * @var mediumDoc
+        */
        var $doc;
 
        /**
@@ -108,13 +114,18 @@ class SC_show_rechis {
                        // Start history object
                $historyObj = t3lib_div::makeInstance('recordHistory');
 
+                       // Return link:
+               if ($historyObj->returnUrl)     {
+                       $this->content .= '<a href="'.htmlspecialchars($historyObj->returnUrl).'" class="typo3-goBack"><img'.t3lib_iconWorks::skinImg('','gfx/goback.gif','width="14" height="14"').' alt="" />'.$LANG->getLL('returnLink',1).'</a>';
+               }
+
                        // Get content:
-               $this->content.= $historyObj->main();
+               $this->content .= $historyObj->main();
 
                        // Return link:
                if ($historyObj->returnUrl)     {
                        $link = '<a href="'.htmlspecialchars($historyObj->returnUrl).'" class="typo3-goBack"><img'.t3lib_iconWorks::skinImg('','gfx/goback.gif','width="14" height="14"').' alt="" />'.$LANG->getLL('returnLink',1).'</a>';
-                       $this->content.= $this->doc->section($LANG->getLL('return'),$link,0,1);
+                       $this->content .= $this->doc->section($LANG->getLL('return'),$link,0,1);
                }
        }
 
@@ -125,7 +136,8 @@ class SC_show_rechis {
         */
        function printContent() {
                $this->content.=$this->doc->spacer(8);
-               $this->content.=$this->doc->endPage();
+               $this->content.= $this->doc->endPage();
+               $this->content = $this->doc->insertStylesAndJS($this->content);
                echo $this->content;
        }
 }