[TASK] Rename table cache_extensions
authorChristian Kuhn <lolli@schwarzbu.ch>
Sat, 18 Aug 2012 11:03:21 +0000 (13:03 +0200)
committerHelmut Hummel <helmut.hummel@typo3.org>
Sat, 18 Aug 2012 15:31:28 +0000 (17:31 +0200)
Table cache_extensions is handled by ext:extensionmanager and should be
moved to its namespace. It is now in line with the according extbase
model and called tx_extensionmanager_domain_model_extension.

Change-Id: I9d8e0981bf5ff35c38c3254672b8b8015c72ff47
Resolves: #39922
Related: #39726
Releases: 6.0
Reviewed-on: http://review.typo3.org/13884
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Philipp Gampe
Tested-by: Philipp Gampe
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
t3lib/class.t3lib_tcemain.php
typo3/sysext/extensionmanager/Classes/Domain/Repository/ExtensionRepository.php
typo3/sysext/extensionmanager/Classes/Utility/Importer/ExtensionList.php
typo3/sysext/extensionmanager/Classes/Utility/Repository/Helper.php
typo3/sysext/extensionmanager/Configuration/TCA/Extension.php
typo3/sysext/extensionmanager/Resources/Private/Language/locallang_db.xml
typo3/sysext/extensionmanager/ext_tables.php
typo3/sysext/extensionmanager/ext_tables.sql
typo3/sysext/extensionmanager/ext_typoscript_setup.txt

index 5345210..f3c62fc 100644 (file)
@@ -6951,9 +6951,6 @@ class t3lib_TCEmain {
         * - cache_imagesizes:  Clearing this table would cause a lot of unneeded
         *                                               Imagemagick calls because the size informations have
         *                                               to be fetched again after clearing.
-        * - cache_extensions:  Clearing this table would make the extension manager
-        *                                               unusable until a new extension list is fetched from
-        *                                               the TER.
         *
         * @param string $cacheCmd The cache command, see above description
         * @return void
index 8e68ee0..7c45de5 100644 (file)
@@ -117,14 +117,14 @@ class Tx_Extensionmanager_Domain_Repository_ExtensionRepository extends Tx_Extba
         */
        public function findByTitleOrAuthorNameOrExtensionKey($searchString) {
                $searchStringForLike = '%' . $searchString . '%';
-               $select = 'cache_extensions.*,
+               $select = 'tx_extensionmanager_domain_model_extension.*,
                        (
                                (extkey like "' . $searchString . '") * 8 +
                                (extkey like "' . $searchStringForLike . '") * 4 +
                                (title like "' . $searchStringForLike . '") * 2 +
                                (authorname like "' . $searchStringForLike . '")
                        ) as position';
-               $from = 'cache_extensions';
+               $from = 'tx_extensionmanager_domain_model_extension';
                $where = '(
                                        extkey = "' . $searchString . '"
                                        OR
@@ -235,7 +235,7 @@ class Tx_Extensionmanager_Domain_Repository_ExtensionRepository extends Tx_Extba
        public function insertLastVersion($repositoryUid = 1) {
                $groupedRows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
                        'extkey, version, max(intversion) maxintversion',
-                       'cache_extensions',
+                       'tx_extensionmanager_domain_model_extension',
                        'repository=' . intval($repositoryUid),
                        'extkey'
                );
@@ -244,7 +244,7 @@ class Tx_Extensionmanager_Domain_Repository_ExtensionRepository extends Tx_Extba
                if ($extensions > 0) {
                                // set all to 0
                        $GLOBALS['TYPO3_DB']->exec_UPDATEquery(
-                               'cache_extensions',
+                               'tx_extensionmanager_domain_model_extension',
                                'lastversion=1 AND repository=' . intval($repositoryUid),
                                array('lastversion' => 0)
                        );
@@ -252,9 +252,9 @@ class Tx_Extensionmanager_Domain_Repository_ExtensionRepository extends Tx_Extba
                                // Find latest version of extensions and set lastversion to 1 for these
                        foreach ($groupedRows as $row) {
                                $GLOBALS['TYPO3_DB']->exec_UPDATEquery(
-                                       'cache_extensions',
-                                       'extkey=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($row['extkey'], 'cache_extensions') .
-                                               ' AND intversion=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($row['maxintversion'], 'cache_extensions') .
+                                       'tx_extensionmanager_domain_model_extension',
+                                       'extkey=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($row['extkey'], 'tx_extensionmanager_domain_model_extension') .
+                                               ' AND intversion=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($row['maxintversion'], 'tx_extensionmanager_domain_model_extension') .
                                                ' AND repository=' . intval($repositoryUid),
                                        array('lastversion' => 1)
                                );
index 811e608..59fcaf3 100644 (file)
@@ -63,7 +63,7 @@ class Tx_Extensionmanager_Utility_Importer_ExtensionList implements SplObserver
        protected $arrRows = array();
 
        /**
-        * Keeps fieldnames of cache_extension table.
+        * Keeps fieldnames of tx_extensionmanager_domain_model_extension table.
         *
         * @var array
         */
@@ -162,7 +162,7 @@ class Tx_Extensionmanager_Utility_Importer_ExtensionList implements SplObserver
                        // flush last rows to database if existing
                if (count($this->arrRows)) {
                        $GLOBALS['TYPO3_DB']->exec_INSERTmultipleRows(
-                               'cache_extensions',
+                               'tx_extensionmanager_domain_model_extension',
                                self::$fieldNames,
                                $this->arrRows,
                                self::$fieldIndicesNoQuote
@@ -184,7 +184,7 @@ class Tx_Extensionmanager_Utility_Importer_ExtensionList implements SplObserver
                        // flush every 50 rows to database
                if ($this->sumRecords !== 0 && $this->sumRecords % 50 === 0) {
                        $GLOBALS['TYPO3_DB']->exec_INSERTmultipleRows(
-                               'cache_extensions',
+                               'tx_extensionmanager_domain_model_extension',
                                self::$fieldNames,
                                $this->arrRows,
                                self::$fieldIndicesNoQuote
index 7be46e0..5413b40 100644 (file)
@@ -317,7 +317,10 @@ class Tx_Extensionmanager_Utility_Repository_Helper implements t3lib_Singleton {
                                $updateNecessity &= ~self::PROBLEM_NO_VERSIONS_IN_DATABASE;
                        } else {
                                        // using straight sql here as extbases "remove" runs into memory problems
-                               $GLOBALS['TYPO3_DB']->exec_DELETEquery('cache_extensions', 'repository=' . $this->repository->getUid());
+                               $GLOBALS['TYPO3_DB']->exec_DELETEquery(
+                                       'tx_extensionmanager_domain_model_extension',
+                                       'repository=' . $this->repository->getUid()
+                               );
                        }
 
                                // no further problems - start of import process
index a95f54f..c8623e5 100644 (file)
@@ -3,16 +3,16 @@ if (!defined('TYPO3_MODE')) {
        die('Access denied.');
 }
 
-$TCA['tx_extensionmanager_extension'] = array(
-       'ctrl' => $TCA['tx_extensionmanager_extension']['ctrl'],
+$TCA['tx_extensionmanager_domain_model_extension'] = array(
+       'ctrl' => $TCA['tx_extensionmanager_domain_model_extension']['ctrl'],
        'interface' => array(
                'showRecordFieldList' => 'extensionkey,version,title,description,state,category,lastupdated,updatecomment,authorname,authoremail'
        ),
-       'feInterface' => $TCA['tx_extensionmanager_extension']['feInterface'],
+       'feInterface' => $TCA['tx_extensionmanager_domain_model_extension']['feInterface'],
        'columns' => array(
                'extension_key' => array(
                        'exclude' => 0,
-                       'label' => 'LLL:EXT:extensionmanager/Resources/Private/locallang_db.xml:tx_extensionmanager_extension.extensionkey',
+                       'label' => 'LLL:EXT:extensionmanager/Resources/Private/locallang_db.xml:tx_extensionmanager_domain_model_extension.extensionkey',
                        'config' => array(
                                'type' => 'input',
                                'size' => '30',
@@ -20,7 +20,7 @@ $TCA['tx_extensionmanager_extension'] = array(
                ),
                'version' => array(
                        'exclude' => 0,
-                       'label' => 'LLL:EXT:extensionmanager/Resources/Private/locallang_db.xml:tx_extensionmanager_extension.version',
+                       'label' => 'LLL:EXT:extensionmanager/Resources/Private/locallang_db.xml:tx_extensionmanager_domain_model_extension.version',
                        'config' => array(
                                'type' => 'input',
                                'size' => '30',
@@ -28,7 +28,7 @@ $TCA['tx_extensionmanager_extension'] = array(
                ),
                'title' => array(
                        'exclude' => 0,
-                       'label' => 'LLL:EXT:extensionmanager/Resources/Private/locallang_db.xml:tx_extensionmanager_extension.title',
+                       'label' => 'LLL:EXT:extensionmanager/Resources/Private/locallang_db.xml:tx_extensionmanager_domain_model_extension.title',
                        'config' => array(
                                'type' => 'input',
                                'size' => '30',
@@ -36,7 +36,7 @@ $TCA['tx_extensionmanager_extension'] = array(
                ),
                'description' => array(
                        'exclude' => 0,
-                       'label' => 'LLL:EXT:extensionmanager/Resources/Private/locallang_db.xml:tx_extensionmanager_extension.description',
+                       'label' => 'LLL:EXT:extensionmanager/Resources/Private/locallang_db.xml:tx_extensionmanager_domain_model_extension.description',
                        'config' => array(
                                'type' => 'text',
                                'cols' => '30',
@@ -45,7 +45,7 @@ $TCA['tx_extensionmanager_extension'] = array(
                ),
                'state' => array(
                        'exclude' => 0,
-                       'label' => 'LLL:EXT:extensionmanager/Resources/Private/locallang_db.xml:tx_extensionmanager_extension.state',
+                       'label' => 'LLL:EXT:extensionmanager/Resources/Private/locallang_db.xml:tx_extensionmanager_domain_model_extension.state',
                        'config' => array(
                                'type' => 'input',
                                'size' => '30',
@@ -55,7 +55,7 @@ $TCA['tx_extensionmanager_extension'] = array(
                ),
                'category' => array(
                        'exclude' => 0,
-                       'label' => 'LLL:EXT:extensionmanager/Resources/Private/locallang_db.xml:tx_extensionmanager_extension.category',
+                       'label' => 'LLL:EXT:extensionmanager/Resources/Private/locallang_db.xml:tx_extensionmanager_domain_model_extension.category',
                        'config' => array(
                                'type' => 'input',
                                'size' => '30',
@@ -65,7 +65,7 @@ $TCA['tx_extensionmanager_extension'] = array(
                ),
                'last_updated' => array(
                        'exclude' => 0,
-                       'label' => 'LLL:EXT:extensionmanager/Resources/Private/locallang_db.xml:tx_extensionmanager_extension.lastupdated',
+                       'label' => 'LLL:EXT:extensionmanager/Resources/Private/locallang_db.xml:tx_extensionmanager_domain_model_extension.lastupdated',
                        'config' => array(
                                'type' => 'input',
                                'size' => '30',
@@ -74,7 +74,7 @@ $TCA['tx_extensionmanager_extension'] = array(
                ),
                'update_comment' => array(
                        'exclude' => 0,
-                       'label' => 'LLL:EXT:extensionmanager/Resources/Private/locallang_db.xml:tx_extensionmanager_extension.updatecomment',
+                       'label' => 'LLL:EXT:extensionmanager/Resources/Private/locallang_db.xml:tx_extensionmanager_domain_model_extension.updatecomment',
                        'config' => array(
                                'type' => 'text',
                                'cols' => '30',
@@ -83,7 +83,7 @@ $TCA['tx_extensionmanager_extension'] = array(
                ),
                'author_name' => array(
                        'exclude' => 0,
-                       'label' => 'LLL:EXT:extensionmanager/Resources/Private/locallang_db.xml:tx_extensionmanager_extension.authorname',
+                       'label' => 'LLL:EXT:extensionmanager/Resources/Private/locallang_db.xml:tx_extensionmanager_domain_model_extension.authorname',
                        'config' => array(
                                'type' => 'input',
                                'size' => '30',
@@ -91,7 +91,7 @@ $TCA['tx_extensionmanager_extension'] = array(
                ),
                'author_email' => array(
                        'exclude' => 0,
-                       'label' => 'LLL:EXT:extensionmanager/Resources/Private/locallang_db.xml:tx_extensionmanager_extension.authoremail',
+                       'label' => 'LLL:EXT:extensionmanager/Resources/Private/locallang_db.xml:tx_extensionmanager_domain_model_extension.authoremail',
                        'config' => array(
                                'type' => 'input',
                                'size' => '30',
@@ -99,7 +99,7 @@ $TCA['tx_extensionmanager_extension'] = array(
                ),
                'lastversion' => array(
                        'exclude' => 0,
-                       'label' => 'LLL:EXT:extensionmanager/Resources/Private/locallang_db.xml:tx_extensionmanager_extension.lastversion',
+                       'label' => 'LLL:EXT:extensionmanager/Resources/Private/locallang_db.xml:tx_extensionmanager_domain_model_extension.lastversion',
                        'config' => array(
                                'type' => 'check',
                                'size' => '1',
@@ -107,7 +107,7 @@ $TCA['tx_extensionmanager_extension'] = array(
                ),
                'position' => array(
                        'exclude' => 0,
-                       'label' => 'LLL:EXT:extensionmanager/Resources/Private/locallang_db.xml:tx_extensionmanager_extension.lastversion',
+                       'label' => 'LLL:EXT:extensionmanager/Resources/Private/locallang_db.xml:tx_extensionmanager_domain_model_extension.lastversion',
                        'config' => array(
                                'type' => 'input',
                                'size' => '10',
index 9ea0ae6..055081c 100644 (file)
@@ -6,17 +6,17 @@
        </meta>
        <data type="array">
                <languageKey index="default" type="array">
-                       <label index="tx_extensionmanager_extension">Extension</label>
-                       <label index="tx_extensionmanager_extension.extensionkey">Extension Key</label>
-                       <label index="tx_extensionmanager_extension.version">Version</label>
-                       <label index="tx_extensionmanager_extension.title">Title</label>
-                       <label index="tx_extensionmanager_extension.description">Description</label>
-                       <label index="tx_extensionmanager_extension.state">State</label>
-                       <label index="tx_extensionmanager_extension.category">Category</label>
-                       <label index="tx_extensionmanager_extension.lastupdated">Last Updated</label>
-                       <label index="tx_extensionmanager_extension.updatecomment">Update Comment</label>
-                       <label index="tx_extensionmanager_extension.authorname">Author Name</label>
-                       <label index="tx_extensionmanager_extension.authoremail">Author Email</label>
+                       <label index="tx_extensionmanager_domain_model_extension">Extension</label>
+                       <label index="tx_extensionmanager_domain_model_extension.extensionkey">Extension Key</label>
+                       <label index="tx_extensionmanager_domain_model_extension.version">Version</label>
+                       <label index="tx_extensionmanager_domain_model_extension.title">Title</label>
+                       <label index="tx_extensionmanager_domain_model_extension.description">Description</label>
+                       <label index="tx_extensionmanager_domain_model_extension.state">State</label>
+                       <label index="tx_extensionmanager_domain_model_extension.category">Category</label>
+                       <label index="tx_extensionmanager_domain_model_extension.lastupdated">Last Updated</label>
+                       <label index="tx_extensionmanager_domain_model_extension.updatecomment">Update Comment</label>
+                       <label index="tx_extensionmanager_domain_model_extension.authorname">Author Name</label>
+                       <label index="tx_extensionmanager_domain_model_extension.authoremail">Author Email</label>
                </languageKey>
        </data>
 </T3locallang>
index 3d2dfb7..5d20552 100644 (file)
@@ -3,13 +3,13 @@ if (!defined('TYPO3_MODE')) {
        die('Access denied.');
 }
 
-$TCA['tx_extensionmanager_extension'] = array(
+$TCA['tx_extensionmanager_domain_model_extension'] = array(
        'ctrl' => array(
-               'title' => 'LLL:EXT:extensionmanager/Resources/Private/Language/locallang_db.xml:tx_extensionmanager_extension',
+               'title' => 'LLL:EXT:extensionmanager/Resources/Private/Language/locallang_db.xml:tx_extensionmanager_domain_model_extension',
                'label' => 'uid',
                'default_sortby' => '',
                'dynamicConfigFile' => t3lib_extMgm::extPath($_EXTKEY) . 'Configuration/TCA/Extension.php',
-               'iconfile' => t3lib_extMgm::extRelPath($_EXTKEY) . 'icon_tx_extensionmanager_extension.gif',
+               'hideTable' => TRUE,
        ),
 );
 
index 142f587..39f7f6b 100644 (file)
@@ -13,9 +13,9 @@ CREATE TABLE sys_ter (
 );
 
 #
-# Table structure for table 'cache_extensions'
+# Table structure for table 'tx_extensionmanager_domain_model_extension'
 #
-CREATE TABLE cache_extensions (
+CREATE TABLE tx_extensionmanager_domain_model_extension (
   uid int(11) NOT NULL auto_increment,
   extkey varchar(60) NOT NULL default '',
   repository int(11) unsigned NOT NULL default '1',
index 1e15e6b..9482097 100644 (file)
@@ -3,7 +3,6 @@ config.tx_extbase {
                classes {
                        Tx_Extensionmanager_Domain_Model_Extension {
                                mapping {
-                                       tableName = cache_extensions
                                        columns {
                                                extkey.mapOnProperty = extensionKey
                                                version.mapOnProperty = version