Fixed bug #13775: Missing <tr> in "Admin Tools -> User Admin" (thanks to Stephan...
[Packages/TYPO3.CMS.git] / typo3 / file_list.php
index 1856a96..04c427f 100644 (file)
@@ -55,11 +55,6 @@ require ('init.php');
 require ('template.php');
 $LANG->includeLLFile('EXT:lang/locallang_mod_file_list.xml');
 $LANG->includeLLFile('EXT:lang/locallang_misc.xml');
-require_once (PATH_t3lib.'class.t3lib_basicfilefunc.php');
-require_once (PATH_t3lib.'class.t3lib_extfilefunc.php');
-require_once (PATH_t3lib.'class.t3lib_recordlist.php');
-require_once (PATH_t3lib.'class.t3lib_clipboard.php');
-require_once (PATH_t3lib.'class.t3lib_parsehtml.php');
 require_once ('class.file_list.inc');
 $BE_USER->modAccess($MCONF,1);
 
@@ -150,7 +145,8 @@ class SC_file_list {
                        'sort' => '',
                        'reverse' => '',
                        'displayThumbs' => '',
-                       'clipBoard' => ''
+                       'clipBoard' => '',
+                       'bigControlPanel' => ''
                );
 
                        // CLEANSE SETTINGS
@@ -169,7 +165,7 @@ class SC_file_list {
                $this->doc = t3lib_div::makeInstance('template');
                $this->doc->backPath = $BACK_PATH;
                $this->doc->setModuleTemplate('templates/file_list.html');
-               $this->doc->loadPrototype();
+               $this->doc->getPageRenderer()->loadPrototype();
 
                        // Validating the input "id" (the path, directory!) and checking it against the mounts of the user.
                $this->id = $this->basicFF->is_directory($this->id);
@@ -241,7 +237,12 @@ class SC_file_list {
                                // Create filelisting object
                        $this->filelist = t3lib_div::makeInstance('fileList');
                        $this->filelist->backPath = $BACK_PATH;
-                       $this->filelist->thumbs = $this->MOD_SETTINGS['displayThumbs']?1:$BE_USER->uc['thumbnailsByDefault'];
+
+                               // if user never opened the list module, set the value for displayThumbs
+                       if (!isset($this->MOD_SETTINGS['displayThumbs'])) {
+                               $this->MOD_SETTINGS['displayThumbs'] = $BE_USER->uc['thumbnailsByDefault'];
+                       }
+                       $this->filelist->thumbs = $this->MOD_SETTINGS['displayThumbs'];
 
                                // Create clipboard object and initialize that
                        $this->filelist->clipObj = t3lib_div::makeInstance('t3lib_clipboard');
@@ -286,7 +287,7 @@ class SC_file_list {
 
                                // Start up filelisting object, include settings.
                        $this->pointer = t3lib_div::intInRange($this->pointer,0,100000);
-                       $this->filelist->start($this->id,$this->pointer,$this->MOD_SETTINGS['sort'],$this->MOD_SETTINGS['reverse'],$this->MOD_SETTINGS['clipBoard']);
+                       $this->filelist->start($this->id, $this->pointer, $this->MOD_SETTINGS['sort'], $this->MOD_SETTINGS['reverse'], $this->MOD_SETTINGS['clipBoard'], $this->MOD_SETTINGS['bigControlPanel']);
 
                                // Generate the list
                        $this->filelist->generateList();
@@ -336,6 +337,9 @@ class SC_file_list {
                                        <div id="typo3-listOptions">
                                ';
 
+                                       // Add "display bigControlPanel" checkbox:
+                               $pageContent.=t3lib_BEfunc::getFuncCheck($this->id, 'SET[bigControlPanel]', $this->MOD_SETTINGS['bigControlPanel'], 'file_list.php', '', 'id="bigControlPanel"') . '<label for="bigControlPanel"> ' .$LANG->getLL('bigControlPanel', 1) . '</label><br />';
+
                                        // Add "display thumbnails" checkbox:
                                $pageContent.=t3lib_BEfunc::getFuncCheck($this->id,'SET[displayThumbs]',$this->MOD_SETTINGS['displayThumbs'],'file_list.php','','id="checkDisplayThumbs"').' <label for="checkDisplayThumbs">'.$LANG->getLL('displayThumbs',1).'</label><br />';