From 80578c97139286fe182036f2bc4a5029c313b155 Mon Sep 17 00:00:00 2001 From: sparkyx Date: Wed, 7 Sep 2005 14:56:53 +0000 Subject: [PATCH] task #4622 domaine --- include/constant.php | 1 + include/debug.php | 2 +- include/postgres.php | 6 +++--- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/constant.php b/include/constant.php index 16cd35ecd..33c34c80b 100644 --- a/include/constant.php +++ b/include/constant.php @@ -22,6 +22,7 @@ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr // $Revision$ define ("phpcompta_password","dany"); +define ("domaine",""); define ("DEBUG","true"); diff --git a/include/debug.php b/include/debug.php index 8b306afaf..1e76c9aa5 100644 --- a/include/debug.php +++ b/include/debug.php @@ -30,7 +30,7 @@ function echo_debug ($file,$line="",$msg="") { $cn=pg_connect($l_Db); $file=FormatString($file); $line=FormatString($line); - $msg=FormatString($msg); + $msg='domaine :'.domaine.' '.FormatString($msg); $sql= "insert into log (lg_file,lg_line,lg_msg) ". "values ('$file','$line','$msg');"; diff --git a/include/postgres.php b/include/postgres.php index 1305bb2af..a352f4800 100644 --- a/include/postgres.php +++ b/include/postgres.php @@ -71,17 +71,17 @@ function ShowDossier($p_type,$p_first=0,$p_max=10,$p_Num=0) { */ function DbConnect($p_db=-1,$p_type='dossier') { if ( $p_db==-1) - $l_dossier="account_repository"; + $l_dossier=sprintf("%saccount_repository",domaine); else { if ( $p_db == -2 ) $l_dossier=$p_type; else switch ($p_type) { case 'dossier': - $l_dossier=sprintf("dossier%d",$p_db); + $l_dossier=sprintf("%sdossier%d",domaine,$p_db); break; case 'mod': - $l_dossier=sprintf("mod%d",$p_db); + $l_dossier=sprintf("%smod%d",domaine,$p_db); break; } }