From 1323fcc3e44f5b6d2a73153627f8baa1ac187ef9 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 15 Sep 2008 17:30:32 +0200 Subject: [PATCH] Fixed minor bug in database upgrade --- src/chartgenerator.php | 2 +- src/include/functions_common.php | 2 +- src/include/functions_config.php | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/chartgenerator.php b/src/chartgenerator.php index c156bbb..19b2aac 100644 --- a/src/chartgenerator.php +++ b/src/chartgenerator.php @@ -151,7 +151,7 @@ if ( !$content['error_occured'] ) // echo $myKey . "
"; $YchartData[] = intval($myData); $XchartData[] = strlen($myKey) > 0 ? $myKey : "Unknown"; - if ( isset($fields[$content['chart_field']]['SearchField']) ) + if ( isset($fields[$content['chart_field']]['SearchField']) && strlen($myKey) > 0 ) $chartImageMapLinks[] = $content['BASEPATH'] . "index.php?filter=" . $fields[$content['chart_field']]['SearchField'] . "%3A%3D" . urlencode($szEncodedKeyStr) . "&search=Search"; else $chartImageMapLinks[] = ""; diff --git a/src/include/functions_common.php b/src/include/functions_common.php index 1a789d1..8646f39 100644 --- a/src/include/functions_common.php +++ b/src/include/functions_common.php @@ -66,7 +66,7 @@ $LANG_EN = "en"; // Used for fallback $LANG = "en"; // Default language // Default Template vars -$content['BUILDNUMBER'] = "2.5.6"; +$content['BUILDNUMBER'] = "2.5.7"; $content['TITLE'] = "phpLogCon :: Release " . $content['BUILDNUMBER']; // Default page title $content['BASEPATH'] = $gl_root_path; $content['SHOW_DONATEBUTTON'] = true; // Default = true! diff --git a/src/include/functions_config.php b/src/include/functions_config.php index 6dcc0c7..49fcdac 100644 --- a/src/include/functions_config.php +++ b/src/include/functions_config.php @@ -416,6 +416,10 @@ function LoadChartsFromDatabase() // Needed to make global global $CFG, $content; + // Abort reading charts if the database version is below 3, because prior v3, there were no charts table + if ( $content['database_installedversion'] < 3 ) + return; + // --- Create SQL Query // Create Where for USERID if ( isset($content['SESSION_LOGGEDIN']) && $content['SESSION_LOGGEDIN'] )