Qual: Uniformize code

This commit is contained in:
Laurent Destailleur
2011-12-19 11:57:09 +01:00
parent 6498742d27
commit 4877e2474c
4 changed files with 42 additions and 42 deletions

View File

@@ -87,7 +87,7 @@ class DoliDBPgsql
$this->connected = 0;
$this->ok = 0;
$this->error="Pgsql PHP functions are not available in this version of PHP";
dol_syslog("DoliDB::DoliDB : Pgsql PHP functions are not available in this version of PHP",LOG_ERR);
dol_syslog(get_class($this)."::DoliDBPgsql : Pgsql PHP functions are not available in this version of PHP",LOG_ERR);
return $this->ok;
}
@@ -96,7 +96,7 @@ class DoliDBPgsql
$this->connected = 0;
$this->ok = 0;
$this->error=$langs->trans("ErrorWrongHostParameter");
dol_syslog("DoliDB::DoliDB : Erreur Connect, wrong host parameters",LOG_ERR);
dol_syslog(get_class($this)."::DoliDBPgsql : Erreur Connect, wrong host parameters",LOG_ERR);
return $this->ok;
}
@@ -114,7 +114,7 @@ class DoliDBPgsql
$this->connected = 0;
$this->ok = 0;
$this->error='Host, login or password incorrect';
dol_syslog("DoliDB::DoliDB : Erreur Connect ".$this->error,LOG_ERR);
dol_syslog(get_class($this)."::DoliDBPgsql : Erreur Connect ".$this->error,LOG_ERR);
}
// Si connexion serveur ok et si connexion base demandee, on essaie connexion base
@@ -132,7 +132,7 @@ class DoliDBPgsql
$this->database_name = '';
$this->ok = 0;
$this->error=$this->error();
dol_syslog("DoliDB::DoliDB : Erreur Select_db ".$this->error,LOG_ERR);
dol_syslog(get_class($this)."::DoliDBPgsql : Erreur Select_db ".$this->error,LOG_ERR);
}
}
else
@@ -412,7 +412,7 @@ class DoliDBPgsql
{
if ($this->db)
{
//dol_syslog("DoliDB::disconnect",LOG_DEBUG);
//dol_syslog(get_class($this)."::disconnect",LOG_DEBUG);
$this->connected=0;
return pg_close($this->db);
}
@@ -531,7 +531,7 @@ class DoliDBPgsql
$this->lastqueryerror = $query;
$this->lasterror = $this->error();
$this->lasterrno = $this->errno();
dol_syslog("Pgsql.lib::query SQL error: ".$query." ".$this->lasterrno, LOG_WARNING);
dol_syslog(get_class($this)."::query SQL error: ".$query." ".$this->lasterrno, LOG_WARNING);
//print "\n>> ".$query."<br>\n";
//print '>> '.$this->lasterrno.' - '.$this->lasterror.' - '.$this->lastqueryerror."<br>\n";
@@ -1078,7 +1078,7 @@ class DoliDBPgsql
{
$sql = "create user \"".addslashes($dolibarr_main_db_user)."\" with password '".addslashes($dolibarr_main_db_pass)."'";
dol_syslog("pgsql.lib::DDLCreateUser", LOG_DEBUG); // No sql to avoid password in log
dol_syslog(get_class($this)."::DDLCreateUser", LOG_DEBUG); // No sql to avoid password in log
$resql=$this->query($sql);
if (! $resql)
{