Clean comment and make some implementations

This commit is contained in:
Laurent Destailleur
2014-02-24 09:52:48 +01:00
parent 404d24a029
commit a797a5e665
7 changed files with 64 additions and 52 deletions

View File

@@ -85,6 +85,7 @@ class DoliDBPgsql extends DoliDB
{
global $conf,$langs;
// Note that having "static" property for "$forcecharset" and "$forcecollate" will make error here in strict mode, so they are not static
if (! empty($conf->db->character_set)) $this->forcecharset=$conf->db->character_set;
if (! empty($conf->db->dolibarr_main_db_collation)) $this->forcecollate=$conf->db->dolibarr_main_db_collation;
@@ -1386,17 +1387,17 @@ class DoliDBPgsql extends DoliDB
}
/**
* Return value of server parameters
* Return value of server parameters
*
* @param string $filter Filter list on a particular value
* @return string Value for parameter
* @param string $filter Filter list on a particular value
* @return array Array of key-values (key=>value)
*/
function getServerParametersValues($filter='')
{
$result=array();
$resql='select name,setting from pg_settings';
if ($filter) $resql.=" WHERE name = '".addslashes($filter)."'";
if ($filter) $resql.=" WHERE name = '".$this->escape($filter)."'";
$resql=$this->query($resql);
if ($resql)
{
@@ -1408,18 +1409,25 @@ class DoliDBPgsql extends DoliDB
}
/**
* Return value of server status
* Return value of server status
*
* @param string $filter Filter list on a particular value
* @return string Value for parameter
* @param string $filter Filter list on a particular value
* @return array Array of key-values (key=>value)
*/
function getServerStatusValues($filter='')
{
// FIXME: Dummy method
// TODO: Implement
// May help: http://netpenthe.wordpress.com/2011/12/07/mysql-show-status-for-postgresql
/* This is to return current running requests.
$sql='SELECT datname,procpid,current_query FROM pg_stat_activity ORDER BY procpid';
if ($filter) $sql.=" LIKE '".$this->escape($filter)."'";
$resql=$this->query($sql);
if ($resql)
{
$obj=$this->fetch_object($resql);
$result[$obj->Variable_name]=$obj->Value;
}
*/
return '';
return array();
}
}
?>