Fixed bug #3637 in EM (translation handling)
authorKarsten Dambekalns <karsten.dambekalns@typo3.org>
Mon, 30 Oct 2006 20:32:29 +0000 (20:32 +0000)
committerKarsten Dambekalns <karsten.dambekalns@typo3.org>
Mon, 30 Oct 2006 20:32:29 +0000 (20:32 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/branches/TYPO3_4-0@1776 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/mod/tools/em/class.em_index.php

index fd9fbf8..0bbacba 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2006-10-30  Karsten Dambekalns  <karsten@typo3.org>
+
+        * Fixed bug #3637 in EM (translation handling)
+
 2006-10-17  Dmitry Dulepov  <dmitry@typo3.org>
 
        * Fixed bug 3199: SUing to myself?
index bc4073a..a2a91ad 100644 (file)
@@ -1188,32 +1188,35 @@ EXTENSION KEYS:
                                        $translationStatusArr = $this->terConnection->fetchTranslationStatus($extKey,$mirrorURL);
 
                                        echo ('<tr class="bgColor4"><td>'.$extKey.'</td>');
-                                       foreach($selectedLanguages as $lang) {
-                                                       // remote unknown -> no l10n available
-                                               if(!isset($translationStatusArr[$lang])) {
-                                                       echo ('<td title="No translation available">N/A</td>');
-                                                       continue;
-                                               }
-                                               // determine local md5 from zip
-                                               if(is_file(PATH_site.'typo3temp/'.$extKey.'-l10n-'.$lang.'.zip')) {
-                                                       $localmd5 = md5_file(PATH_site.'typo3temp/'.$extKey.'-l10n-'.$lang.'.zip');
-                                               } else {
-                                                       $localmd5 = 'zzz';
-                                               }
-                                               // local!=remote or not installed -> needs update
-                                               if($localmd5 != $translationStatusArr[$lang]['md5']) {
-                                                       $ret = $this->updateTranslation($extKey, $lang, $mirrorURL);
-                                                       if($ret === true) {
-                                                               echo ('<td title="Has been updated" style="background-color:#69a550">UPD</td>');
+                                       if(is_array($translationStatusArr)) {
+                                               foreach($selectedLanguages as $lang) {
+                                                               // remote unknown -> no l10n available
+                                                       if(!isset($translationStatusArr[$lang])) {
+                                                               echo ('<td title="No translation available">N/A</td>');
+                                                               continue;
+                                                       }
+                                                               // determine local md5 from zip
+                                                       if(is_file(PATH_site.'typo3temp/'.$extKey.'-l10n-'.$lang.'.zip')) {
+                                                               $localmd5 = md5_file(PATH_site.'typo3temp/'.$extKey.'-l10n-'.$lang.'.zip');
                                                        } else {
-                                                               echo ('<td title="'.htmlspecialchars($ret).'" style="background-color:#cb3352">ERR</td>');
+                                                               $localmd5 = 'zzz';
                                                        }
-                                                       continue;
+                                                               // local!=remote or not installed -> needs update
+                                                       if($localmd5 != $translationStatusArr[$lang]['md5']) {
+                                                               $ret = $this->updateTranslation($extKey, $lang, $mirrorURL);
+                                                               if($ret === true) {
+                                                                       echo ('<td title="Has been updated" style="background-color:#69a550">UPD</td>');
+                                                               } else {
+                                                                       echo ('<td title="'.htmlspecialchars($ret).'" style="background-color:#cb3352">ERR</td>');
+                                                               }
+                                                               continue;
+                                                       }
+                                                       echo ('<td title="Is up to date" style="background-color:#69a550">OK</td>');
                                                }
-                                               echo ('<td title="Is up to date" style="background-color:#69a550">OK</td>');
+                                       } else {
+                                               echo ('<td colspan="'.count($selectedLanguages).'" title="Possible reasons: network problems, allow_url_fopen off, curl not enabled in Install tool.">Could not fetch translation status</td>');
                                        }
                                        echo ('</tr>');
-
                                        $counter++;
                                }
                                echo '</table>