From 8a68548deb55825529743380a803d2900f61ca87 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sat, 6 Jun 2009 21:00:43 +0000 Subject: [PATCH] More debug.log lines added, indent fixed in surfbar.php --- inc/extensions.php | 16 ++++++++++++++-- surfbar.php | 6 +++--- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/inc/extensions.php b/inc/extensions.php index fb0ae03c51..790c42639f 100644 --- a/inc/extensions.php +++ b/inc/extensions.php @@ -61,6 +61,8 @@ function LOAD_EXTENSION ($ext_name, $EXT_LOAD_MODE = '', $EXT_VER = '', $dry_run if ((isset($GLOBALS['ext_loaded']['ext'][$ext_name])) && (empty($EXT_LOAD_MODE))) { // Debug message DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Extension %s already loaded.", $ext_name)); + + // Abort here return false; } // END - if @@ -71,7 +73,7 @@ function LOAD_EXTENSION ($ext_name, $EXT_LOAD_MODE = '', $EXT_VER = '', $dry_run // Is the extension file NOT there? if (!isIncludeReadable($INC)) { // Debug message - DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Extension %s not found.", $ext_name)); + DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Extension %s not found or not readable.", $ext_name)); // Abort here return false; @@ -86,7 +88,12 @@ function LOAD_EXTENSION ($ext_name, $EXT_LOAD_MODE = '', $EXT_VER = '', $dry_run //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "--- Language loaded."); $GLOBALS['ext_loaded']['lang'][$ext_name] = true; loadIncludeOnce($langInclude); - } // END - if + } else { + // No language file is not so good... + DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("WARNING: Extension %s has no language file or we cannot read from it. lang=%s", + $ext_name, getLanguage() + )); + } // Construct FQFN for functions file $funcsInclude = sprintf("inc/libs/%s_functions.php", $ext_name); @@ -97,6 +104,11 @@ function LOAD_EXTENSION ($ext_name, $EXT_LOAD_MODE = '', $EXT_VER = '', $dry_run //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "--- Functions loaded."); $GLOBALS['ext_loaded']['funcs'][$ext_name] = true; loadIncludeOnce($funcsInclude); + } else { + // No functions file is not so good... + DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("WARNING: Extension %s has no own functions file or we cannot read from it.", + $ext_name + )); } // END - if // Extensions are not deprecated by default diff --git a/surfbar.php b/surfbar.php index 6d70c83dda..8f313fd4b3 100644 --- a/surfbar.php +++ b/surfbar.php @@ -118,10 +118,10 @@ if (isInstalled()) { 'restart' => getConfig('surfbar_restart_time'), 'start' => str_repeat('X', strlen(getConfig('surfbar_restart_time'))), 'autostart' => (getConfig('surfbar_autostart') == 'Y') ? 'true' : 'false' - ); + ); - // Load template for stopped surfbar - LOAD_TEMPLATE('surfbar_stopped', false, $content); + // Load template for stopped surfbar + LOAD_TEMPLATE('surfbar_stopped', false, $content); } } elseif ((REQUEST_ISSET_GET(('check'))) && (REQUEST_ISSET_GET('id')) && (REQUEST_ISSET_GET(('salt')))) { // Dummy next id get -- 2.39.2