Skip to content
Snippets Groups Projects
Commit 6e5eb9cc authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Normalize code to removed database conexion creation in user code. Database...

Normalize code to removed database conexion creation in user code. Database handler $db is already created by master.inc.php called by every PHP file (directly or through main.inc.php).
parent fbf8bec4
No related branches found
No related tags found
No related merge requests found
......@@ -20,9 +20,8 @@
*
*
* Generation des graphiques clients
*
*
*/
require ("../../master.inc.php");
require_once (DOL_DOCUMENT_ROOT."/telephonie/lignetel.class.php");
......@@ -51,11 +50,11 @@ class ProcessGraphClients
function ProcessGraphClients( $ident , $cpc)
{
global $conf;
global $db;
$this->ident = $ident;
$this->cpc = $cpc;
$this->db = new DoliDb($conf->db->type,$conf->db->host,$conf->db->user,$conf->db->pass,$conf->db->name,$conf->db->port);
$this->db = $db;
}
function go($id=0)
......
......@@ -38,11 +38,11 @@ class ProcessGraphContrats
function ProcessGraphContrats( $ident=0 , $cpc=0)
{
global $conf;
global $db;
$this->ident = $ident;
$this->cpc = $cpc;
$this->db = new DoliDb($conf->db->type,$conf->db->host,$conf->db->user,$conf->db->pass,$conf->db->name,$conf->db->port);
$this->db = $db;
$this->messages = array();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment