From 3f1dfaea2ed7099f1ba36f863f8d8946e283b113 Mon Sep 17 00:00:00 2001 From: Frank Fegert Date: Thu, 25 Jun 2009 19:40:21 +0000 Subject: [PATCH] - Fixed Bug #0000010: Do not commit empty user passwords to DB. - Removed navbar from admin.php since its broken there anyway. - Catch empty results in "Overview" page. - Some formating and cleanup. --- admin.php | 12 ++++-------- includes/overview.php | 3 --- includes/tsmmonitor.php | 1 + 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/admin.php b/admin.php index e6e22fe..217c35e 100644 --- a/admin.php +++ b/admin.php @@ -86,10 +86,8 @@ if ($_POST["css"] != "") { } if ($tmonpolld->isEnabled()=="1") { $polldenabled = "enabled and ".$tmonpolld->getStatus(); - //$cellcolor = "green"; } else { $polldenabled = "disabled"; - //$cellcolor = "red"; } echo "
"; echo ""; @@ -250,7 +248,8 @@ if ($_POST["css"] != "") { if ($_POST["txt".$col['Field']] != "") { $val = md5($_POST["txt".$col['Field']]); } else { - $val = ""; + $pwerr = "

Password cannot be empty! Password was not reset.

"; + continue; } } else { $val = $_POST["txt".$col['Field']]; @@ -273,6 +272,7 @@ if ($_POST["css"] != "") { } $adodb->updateDB("cfg_".$_GET['q'], $colarray, 'id'); } + if (!empty($pwerr)) echo $pwerr; echo ""; echo "
"; $thead = $tsmmonitor->getTableheader(); @@ -281,12 +281,8 @@ if ($_POST["css"] != "") { if ($tbody != "") { echo $tbody; } else { - echo ""; + echo ""; } - $nav = $tsmmonitor->showPageNavigation("40"); - if ($nav!="") { - echo ""; - } echo "
No entries found in database.
No entries found in database.
"; echo ""; echo "
"; diff --git a/includes/overview.php b/includes/overview.php index 61163e0..f6d537c 100644 --- a/includes/overview.php +++ b/includes/overview.php @@ -47,7 +47,6 @@ - getOverviewRows($tsmmonitor->configarray["infoboxarray"]["database"]); ?>
TSM Database
@@ -57,7 +56,6 @@ - getOverviewRows($tsmmonitor->configarray["infoboxarray"]["totaldata"]); ?>
Total Data
@@ -66,7 +64,6 @@ - getOverviewRows($tsmmonitor->configarray["infoboxarray"]["schedules"]); ?>
Schedule Status
diff --git a/includes/tsmmonitor.php b/includes/tsmmonitor.php index 0413fce..2fbd571 100644 --- a/includes/tsmmonitor.php +++ b/includes/tsmmonitor.php @@ -1156,6 +1156,7 @@ class TSMMonitor { } else { $sql = "SELECT name, result from res_overview_".$this->GETVars['server']." where name='".$subindexqueryarray[$key]["name"]."'"; $sqlres = $this->adodb->fetchArrayDB($sql); + if (empty($sqlres[0]["result"])) $sqlres[0]["result"] = 0; $comperator = $subindexqueryarray[$key]["alert_comp"]; $alertval = $subindexqueryarray[$key]["alert_val"]; $alertcol = $subindexqueryarray[$key]["alert_col"];