From 9d3e47c8ab6ff3ab7efca2a968d66a5ccf76728d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sat, 6 Jun 2009 19:27:54 +0000 Subject: [PATCH] Now debug_report_bug() will be called if ext_name or ext_ver is empty which should not happen --- inc/modules/admin/overview-inc.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/inc/modules/admin/overview-inc.php b/inc/modules/admin/overview-inc.php index 36cf9c6f3f..ccaaa3f034 100644 --- a/inc/modules/admin/overview-inc.php +++ b/inc/modules/admin/overview-inc.php @@ -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%")."
\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 -- 2.39.5