Fixed bug #17758: EM: After update repository the info labels are not updated
authorsteffenk <steffenk@709f56b5-9817-0410-a4d7-c38de5d9e867>
Thu, 24 Feb 2011 21:26:23 +0000 (21:26 +0000)
committersteffenk <steffenk@709f56b5-9817-0410-a4d7-c38de5d9e867>
Thu, 24 Feb 2011 21:26:23 +0000 (21:26 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@10625 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/em/classes/connection/class.tx_em_connection_extdirectserver.php
typo3/sysext/em/res/js/em_repositorylist.js

index 8c94aef..92f61b2 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
 2011-02-24  Steffen Kamper  <steffen@typo3.org>
 
+       * Fixed bug #17758: EM: After update repository the info labels are not updated
        * Fixed bug #13309 Text on "Settings" tab needs more space
        * Fixed bug #13310: PHP Warning "array_merge(): Argument #2 is not an array" in class.tx_em_settings.php
        * Renewed fix #17701: Generated t3x are corrupted in 4.5.1-dev and trunk
index 0224f6a..f4585d9 100644 (file)
@@ -1107,16 +1107,17 @@ class tx_em_Connection_ExtDirectServer {
                /** @var $objRepositoryUtility tx_em_Repository_Utility */
                $objRepositoryUtility = t3lib_div::makeInstance('tx_em_Repository_Utility', $objRepository);
                $count = $objRepositoryUtility->updateExtList();
-
+               $time = $GLOBALS['EXEC_TIME'];
 
                if ($count) {
                        $objRepository->setExtensionCount($count);
-                       $objRepository->setLastUpdate(time());
+                       $objRepository->setLastUpdate($time);
                        tx_em_Database::updateRepository($objRepository);
                        return array(
                                'success' => TRUE,
                                'data' => array(
-                                       'count' => $count
+                                       'count' => $count,
+                                       'updated' => date('d/m/Y H:i', $time)
                                ),
                                'rep' =>  intval($repositoryId)
                        );
index 27ef1e4..421384e 100644 (file)
@@ -382,7 +382,12 @@ TYPO3.EM.RepositoryList = Ext.extend(Ext.grid.GridPanel, {
 
        repositoryUpdate: function() {
                var m = Ext.MessageBox.wait(TYPO3.lang.msg_longwait, TYPO3.lang.repository_update);
-               TYPO3.EM.ExtDirect.repositoryUpdate(1, function(response) {
+               var index = TYPO3.EM.RepositoryCombo.getValue();
+               if (!index) {
+                       return;
+               }
+               var record = this.repositoryStore.getAt(index - 1);
+               TYPO3.EM.ExtDirect.repositoryUpdate(index, function(response) {
                        if (!response.success) {
                                if (response.rep == 0) {
                                        TYPO3.Flashmessage.display(TYPO3.Severity.error, TYPO3.lang.msg_error, response.errormsg, 15);
@@ -391,11 +396,12 @@ TYPO3.EM.RepositoryList = Ext.extend(Ext.grid.GridPanel, {
                                }
                        } else {
                                TYPO3.Flashmessage.display(TYPO3.Severity.information, TYPO3.lang.repository_updated, String.format(TYPO3.lang.repository_extensions_count, response.data.count), 10);
-                               this.repositoryListStore.load();
+                               record.set('count', response.data.count);
+                               record.set('updated', response.data.updated);
+                               Ext.getCmp('repListInfo').update(TYPO3.EM.Layouts.repositoryInfo().applyTemplate(record.data));
                        }
                        m.hide();
                }, this);
-
        },
 
        showExtInfoInWindow: function(index) {