[TASK] Cleanup ext:lowlevel 74/21774/3
authorWouter Wolters <typo3@wouterwolters.nl>
Mon, 1 Jul 2013 16:29:28 +0000 (18:29 +0200)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Tue, 2 Jul 2013 11:33:58 +0000 (13:33 +0200)
* Fix path to commands in ext_localconf.php
* Remove require_once calls
* Move code from dbint/index.php to constructor
* Move code from config/index.php to constructor

Change-Id: I288834f66427c2a11836c87b973c92f9621c9c3f
Resolves: #49552
Releases: 6.2
Reviewed-on: https://review.typo3.org/21774
Reviewed-by: Alexander Opitz
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
typo3/sysext/lowlevel/Classes/View/ConfigurationView.php
typo3/sysext/lowlevel/Classes/View/DatabaseIntegrityView.php
typo3/sysext/lowlevel/config/index.php
typo3/sysext/lowlevel/dbint/index.php
typo3/sysext/lowlevel/doc/TODO.txt [deleted file]
typo3/sysext/lowlevel/ext_localconf.php
typo3/sysext/lowlevel/ext_tables.php

index 24ec0ef..f4e6234 100644 (file)
@@ -68,6 +68,14 @@ class ConfigurationView {
        public $content;
 
        /**
+        * Constructor
+        */
+       public function __construct() {
+               $GLOBALS['LANG']->includeLLFile('EXT:lowlevel/config/locallang.xml');
+               $GLOBALS['BE_USER']->modAccess($GLOBALS['MCONF'], 1);
+       }
+
+       /**
         * Initialization
         *
         * @return void
index 04c937a..1d6219a 100644 (file)
@@ -70,6 +70,14 @@ class DatabaseIntegrityView {
        protected $formName = 'queryform';
 
        /**
+        * Constructor
+        */
+       public function __construct() {
+               $GLOBALS['LANG']->includeLLFile('EXT:lowlevel/dbint/locallang.xml');
+               $GLOBALS['BE_USER']->modAccess($GLOBALS['MCONF'], 1);
+       }
+
+       /**
         * Initialization
         *
         * @return void
index 07a3b24..4a37523 100755 (executable)
@@ -24,6 +24,7 @@
  *
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
+
 /**
  * Module: Config
  *
  *
  * @author Kasper Skårhøj <kasperYYYY@typo3.com>
  */
-$GLOBALS['LANG']->includeLLFile('EXT:lowlevel/config/locallang.xml');
-$BE_USER->modAccess($MCONF, 1);
-/*
- * @deprecated since 6.0, the classname SC_mod_tools_config_index and this file is obsolete
- * and will be removed with 6.2. The class was renamed and is now located at:
- * typo3/sysext/lowlevel/Classes/View/ConfigurationView.php
- */
-require_once \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('lowlevel') . 'Classes/View/ConfigurationView.php';
-// Make instance:
+
 $SOBE = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Lowlevel\\View\\ConfigurationView');
 $SOBE->init();
 $SOBE->main();
index 4cf4c13..eac81c9 100755 (executable)
@@ -24,6 +24,7 @@
  *
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
+
 /**
  * Module: Database integrity check
  *
  * @author Kasper Skårhøj <kasperYYYY@typo3.com>
  * @coauthor Jo Hasenau <info@cybercraft.de>
  */
-$GLOBALS['LANG']->includeLLFile('EXT:lowlevel/dbint/locallang.xml');
-$BE_USER->modAccess($MCONF, 1);
-/*
- * @deprecated since 6.0, the classname SC_mod_tools_dbint_index and this file is obsolete
- * and will be removed with 6.2. The class was renamed and is now located at:
- * typo3/sysext/lowlevel/Classes/View/DatabaseIntegrityView.php
- */
-require_once \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('lowlevel') . 'Classes/View/DatabaseIntegrityView.php';
-// Make instance:
+
 $SOBE = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Lowlevel\\View\\DatabaseIntegrityView');
 $SOBE->init();
 $SOBE->main();
diff --git a/typo3/sysext/lowlevel/doc/TODO.txt b/typo3/sysext/lowlevel/doc/TODO.txt
deleted file mode 100755 (executable)
index 7c47d33..0000000
+++ /dev/null
@@ -1 +0,0 @@
-- BUG: in admin-class: selectNonEmptyRecordsWithFkeys fejler med count-værdi for MM-felter?
index 56c1d70..d08b54e 100644 (file)
@@ -2,20 +2,20 @@
 if (!defined('TYPO3_MODE')) {
        die('Access denied.');
 }
-if (TYPO3_MODE == 'BE') {
+if (TYPO3_MODE === 'BE') {
        // Setting up scripts that can be run from the cli_dispatch.phpsh script.
-       $TYPO3_CONF_VARS['SC_OPTIONS']['GLOBAL']['cliKeys']['lowlevel_refindex'] = array('EXT:lowlevel/dbint/cli/refindex_cli.php', '_CLI_lowlevel');
-       $TYPO3_CONF_VARS['SC_OPTIONS']['GLOBAL']['cliKeys']['lowlevel_cleaner'] = array('EXT:lowlevel/dbint/cli/cleaner_cli.php', '_CLI_lowlevel');
-       $TYPO3_CONF_VARS['SC_OPTIONS']['GLOBAL']['cliKeys']['lowlevel_admin'] = array('EXT:lowlevel/admin_cli.php', '_CLI_lowlevel');
-       $TYPO3_CONF_VARS['EXTCONF']['lowlevel']['cleanerModules']['missing_files'] = array('EXT:lowlevel/clmods/class.missing_files.php:TYPO3\\CMS\\Lowlevel\\MissingFilesCommand');
-       $TYPO3_CONF_VARS['EXTCONF']['lowlevel']['cleanerModules']['missing_relations'] = array('EXT:lowlevel/clmods/class.missing_relations.php:TYPO3\\CMS\\Lowlevel\\MissingRelationsCommand');
-       $TYPO3_CONF_VARS['EXTCONF']['lowlevel']['cleanerModules']['double_files'] = array('EXT:lowlevel/clmods/class.double_files.php:TYPO3\\CMS\\Lowlevel\\DoubleFilesCommand');
-       $TYPO3_CONF_VARS['EXTCONF']['lowlevel']['cleanerModules']['rte_images'] = array('EXT:lowlevel/clmods/class.rte_images.php:TYPO3\\CMS\\Lowlevel\\RteImagesCommand');
-       $TYPO3_CONF_VARS['EXTCONF']['lowlevel']['cleanerModules']['lost_files'] = array('EXT:lowlevel/clmods/class.lost_files.php:TYPO3\\CMS\\Lowlevel\\LostFilesCommand');
-       $TYPO3_CONF_VARS['EXTCONF']['lowlevel']['cleanerModules']['orphan_records'] = array('EXT:lowlevel/clmods/class.orphan_records.php:TYPO3\\CMS\\Lowlevel\\OrphanRecordsCommand');
-       $TYPO3_CONF_VARS['EXTCONF']['lowlevel']['cleanerModules']['deleted'] = array('EXT:lowlevel/clmods/class.deleted.php:TYPO3\\CMS\\Lowlevel\\DeletedRecordsCommand');
-       $TYPO3_CONF_VARS['EXTCONF']['lowlevel']['cleanerModules']['versions'] = array('EXT:lowlevel/clmods/class.versions.php:TYPO3\\CMS\\Lowlevel\\VersionsCommand');
-       $TYPO3_CONF_VARS['EXTCONF']['lowlevel']['cleanerModules']['cleanflexform'] = array('EXT:lowlevel/clmods/class.cleanflexform.php:TYPO3\\CMS\\Lowlevel\\CleanFlexformCommand');
-       $TYPO3_CONF_VARS['EXTCONF']['lowlevel']['cleanerModules']['syslog'] = array('EXT:lowlevel/clmods/class.syslog.php:TYPO3\\CMS\\Lowlevel\\SyslogCommand');
+       $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['cliKeys']['lowlevel_refindex'] = array('EXT:lowlevel/dbint/cli/refindex_cli.php', '_CLI_lowlevel');
+       $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['cliKeys']['lowlevel_cleaner'] = array('EXT:lowlevel/dbint/cli/cleaner_cli.php', '_CLI_lowlevel');
+       $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['cliKeys']['lowlevel_admin'] = array('EXT:lowlevel/admin_cli.php', '_CLI_lowlevel');
+       $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['lowlevel']['cleanerModules']['missing_files'] = array('TYPO3\\CMS\\Lowlevel\\MissingFilesCommand');
+       $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['lowlevel']['cleanerModules']['missing_relations'] = array('TYPO3\\CMS\\Lowlevel\\MissingRelationsCommand');
+       $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['lowlevel']['cleanerModules']['double_files'] = array('TYPO3\\CMS\\Lowlevel\\DoubleFilesCommand');
+       $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['lowlevel']['cleanerModules']['rte_images'] = array('TYPO3\\CMS\\Lowlevel\\RteImagesCommand');
+       $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['lowlevel']['cleanerModules']['lost_files'] = array('TYPO3\\CMS\\Lowlevel\\LostFilesCommand');
+       $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['lowlevel']['cleanerModules']['orphan_records'] = array('TYPO3\\CMS\\Lowlevel\\OrphanRecordsCommand');
+       $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['lowlevel']['cleanerModules']['deleted'] = array('TYPO3\\CMS\\Lowlevel\\DeletedRecordsCommand');
+       $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['lowlevel']['cleanerModules']['versions'] = array('TYPO3\\CMS\\Lowlevel\\VersionsCommand');
+       $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['lowlevel']['cleanerModules']['cleanflexform'] = array('TYPO3\\CMS\\Lowlevel\\CleanFlexformCommand');
+       $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['lowlevel']['cleanerModules']['syslog'] = array('TYPO3\\CMS\\Lowlevel\\SyslogCommand');
 }
 ?>
\ No newline at end of file
index 53e000f..e026edd 100755 (executable)
@@ -2,8 +2,18 @@
 if (!defined('TYPO3_MODE')) {
        die('Access denied.');
 }
-if (TYPO3_MODE == 'BE') {
-       \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule('tools', 'dbint', '', \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'dbint/');
-       \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule('tools', 'config', '', \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'config/');
+if (TYPO3_MODE === 'BE') {
+       \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule(
+               'tools',
+               'dbint',
+               '',
+               \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'dbint/'
+       );
+       \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule(
+               'tools',
+               'config',
+               '',
+               \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'config/'
+       );
 }
 ?>
\ No newline at end of file