[TASK] Rename ExtensionManager class
authorHelmut Hummel <helmut.hummel@typo3.org>
Sat, 3 Nov 2012 18:45:41 +0000 (19:45 +0100)
committerHelmut Hummel <helmut.hummel@typo3.org>
Sat, 3 Nov 2012 18:50:06 +0000 (19:50 +0100)
The class ExtensionManager is actually a utility
to manage extensions. Rename it to better reflect
it's purpose.

Resolves: #42661
Releases: 6.0

Change-Id: Idde15838565fca4ac51cffe4df14eade477a3506
Reviewed-on: http://review.typo3.org/16170
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
15 files changed:
typo3/sysext/dbal/Classes/Autoloader.php
typo3/sysext/dbal/Classes/Database/DatabaseConnection.php
typo3/sysext/dbal/Classes/ExtensionManager/MessageDisplay.php
typo3/sysext/dbal/Classes/Hooks/InstallToolHooks.php
typo3/sysext/dbal/Tests/FakeDatabaseConnection.php
typo3/sysext/dbal/class.tx_dbal_em.php
typo3/sysext/dbal/class.tx_dbal_installtool.php
typo3/sysext/dbal/class.ux_db_list_extra.php
typo3/sysext/dbal/class.ux_t3lib_db.php
typo3/sysext/dbal/class.ux_t3lib_sqlparser.php
typo3/sysext/dbal/ext_autoload.php
typo3/sysext/dbal/ext_tables.php
typo3/sysext/dbal/lib/class.tx_dbal_querycache.php
typo3/sysext/dbal/lib/class.tx_dbal_tsparserext.php
typo3/sysext/dbal/mod1/index.php

index 43074d2..01c55f7 100644 (file)
@@ -46,7 +46,7 @@ class Autoloader {
                if ($instObj->mode == '123') {
                        switch ($instObj->step) {
                        case 1:
-                               if (!\TYPO3\CMS\Core\Extension\ExtensionManager::isLoaded('dbal') && $this->isDbalSupported()) {
+                               if (!\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('dbal') && $this->isDbalSupported()) {
                                        $this->activateDbal();
                                        // Reload page to have Install Tool actually load DBAL
                                        $redirectUrl = \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_REQUEST_URL');
@@ -54,7 +54,7 @@ class Autoloader {
                                }
                                break;
                        case 2:
-                               if (!\TYPO3\CMS\Core\Extension\ExtensionManager::isLoaded('dbal') && $this->isDbalSupported()) {
+                               if (!\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('dbal') && $this->isDbalSupported()) {
                                        $this->activateDbal();
                                }
                                break;
@@ -83,11 +83,11 @@ class Autoloader {
         * @return void
         */
        protected function activateDbal() {
-               if (!\TYPO3\CMS\Core\Extension\ExtensionManager::isLoaded('adodb')) {
-                       \TYPO3\CMS\Core\Extension\ExtensionManager::loadExtension('adodb');
+               if (!\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('adodb')) {
+                       \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::loadExtension('adodb');
                }
-               if (!\TYPO3\CMS\Core\Extension\ExtensionManager::isLoaded('dbal')) {
-                       \TYPO3\CMS\Core\Extension\ExtensionManager::loadExtension('dbal');
+               if (!\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('dbal')) {
+                       \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::loadExtension('dbal');
                }
        }
 
@@ -97,11 +97,11 @@ class Autoloader {
         * @return void
         */
        protected function deactivateDbal() {
-               if (\TYPO3\CMS\Core\Extension\ExtensionManager::isLoaded('dbal')) {
-                       \TYPO3\CMS\Core\Extension\ExtensionManager::unloadExtension('dbal');
+               if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('dbal')) {
+                       \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::unloadExtension('dbal');
                }
-               if (\TYPO3\CMS\Core\Extension\ExtensionManager::isLoaded('adodb')) {
-                       \TYPO3\CMS\Core\Extension\ExtensionManager::unloadExtension('adodb');
+               if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('adodb')) {
+                       \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::unloadExtension('adodb');
                }
        }
 
index 75b768e..795ef91 100644 (file)
@@ -2911,7 +2911,7 @@ class DatabaseConnection extends \TYPO3\CMS\Core\Database\DatabaseConnection {
                                break;
                        case 'adodb':
                                $output = TRUE;
-                               require_once \TYPO3\CMS\Core\Extension\ExtensionManager::extPath('adodb') . 'adodb/adodb.inc.php';
+                               require_once \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('adodb') . 'adodb/adodb.inc.php';
                                if (!defined('ADODB_FORCE_NULLS')) {
                                        define('ADODB_FORCE_NULLS', 1);
                                }
index 66bcf21..afd09c3 100644 (file)
@@ -47,7 +47,7 @@ class MessageDisplay {
                                        <div class="message-header">PostgreSQL</div>
                                        <div class="message-body">
                                                If you use a PostgreSQL database, make sure to run SQL scripts located in<br />
-                                               <tt>' . \TYPO3\CMS\Core\Extension\ExtensionManager::extPath('dbal') . 'res/postgresql/</tt><br />
+                                               <tt>' . \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('dbal') . 'res/postgresql/</tt><br />
                                                to ensure best compatibility with TYPO3.
                                        </div>
                                </div>
index f944782..c59b9ba 100644 (file)
@@ -174,7 +174,7 @@ class InstallToolHooks {
                        $this->driver = $this->getDefaultDriver();
                }
                // Get the template file
-               $templateFile = @file_get_contents((\TYPO3\CMS\Core\Extension\ExtensionManager::extPath('dbal') . $this->templateFilePath . 'install.html'));
+               $templateFile = @file_get_contents((\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('dbal') . $this->templateFilePath . 'install.html'));
                // Get the template part from the file
                $template = \TYPO3\CMS\Core\Html\HtmlParser::getSubpart($templateFile, '###TEMPLATE###');
                // Get the subpart for the connection form
@@ -446,7 +446,7 @@ class InstallToolHooks {
                // There should be a database host connection at this point
                if ($result = $GLOBALS['TYPO3_DB']->sql_pconnect(TYPO3_db_host, TYPO3_db_username, TYPO3_db_password)) {
                        // Get the template file
-                       $templateFile = @file_get_contents((\TYPO3\CMS\Core\Extension\ExtensionManager::extPath('dbal') . $this->templateFilePath . 'install.html'));
+                       $templateFile = @file_get_contents((\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('dbal') . $this->templateFilePath . 'install.html'));
                        // Get the template part from the file
                        $template = \TYPO3\CMS\Core\Html\HtmlParser::getSubpart($templateFile, '###TEMPLATE###');
                        // Get the subpart for the database choice step
index e977f1b..f8899aa 100644 (file)
@@ -43,8 +43,8 @@ class FakeDatabaseConnection {
                // Make sure to have a clean configuration
                $db->clearCachedFieldInfo();
                $db->_call('initInternalVariables');
-               require_once \TYPO3\CMS\Core\Extension\ExtensionManager::extPath('adodb') . 'adodb/adodb.inc.php';
-               require_once \TYPO3\CMS\Core\Extension\ExtensionManager::extPath('adodb') . 'adodb/drivers/adodb-' . $driver . '.inc.php';
+               require_once \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('adodb') . 'adodb/adodb.inc.php';
+               require_once \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('adodb') . 'adodb/drivers/adodb-' . $driver . '.inc.php';
                $handlerKey = '_DEFAULT';
                $db->lastHandlerKey = $handlerKey;
                $db->handlerInstance[$handlerKey] = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('ADODB_' . $driver);
index 9e1e6d4..9447a2c 100644 (file)
@@ -4,5 +4,5 @@
  * and will be removed by 7.0. The class was renamed and is now located at:
  * typo3/sysext/dbal/Classes/Hooks/ExtensionManagerHooks.php
  */
-require_once \TYPO3\CMS\Core\Extension\ExtensionManager::extPath('dbal') . 'Classes/Hooks/ExtensionManagerHooks.php';
+require_once \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('dbal') . 'Classes/Hooks/ExtensionManagerHooks.php';
 ?>
\ No newline at end of file
index b2909e1..f5b4e74 100644 (file)
@@ -4,5 +4,5 @@
  * and will be removed by 7.0. The class was renamed and is now located at:
  * typo3/sysext/dbal/Classes/Hooks/InstallToolHooks.php
  */
-require_once \TYPO3\CMS\Core\Extension\ExtensionManager::extPath('dbal') . 'Classes/Hooks/InstallToolHooks.php';
+require_once \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('dbal') . 'Classes/Hooks/InstallToolHooks.php';
 ?>
\ No newline at end of file
index 38de3e4..73cf35e 100644 (file)
@@ -4,5 +4,5 @@
  * and will be removed by 7.0. The class was renamed and is now located at:
  * typo3/sysext/dbal/Classes/RecordList/RecordList.php
  */
-require_once \TYPO3\CMS\Core\Extension\ExtensionManager::extPath('dbal') . 'Classes/RecordList/RecordList.php';
+require_once \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('dbal') . 'Classes/RecordList/RecordList.php';
 ?>
\ No newline at end of file
index 314228b..83b58e5 100644 (file)
@@ -4,5 +4,5 @@
  * and will be removed by 7.0. The class was renamed and is now located at:
  * typo3/sysext/dbal/Classes/Database/DatabaseConnection.php
  */
-require_once \TYPO3\CMS\Core\Extension\ExtensionManager::extPath('dbal') . 'Classes/Database/DatabaseConnection.php';
+require_once \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('dbal') . 'Classes/Database/DatabaseConnection.php';
 ?>
\ No newline at end of file
index 9a19e1e..ea017eb 100644 (file)
@@ -4,5 +4,5 @@
  * and will be removed by 7.0. The class was renamed and is now located at:
  * typo3/sysext/dbal/Classes/Database/SqlParser.php
  */
-require_once \TYPO3\CMS\Core\Extension\ExtensionManager::extPath('dbal') . 'Classes/Database/SqlParser.php';
+require_once \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('dbal') . 'Classes/Database/SqlParser.php';
 ?>
\ No newline at end of file
index 873e40d..9059e39 100644 (file)
@@ -1,5 +1,5 @@
 <?php
-$extensionPath = \TYPO3\CMS\Core\Extension\ExtensionManager::extPath('dbal');
+$extensionPath = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('dbal');
 return array(
        'tx_dbal_autoloader' => $extensionPath . 'class.tx_dbal_autoloader.php',
        'tx_dbal_em' => $extensionPath . 'class.tx_dbal_em.php',
index 1fecb32..f4e43db 100644 (file)
@@ -3,6 +3,6 @@ if (!defined('TYPO3_MODE')) {
        die('Access denied.');
 }
 if (TYPO3_MODE === 'BE') {
-       \TYPO3\CMS\Core\Extension\ExtensionManager::addModule('tools', 'txdbalM1', '', \TYPO3\CMS\Core\Extension\ExtensionManager::extPath($_EXTKEY) . 'mod1/');
+       \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule('tools', 'txdbalM1', '', \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'mod1/');
 }
 ?>
\ No newline at end of file
index 65f4e0a..62c31b9 100644 (file)
@@ -4,5 +4,5 @@
  * and will be removed by 7.0. The class was renamed and is now located at:
  * typo3/sysext/dbal/Classes/QueryCache.php
  */
-require_once \TYPO3\CMS\Core\Extension\ExtensionManager::extPath('dbal') . 'Classes/QueryCache.php';
+require_once \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('dbal') . 'Classes/QueryCache.php';
 ?>
\ No newline at end of file
index c42225e..4ea027f 100644 (file)
@@ -4,5 +4,5 @@
  * and will be removed by 7.0. The class was renamed and is now located at:
  * typo3/sysext/dbal/Classes/ExtensionManager/MessageDisplay.php
  */
-require_once \TYPO3\CMS\Core\Extension\ExtensionManager::extPath('dbal') . 'Classes/ExtensionManager/MessageDisplay.php';
+require_once \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('dbal') . 'Classes/ExtensionManager/MessageDisplay.php';
 ?>
\ No newline at end of file
index cd98243..d65011a 100644 (file)
@@ -35,7 +35,7 @@ $BE_USER->modAccess($MCONF, 1);
  * and will be removed by 7.0. The class was renamed and is now located at:
  * typo3/sysext/dbal/Classes/Controller/ModuleController.php
  */
-require_once \TYPO3\CMS\Core\Extension\ExtensionManager::extPath('dbal') . 'Classes/Controller/ModuleController.php';
+require_once \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('dbal') . 'Classes/Controller/ModuleController.php';
 // Make instance:
 $SOBE = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Dbal\\Controller\\ModuleController');
 $SOBE->init();