Fixed empty API message/status in primera and wernis extensions
authorRoland Häder <roland@mxchange.org>
Wed, 26 Nov 2008 01:56:37 +0000 (01:56 +0000)
committerRoland Häder <roland@mxchange.org>
Wed, 26 Nov 2008 01:56:37 +0000 (01:56 +0000)
inc/modules/admin/what-list_primera.php
inc/modules/admin/what-list_wernis.php

index f500925d529dc098ca8e8eb7e2b931de92e95063..6bd4c379c5af7e36093b0d0c36f7da83fa7213a2 100644 (file)
@@ -55,12 +55,16 @@ if (SQL_NUMROWS($result) > 0) {
                $content['primera_amount']              = TRANSLATE_COMMA($content['primera_amount']);
                $content['primera_timestamp']   = MAKE_DATETIME($content['primera_timestamp'], "2");
                $content['raw_type']                    = strtolower($content['primera_type']);
                $content['primera_amount']              = TRANSLATE_COMMA($content['primera_amount']);
                $content['primera_timestamp']   = MAKE_DATETIME($content['primera_timestamp'], "2");
                $content['raw_type']                    = strtolower($content['primera_type']);
-               $content['primera_type']                        = PRIMERA_TRANSFER_STATUS($content['primera_type']);
+               $content['primera_type']                = PRIMERA_TRANSFER_STATUS($content['primera_type']);
+
+               // Fix empty message and status
+               if (empty($content['primera_api_message'])) $content['primera_api_message'] = "---";
+               if (empty($content['primera_api_status']))  $content['primera_api_status']  = "OK";
 
                // Append it and switch colors
                $OUT .= LOAD_TEMPLATE("admin_list_primera_row", true, $content);
                $SW = 3 - $SW;
 
                // Append it and switch colors
                $OUT .= LOAD_TEMPLATE("admin_list_primera_row", true, $content);
                $SW = 3 - $SW;
-       }
+       } // END - while
 
        // Load main template
        LOAD_TEMPLATE("admin_list_primera_main", false, $OUT);
 
        // Load main template
        LOAD_TEMPLATE("admin_list_primera_main", false, $OUT);
index 844813b17c2f9963ebb5dc9e42ef122a2fa46ac2..722d9bb252bb43c1c5a2af40adf334933e9fd123 100644 (file)
@@ -57,6 +57,10 @@ if (SQL_NUMROWS($result) > 0) {
                $content['raw_type']                    = strtolower($content['wernis_type']);
                $content['wernis_type']                 = WERNIS_TRANSFER_STATUS($content['wernis_type']);
 
                $content['raw_type']                    = strtolower($content['wernis_type']);
                $content['wernis_type']                 = WERNIS_TRANSFER_STATUS($content['wernis_type']);
 
+               // Fix empty message and status
+               if (empty($content['wernis_api_message'])) $content['wernis_api_message'] = "---";
+               if (empty($content['wernis_api_status']))  $content['wernis_api_status']  = "OK";
+
                // Append it and switch colors
                $OUT .= LOAD_TEMPLATE("admin_list_wernis_row", true, $content);
                $SW = 3 - $SW;
                // Append it and switch colors
                $OUT .= LOAD_TEMPLATE("admin_list_wernis_row", true, $content);
                $SW = 3 - $SW;