mirror of
https://codeberg.org/mclemens/tsmmonitor2.git
synced 2025-01-08 18:56:37 -05:00
...
This commit is contained in:
parent
8e5e0648a5
commit
d1bb95bdcb
@ -46,12 +46,6 @@ class PollD {
|
||||
var $servers;
|
||||
var $queries;
|
||||
var $overviewqueries;
|
||||
/**
|
||||
var $db_host;
|
||||
var $db_name;
|
||||
var $db_user;
|
||||
var $db_password;
|
||||
**/
|
||||
var $adodb;
|
||||
|
||||
var $log_timeneeded;
|
||||
@ -70,8 +64,6 @@ var $log_updated;
|
||||
function PollD($adodb) {
|
||||
|
||||
$this->adodb = $adodb;
|
||||
|
||||
//$this->setDBParams("localhost", "tsmmonitor", "tsmmonitor", "tsmmonitor");
|
||||
$this->servers = $this->getServers();
|
||||
$this->queries = $this->getQueries();
|
||||
$this->overviewqueries = $this->getOverviewQueries();
|
||||
@ -80,35 +72,6 @@ function PollD($adodb) {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* fireMySQLQuery - executes a SQL query
|
||||
*
|
||||
* @param string $sql SQL query
|
||||
* @param boolean $direct give back MySQLResultSet directly or Array of Objects
|
||||
* @return MySQLResultSet/Array
|
||||
*/
|
||||
/**
|
||||
function fireMySQLQuery($sql, $getreturnval = TRUE){
|
||||
|
||||
$ret = array();
|
||||
|
||||
$db = mysql_connect($this->db_host, $this->db_user, $this->db_password);
|
||||
mysql_select_db($this->db_name, $db);
|
||||
$result = mysql_query($sql, $db);
|
||||
//if (strtolower(substr($sql,0,6)) == "select" && $getreturnval && $result ) {
|
||||
if ($getreturnval && $result ) {
|
||||
while($row = mysql_fetch_object($result))
|
||||
{
|
||||
$ret[] = $row;
|
||||
}
|
||||
mysql_free_result($result);
|
||||
}
|
||||
|
||||
return $ret;
|
||||
}
|
||||
**/
|
||||
|
||||
|
||||
/**
|
||||
* getQueries - returns an array filled with all configured TSM queries
|
||||
*
|
||||
@ -534,7 +497,7 @@ function getStatus() {
|
||||
//$result = $this->fireMySQLQuery($sql, TRUE);
|
||||
$result = $this->adodb->fetchArrayDB($sql);
|
||||
|
||||
return $result[0]->status;
|
||||
return $result[0]["status"];
|
||||
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user