From aac3cb15887577d2016bb5b4de91ad4da5b9cc6f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sat, 6 Jun 2009 19:38:38 +0000 Subject: [PATCH] More debug output added --- inc/extensions.php | 2 +- inc/modules/admin/overview-inc.php | 14 +++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/inc/extensions.php b/inc/extensions.php index b0b7df1291..fb0ae03c51 100644 --- a/inc/extensions.php +++ b/inc/extensions.php @@ -579,7 +579,7 @@ function EXTENSION_UPDATE ($ext_name, $ext_ver, $dry_run = false) { } // Output verbose SQL table for extension -function EXTENSION_VERBOSE_TABLE ($queries = array(), $title = '', $dashed = '', $switch = false, $width = "100%") { +function EXTENSION_VERBOSE_TABLE ($queries = array(), $title = '', $dashed = '', $switch = false, $width = '100%') { // Empty title? if (empty($title)) { // Then fix it to default diff --git a/inc/modules/admin/overview-inc.php b/inc/modules/admin/overview-inc.php index ccaaa3f034..856454cffb 100644 --- a/inc/modules/admin/overview-inc.php +++ b/inc/modules/admin/overview-inc.php @@ -169,7 +169,10 @@ LIMIT 1", // Shall I list SQL commands assigned to an extension installation or update task? if (((GET_EXT_VERSION('sql_patches') != '') && (getConfig('verbose_sql') == 'Y')) || (!EXT_IS_ACTIVE('sql_patches'))) { + // Extract extension name from subject $ext_name = substr($subj, 1, strpos($subj, ':') - 1); + + // Update task or extension task? if ($type == 'EXTENSION') { // Load SQL commands for registering REGISTER_EXTENSION($ext_name, $id, true); @@ -183,7 +186,7 @@ LIMIT 1", // Prepare extension name and version $ext_name = substr($ext_name, 7); $ext_name = substr($ext_name, 0, strpos($ext_name, '-')); - $test = '[UPDATE-'.$ext_name.'-'; + $test = '[UPDATE-' . $ext_name . '-'; $ext_ver = substr($subj, strlen($test)); $ext_ver = substr($ext_ver, 0, strpos($ext_ver, ':')); @@ -200,12 +203,13 @@ LIMIT 1", $ext_name = ''; } - // Add SQLs to a table + // Auto-init SQL handler if (!IS_SQLS_VALID()) INIT_SQLS(); - if (empty($title)) $title = ''; + + // Add SQLs to a table if ((!empty($ext_name)) && (GET_EXT_VERSION('sql_patches')) && (getConfig('verbose_sql') == 'Y')) { // Add verbose SQL table - $text .= EXTENSION_VERBOSE_TABLE($title, " class=\"admin_table top2 left2 right2\"", true, "100%")."
\n"; + $text .= EXTENSION_VERBOSE_TABLE($title, " class=\"admin_table top2 left2 right2\"", true, '100%')."
\n"; } // END - if } elseif ((!empty($ext_name)) && (!empty($ext_ver))) { // Run SQL commands in dry mode but only return the notes @@ -213,7 +217,7 @@ LIMIT 1", $text .= EXT_GET_NOTES(); } else { // This should not normally happen! - debug_report_bug('ext_name(' . $ext_name . ') or ext_ver (' . $ext_ver . ') is empty!'); + debug_report_bug('ext_name(' . $ext_name . ') or ext_ver(' . $ext_ver . ') is empty! sql_patches=' . GET_EXT_VERSION('sql_patches') . '/verbose_sql=' . getConfig('verbose_sql')); } // Prepare array for the template -- 2.30.2