[BUGFIX] EM update module doesn't accept cache_extension table
authorSteffen Kamper <info@sk-typo3.de>
Wed, 9 Mar 2011 17:30:10 +0000 (18:30 +0100)
committerSteffen Kamper <info@sk-typo3.de>
Tue, 22 Mar 2011 11:02:11 +0000 (12:02 +0100)
You see only the message:
To get and update the list, go to the section "Import extensions" and use the button "Retrieve/Update" even if table is filled.
The reason is that it looks for typo3temp/extensions.xml.hz instead checking if the table has records.

Solution:
Check table count instead.

Change-Id: Ide26c0fc5a3963f6bfa1a134ebfdbbf5f0b9b768
Resolves: #M17907
Reviewed-on: http://review.typo3.org/1232
Reviewed-by: Steffen Kamper <info@sk-typo3.de>
Tested-by: Steffen Kamper <info@sk-typo3.de>
typo3/sysext/em/classes/index.php

index 1c75d20..e0948df 100644 (file)
@@ -2440,7 +2440,8 @@ class SC_mod_tools_em_index extends t3lib_SCbase {
                global $LANG;
                $content = '';
 
-               if (is_file(PATH_site . 'typo3temp/extensions.xml.gz')) {
+               $count = intval(tx_em_Database::getExtensionCountFromRepository());
+               if ($count > 0) {
                        $content = $this->extensionList->showExtensionsToUpdate()
                                        . t3lib_BEfunc::getFuncCheck(0, 'SET[display_installed]', $this->MOD_SETTINGS['display_installed'], '', '', 'id="checkDisplayInstalled"')
                                        . '&nbsp;<label for="checkDisplayInstalled">' . $LANG->sL('LLL:EXT:lang/locallang_mod_tools_em.xml:display_nle') . '</label><br />'