Fixed bug #14021: Simplify the code to get nested GET Parameters with TS
[Packages/TYPO3.CMS.git] / typo3 / show_item.php
old mode 100755 (executable)
new mode 100644 (file)
index 466e413..7bf8af1
@@ -2,7 +2,7 @@
 /***************************************************************
 *  Copyright notice
 *
-*  (c) 1999-2008 Kasper Skaarhoj (kasperYYYY@typo3.com)
+*  (c) 1999-2009 Kasper Skaarhoj (kasperYYYY@typo3.com)
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is
@@ -59,9 +59,6 @@
 $BACK_PATH = '';
 require($BACK_PATH.'init.php');
 require($BACK_PATH.'template.php');
-require_once(PATH_t3lib.'class.t3lib_page.php');
-require_once(PATH_t3lib.'class.t3lib_loaddbgroup.php');
-require_once(PATH_t3lib.'class.t3lib_transferdata.php');
 
 
 
@@ -196,7 +193,7 @@ class SC_show_item {
                } else  {
                        // if the filereference $this->file is relative, we correct the path
                        if (substr($this->table,0,3)=='../')    {
-                               $this->file = PATH_site.ereg_replace('^\.\./','',$this->table);
+                               $this->file = PATH_site.preg_replace('/^\.\.\//','',$this->table);
                        } else {
                                $this->file = $this->table;
                        }
@@ -209,7 +206,6 @@ class SC_show_item {
                        // Initialize document template object:
                $this->doc = t3lib_div::makeInstance('smallDoc');
                $this->doc->backPath = $BACK_PATH;
-               $this->doc->docType = 'xhtml_trans';
 
                        // Starting the page by creating page header stuff:
                $this->content.=$this->doc->startPage($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:show_item.php.viewItem'));
@@ -311,10 +307,10 @@ class SC_show_item {
                $this->content.= $this->doc->section('', $code);
 
                        // References:
-               $this->content.= $this->doc->section('References to this item:',$this->makeRef($this->table,$this->row['uid']));
+               $this->content.= $this->doc->section($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:show_item.php.referencesToThisItem'),$this->makeRef($this->table,$this->row['uid']));
 
                        // References:
-               $this->content.= $this->doc->section('References from this item:',$this->makeRefFrom($this->table,$this->row['uid']));
+               $this->content.= $this->doc->section($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:show_item.php.referencesFromThisItem'),$this->makeRefFrom($this->table,$this->row['uid']));
        }
 
        /**
@@ -326,7 +322,6 @@ class SC_show_item {
        function renderFileInfo($returnLinkTag) {
 
                        // Initialize object to work on the image:
-               require_once(PATH_t3lib.'class.t3lib_stdgraphic.php');
                $imgObj = t3lib_div::makeInstance('t3lib_stdGraphic');
                $imgObj->init();
                $imgObj->mayScaleUp = 0;
@@ -420,7 +415,7 @@ class SC_show_item {
                                        $this->content.= $this->doc->section('',$code);
                                }
                        } elseif ($GLOBALS['TYPO3_CONF_VARS']['BE']['disable_exec_function']) {
-                               $this->content.= $this->doc->section('','Sorry, TYPO3_CONF_VARS[BE][disable_exec_function] was set, so cannot display content of archive file.');
+                               $this->content.= $this->doc->section('',$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:show_item.php.cannotDisplayArchive'));
                        }
 
                                // Font files:
@@ -438,7 +433,7 @@ class SC_show_item {
 
 
                        // References:
-               $this->content.= $this->doc->section('References to this item:',$this->makeRef('_FILE',$this->file));
+               $this->content.= $this->doc->section($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:show_item.php.referencesToThisItem'),$this->makeRef('_FILE',$this->file));
        }
 
        /**
@@ -535,13 +530,13 @@ class SC_show_item {
                $infoData = array();
                if (count($rows))       {
                        $infoData[] = '<tr class="bgColor5 tableheader">' .
-                                       '<td>Field:</td>'.
-                                       '<td>Flexpointer:</td>'.
-                                       '<td>Softref Key:</td>'.
-                                       '<td>Sorting:</td>'.
-                                       '<td>Ref Table:</td>' .
-                                       '<td>Ref Uid:</td>' .
-                                       '<td>Ref String:</td>' .
+                                       '<td>'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:show_item.php.field').'</td>'.
+                                       '<td>'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:show_item.php.flexpointer').'</td>'.
+                                       '<td>'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:show_item.php.softrefKey').'</td>'.
+                                       '<td>'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:show_item.php.sorting').'</td>'.
+                                       '<td>'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:show_item.php.refTable').'</td>' .
+                                       '<td>'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:show_item.php.refUid').'</td>' .
+                                       '<td>'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:show_item.php.refString').'</td>' .
                                        '</tr>';
                }
                foreach($rows as $row)  {
@@ -560,25 +555,17 @@ class SC_show_item {
        }
 }
 
-// Include extension?
+
 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/show_item.php'])    {
        include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/show_item.php']);
 }
 
 
 
-
-
-
-
-
-
-
-
-
 // Make instance:
 $SOBE = t3lib_div::makeInstance('SC_show_item');
 $SOBE->init();
 $SOBE->main();
 $SOBE->printContent();
+
 ?>
\ No newline at end of file