committed #8507 - added alt to img tags and changed reference to locallang file to...
[Packages/TYPO3.CMS.git] / typo3 / file_list.php
old mode 100755 (executable)
new mode 100644 (file)
index 2489a22..c0fccda
@@ -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
@@ -168,7 +168,6 @@ class SC_file_list {
                $this->doc = t3lib_div::makeInstance('template');
                $this->doc->backPath = $BACK_PATH;
                $this->doc->setModuleTemplate('templates/file_list.html');
-               $this->doc->docType = 'xhtml_trans';
 
                        // Validating the input "id" (the path, directory!) and checking it against the mounts of the user.
                $this->id = $this->basicFF->is_directory($this->id);
@@ -208,7 +207,7 @@ class SC_file_list {
                                                // Init file processing object for deleting and pass the cmd array.
                                        $fileProcessor = t3lib_div::makeInstance('t3lib_extFileFunctions');
                                        $fileProcessor->init($FILEMOUNTS, $TYPO3_CONF_VARS['BE']['fileExtensions']);
-                                       $fileProcessor->init_actionPerms($BE_USER->user['fileoper_perms']);
+                                       $fileProcessor->init_actionPerms($GLOBALS['BE_USER']->getFileoperationPermissions());
                                        $fileProcessor->dontCheckForUnique = $this->overwriteExistingFiles ? 1 : 0;
                                        $fileProcessor->start($FILE);
                                        $fileProcessor->processData();
@@ -256,11 +255,10 @@ class SC_file_list {
                        $docHeaderButtons = array_merge($this->getButtons(), $buttons);
 
                                // Build the <body> for the module
-                       $this->content = $this->doc->startPage('Template Tools');
+                       $this->content = $this->doc->startPage($LANG->getLL('files'));
 
                                // Create output
                        $pageContent='';
-                       $pageContent.=$this->doc->startPage($LANG->getLL('files'));
                        $pageContent.= '<form action="'.htmlspecialchars($this->filelist->listURL()).'" method="post" name="dblistForm">';
                        $pageContent.= $this->filelist->HTMLcode;
                        $pageContent.= '<input type="hidden" name="cmd" /></form>';
@@ -345,44 +343,31 @@ class SC_file_list {
                }
 
                        // FileList Module CSH:
-               $buttons['csh'] = t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'filelist_module', $GLOBALS['BACK_PATH']);
+               $buttons['csh'] = t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'filelist_module', $GLOBALS['BACK_PATH'], '', TRUE);
 
                        // upload button
-               $theIcon = '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/upload.gif','width="18" height="16"').' title="'.$GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:cm.upload',1)).'" alt="" />';
-               $buttons['upload'] = '<a href="'.$BACK_PATH.'file_upload.php?target='.htmlspecialchars($this->id).'&returnUrl='.htmlspecialchars($this->filelist->listURL()).'">'.$theIcon.'</a>';
+               $theIcon = '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/upload.gif','width="18" height="16"').' title="'.$GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:cm.upload',1)).'" alt="'.$GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:cm.upload',1)).'" />';
+               $buttons['upload'] = '<a href="' . $BACK_PATH . 'file_upload.php?target=' . rawurlencode($this->id) . '&amp;returnUrl=' . rawurlencode($this->filelist->listURL()) . '">' . $theIcon . '</a>';
 
-               $theIcon = '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/new_file.gif','width="18" height="16"').' title="'.$GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:cm.new',1)).'" alt="" />';
-               $buttons['new'] = '<a href="'.$BACK_PATH.'file_newfolder.php?target='.htmlspecialchars($this->id).'&returnUrl='.htmlspecialchars($this->filelist->listURL()).'">'.$theIcon.'</a>';
+               $theIcon = '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/new_file.gif','width="18" height="16"').' title="'.$GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:cm.new',1)).'" alt="'.$GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:cm.new',1)).'" />';
+               $buttons['new'] = '<a href="' . $BACK_PATH . 'file_newfolder.php?target=' . rawurlencode($this->id) . '&amp;returnUrl=' . rawurlencode($this->filelist->listURL()) . '">' . $theIcon . '</a>';
 
                return $buttons;
        }
 
 }
 
-// Include extension?
+
 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/file_list.php'])    {
        include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/file_list.php']);
 }
 
 
 
-
-
-
-
-
-
-
-
-
 // Make instance:
 $SOBE = t3lib_div::makeInstance('SC_file_list');
 $SOBE->init();
 $SOBE->main();
 $SOBE->printContent();
 
-
-if ($TYPO3_CONF_VARS['BE']['compressionLevel'])        {
-       new gzip_encode($TYPO3_CONF_VARS['BE']['compressionLevel']);
-}
 ?>