Now debug_report_bug() will be called if ext_name or ext_ver is empty which should...
[mailer.git] / inc / modules / admin / overview-inc.php
index 36cf9c6f3fe6ffc09814ff0bbac6d2fb9946aa45..ccaaa3f03467608e4013ea4e2bed1563e12b0906 100644 (file)
@@ -42,7 +42,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
        require($INC);
 }
 
-function OUTPUT_STANDARD_OVERVIEW(&$result_tasks) {
+function OUTPUT_STANDARD_OVERVIEW (&$result_tasks) {
        // First check for solved and not assigned tasks and assign them to current admin
        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_task_system` SET `assigned_admin`=%s WHERE assigned_admin < 1 AND status != 'NEW'",
        array(getCurrentAdminId()), __FILE__, __LINE__);
@@ -164,7 +164,7 @@ LIMIT 1",
                                $text = LOAD_TEMPLATE('admin_extensions_text', true, $text);
 
                                // Initialize variables (no title for SQL commands by default)
-                               $ext_name = '';
+                               $ext_name = ''; $ext_ver = '';
                                $title = getMessage('TASK_NO_TITLE');
 
                                // Shall I list SQL commands assigned to an extension installation or update task?
@@ -207,10 +207,13 @@ LIMIT 1",
                                                // Add verbose SQL table
                                                $text .= EXTENSION_VERBOSE_TABLE($title, " class=\"admin_table top2 left2 right2\"", true, "100%")."<br />\n";
                                        } // END - if
-                               } else {
+                               } elseif ((!empty($ext_name)) && (!empty($ext_ver))) {
                                        // Run SQL commands in dry mode but only return the notes
                                        EXTENSION_UPDATE($ext_name, $ext_ver, true);
                                        $text .= EXT_GET_NOTES();
+                               } else {
+                                       // This should not normally happen!
+                                       debug_report_bug('ext_name(' . $ext_name . ') or ext_ver (' . $ext_ver . ') is empty!');
                                }
 
                                // Prepare array for the template