Fixed minor bug in database upgrade

This commit is contained in:
unknown 2008-09-15 17:30:32 +02:00
parent 422b1f01ff
commit 1323fcc3e4
3 changed files with 6 additions and 2 deletions

View File

@ -151,7 +151,7 @@ if ( !$content['error_occured'] )
// echo $myKey . "<br>";
$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[] = "";

View File

@ -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!

View File

@ -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'] )