[TASK] Move modAccess and language include in EXT:filelist 04/28304/3
authorWouter Wolters <typo3@wouterwolters.nl>
Wed, 12 Mar 2014 16:59:46 +0000 (17:59 +0100)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Thu, 13 Mar 2014 18:50:54 +0000 (19:50 +0100)
* Remove deprecated require_once call

Resolves: #56827
Releases: 6.2
Change-Id: Iae4b666f7bb3ff81194ea6a6ff51b84fd9a1112c
Reviewed-on: https://review.typo3.org/28304
Reviewed-by: Benjamin Mack
Tested-by: Benjamin Mack
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
typo3/sysext/filelist/Classes/Controller/FileListController.php
typo3/sysext/filelist/ext_tables.php
typo3/sysext/filelist/mod1/index.php

index 2d83d5e..adf1937 100644 (file)
@@ -125,6 +125,15 @@ class FileListController {
        public $filelist = NULL;
 
        /**
+        * Constructor
+        */
+       public function __construct() {
+               $GLOBALS['LANG']->includeLLFile('EXT:lang/locallang_mod_file_list.xlf');
+               $GLOBALS['LANG']->includeLLFile('EXT:lang/locallang_misc.xlf');
+               $GLOBALS['BE_USER']->modAccess($GLOBALS['MCONF'], TRUE);
+       }
+
+       /**
         * Initialize variables, file object
         * Incoming GET vars include id, pointer, table, imagemode
         *
index bfa1eda..f889467 100644 (file)
@@ -3,5 +3,10 @@ if (!defined('TYPO3_MODE')) {
        die('Access denied.');
 }
 if (TYPO3_MODE === 'BE') {
-       \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule('file', 'list', '', \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'mod1/');
+       \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule(
+               'file',
+               'list',
+               '',
+               \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'mod1/'
+       );
 }
index c0678a1..9654cf4 100644 (file)
  *
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
+
 /**
  * Web>File: File listing
- *
- * @author Kasper Skårhøj <kasperYYYY@typo3.com>
- */
-$LANG->includeLLFile('EXT:lang/locallang_mod_file_list.xlf');
-$LANG->includeLLFile('EXT:lang/locallang_misc.xlf');
-$BE_USER->modAccess($MCONF, 1);
-/*
- * @deprecated since 6.0, the classname SC_file_list and this file is obsolete
- * and will be removed with 6.2. The class was renamed and is now located at:
- * typo3/sysext/filelist/Classes/Controller/FileListController.php
  */
-require_once \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('filelist') . 'Classes/Controller/FileListController.php';
-// Make instance:
+
 $SOBE = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Filelist\\Controller\\FileListController');
 $SOBE->init();
 $SOBE->main();