[TASK] Cleanup ext:recordlist 88/21788/2
authorWouter Wolters <typo3@wouterwolters.nl>
Tue, 2 Jul 2013 10:03:28 +0000 (12:03 +0200)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Tue, 2 Jul 2013 11:37:24 +0000 (13:37 +0200)
* Remove ext_autoload.php
* Refactor ext_tables.php
* Move code from mod1/index.php to Classes/RecordList.php

Change-Id: I251ff7631042487aa8d85c1b2483be8db1fb9992
Resolves: #49578
Releases: 6.2
Reviewed-on: https://review.typo3.org/21788
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
typo3/sysext/recordlist/Classes/RecordList.php
typo3/sysext/recordlist/ext_autoload.php [deleted file]
typo3/sysext/recordlist/ext_tables.php
typo3/sysext/recordlist/mod1/index.php

index fad6eae..d763f75 100644 (file)
@@ -161,6 +161,14 @@ class RecordList {
        public $content;
 
        /**
+        * Constructor
+        */
+       public function __construct() {
+               $GLOBALS['LANG']->includeLLFile('EXT:lang/locallang_mod_web_list.xlf');
+               $GLOBALS['BE_USER']->modAccess($GLOBALS['MCONF'], 1);
+       }
+
+       /**
         * Initializing the module
         *
         * @return void
diff --git a/typo3/sysext/recordlist/ext_autoload.php b/typo3/sysext/recordlist/ext_autoload.php
deleted file mode 100644 (file)
index abd2b1a..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-<?php
-// DO NOT CHANGE THIS FILE! It is automatically generated by extdeveval::buildAutoloadRegistry.
-// This file was generated on 2009-10-26 22:04
-$extensionPath = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('recordlist');
-return array(
-       'sc_db_list' => $extensionPath . 'mod1/index.php'
-);
-?>
\ No newline at end of file
index c21e0ec..96a3978 100644 (file)
@@ -3,7 +3,15 @@ if (!defined('TYPO3_MODE')) {
        die('Access denied.');
 }
 if (TYPO3_MODE === 'BE') {
-       \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModulePath('web_list', \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'mod1/');
-       \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule('web', 'list', '', \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'mod1/');
+       \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModulePath(
+               'web_list',
+               \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'mod1/'
+       );
+       \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule(
+               'web',
+               'list',
+               '',
+               \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'mod1/'
+       );
 }
 ?>
\ No newline at end of file
index be70e41..80da09b 100644 (file)
@@ -24,6 +24,7 @@
  *
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
+
 /**
  * Module: Web>List
  *
  * are NOT located in their actual module directories (fx. mod/web/list/) but in the
  * backend root directory. This has some historical and practical causes.
  *
- * Revised for TYPO3 3.6 November/2003 by Kasper Skårhøj
- * XHTML compliant
- *
  * @author Kasper Skårhøj <kasperYYYY@typo3.com>
  */
-$LANG->includeLLFile('EXT:lang/locallang_mod_web_list.xlf');
-$BE_USER->modAccess($MCONF, 1);
 \TYPO3\CMS\Backend\Utility\BackendUtility::lockRecords();
-/*
- * @deprecated since 6.0, the classname SC_db_list and this file is obsolete
- * and will be removed with 6.2. The class was renamed and is now located at:
- * typo3/sysext/recordlist/Classes/RecordList.php
- */
-require_once \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('recordlist') . 'Classes/RecordList.php';
-// Make instance:
+
 $SOBE = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Recordlist\\RecordList');
 $SOBE->init();
 // Include files?