Updates to node display
This commit is contained in:
@@ -94,7 +94,6 @@ class Database_TSM extends Database {
|
||||
|
||||
$result = $this->query(Database::SELECT,'SELECT server_name,platform,version,release,level,sublevel FROM status');
|
||||
|
||||
//echo Kohana::debug($result);die();
|
||||
if ($result)
|
||||
return TSM::instance()->set($username,$password,$result);
|
||||
else
|
||||
@@ -163,10 +162,15 @@ class Database_TSM extends Database {
|
||||
}
|
||||
}
|
||||
|
||||
private function clear() {
|
||||
$this->_query_msg_codes = array();
|
||||
}
|
||||
|
||||
public function query($type, $sql, $as_object = FALSE, array $params = NULL)
|
||||
{
|
||||
// Make sure the database is connected
|
||||
$this->_connection or $this->connect();
|
||||
$this->clear();
|
||||
|
||||
if ( ! empty($this->_config['profiling']))
|
||||
{
|
||||
@@ -174,6 +178,10 @@ class Database_TSM extends Database {
|
||||
$benchmark = Profiler::start("Database ({$this->_instance})", $sql);
|
||||
}
|
||||
|
||||
// We need to escape any back slashes, since the exec will transpose them
|
||||
// @todo Is there a better way of doing this?
|
||||
$sql = str_replace('\\','\\\\',$sql);
|
||||
|
||||
// Execute the query
|
||||
$stderr = exec($this->_connection.'"'.$sql.'"',$stdout,$rc);
|
||||
|
||||
@@ -187,7 +195,7 @@ class Database_TSM extends Database {
|
||||
|
||||
// If we got a no data code
|
||||
if (array_intersect($this->_query_msg_codes,$this->nodata_codes)) {
|
||||
$result = array(0);
|
||||
$result = array();
|
||||
$rc = 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user