diff --git a/dev/load/generate-commande.php b/dev/load/generate-commande.php index 5facdd96e95a9af400cc87a96212eca3b7e12c55..16488da670cece8fae7c7f489f0714a60fb58719 100644 --- a/dev/load/generate-commande.php +++ b/dev/load/generate-commande.php @@ -175,7 +175,7 @@ for ($s = 0 ; $s < GEN_NUMBER_COMMANDE ; $s++) $result=$com->add_product($prodids[$prodid],rand(1,11),rand(1,6),rand(0,20)); if ($result < 0) { - dolibarr_print_error($db,$propal->error); + dol_print_error($db,$propal->error); } $xnbp++; } @@ -187,12 +187,12 @@ for ($s = 0 ; $s < GEN_NUMBER_COMMANDE ; $s++) if ($result) print " OK"; else { - dolibarr_print_error($db,$com->error); + dol_print_error($db,$com->error); } } else { - dolibarr_print_error($db,$facture->error); + dol_print_error($db,$facture->error); } print "\n"; diff --git a/dev/load/generate-facture.php b/dev/load/generate-facture.php index f0894a1ef1795ddc1dccb7cd56287a927e04e48b..7656d65b674486692d9d1cde507fdae34f1cf74a 100644 --- a/dev/load/generate-facture.php +++ b/dev/load/generate-facture.php @@ -119,12 +119,12 @@ while ($i < GEN_NUMBER_FACTURE && $result >= 0) if ($result) print " OK"; else { - dolibarr_print_error($db,$facture->error); + dol_print_error($db,$facture->error); } } else { - dolibarr_print_error($db,$facture->error); + dol_print_error($db,$facture->error); } print "\n"; diff --git a/dev/load/generate-propale.php b/dev/load/generate-propale.php index 8bc83c4fcb5626403206227edfb128022e3c3bdd..8d26c74c6e26e53c5f2a4aa448b0305753e21ef5 100644 --- a/dev/load/generate-propale.php +++ b/dev/load/generate-propale.php @@ -149,7 +149,7 @@ while ($i < GEN_NUMBER_PROPAL && $result >= 0) $result=$propal->addline($propal->id, 'Description '.$xnbp, '100', rand(1,5), '19.6', $prodids[$prodid], 0); if ($result < 0) { - dolibarr_print_error($db,$propal->error); + dol_print_error($db,$propal->error); } $xnbp++; } @@ -157,7 +157,7 @@ while ($i < GEN_NUMBER_PROPAL && $result >= 0) } else { - dolibarr_print_error($db,$propal->error); + dol_print_error($db,$propal->error); } print "\n"; diff --git a/dev/skeletons/skeleton_class.class.php b/dev/skeletons/skeleton_class.class.php index f438c87b3f0aac3590105adf4b445fdd15187530..381173f22c4ceae242e4f83327d9d210fc340aad 100644 --- a/dev/skeletons/skeleton_class.class.php +++ b/dev/skeletons/skeleton_class.class.php @@ -94,7 +94,7 @@ class Skeleton_class // extends CommonObject $this->db->begin(); - dolibarr_syslog(get_class($this)."::create sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::create sql=".$sql, LOG_DEBUG); $resql=$this->db->query($sql); if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); } @@ -121,7 +121,7 @@ class Skeleton_class // extends CommonObject { foreach($this->errors as $errmsg) { - dolibarr_syslog(get_class($this)."::create ".$errmsg, LOG_ERR); + dol_syslog(get_class($this)."::create ".$errmsg, LOG_ERR); $this->error.=($this->error?', '.$errmsg:$errmsg); } $this->db->rollback(); @@ -151,7 +151,7 @@ class Skeleton_class // extends CommonObject $sql.= " FROM ".MAIN_DB_PREFIX."mytable as t"; $sql.= " WHERE t.rowid = ".$id; - dolibarr_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -171,7 +171,7 @@ class Skeleton_class // extends CommonObject else { $this->error="Error ".$this->db->lasterror(); - dolibarr_syslog(get_class($this)."::fetch ".$this->error, LOG_ERR); + dol_syslog(get_class($this)."::fetch ".$this->error, LOG_ERR); return -1; } } @@ -205,7 +205,7 @@ class Skeleton_class // extends CommonObject $this->db->begin(); - dolibarr_syslog(get_class($this)."::update sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::update sql=".$sql, LOG_DEBUG); $resql = $this->db->query($sql); if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); } @@ -230,7 +230,7 @@ class Skeleton_class // extends CommonObject { foreach($this->errors as $errmsg) { - dolibarr_syslog(get_class($this)."::update ".$errmsg, LOG_ERR); + dol_syslog(get_class($this)."::update ".$errmsg, LOG_ERR); $this->error.=($this->error?', '.$errmsg:$errmsg); } $this->db->rollback(); @@ -260,7 +260,7 @@ class Skeleton_class // extends CommonObject $this->db->begin(); - dolibarr_syslog(get_class($this)."::delete sql=".$sql); + dol_syslog(get_class($this)."::delete sql=".$sql); $resql = $this->db->query($sql); if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); } @@ -285,7 +285,7 @@ class Skeleton_class // extends CommonObject { foreach($this->errors as $errmsg) { - dolibarr_syslog(get_class($this)."::delete ".$errmsg, LOG_ERR); + dol_syslog(get_class($this)."::delete ".$errmsg, LOG_ERR); $this->error.=($this->error?', '.$errmsg:$errmsg); } $this->db->rollback(); diff --git a/dev/skeletons/skeleton_script.php b/dev/skeletons/skeleton_script.php index f70e754928997adb6392477039b780fe4c05c472..3cd7bfc440b118eb0d4c1a0cb52e893a08b8918a 100644 --- a/dev/skeletons/skeleton_script.php +++ b/dev/skeletons/skeleton_script.php @@ -70,37 +70,37 @@ $myobject=new Skeleton_class($db); // Example for inserting creating object in database /* -dolibarr_syslog($script_file." CREATE", LOG_DEBUG); +dol_syslog($script_file." CREATE", LOG_DEBUG); $myobject->prop1='value_prop1'; $myobject->prop2='value_prop2'; $id=$myobject->create($user); -if ($id < 0) dolibarr_print_error($db,$myobject->error); +if ($id < 0) dol_print_error($db,$myobject->error); else print "Object created with id=".$id."\n"; */ // Example for reading object from database /* -dolibarr_syslog($script_file." FETCH", LOG_DEBUG); +dol_syslog($script_file." FETCH", LOG_DEBUG); $result=$myobject->fetch($id); -if ($result < 0) dolibarr_print_error($db,$myobject->error); +if ($result < 0) dol_print_error($db,$myobject->error); else print "Object with id=".$id." loaded\n"; */ // Example for updating object in database ($myobject must have been loaded by a fetch before) /* -dolibarr_syslog($script_file." UPDATE", LOG_DEBUG); +dol_syslog($script_file." UPDATE", LOG_DEBUG); $myobject->prop1='newvalue_prop1'; $myobject->prop2='newvalue_prop2'; $result=$myobject->update($user); -if ($result < 0) dolibarr_print_error($db,$myobject->error); +if ($result < 0) dol_print_error($db,$myobject->error); else print "Object with id ".$myobject->id." updated\n"; */ // Example for deleting object in database ($myobject must have been loaded by a fetch before) /* -dolibarr_syslog($script_file." DELETE", LOG_DEBUG); +dol_syslog($script_file." DELETE", LOG_DEBUG); $result=$myobject->delete($user); -if ($result < 0) dolibarr_print_error($db,$myobject->error); +if ($result < 0) dol_print_error($db,$myobject->error); else print "Object with id ".$myobject->id." deleted\n"; */ @@ -112,7 +112,7 @@ $sql.= " FROM ".MAIN_DB_PREFIX."c_pays"; $sql.= " WHERE field3 = 'xxx'"; $sql.= " ORDER BY field1 ASC"; -dolibarr_syslog($script_file." sql=".$sql, LOG_DEBUG); +dol_syslog($script_file." sql=".$sql, LOG_DEBUG); $resql=$db->query($sql); if ($resql) { @@ -135,7 +135,7 @@ if ($resql) } else { - dolibarr_print_error($db); + dol_print_error($db); exit; } */ diff --git a/htdocs/accountancy/accountancyaccount.class.php b/htdocs/accountancy/accountancyaccount.class.php index 44cbaf83edde1b0269e3d006681a564f98f61826..5b4dd0f3e795d8a210beffebe4c42ebd502d2a6b 100644 --- a/htdocs/accountancy/accountancyaccount.class.php +++ b/htdocs/accountancy/accountancyaccount.class.php @@ -79,14 +79,14 @@ class AccountancyAccount { $result = -2; $this->error="AccountancyAccount::Create Erreur $result"; - dolibarr_syslog($this->error); + dol_syslog($this->error); } } else { $result = -1; $this->error="AccountancyAccount::Create Erreur $result"; - dolibarr_syslog($this->error); + dol_syslog($this->error); } return $result; diff --git a/htdocs/accountancy/accountancysystem.class.php b/htdocs/accountancy/accountancysystem.class.php index a43a767e429a7ae5520e2179cdea0139c5572d6f..838c76662b8a59a0acc3bc5cd3cdf8a779a627ba 100644 --- a/htdocs/accountancy/accountancysystem.class.php +++ b/htdocs/accountancy/accountancysystem.class.php @@ -79,14 +79,14 @@ class AccountancySystem { $result = -2; $this->error="AccountancySystem::Create Erreur $result"; - dolibarr_syslog($this->error); + dol_syslog($this->error); } } else { $result = -1; $this->error="AccountancySystem::Create Erreur $result"; - dolibarr_syslog($this->error); + dol_syslog($this->error); } return $result; diff --git a/htdocs/actioncomm.class.php b/htdocs/actioncomm.class.php index 65b4dbb4df26e6702af3c3d9f204658c06ff8f28..e7c7247e658184a0d231b66dcfe088d114db01d2 100644 --- a/htdocs/actioncomm.class.php +++ b/htdocs/actioncomm.class.php @@ -173,7 +173,7 @@ class ActionComm $sql.= ($this->orderrowid?$this->orderrowid:"null"); $sql.= ")"; - dolibarr_syslog("ActionComm::add sql=".$sql); + dol_syslog("ActionComm::add sql=".$sql); $resql=$this->db->query($sql); if ($resql) { @@ -226,7 +226,7 @@ class ActionComm $sql.= " FROM ".MAIN_DB_PREFIX."actioncomm as a, ".MAIN_DB_PREFIX."c_actioncomm as c"; $sql.= " WHERE a.id=".$id." AND a.fk_action=c.id"; - dolibarr_syslog("ActionComm::fetch sql=".$sql); + dol_syslog("ActionComm::fetch sql=".$sql); $resql=$this->db->query($sql); if ($resql) { @@ -307,7 +307,7 @@ class ActionComm $sql = "DELETE FROM ".MAIN_DB_PREFIX."actioncomm"; $sql.= " WHERE id=".$this->id; - dolibarr_syslog("ActionComm::delete sql=".$sql, LOG_DEBUG); + dol_syslog("ActionComm::delete sql=".$sql, LOG_DEBUG); if ($this->db->query($sql)) { return 1; @@ -363,7 +363,7 @@ class ActionComm $sql.= ", fk_user_done=".($this->userdone->id > 0 ? "'".$this->userdone->id."'":"null"); $sql.= " WHERE id=".$this->id; - dolibarr_syslog("ActionComm::update sql=".$sql); + dol_syslog("ActionComm::update sql=".$sql); if ($this->db->query($sql)) { return 1; @@ -371,7 +371,7 @@ class ActionComm else { $this->error=$this->db->error(); - dolibarr_syslog("ActionComm::update ".$this->error,LOG_ERR); + dol_syslog("ActionComm::update ".$this->error,LOG_ERR); return -1; } } @@ -429,7 +429,7 @@ class ActionComm $sql.= ' FROM '.MAIN_DB_PREFIX.'actioncomm as a'; $sql.= ' WHERE a.id = '.$id; - dolibarr_syslog("ActionComm::info sql=".$sql); + dol_syslog("ActionComm::info sql=".$sql); $result=$this->db->query($sql); if ($result) { @@ -457,7 +457,7 @@ class ActionComm } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); } } @@ -546,7 +546,7 @@ class ActionComm else { $libelle=$this->libelle; - $libelleshort=dolibarr_trunc($this->libelle,$maxlength); + $libelleshort=dol_trunc($this->libelle,$maxlength); } if ($withpicto) $result.=($lien.img_object($langs->trans("ShowAction").': '.$libelle,'task').$lienfin); @@ -571,7 +571,7 @@ class ActionComm require_once (DOL_DOCUMENT_ROOT ."/lib/xcal.lib.php"); - dolibarr_syslog("ActionComm::build_exportfile Build export file format=".$format.", type=".$type.", cachedelay=".$cachedelay.", filename=".$filename.", filters size=".sizeof($filters), LOG_DEBUG); + dol_syslog("ActionComm::build_exportfile Build export file format=".$format.", type=".$type.", cachedelay=".$cachedelay.", filename=".$filename.", filters size=".sizeof($filters), LOG_DEBUG); // Check parameters if (empty($format)) return -1; @@ -658,7 +658,7 @@ class ActionComm //$sql.= " AND a.datep != 'null'"; // To exclude corrupted events and avoid errors in lightning/sunbird import $sql.= " ORDER by datep"; - dolibarr_syslog("ActionComm::build_exportfile select events sql=".$sql); + dol_syslog("ActionComm::build_exportfile select events sql=".$sql); $resql=$this->db->query($sql); if ($resql) { @@ -702,7 +702,7 @@ class ActionComm else { $this->error=$this->db->lasterror(); - dolibarr_syslog("ActionComm::build_exportfile ".$this->db->lasterror(), LOG_ERR); + dol_syslog("ActionComm::build_exportfile ".$this->db->lasterror(), LOG_ERR); return -1; } diff --git a/htdocs/adherents/adherent.class.php b/htdocs/adherents/adherent.class.php index 9d6e26d350141f8bb5c6b7641fef64112e156644..14a58fee46cb27ed7580af3dc6dbde145403d0c5 100644 --- a/htdocs/adherents/adherent.class.php +++ b/htdocs/adherents/adherent.class.php @@ -278,7 +278,7 @@ class Adherent extends CommonObject $sql.= " '".$user->id."',null,null,'".$this->morphy."'"; $sql.= ")"; - dolibarr_syslog("Adherent::create sql=".$sql); + dol_syslog("Adherent::create sql=".$sql); $result = $this->db->query($sql); if ($result) { @@ -348,7 +348,7 @@ class Adherent extends CommonObject $nbrowsaffected=0; $error=0; - dolibarr_syslog("Adherent::update notrigger=".$notrigger.", nosyncuser=".$nosyncuser.", email=".$this->email); + dol_syslog("Adherent::update notrigger=".$notrigger.", nosyncuser=".$nosyncuser.", email=".$this->email); // Verification parametres if ($conf->global->ADHERENT_MAIL_REQUIRED && ! ValidEMail($this->email)) @@ -385,7 +385,7 @@ class Adherent extends CommonObject $sql.= ", fk_user_mod=".$user->id; $sql.= " WHERE rowid = ".$this->id; - dolibarr_syslog("Adherent::update sql=".$sql); + dol_syslog("Adherent::update sql=".$sql); $resql = $this->db->query($sql); if ($resql) { @@ -394,7 +394,7 @@ class Adherent extends CommonObject if (sizeof($this->array_options) > 0) { $sql_del = "DELETE FROM ".MAIN_DB_PREFIX."adherent_options WHERE adhid = ".$this->id; - dolibarr_syslog("Adherent::update sql=".$sql_del); + dol_syslog("Adherent::update sql=".$sql_del); $this->db->query($sql_del); $sql = "INSERT INTO ".MAIN_DB_PREFIX."adherent_options (adhid"; @@ -418,7 +418,7 @@ class Adherent extends CommonObject } $sql.=")"; - dolibarr_syslog("Adherent::update sql=".$sql); + dol_syslog("Adherent::update sql=".$sql); $resql = $this->db->query($sql); if ($resql) { @@ -427,7 +427,7 @@ class Adherent extends CommonObject else { $this->error=$this->db->error(); - dolibarr_syslog("Adherent::update ".$this->error,LOG_ERR); + dol_syslog("Adherent::update ".$this->error,LOG_ERR); $this->db->rollback(); return -2; } @@ -477,7 +477,7 @@ class Adherent extends CommonObject if ($result < 0) { $this->error=$luser->error; - dolibarr_syslog("Adherent::update ".$this->error,LOG_ERR); + dol_syslog("Adherent::update ".$this->error,LOG_ERR); $error++; } } @@ -519,7 +519,7 @@ class Adherent extends CommonObject $this->db->rollback(); $this->error=$this->db->lasterror(); - dolibarr_syslog("Adherent::update ".$this->error,LOG_ERR); + dol_syslog("Adherent::update ".$this->error,LOG_ERR); return -1; } } @@ -544,7 +544,7 @@ class Adherent extends CommonObject $sql.= " WHERE fk_adherent='".$this->id."'"; $sql.= " ORDER by dateadh DESC"; // Sort by start subscription date - dolibarr_syslog("Adherent::update_end_date sql=".$sql); + dol_syslog("Adherent::update_end_date sql=".$sql); $resql=$this->db->query($sql); if ($resql) { @@ -555,7 +555,7 @@ class Adherent extends CommonObject $sql.= " datefin=".($datefin != '' ? "'".$this->db->idate($datefin)."'" : "null"); $sql.= " WHERE rowid = ".$this->id; - dolibarr_syslog("Adherent::update_end_date sql=".$sql); + dol_syslog("Adherent::update_end_date sql=".$sql); $resql=$this->db->query($sql); if ($resql) { @@ -571,7 +571,7 @@ class Adherent extends CommonObject else { $this->error=$this->db->lasterror(); - dolibarr_syslog("Adherent::update_end_date ".$this->error, LOG_ERR); + dol_syslog("Adherent::update_end_date ".$this->error, LOG_ERR); $this->db->rollback(); return -1; } @@ -593,17 +593,17 @@ class Adherent extends CommonObject // Suppression options $sql = "DELETE FROM ".MAIN_DB_PREFIX."adherent_options WHERE adhid = ".$rowid; - dolibarr_syslog("Adherent::delete sql=".$sql); + dol_syslog("Adherent::delete sql=".$sql); $resql=$this->db->query($sql); if ($resql) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."cotisation WHERE fk_adherent = ".$rowid; - dolibarr_syslog("Adherent::delete sql=".$sql); + dol_syslog("Adherent::delete sql=".$sql); $resql=$this->db->query( $sql); if ($resql) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."adherent WHERE rowid = ".$rowid; - dolibarr_syslog("Adherent::delete sql=".$sql); + dol_syslog("Adherent::delete sql=".$sql); $resql=$this->db->query($sql); if ($resql) { @@ -669,7 +669,7 @@ class Adherent extends CommonObject $error=0; - dolibarr_syslog("Adherent::Password user=".$user->id." password=".eregi_replace('.','*',$password)." isencrypted=".$isencrypted); + dol_syslog("Adherent::Password user=".$user->id." password=".eregi_replace('.','*',$password)." isencrypted=".$isencrypted); // Si nouveau mot de passe non communique, on genere par module if (! $password) @@ -695,8 +695,8 @@ class Adherent extends CommonObject $sql = "UPDATE ".MAIN_DB_PREFIX."adherent SET pass = '".addslashes($password_indatabase)."'"; $sql.= " WHERE rowid = ".$this->id; - //dolibarr_syslog("Adherent::Password sql=hidden"); - dolibarr_syslog("Adherent::Password sql=".$sql); + //dol_syslog("Adherent::Password sql=hidden"); + dol_syslog("Adherent::Password sql=".$sql); $result = $this->db->query($sql); if ($result) { @@ -723,7 +723,7 @@ class Adherent extends CommonObject if ($result < 0) { $this->error=$luser->error; - dolibarr_syslog("Adherent::password ".$this->error,LOG_ERR); + dol_syslog("Adherent::password ".$this->error,LOG_ERR); $error++; } } @@ -753,7 +753,7 @@ class Adherent extends CommonObject } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); return -1; } } @@ -779,7 +779,7 @@ class Adherent extends CommonObject } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); } } @@ -810,7 +810,7 @@ class Adherent extends CommonObject $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."user as u ON d.rowid = u.fk_member"; $sql.= " WHERE d.fk_adherent_type = t.rowid"; $sql.= " AND d.rowid = ".$rowid; - dolibarr_syslog("Adherent::fetch sql=".$sql); + dol_syslog("Adherent::fetch sql=".$sql); $resql=$this->db->query($sql); if ($resql) @@ -898,7 +898,7 @@ class Adherent extends CommonObject $sql.= " FROM ".MAIN_DB_PREFIX."cotisation as c"; $sql.= " WHERE c.fk_adherent = ".$this->id; $sql.= " ORDER BY c.dateadh"; - dolibarr_syslog("Adherent::fetch_subscriptions sql=".$sql); + dol_syslog("Adherent::fetch_subscriptions sql=".$sql); $resql=$this->db->query($sql); if ($resql) @@ -939,7 +939,7 @@ class Adherent extends CommonObject $sql.= " FROM ".MAIN_DB_PREFIX."adherent_options"; $sql.= " WHERE adhid=".$rowid; - dolibarr_syslog("Adherent::fetch_optionals sql=".$sql, LOG_DEBUG); + dol_syslog("Adherent::fetch_optionals sql=".$sql, LOG_DEBUG); $result=$this->db->query( $sql); if ($result) { @@ -959,7 +959,7 @@ class Adherent extends CommonObject } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); } } @@ -1038,7 +1038,7 @@ class Adherent extends CommonObject // Met a jour la table cotisation $sql="UPDATE ".MAIN_DB_PREFIX."cotisation SET fk_bank=".$insertid." WHERE rowid=".$rowid; - dolibarr_syslog("Adherent::cotisation sql=".$sql); + dol_syslog("Adherent::cotisation sql=".$sql); $resql = $this->db->query($sql); if (! $resql) { @@ -1104,7 +1104,7 @@ class Adherent extends CommonObject if ($this->statut == 1) { - dolibarr_syslog("Adherent::validate statut of member does not allow this", LOG_WARNING); + dol_syslog("Adherent::validate statut of member does not allow this", LOG_WARNING); return 0; } @@ -1115,7 +1115,7 @@ class Adherent extends CommonObject $sql.= " fk_user_valid=".$user->id; $sql.= " WHERE rowid = ".$this->id; - dolibarr_syslog("Adherent::validate sql=".$sql); + dol_syslog("Adherent::validate sql=".$sql); $result = $this->db->query($sql); if ($result) { @@ -1153,7 +1153,7 @@ class Adherent extends CommonObject if ($this->statut == 0) { - dolibarr_syslog("Adherent::resiliate statut of member does not allow this", LOG_WARNING); + dol_syslog("Adherent::resiliate statut of member does not allow this", LOG_WARNING); return 0; } @@ -1276,7 +1276,7 @@ class Adherent extends CommonObject { require_once(DOL_DOCUMENT_ROOT.'/lib/security.lib.php'); - dolibarr_syslog("Adherent::add_to_spip"); + dol_syslog("Adherent::add_to_spip"); if (defined("ADHERENT_USE_SPIP") && ADHERENT_USE_SPIP ==1 && defined('ADHERENT_SPIP_SERVEUR') && ADHERENT_SPIP_SERVEUR != '' && @@ -1388,7 +1388,7 @@ class Adherent extends CommonObject { global $conf,$langs; - dolibarr_syslog("Adherent::add_to_mailman"); + dol_syslog("Adherent::add_to_mailman"); if (! function_exists("curl_init")) { @@ -1437,7 +1437,7 @@ class Adherent extends CommonObject //--- Start buffering //ob_start(); $result=curl_exec ($ch); - dolibarr_syslog($result); + dol_syslog($result); //--- End buffering and clean output //ob_end_clean(); if (curl_error($ch) > 0) @@ -1505,7 +1505,7 @@ class Adherent extends CommonObject //--- Start buffering //ob_start(); $result=curl_exec ($ch); - dolibarr_syslog($result); + dol_syslog($result); //--- End buffering and clean output //ob_end_clean(); if (curl_error($ch) > 0) @@ -1567,7 +1567,7 @@ class Adherent extends CommonObject if ($withpicto) $result.=($lien.img_object($label,$picto).$lienfin); if ($withpicto && $withpicto != 2) $result.=' '; - $result.=$lien.($maxlen?dolibarr_trunc($this->ref,$maxlen):$this->ref).$lienfin; + $result.=$lien.($maxlen?dol_trunc($this->ref,$maxlen):$this->ref).$lienfin; return $result; } @@ -1687,7 +1687,7 @@ class Adherent extends CommonObject } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); $this->error=$this->db->error(); return -1; } @@ -1723,7 +1723,7 @@ class Adherent extends CommonObject } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); $this->error=$this->db->error(); return -1; } @@ -1826,14 +1826,14 @@ class Adherent extends CommonObject if ($this->phone_mobile && $conf->global->LDAP_FIELD_MOBILE) $info[$conf->global->LDAP_FIELD_MOBILE] = $this->phone_mobile; if ($this->fax && $conf->global->LDAP_FIELD_FAX) $info[$conf->global->LDAP_FIELD_FAX] = $this->fax; if ($this->note && $conf->global->LDAP_FIELD_DESCRIPTION) $info[$conf->global->LDAP_FIELD_DESCRIPTION] = $this->note; - if ($this->naiss && $conf->global->LDAP_FIELD_BIRTHDATE) $info[$conf->global->LDAP_FIELD_BIRTHDATE] = dolibarr_print_date($this->naiss,'dayhourldap'); + if ($this->naiss && $conf->global->LDAP_FIELD_BIRTHDATE) $info[$conf->global->LDAP_FIELD_BIRTHDATE] = dol_print_date($this->naiss,'dayhourldap'); if (isset($this->statut) && $conf->global->LDAP_FIELD_MEMBER_STATUS) $info[$conf->global->LDAP_FIELD_MEMBER_STATUS] = $this->statut; - if ($this->datefin && $conf->global->LDAP_FIELD_MEMBER_END_LASTSUBSCRIPTION) $info[$conf->global->LDAP_FIELD_MEMBER_END_LASTSUBSCRIPTION] = dolibarr_print_date($this->datefin,'dayhourldap'); + if ($this->datefin && $conf->global->LDAP_FIELD_MEMBER_END_LASTSUBSCRIPTION) $info[$conf->global->LDAP_FIELD_MEMBER_END_LASTSUBSCRIPTION] = dol_print_date($this->datefin,'dayhourldap'); // Subscriptions - if ($this->firstsubscription_date && $conf->global->LDAP_FIELD_MEMBER_FIRSTSUBSCRIPTION_DATE) $info[$conf->global->LDAP_FIELD_MEMBER_FIRSTSUBSCRIPTION_DATE] = dolibarr_print_date($this->firstsubscription_date,'dayhourldap'); + if ($this->firstsubscription_date && $conf->global->LDAP_FIELD_MEMBER_FIRSTSUBSCRIPTION_DATE) $info[$conf->global->LDAP_FIELD_MEMBER_FIRSTSUBSCRIPTION_DATE] = dol_print_date($this->firstsubscription_date,'dayhourldap'); if (isset($this->firstsubscription_amount) && $conf->global->LDAP_FIELD_MEMBER_FIRSTSUBSCRIPTION_AMOUNT) $info[$conf->global->LDAP_FIELD_MEMBER_FIRSTSUBSCRIPTION_AMOUNT] = $this->firstsubscription_amount; - if ($this->lastsubscription_date && $conf->global->LDAP_FIELD_MEMBER_LASTSUBSCRIPTION_DATE) $info[$conf->global->LDAP_FIELD_MEMBER_LASTSUBSCRIPTION_DATE] = dolibarr_print_date($this->lastsubscription_date,'dayhourldap'); + if ($this->lastsubscription_date && $conf->global->LDAP_FIELD_MEMBER_LASTSUBSCRIPTION_DATE) $info[$conf->global->LDAP_FIELD_MEMBER_LASTSUBSCRIPTION_DATE] = dol_print_date($this->lastsubscription_date,'dayhourldap'); if (isset($this->lastsubscription_amount) && $conf->global->LDAP_FIELD_MEMBER_LASTSUBSCRIPTION_AMOUNT) $info[$conf->global->LDAP_FIELD_MEMBER_LASTSUBSCRIPTION_AMOUNT] = $this->lastsubscription_amount; return $info; @@ -1853,7 +1853,7 @@ class Adherent extends CommonObject $sql.= ' FROM '.MAIN_DB_PREFIX.'adherent as a'; $sql.= ' WHERE a.rowid = '.$id; - dolibarr_syslog("Adherent::info sql=".$sql, LOG_DEBUG); + dol_syslog("Adherent::info sql=".$sql, LOG_DEBUG); $result=$this->db->query($sql); if ($result) { @@ -1892,7 +1892,7 @@ class Adherent extends CommonObject } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); } } diff --git a/htdocs/adherents/adherent_options.class.php b/htdocs/adherents/adherent_options.class.php index 55e2ef72ee5a5551bffc495fee0d11586f4335b9..a68aaf6395d2edf10e376d997556fd47567840ce 100644 --- a/htdocs/adherents/adherent_options.class.php +++ b/htdocs/adherents/adherent_options.class.php @@ -150,14 +150,14 @@ class AdherentOptions break; } - dolibarr_syslog("AdherentOptions::create sql=".$sql, LOG_DEBUG); + dol_syslog("AdherentOptions::create sql=".$sql, LOG_DEBUG); if ($this->db->query($sql)) { return 1; } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); return 0; } }else{ @@ -182,14 +182,14 @@ class AdherentOptions $sql .= " name='$attrname', label='".addslashes($label)."',"; $sql .= " type='".$type."', pos='".$pos."', size='".$size."'"; - dolibarr_syslog("AdherentOptions::create_label sql=".$sql); + dol_syslog("AdherentOptions::create_label sql=".$sql); if ($this->db->query($sql)) { return 1; } else { - print dolibarr_print_error($this->db); + print dol_print_error($this->db); return 0; } } @@ -207,7 +207,7 @@ class AdherentOptions if ($result < 0) { $this->error=$this->db->lasterror(); - dolibarr_syslog("AdherentOption::delete ".$this->error, LOG_ERR); + dol_syslog("AdherentOption::delete ".$this->error, LOG_ERR); } $result=$this->delete_label($attrname); @@ -236,7 +236,7 @@ class AdherentOptions } else { - print dolibarr_print_error($this->db); + print dol_print_error($this->db); return 0; } }else{ @@ -277,7 +277,7 @@ class AdherentOptions } else { - print dolibarr_print_error($this->db); + print dol_print_error($this->db); return 0; } }else{ @@ -308,7 +308,7 @@ class AdherentOptions } else { - print dolibarr_print_error($this->db); + print dol_print_error($this->db); return 0; } }else{ @@ -336,7 +336,7 @@ class AdherentOptions $sql = "SELECT name,label,type FROM ".MAIN_DB_PREFIX."adherent_options_label"; $sql.= " ORDER BY pos"; - dolibarr_syslog("Adherent_options::fetch_name_optionals_label"); + dol_syslog("Adherent_options::fetch_name_optionals_label"); $resql=$this->db->query($sql); if ($resql) { @@ -354,7 +354,7 @@ class AdherentOptions return array(); } }else{ - print dolibarr_print_error($this->db); + print dol_print_error($this->db); return array() ; } diff --git a/htdocs/adherents/adherent_type.class.php b/htdocs/adherents/adherent_type.class.php index 8d92445493005adbd8ad67db5afe0aae868c03a8..f529f0497847580ea81b32be4067ac513a6c9de4 100644 --- a/htdocs/adherents/adherent_type.class.php +++ b/htdocs/adherents/adherent_type.class.php @@ -86,7 +86,7 @@ class AdherentType extends CommonObject $sql = "INSERT INTO ".MAIN_DB_PREFIX."adherent_type (libelle)"; $sql.= " VALUES ('".addslashes($this->libelle)."')"; - dolibarr_syslog("Adherent_type::create sql=".$sql); + dol_syslog("Adherent_type::create sql=".$sql); $result = $this->db->query($sql); if ($result) { @@ -170,7 +170,7 @@ class AdherentType extends CommonObject $sql = "SELECT d.rowid, d.libelle, d.statut, d.cotisation, d.mail_valid, d.note, d.vote"; $sql .= " FROM ".MAIN_DB_PREFIX."adherent_type as d"; $sql .= " WHERE d.rowid = ".$rowid; - dolibarr_syslog("Adherent_type::fetch sql=".$sql); + dol_syslog("Adherent_type::fetch sql=".$sql); $resql=$this->db->query($sql); if ($resql) @@ -255,7 +255,7 @@ class AdherentType extends CommonObject if ($withpicto) $result.=($lien.img_object($label,$picto).$lienfin); if ($withpicto && $withpicto != 2) $result.=' '; - $result.=$lien.($maxlen?dolibarr_trunc($this->libelle,$maxlen):$this->libelle).$lienfin; + $result.=$lien.($maxlen?dol_trunc($this->libelle,$maxlen):$this->libelle).$lienfin; return $result; } diff --git a/htdocs/adherents/card_subscriptions.php b/htdocs/adherents/card_subscriptions.php index 4415074f86a09042dc05c49f3e994b73574e6f47..f1b334574b729a1d2e679a95a35a209101c4ee10 100644 --- a/htdocs/adherents/card_subscriptions.php +++ b/htdocs/adherents/card_subscriptions.php @@ -73,11 +73,11 @@ if ($user->rights->adherent->cotisation->creer && $_POST["action"] == 'cotisatio $datesubend=0; if ($_POST["reyear"] && $_POST["remonth"] && $_POST["reday"]) { - $datecotisation=dolibarr_mktime(0, 0, 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]); + $datecotisation=dol_mktime(0, 0, 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]); } if ($_POST["endyear"] && $_POST["endmonth"] && $_POST["endday"]) { - $datesubend=dolibarr_mktime(0, 0, 0, $_POST["endmonth"], $_POST["endday"], $_POST["endyear"]); + $datesubend=dol_mktime(0, 0, 0, $_POST["endmonth"], $_POST["endday"], $_POST["endyear"]); } $cotisation=$_POST["cotisation"]; // Amount of subscription $label=$_POST["label"]; @@ -186,7 +186,7 @@ $adho->fetch_optionals(); */ $head = member_prepare_head($adh); -dolibarr_fiche_head($head, 'subscription', $langs->trans("Member")); +dol_fiche_head($head, 'subscription', $langs->trans("Member")); print '<form action="fiche.php" method="post">'; print '<table class="border" width="100%">'; @@ -310,8 +310,8 @@ if ($result) $cotisationstatic->ref=$objp->crowid; $cotisationstatic->id=$objp->crowid; print '<td>'.$cotisationstatic->getNomUrl(1).'</td>'; - print '<td align="center">'.dolibarr_print_date($objp->dateadh,'day')."</td>\n"; - print '<td align="center">'.dolibarr_print_date($objp->datef,'day')."</td>\n"; + print '<td align="center">'.dol_print_date($objp->dateadh,'day')."</td>\n"; + print '<td align="center">'.dol_print_date($objp->datef,'day')."</td>\n"; print '<td align="right">'.price($objp->cotisation).'</td>'; if ($conf->banque->enabled && $conf->global->ADHERENT_BANK_USE) { @@ -335,7 +335,7 @@ if ($result) } else { - dolibarr_print_error($db); + dol_print_error($db); } print '</td><td valign="top">'; @@ -350,12 +350,12 @@ if ($adh->datefin) { if ($adh->datefin < time()) { - print dolibarr_print_date($adh->datefin,'day'); + print dol_print_date($adh->datefin,'day'); if ($adh->statut > 0) print " ".img_warning($langs->trans("Late")); // Affiche picto retard uniquement si non brouillon et non resilie } else { - print dolibarr_print_date($adh->datefin,'day'); + print dol_print_date($adh->datefin,'day'); } } else @@ -392,7 +392,7 @@ if ($action == 'addsubscription' && $user->rights->adherent->cotisation->creer) print '<tr><td>'.$langs->trans("DateSubscription").'</td><td>'; if ($_POST["reday"]) { - $datefrom=dolibarr_mktime(0,0,0,$_POST["remonth"],$_POST["reday"],$_POST["reyear"]); + $datefrom=dol_mktime(0,0,0,$_POST["remonth"],$_POST["reday"],$_POST["reyear"]); } if (! $datefrom) { @@ -411,7 +411,7 @@ if ($action == 'addsubscription' && $user->rights->adherent->cotisation->creer) // Date end subscription if ($_POST["endday"]) { - $dateto=dolibarr_mktime(0,0,0,$_POST["endmonth"],$_POST["endday"],$_POST["endyear"]); + $dateto=dol_mktime(0,0,0,$_POST["endmonth"],$_POST["endday"],$_POST["endyear"]); } if (! $dateto) { @@ -430,7 +430,7 @@ if ($action == 'addsubscription' && $user->rights->adherent->cotisation->creer) // Label print '<tr><td>'.$langs->trans("Label").'</td>'; print '<td><input name="label" type="text" size="32" value="'.$langs->trans("Subscription").' '; - print dolibarr_print_date(($datefrom?$datefrom:time()),"%Y").'" ></td></tr>'; + print dol_print_date(($datefrom?$datefrom:time()),"%Y").'" ></td></tr>'; // Bank account if ($conf->banque->enabled && $conf->global->ADHERENT_BANK_USE) diff --git a/htdocs/adherents/cartes/carte.php b/htdocs/adherents/cartes/carte.php index 6f64e9cb091271fc4ee12df2ceea43cf762d53e5..6f99893a703a4c3fc1c752db445b08d23865e059 100755 --- a/htdocs/adherents/cartes/carte.php +++ b/htdocs/adherents/cartes/carte.php @@ -146,7 +146,7 @@ if ($result) } else { - dolibarr_print_error($db); + dol_print_error($db); llxFooter('$Date$ - $Revision$'); } diff --git a/htdocs/adherents/cartes/etiquette.php b/htdocs/adherents/cartes/etiquette.php index 41eaf032383b5842e9ab31485d73a2bd0ca48f2a..82021d7c1fd3dbf3ab72d391f91a1894db01f03e 100755 --- a/htdocs/adherents/cartes/etiquette.php +++ b/htdocs/adherents/cartes/etiquette.php @@ -114,7 +114,7 @@ if ($result) } else { - dolibarr_print_error($db); + dol_print_error($db); llxFooter('$Date$ - $Revision$'); } diff --git a/htdocs/adherents/cotisation.class.php b/htdocs/adherents/cotisation.class.php index c24c8502a1391d0d2dcce08fcf63780d36bc94bd..fa714961ef12787e6b1e232002f945d8888a418a 100644 --- a/htdocs/adherents/cotisation.class.php +++ b/htdocs/adherents/cotisation.class.php @@ -76,7 +76,7 @@ class Cotisation extends CommonObject $sql.= " ".$this->db->idate($this->datef).","; $sql.= " ".$this->amount.",'".$this->note."')"; - dolibarr_syslog("Cotisation::create sql=".$sql); + dol_syslog("Cotisation::create sql=".$sql); $resql = $this->db->query($sql); if ($resql) { @@ -85,7 +85,7 @@ class Cotisation extends CommonObject else { $this->error=$this->db->error(); - dolibarr_syslog($this->error); + dol_syslog($this->error); return -1; } } @@ -106,7 +106,7 @@ class Cotisation extends CommonObject $sql.=" FROM ".MAIN_DB_PREFIX."cotisation"; $sql.=" WHERE rowid=".$rowid; - dolibarr_syslog("Cotisation::fetch sql=".$sql); + dol_syslog("Cotisation::fetch sql=".$sql); $resql=$this->db->query($sql); if ($resql) { @@ -160,7 +160,7 @@ class Cotisation extends CommonObject $sql .= " fk_bank = ".($this->fk_bank ? $this->fk_bank : 'null'); $sql .= " WHERE rowid = ".$this->id; - dolibarr_syslog("Cotisation::update sql=".$sql); + dol_syslog("Cotisation::update sql=".$sql); $resql = $this->db->query($sql); if ($resql) { @@ -175,7 +175,7 @@ class Cotisation extends CommonObject { $this->db->rollback(); $this->error=$this->db->error(); - dolibarr_syslog("Cotisation::update ".$this->error); + dol_syslog("Cotisation::update ".$this->error); return -1; } } @@ -198,7 +198,7 @@ class Cotisation extends CommonObject $this->db->begin(); $sql = "DELETE FROM ".MAIN_DB_PREFIX."cotisation WHERE rowid = ".$this->id; - dolibarr_syslog("Cotisation::delete sql=".$sql); + dol_syslog("Cotisation::delete sql=".$sql); $resql=$this->db->query($sql); if ($resql) { @@ -293,7 +293,7 @@ class Cotisation extends CommonObject } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); } } } diff --git a/htdocs/adherents/cotisations.php b/htdocs/adherents/cotisations.php index e8ed78a8faa6364caac363937ea9bb0afd62895b..71c46c948639e818f3cf94f5a7ee9e6fe5e887b8 100644 --- a/htdocs/adherents/cotisations.php +++ b/htdocs/adherents/cotisations.php @@ -100,7 +100,7 @@ if ($allowinsertbankafter && $_POST["action"] == '2bank' && $_POST["rowid"] !='' $insertid=$acct->addline($dateop, $_POST["paymenttypeid"], $_POST["label"], $amount, $_POST["num_chq"],ADHERENT_BANK_CATEGORIE,$user); if ($insertid < 0) { - dolibarr_print_error($db,$acct->error); + dol_print_error($db,$acct->error); } else { @@ -111,7 +111,7 @@ if ($allowinsertbankafter && $_POST["action"] == '2bank' && $_POST["rowid"] !='' $sql.=" SET fk_bank=".$insertid.","; $sql.=" note='".addslashes($_POST["label"])."'"; $sql.=" WHERE rowid=".$_POST["rowid"]; - dolibarr_syslog("cotisations sql=".$sql); + dol_syslog("cotisations sql=".$sql); $result = $db->query($sql); if ($result) { @@ -121,14 +121,14 @@ if ($allowinsertbankafter && $_POST["action"] == '2bank' && $_POST["rowid"] !='' else { $db->rollback(); - dolibarr_print_error($db); + dol_print_error($db); } } } else { $db->rollback(); - dolibarr_print_error($db,$cotisation->error); + dol_print_error($db,$cotisation->error); } } } @@ -226,14 +226,14 @@ if ($result) print '<td>'; if ($allowinsertbankafter && $user->rights->banque->modifier && ! $objp->fk_account && $conf->banque->enabled && $conf->global->ADHERENT_BANK_USE && $objp->cotisation) { - print "<input name=\"label\" type=\"text\" class=\"flat\" size=\"30\" value=\"".$langs->trans("Subscriptions").' '.dolibarr_print_date($objp->dateadh,"%Y")."\" >\n"; + print "<input name=\"label\" type=\"text\" class=\"flat\" size=\"30\" value=\"".$langs->trans("Subscriptions").' '.dol_print_date($objp->dateadh,"%Y")."\" >\n"; // print "<td><input name=\"debit\" type=\"text\" size=8></td>"; // print "<td><input name=\"credit\" type=\"text\" size=8></td>"; print '<input type="submit" class="button" value="'.$langs->trans("Save").'">'; } else { - print dolibarr_trunc($objp->note,32); + print dol_trunc($objp->note,32); } print '</td>'; @@ -269,10 +269,10 @@ if ($result) } // Date start - print '<td align="center">'.dolibarr_print_date($objp->dateadh,'day')."</td>\n"; + print '<td align="center">'.dol_print_date($objp->dateadh,'day')."</td>\n"; // Date end - print '<td align="center">'.dolibarr_print_date($objp->datef,'day')."</td>\n"; + print '<td align="center">'.dol_print_date($objp->datef,'day')."</td>\n"; // Price print '<td align="right">'.price($objp->cotisation).'</td>'; @@ -308,7 +308,7 @@ if ($result) } else { - dolibarr_print_error($db); + dol_print_error($db); } diff --git a/htdocs/adherents/fiche.php b/htdocs/adherents/fiche.php index d8aa740126b5271ac36bcf46e909c01008791f7e..f5693adf882a32b8ac90aee849c35268dc93c95b 100644 --- a/htdocs/adherents/fiche.php +++ b/htdocs/adherents/fiche.php @@ -140,7 +140,7 @@ if ($_REQUEST["action"] == 'update' && ! $_POST["cancel"]) && isset($_POST["naissmonth"]) && $_POST["naissmonth"] && isset($_POST["naissyear"]) && $_POST["naissyear"]) { - $datenaiss=dolibarr_mktime(12, 0, 0, $_POST["naissmonth"], $_POST["naissday"], $_POST["naissyear"]); + $datenaiss=dol_mktime(12, 0, 0, $_POST["naissmonth"], $_POST["naissday"], $_POST["naissyear"]); } //print $_POST["naissmonth"].", ".$_POST["naissday"].", ".$_POST["naissyear"]." ".$datenaiss." ".adodb_strftime('%Y-%m-%d %H:%M:%S',$datenaiss); @@ -236,12 +236,12 @@ if ($user->rights->adherent->creer && $_POST["action"] == 'add') && isset($_POST["naissmonth"]) && $_POST["naissmonth"] && isset($_POST["naissyear"]) && $_POST["naissyear"]) { - $datenaiss=dolibarr_mktime(12, 0, 0, $_POST["naissmonth"], $_POST["naissday"], $_POST["naissyear"]); + $datenaiss=dol_mktime(12, 0, 0, $_POST["naissmonth"], $_POST["naissday"], $_POST["naissyear"]); } $datecotisation=''; if (isset($_POST["reday"]) && isset($_POST["remonth"]) && isset($_POST["reyear"])) { - $datecotisation=dolibarr_mktime(12, 0 , 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]); + $datecotisation=dol_mktime(12, 0 , 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]); } $type=$_POST["type"]; @@ -352,7 +352,7 @@ if ($user->rights->adherent->creer && $_POST["action"] == 'add') $insertid=$acct->addline($dateop, $_POST["operation"], $_POST["label"], $amount, $_POST["num_chq"], '', $user); if ($insertid == '') { - dolibarr_print_error($db); + dol_print_error($db); } else { @@ -366,7 +366,7 @@ if ($user->rights->adherent->creer && $_POST["action"] == 'add') } else { - dolibarr_print_error($db); + dol_print_error($db); } } } @@ -573,7 +573,7 @@ if ($action == 'edit') */ $head = member_prepare_head($adh); - dolibarr_fiche_head($head, 'general', $langs->trans("Member")); + dol_fiche_head($head, 'general', $langs->trans("Member")); print '<form name="update" action="'.$_SERVER["PHP_SELF"].'" method="post" enctype="multipart/form-data">'; @@ -837,7 +837,7 @@ if ($rowid && $action != 'edit') */ $head = member_prepare_head($adh); - dolibarr_fiche_head($head, 'general', $langs->trans("Member")); + dol_fiche_head($head, 'general', $langs->trans("Member")); if ($msg) print '<div class="error">'.$msg.'</div>'; @@ -1003,7 +1003,7 @@ if ($rowid && $action != 'edit') print '<tr><td>'.$langs->trans("EMail").'</td><td class="valeur">'.dol_print_email($adh->email,0,$adh->fk_soc,1).'</td></tr>'; // Date naissance - print '<tr><td>'.$langs->trans("Birthday").'</td><td class="valeur">'.dolibarr_print_date($adh->naiss,'day').'</td></tr>'; + print '<tr><td>'.$langs->trans("Birthday").'</td><td class="valeur">'.dol_print_date($adh->naiss,'day').'</td></tr>'; // Public print '<tr><td>'.$langs->trans("Public").'</td><td class="valeur">'.yn($adh->public).'</td></tr>'; diff --git a/htdocs/adherents/fiche_subscription.php b/htdocs/adherents/fiche_subscription.php index 8bb13a5f4f7ed0e11701c2aedebddd3b5d41e3c8..3175a53d2c0a71d8819f28d8f1a52e6f1b7aeca7 100644 --- a/htdocs/adherents/fiche_subscription.php +++ b/htdocs/adherents/fiche_subscription.php @@ -72,8 +72,8 @@ if ($user->rights->adherent->cotisation->creer && $_REQUEST["action"] == 'update } else { - $accountline->datev=dolibarr_mktime($_POST['datesubhour'], $_POST['datesubmin'], 0, $_POST['datesubmonth'], $_POST['datesubday'], $_POST['datesubyear']); - $accountline->dateo=dolibarr_mktime($_POST['datesubhour'], $_POST['datesubmin'], 0, $_POST['datesubmonth'], $_POST['datesubday'], $_POST['datesubyear']); + $accountline->datev=dol_mktime($_POST['datesubhour'], $_POST['datesubmin'], 0, $_POST['datesubmonth'], $_POST['datesubday'], $_POST['datesubyear']); + $accountline->dateo=dol_mktime($_POST['datesubhour'], $_POST['datesubmin'], 0, $_POST['datesubmonth'], $_POST['datesubday'], $_POST['datesubyear']); $accountline->amount=$_POST["amount"]; $result=$accountline->update($user); if ($result < 0) @@ -86,8 +86,8 @@ if ($user->rights->adherent->cotisation->creer && $_REQUEST["action"] == 'update if (! $errmsg) { // Modifie valeures - $subscription->dateh=dolibarr_mktime($_POST['datesubhour'], $_POST['datesubmin'], 0, $_POST['datesubmonth'], $_POST['datesubday'], $_POST['datesubyear']); - $subscription->datef=dolibarr_mktime($_POST['datesubendhour'], $_POST['datesubendmin'], 0, $_POST['datesubendmonth'], $_POST['datesubendday'], $_POST['datesubendyear']); + $subscription->dateh=dol_mktime($_POST['datesubhour'], $_POST['datesubmin'], 0, $_POST['datesubmonth'], $_POST['datesubday'], $_POST['datesubyear']); + $subscription->datef=dol_mktime($_POST['datesubendhour'], $_POST['datesubendmin'], 0, $_POST['datesubendmonth'], $_POST['datesubendday'], $_POST['datesubendyear']); $subscription->note=$_POST["note"]; $subscription->amount=$_POST["amount"]; //print 'datef='.$subscription->datef.' '.$_POST['datesubendday']; @@ -187,7 +187,7 @@ if ($user->rights->adherent->cotisation->creer && $action == 'edit') $head[$h][2] = 'info'; $h++; - dolibarr_fiche_head($head, 'general', $langs->trans("Subscription")); + dol_fiche_head($head, 'general', $langs->trans("Subscription")); print "\n"; print '<form name="update" action="'.$_SERVER["PHP_SELF"].'" method="post">'; @@ -286,7 +286,7 @@ if ($rowid && $action != 'edit') $head[$h][2] = 'info'; $h++; - dolibarr_fiche_head($head, 'general', $langs->trans("Subscription")); + dol_fiche_head($head, 'general', $langs->trans("Subscription")); if ($msg) print '<div class="error">'.$msg.'</div>'; @@ -318,12 +318,12 @@ if ($rowid && $action != 'edit') // Date subscription print '<tr>'; - print '<td>'.$langs->trans("DateSubscription").'</td><td class="valeur" colspan="3">'.dolibarr_print_date($subscription->dateh,'dayhour').'</td>'; + print '<td>'.$langs->trans("DateSubscription").'</td><td class="valeur" colspan="3">'.dol_print_date($subscription->dateh,'dayhour').'</td>'; print '</tr>'; // Date end subscription print '<tr>'; - print '<td>'.$langs->trans("DateEndSubscription").'</td><td class="valeur" colspan="3">'.dolibarr_print_date($subscription->datef,'day').'</td>'; + print '<td>'.$langs->trans("DateEndSubscription").'</td><td class="valeur" colspan="3">'.dol_print_date($subscription->datef,'day').'</td>'; print '</tr>'; // Amount diff --git a/htdocs/adherents/htpasswd.php b/htdocs/adherents/htpasswd.php index 2091557cb5437059c73c32bce69955c7423dee35..d774806960ebab0f5852a3e0f4bfb2d0d0406a3e 100644 --- a/htdocs/adherents/htpasswd.php +++ b/htdocs/adherents/htpasswd.php @@ -76,7 +76,7 @@ if ($resql) } else { - dolibarr_print_error($db); + dol_print_error($db); } diff --git a/htdocs/adherents/index.php b/htdocs/adherents/index.php index 475ea4e4dd1a028d7efd5ff7f4a894d848cdf38d..f5a724b80aa6b86dc95f28906db2ff4a17c6b4d3 100644 --- a/htdocs/adherents/index.php +++ b/htdocs/adherents/index.php @@ -214,7 +214,7 @@ if ($resql) $statictype->libelle=$obj->libelle; print '<td>'.$staticmember->getNomUrl(1).'</td>'; print '<td>'.$statictype->getNomUrl(1).'</td>'; - print '<td>'.dolibarr_print_date($obj->datem,'dayhour').'</td>'; + print '<td>'.dol_print_date($obj->datem,'dayhour').'</td>'; print '<td align="right">'.$staticmember->LibStatut($obj->statut,($obj->cotisation=='yes'?1:0),$obj->date_end_subscription,5).'</td>'; print '</tr>'; $i++; @@ -224,7 +224,7 @@ if ($resql) } else { - dolibarr_print_error($db); + dol_print_error($db); } @@ -250,7 +250,7 @@ if ($result) while ($i < $num) { $objp = $db->fetch_object($result); - $year=dolibarr_print_date($objp->dateadh,"%Y"); + $year=dol_print_date($objp->dateadh,"%Y"); $Total[$year]=(isset($Total[$year])?$Total[$year]:0)+$objp->cotisation; $Number[$year]=(isset($Number[$year])?$Number[$year]:0)+1; $tot+=$objp->cotisation; diff --git a/htdocs/adherents/info.php b/htdocs/adherents/info.php index 46b93fe50801b808cfd73a0352552f6afe1ecf13..9fca3b348186727254b5ee863492263a20e3c6a7 100644 --- a/htdocs/adherents/info.php +++ b/htdocs/adherents/info.php @@ -55,7 +55,7 @@ $adh->info($_GET["id"]); */ $head = member_prepare_head($adh); -dolibarr_fiche_head($head, 'info', $langs->trans("Member")); +dol_fiche_head($head, 'info', $langs->trans("Member")); print '<table width="100%"><tr><td>'; diff --git a/htdocs/adherents/info_subscription.php b/htdocs/adherents/info_subscription.php index 68ded081c15ee9bdedd8582c59ccc8cb5d6376ab..2f42188812d1a82e1c5ba5416e8f93b27af6c8ea 100644 --- a/htdocs/adherents/info_subscription.php +++ b/htdocs/adherents/info_subscription.php @@ -68,7 +68,7 @@ $head[$h][2] = 'info'; $h++; -dolibarr_fiche_head($head, 'info', $langs->trans("Subscription")); +dol_fiche_head($head, 'info', $langs->trans("Subscription")); $subscription->info($rowid); diff --git a/htdocs/adherents/ldap.php b/htdocs/adherents/ldap.php index 1fe70449523380f42ffe3b2115dc62fe42708e69..b72f7b85cbf5f5684398f759a81e7e96b4d38e79 100644 --- a/htdocs/adherents/ldap.php +++ b/htdocs/adherents/ldap.php @@ -60,7 +60,7 @@ $adh->id = $rowid; $result=$adh->fetch($rowid); if (! $result) { - dolibarr_print_error($db,"Failed to get adherent: ".$adh->error); + dol_print_error($db,"Failed to get adherent: ".$adh->error); exit; } $adh->fetch_optionals($rowid); @@ -69,7 +69,7 @@ $adht = new AdherentType($db); $result=$adht->fetch($adh->typeid); if (! $result) { - dolibarr_print_error($db,"Failed to get type of adherent: ".$adht->error); + dol_print_error($db,"Failed to get type of adherent: ".$adht->error); exit; } @@ -80,7 +80,7 @@ if (! $result) */ $head = member_prepare_head($adh); -dolibarr_fiche_head($head, 'ldap', $langs->trans("Member")); +dol_fiche_head($head, 'ldap', $langs->trans("Member")); /* @@ -190,7 +190,7 @@ if ($result > 0) } else { - dolibarr_print_error('',$ldap->error); + dol_print_error('',$ldap->error); } diff --git a/htdocs/adherents/liste.php b/htdocs/adherents/liste.php index 24a2722c06e82fd553097c5137fcc19654d84e4c..bb1a9ff96d3a723e227a6b0527489534023a12bd 100644 --- a/htdocs/adherents/liste.php +++ b/htdocs/adherents/liste.php @@ -257,11 +257,11 @@ if ($resql) print '<td align="center">'; if ($objp->datefin < time() && $objp->statut > 0) { - print dolibarr_print_date($objp->datefin)." ".img_warning($langs->trans("SubscriptionLate")); + print dol_print_date($objp->datefin)." ".img_warning($langs->trans("SubscriptionLate")); } else { - print dolibarr_print_date($objp->datefin); + print dol_print_date($objp->datefin); } print '</td>'; } @@ -306,7 +306,7 @@ if ($resql) } else { - dolibarr_print_error($db); + dol_print_error($db); } diff --git a/htdocs/adherents/note.php b/htdocs/adherents/note.php index cc6a3e4520ad841cfaf32a8992dd54bb19053350..a708378fde07b63f461a358ace08a6ca5f4ff988 100644 --- a/htdocs/adherents/note.php +++ b/htdocs/adherents/note.php @@ -77,7 +77,7 @@ if ($id) { $head = member_prepare_head($adh); - dolibarr_fiche_head($head, 'note', $langs->trans("Member")); + dol_fiche_head($head, 'note', $langs->trans("Member")); if ($msg) print '<div class="error">'.$msg.'</div>'; diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php index 612468cd05a39081a76d5541519f3671d2edd2f0..60d3020b1519b01a0e4b2a223f87753272fa4bbb 100644 --- a/htdocs/adherents/type.php +++ b/htdocs/adherents/type.php @@ -161,7 +161,7 @@ if (! $rowid && $_GET["action"] != 'create' && $_GET["action"] != 'edit') } else { - dolibarr_print_error($db); + dol_print_error($db); } @@ -256,7 +256,7 @@ if ($rowid > 0) $head[$h][2] = 'card'; $h++; - dolibarr_fiche_head($head, 'card', $langs->trans("MemberType")); + dol_fiche_head($head, 'card', $langs->trans("MemberType")); print '<table class="border" width="100%">'; @@ -328,7 +328,7 @@ if ($rowid > 0) $head[$h][2] = 'card'; $h++; - dolibarr_fiche_head($head, 'card', $langs->trans("MemberType")); + dol_fiche_head($head, 'card', $langs->trans("MemberType")); print '<form method="post" action="'.$_SERVER["PHP_SELF"].'?rowid='.$rowid.'">'; diff --git a/htdocs/admin/agenda.php b/htdocs/admin/agenda.php index 304d01b737438dab9c0b94805856c9e4a623b3b3..e0dd2cbbd5203274aeece1d1f00ac0bb777bcf69 100644 --- a/htdocs/admin/agenda.php +++ b/htdocs/admin/agenda.php @@ -98,7 +98,7 @@ print "<br>\n"; $head=agenda_prepare_head(); -dolibarr_fiche_head($head, 'autoactions', $langs->trans("Agenda")); +dol_fiche_head($head, 'autoactions', $langs->trans("Agenda")); print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">'; diff --git a/htdocs/admin/agenda_xcal.php b/htdocs/admin/agenda_xcal.php index 1c9be6fef5c0e724167e28337af8c0cea5b3ee75..4e2bea89d45f6bc89b3c0b9b03cd37123152af71 100644 --- a/htdocs/admin/agenda_xcal.php +++ b/htdocs/admin/agenda_xcal.php @@ -76,7 +76,7 @@ print "<br>\n"; $head=agenda_prepare_head(); -dolibarr_fiche_head($head, 'xcal', $langs->trans("Agenda")); +dol_fiche_head($head, 'xcal', $langs->trans("Agenda")); print '<form name="agendasetupform" action="'.$_SERVER["PHP_SELF"].'" method="post">'; diff --git a/htdocs/admin/bookmark.php b/htdocs/admin/bookmark.php index 602ba9f6703ea19f73ed0cf361c2cdcf287ca6dd..f8db67eaaac0a0285d90fe0423eb5be331e22de6 100644 --- a/htdocs/admin/bookmark.php +++ b/htdocs/admin/bookmark.php @@ -41,7 +41,7 @@ if ($_POST["action"] == 'setvalue' && $user->admin) } else { - dolibarr_print_error($db); + dol_print_error($db); } } diff --git a/htdocs/admin/boxes.php b/htdocs/admin/boxes.php index deb4aa0541febe4254199fd29c111d9cc2e9aa06..372d107ba217806c115359deae942e0b3f151aba 100644 --- a/htdocs/admin/boxes.php +++ b/htdocs/admin/boxes.php @@ -51,7 +51,7 @@ if ($_POST["action"] == 'add') $sql.= " FROM ".MAIN_DB_PREFIX."boxes"; $sql.= " WHERE fk_user=0 AND box_id=".$_POST["boxid"]." AND position=".$_POST["pos"]; $resql = $db->query($sql); - dolibarr_syslog("boxes.php::search if box active sql=".$sql); + dol_syslog("boxes.php::search if box active sql=".$sql); if ($resql) { $num = $db->num_rows($resql); @@ -61,13 +61,13 @@ if ($_POST["action"] == 'add') // Si la boite n'est pas deja active, insert with box_order='' $sql = "INSERT INTO ".MAIN_DB_PREFIX."boxes (box_id, position, box_order, fk_user) values (".$_POST["boxid"].",".$_POST["pos"].", '', 0)"; - dolibarr_syslog("boxes.php activate box sql=".$sql); + dol_syslog("boxes.php activate box sql=".$sql); $resql = $db->query($sql); // Remove all personalized setup when a box is activated or disabled $sql = "DELETE FROM ".MAIN_DB_PREFIX."user_param"; $sql.= " WHERE param like 'MAIN_BOXES_%'"; - dolibarr_syslog("boxes.php delete user_param sql=".$sql); + dol_syslog("boxes.php delete user_param sql=".$sql); $resql = $db->query($sql); $db->commit(); @@ -78,7 +78,7 @@ if ($_POST["action"] == 'add') } else { - dolibarr_print_error($db); + dol_print_error($db); } } @@ -114,11 +114,11 @@ if ($_GET["action"] == 'switch') $sql="UPDATE ".MAIN_DB_PREFIX."boxes set box_order='".$objto->box_order."' WHERE rowid=".$objfrom->rowid; //print "xx".$sql; $resultupdatefrom = $db->query($sql); - if (! $resultupdatefrom) { dolibarr_print_error($db); } + if (! $resultupdatefrom) { dol_print_error($db); } $sql="UPDATE ".MAIN_DB_PREFIX."boxes set box_order='".$objfrom->box_order."' WHERE rowid=".$objto->rowid; //print "xx".$sql; $resultupdateto = $db->query($sql); - if (! $resultupdateto) { dolibarr_print_error($db); } + if (! $resultupdateto) { dol_print_error($db); } } if ($resultupdatefrom && $resultupdateto) diff --git a/htdocs/admin/cashdesk.php b/htdocs/admin/cashdesk.php index 189e8c197c2726f8278bc532fc6d76b297c700ad..10c513cd061008066a940e7d995f27f5f08e9fda 100644 --- a/htdocs/admin/cashdesk.php +++ b/htdocs/admin/cashdesk.php @@ -47,7 +47,7 @@ if ($_POST["action"] == 'set') dolibarr_set_const($db,"CASHDESK_ID_BANKACCOUNT",$_POST["CASHDESK_ID_BANKACCOUNT"]); dolibarr_set_const($db,"CASHDESK_ID_WAREHOUSE",$_POST["CASHDESK_ID_WAREHOUSE"]); - dolibarr_syslog("admin/cashdesk: level ".$_POST["level"]); + dol_syslog("admin/cashdesk: level ".$_POST["level"]); } diff --git a/htdocs/admin/clicktodial.php b/htdocs/admin/clicktodial.php index 40de19b49f90fbc81910ee527560e15ebb6c62d6..919a6c2c44355e231468b47646e2180235142707 100644 --- a/htdocs/admin/clicktodial.php +++ b/htdocs/admin/clicktodial.php @@ -41,7 +41,7 @@ if ($_POST["action"] == 'setvalue' && $user->admin) } else { - dolibarr_print_error($db); + dol_print_error($db); } } diff --git a/htdocs/admin/commande.php b/htdocs/admin/commande.php index 18c8a65da71e57fa833549cd8f0db50dcfa15e0d..a1f58753dfac85dc41e97961008337977ce57dfd 100644 --- a/htdocs/admin/commande.php +++ b/htdocs/admin/commande.php @@ -77,13 +77,13 @@ if ($_GET["action"] == 'specimen') else { $mesg='<div class="error">'.$obj->error.'</div>'; - dolibarr_syslog($obj->error, LOG_ERR); + dol_syslog($obj->error, LOG_ERR); } } else { $mesg='<div class="error">'.$langs->trans("ErrorModuleNotFound").'</div>'; - dolibarr_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR); + dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR); } } @@ -302,7 +302,7 @@ if ($resql) } else { - dolibarr_print_error($db); + dol_print_error($db); } $dir = "../includes/modules/commande/"; diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php index a46b650fbff2460899fe71bec827dec2cef2fc6d..629aeb5080f7188a628223f0b0123914256b1e64 100644 --- a/htdocs/admin/company.php +++ b/htdocs/admin/company.php @@ -62,7 +62,7 @@ if ( (isset($_POST["action"]) && $_POST["action"] == 'update') $isimage=image_format_supported($original_file); if ($isimage >= 0) { - dolibarr_syslog("Move file ".$_FILES["logo"]["tmp_name"]." to ".$conf->societe->dir_logos.'/'.$original_file); + dol_syslog("Move file ".$_FILES["logo"]["tmp_name"]." to ".$conf->societe->dir_logos.'/'.$original_file); if (! is_dir($conf->societe->dir_logos)) { create_exdir($conf->societe->dir_logos); @@ -82,7 +82,7 @@ if ( (isset($_POST["action"]) && $_POST["action"] == 'update') $imgThumbSmall = $reg[1]; dolibarr_set_const($db, "MAIN_INFO_SOCIETE_LOGO_SMALL",$imgThumbSmall); } - else dolibarr_syslog($imgThumbSmall); + else dol_syslog($imgThumbSmall); // Cr�ation de la vignette de la page "Soci�t�/Institution" $imgThumbMini = vignette($conf->societe->dir_logos.'/'.$original_file, 100, 30, '_mini', $quality); @@ -91,9 +91,9 @@ if ( (isset($_POST["action"]) && $_POST["action"] == 'update') $imgThumbMini = $reg[1]; dolibarr_set_const($db, "MAIN_INFO_SOCIETE_LOGO_MINI",$imgThumbMini); } - else dolibarr_syslog($imgThumbMini); + else dol_syslog($imgThumbMini); } - else dolibarr_syslog($langs->trans("ErrorImageFormatNotSupported"),LOG_WARNING); + else dol_syslog($langs->trans("ErrorImageFormatNotSupported"),LOG_WARNING); } else { @@ -142,7 +142,7 @@ if ($_GET["action"] == 'addthumb') $imgThumbSmall = $reg[1]; dolibarr_set_const($db, "MAIN_INFO_SOCIETE_LOGO_SMALL",$imgThumbSmall); } - else dolibarr_syslog($imgThumbSmall); + else dol_syslog($imgThumbSmall); // Cr�ation de la vignette de la page "Soci�t�/Institution" $imgThumbMini = vignette($conf->societe->dir_logos.'/'.$_GET["file"], 100, 30, '_mini',80); @@ -151,7 +151,7 @@ if ($_GET["action"] == 'addthumb') $imgThumbMini = $reg[1]; dolibarr_set_const($db, "MAIN_INFO_SOCIETE_LOGO_MINI",$imgThumbMini); } - else dolibarr_syslog($imgThumbMini); + else dol_syslog($imgThumbMini); Header("Location: ".$_SERVER["PHP_SELF"]); exit; @@ -159,13 +159,13 @@ if ($_GET["action"] == 'addthumb') else { $message .= '<div class="error">'.$langs->trans("ErrorImageFormatNotSupported").'</div>'; - dolibarr_syslog($langs->transnoentities("ErrorImageFormatNotSupported"),LOG_WARNING); + dol_syslog($langs->transnoentities("ErrorImageFormatNotSupported"),LOG_WARNING); } } else { $message .= '<div class="error">'.$langs->trans("ErrorFileDoesNotExists",$_GET["file"]).'</div>'; - dolibarr_syslog($langs->transnoentities("ErrorFileDoesNotExists",$_GET["file"]),LOG_WARNING); + dol_syslog($langs->transnoentities("ErrorFileDoesNotExists",$_GET["file"]),LOG_WARNING); } } @@ -320,7 +320,7 @@ if ((isset($_GET["action"]) && $_GET["action"] == 'edit') if ($obj->code) $code_pays=$obj->code; } else { - dolibarr_print_error($db); + dol_print_error($db); } } @@ -579,7 +579,7 @@ else if ($obj->code) $code_pays=$obj->code; } else { - dolibarr_print_error($db); + dol_print_error($db); } } diff --git a/htdocs/admin/confexped.php b/htdocs/admin/confexped.php index 8c89b4619f8f926ce38f3f20cb32162ea6b038c9..14e0dbdaed4974112e426de4c9a8f10a09cb2246 100644 --- a/htdocs/admin/confexped.php +++ b/htdocs/admin/confexped.php @@ -95,7 +95,7 @@ if ($conf->global->MAIN_SUBMODULE_LIVRAISON) $h++; } -dolibarr_fiche_head($head, $hselected, $langs->trans("ModuleSetup")); +dol_fiche_head($head, $hselected, $langs->trans("ModuleSetup")); /* * Formulaire parametres divers diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index d0dd82a565a89154010a46b520aa52fb37a1875a..235537947e09544616cf5284a4bfa4d9424e5d5e 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -277,7 +277,7 @@ if ($_POST["actionadd"] || $_POST["actionmodify"]) $newid=($obj->newid + 1); } else { - dolibarr_print_error($db); + dol_print_error($db); } } @@ -302,7 +302,7 @@ if ($_POST["actionadd"] || $_POST["actionmodify"]) } $sql.=",1)"; - dolibarr_syslog("dict actionadd sql=".$sql); + dol_syslog("dict actionadd sql=".$sql); $result = $db->query($sql); if (!$result) { @@ -310,7 +310,7 @@ if ($_POST["actionadd"] || $_POST["actionmodify"]) $msg=$langs->trans("ErrorRecordAlreadyExists").'<br>'; } else { - dolibarr_print_error($db); + dol_print_error($db); } } } @@ -338,7 +338,7 @@ if ($_POST["actionadd"] || $_POST["actionmodify"]) } $sql.= " WHERE ".$rowidcol." = '".$_POST["rowid"]."'"; - dolibarr_syslog("dict actionmodify sql=".$sql); + dol_syslog("dict actionmodify sql=".$sql); //print $sql; $resql = $db->query($sql); if (! $resql) @@ -363,7 +363,7 @@ if ($_POST['action'] == 'confirm_delete' && $_POST['confirm'] == 'yes') // $sql = "DELETE from ".$tabname[$_GET["id"]]." WHERE ".$rowidcol."='".$_GET["rowid"]."'"; - dolibarr_syslog("dict delete sql=".$sql); + dol_syslog("dict delete sql=".$sql); $result = $db->query($sql); if (! $result) { @@ -373,7 +373,7 @@ if ($_POST['action'] == 'confirm_delete' && $_POST['confirm'] == 'yes') // } else { - dolibarr_print_error($db); + dol_print_error($db); } } } @@ -393,7 +393,7 @@ if ($_GET["action"] == $acts[0]) // activate $result = $db->query($sql); if (!$result) { - dolibarr_print_error($db); + dol_print_error($db); } } @@ -412,7 +412,7 @@ if ($_GET["action"] == $acts[1]) // disable $result = $db->query($sql); if (!$result) { - dolibarr_print_error($db); + dol_print_error($db); } } @@ -551,7 +551,7 @@ if ($_GET["id"]) } // Affiche table des valeurs - dolibarr_syslog("htdocs/admin/dict sql=".$sql, LOG_DEBUG); + dol_syslog("htdocs/admin/dict sql=".$sql, LOG_DEBUG); $resql=$db->query($sql); if ($resql) { @@ -664,7 +664,7 @@ if ($_GET["id"]) } } else { - dolibarr_print_error($db); + dol_print_error($db); } print '</table>'; diff --git a/htdocs/admin/dons.php b/htdocs/admin/dons.php index 2d192e5e6f90100ec3f00430110040ae270615b9..53e50f470994699e6504e000ea6765595a793357 100644 --- a/htdocs/admin/dons.php +++ b/htdocs/admin/dons.php @@ -63,13 +63,13 @@ if ($_GET["action"] == 'specimen') else { $mesg='<div class="error">'.$obj->error.'</div>'; - dolibarr_syslog($obj->error, LOG_ERR); + dol_syslog($obj->error, LOG_ERR); } } else { $mesg='<div class="error">'.$langs->trans("ErrorModuleNotFound").'</div>'; - dolibarr_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR); + dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR); } } @@ -160,7 +160,7 @@ if ($resql) } else { - dolibarr_print_error($db); + dol_print_error($db); } print '<table class="noborder" width=\"100%\">'; diff --git a/htdocs/admin/events.php b/htdocs/admin/events.php index 15f1f6abdeb12019c9daf713a6aaea981c690f13..f5c824fce43985896011e1fdd1dad672343f223a 100644 --- a/htdocs/admin/events.php +++ b/htdocs/admin/events.php @@ -112,7 +112,7 @@ print "<br>\n"; $head=security_prepare_head(); -dolibarr_fiche_head($head, 'audit', $langs->trans("Security")); +dol_fiche_head($head, 'audit', $langs->trans("Security")); print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">'; diff --git a/htdocs/admin/expedition.php b/htdocs/admin/expedition.php index e9f55fb68f956b08841be98b3a44e03c78eb5c4a..3b1254e008625f78c30e909ebddf2a800462b442 100644 --- a/htdocs/admin/expedition.php +++ b/htdocs/admin/expedition.php @@ -70,13 +70,13 @@ if ($_GET["action"] == 'specimen') else { $mesg='<div class="error">'.$obj->error.'</div>'; - dolibarr_syslog($obj->error, LOG_ERR); + dol_syslog($obj->error, LOG_ERR); } } else { $mesg='<div class="error">'.$langs->trans("ErrorModuleNotFound").'</div>'; - dolibarr_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR); + dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR); } } @@ -172,7 +172,7 @@ if ($_GET["action"] == 'setmethod' || $_GET["action"] == 'setmod') } else { - //dolibarr_print_error($db); + //dol_print_error($db); $db->rollback(); } } @@ -241,7 +241,7 @@ if ($conf->global->MAIN_SUBMODULE_LIVRAISON) $h++; } -dolibarr_fiche_head($head, $hselected, $langs->trans("ModuleSetup")); +dol_fiche_head($head, $hselected, $langs->trans("ModuleSetup")); @@ -270,7 +270,7 @@ if ($resql) } else { - dolibarr_print_error($db); + dol_print_error($db); } print '<table class="noborder" width="100%">'; diff --git a/htdocs/admin/external_rss.php b/htdocs/admin/external_rss.php index e194bfced212620af7bc40c23839f69c10de2f60..2c505444d05db5493eba544a97b663ed5731d4f7 100644 --- a/htdocs/admin/external_rss.php +++ b/htdocs/admin/external_rss.php @@ -51,7 +51,7 @@ if ($result) } else { - dolibarr_print_error($db); + dol_print_error($db); } if ($_POST["action"] == 'add' || $_POST["modify"]) @@ -76,7 +76,7 @@ if ($_POST["action"] == 'add' || $_POST["modify"]) $resql=$db->query($sql); if (! $resql) { - dolibarr_print_error($db,"sql=$sql"); + dol_print_error($db,"sql=$sql"); exit; } */ @@ -88,7 +88,7 @@ if ($_POST["action"] == 'add' || $_POST["modify"]) $sql.= " VALUES ('box_external_rss.php','".addslashes($_POST["norss"].' ('.$_POST[$external_rss_title]).")')"; if (! $db->query($sql)) { - dolibarr_print_error($db); + dol_print_error($db); $err++; } } @@ -106,7 +106,7 @@ if ($_POST["action"] == 'add' || $_POST["modify"]) else { $db->rollback(); - dolibarr_print_error($db); + dol_print_error($db); } } } @@ -141,7 +141,7 @@ if ($_POST["delete"]) if (! $resql) { $db->rollback(); - dolibarr_print_error($db,"sql=$sql"); + dol_print_error($db,"sql=$sql"); exit; } @@ -153,7 +153,7 @@ if ($_POST["delete"]) else { $db->rollback(); - dolibarr_print_error($db,"sql=$sql"); + dol_print_error($db,"sql=$sql"); exit; } @@ -171,7 +171,7 @@ if ($_POST["delete"]) else { $db->rollback(); - dolibarr_print_error($db); + dol_print_error($db); } } } @@ -227,7 +227,7 @@ $sql ="select rowid, file, note from ".MAIN_DB_PREFIX."boxes_def"; $sql.=" WHERE file = 'box_external_rss.php'"; $sql.=" ORDER BY note"; -dolibarr_syslog("external_rss select rss boxes sql=".$sql,LOG_DEBUG); +dol_syslog("external_rss select rss boxes sql=".$sql,LOG_DEBUG); $resql=$db->query($sql); if ($resql) { @@ -311,7 +311,7 @@ if ($resql) } else { - dolibarr_print_error($db); + dol_print_error($db); } ?> diff --git a/htdocs/admin/facture.php b/htdocs/admin/facture.php index 824e04795497af029ace4b443477cc8c02523e0a..ab028368db91a3a92819f60dd4b9da4fc10f388e 100644 --- a/htdocs/admin/facture.php +++ b/htdocs/admin/facture.php @@ -81,13 +81,13 @@ if ($_GET["action"] == 'specimen') else { $mesg='<div class="error">'.$obj->error.'</div>'; - dolibarr_syslog($obj->error, LOG_ERR); + dol_syslog($obj->error, LOG_ERR); } } else { $mesg='<div class="error">'.$langs->trans("ErrorModuleNotFound").'</div>'; - dolibarr_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR); + dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR); } } @@ -181,7 +181,7 @@ if ($_POST["action"] == 'update' || $_POST["action"] == 'add') { if (! dolibarr_set_const($db, $_POST["constname"],$_POST["constvalue"],$typeconst[$_POST["consttype"]],0,isset($_POST["constnote"])?$_POST["constnote"]:'')); { - dolibarr_print_error($db); + dol_print_error($db); } } @@ -189,7 +189,7 @@ if ($_GET["action"] == 'delete') { if (! dolibarr_del_const($db, $_GET["rowid"])); { - dolibarr_print_error($db); + dol_print_error($db); } } @@ -223,7 +223,7 @@ $head[$h][1] = $langs->trans("Invoices"); $hselected=$h; $h++; -dolibarr_fiche_head($head, $hselected, $langs->trans("ModuleSetup")); +dol_fiche_head($head, $hselected, $langs->trans("ModuleSetup")); /* * Module numerotation @@ -358,7 +358,7 @@ if ($resql) } else { - dolibarr_print_error($db); + dol_print_error($db); } print '<table class="noborder" width="100%">'; diff --git a/htdocs/admin/fichinter.php b/htdocs/admin/fichinter.php index b084fa4cbfd1cc1d2de0e3c2661ae690dc7c94fa..98d5abf12b59d1efafcf3eb3ca2ffbc7ec783762 100644 --- a/htdocs/admin/fichinter.php +++ b/htdocs/admin/fichinter.php @@ -81,13 +81,13 @@ if ($_GET["action"] == 'specimen') else { $mesg='<div class="error">'.$obj->error.'</div>'; - dolibarr_syslog($obj->error, LOG_ERR); + dol_syslog($obj->error, LOG_ERR); } } else { $mesg='<div class="error">'.$langs->trans("ErrorModuleNotFound").'</div>'; - dolibarr_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR); + dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR); } } @@ -272,7 +272,7 @@ if ($resql) } else { - dolibarr_print_error($db); + dol_print_error($db); } diff --git a/htdocs/admin/fournisseur.php b/htdocs/admin/fournisseur.php index ddb7b0ff6afce013aba8de139daff298e8161c0d..ba0fce2fde77063ec71f983b8171ca2c3635e32f 100644 --- a/htdocs/admin/fournisseur.php +++ b/htdocs/admin/fournisseur.php @@ -77,13 +77,13 @@ if ($_GET["action"] == 'specimen') else { $mesg='<div class="error">'.$obj->error.'</div>'; - dolibarr_syslog($obj->error, LOG_ERR); + dol_syslog($obj->error, LOG_ERR); } } else { $mesg='<div class="error">'.$langs->trans("ErrorModuleNotFound").'</div>'; - dolibarr_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR); + dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR); } } @@ -289,7 +289,7 @@ if ($resql) } else { - dolibarr_print_error($db); + dol_print_error($db); } print "<table class=\"noborder\" width=\"100%\">\n"; @@ -419,7 +419,7 @@ print '</table><br/>'; } else { - dolibarr_print_error($db); + dol_print_error($db); } */ diff --git a/htdocs/admin/import/dolibarrimport.class.php b/htdocs/admin/import/dolibarrimport.class.php index ad7b8f7c5776775e323574908cfc4fd4308d9535..c4c60cd8521e2120c7f1c7a4189f3f306683c868 100644 --- a/htdocs/admin/import/dolibarrimport.class.php +++ b/htdocs/admin/import/dolibarrimport.class.php @@ -46,7 +46,7 @@ class DolibarrImport $this->nb_import_ko = 0; $this->nb_import = 0; - dolibarr_syslog("DolibarrImport::ImportClients($file)", LOG_DEBUG); + dol_syslog("DolibarrImport::ImportClients($file)", LOG_DEBUG); $this->ReadFile($file); @@ -65,12 +65,12 @@ class DolibarrImport if ( $societe->create($user) == 0) { - dolibarr_syslog("DolibarrImport::ImportClients ".$societe->nom." SUCCESS", LOG_DEBUG); + dol_syslog("DolibarrImport::ImportClients ".$societe->nom." SUCCESS", LOG_DEBUG); $this->nb_import_ok++; } else { - dolibarr_syslog("DolibarrImport::ImportClients ".$societe->nom." ERROR", LOG_ERR); + dol_syslog("DolibarrImport::ImportClients ".$societe->nom." ERROR", LOG_ERR); $this->nb_import_ko++; } } @@ -106,7 +106,7 @@ class DolibarrImport if (is_readable($file)) { - dolibarr_syslog("DolibarrImport::ReadFile Lecture du fichier $file", LOG_DEBUG); + dol_syslog("DolibarrImport::ReadFile Lecture du fichier $file", LOG_DEBUG); $line = 0; $hf = fopen ($file, "r"); @@ -150,7 +150,7 @@ class DolibarrImport umask(0); if (! mkdir($upload_dir, 0755)) { - dolibarr_syslog("DolibarrImport::ReadFile Impossible de cr�er $upload_dir",LOG_ERR); + dol_syslog("DolibarrImport::ReadFile Impossible de cr�er $upload_dir",LOG_ERR); } } @@ -161,7 +161,7 @@ class DolibarrImport umask(0); if (! mkdir($upload_dir, 0755)) { - dolibarr_syslog("DolibarrImport::ReadFile Impossible de cr�er $upload_dir",LOG_ERR); + dol_syslog("DolibarrImport::ReadFile Impossible de cr�er $upload_dir",LOG_ERR); } } @@ -172,7 +172,7 @@ class DolibarrImport umask(0); if (! mkdir($upload_dir, 0755)) { - dolibarr_syslog("DolibarrImport::ReadFile Impossible de cr�er $upload_dir",LOG_ERR); + dol_syslog("DolibarrImport::ReadFile Impossible de cr�er $upload_dir",LOG_ERR); } } diff --git a/htdocs/admin/ldap.php b/htdocs/admin/ldap.php index d925d71d51a5820856519e0beeeaf8e5d2b2f1ba..f19e27f6fcfbae4968b07b2b73e903786a8d34e4 100644 --- a/htdocs/admin/ldap.php +++ b/htdocs/admin/ldap.php @@ -64,7 +64,7 @@ if ($_GET["action"] == 'setvalue' && $user->admin) if ($error) { - dolibarr_print_error($db->error()); + dol_print_error($db->error()); } } @@ -89,7 +89,7 @@ if ($mesg) print '<div class="error">'.$mesg.'</div>'; -dolibarr_fiche_head($head, 'ldap', $langs->trans("LDAPSetup")); +dol_fiche_head($head, 'ldap', $langs->trans("LDAPSetup")); $var=true; $html=new Form($db); diff --git a/htdocs/admin/ldap_contacts.php b/htdocs/admin/ldap_contacts.php index 13038b29299f583a397c76d63ea74b6fbaadcf5c..2181044feb6db004b7930c331ff7ed1891b220b2 100644 --- a/htdocs/admin/ldap_contacts.php +++ b/htdocs/admin/ldap_contacts.php @@ -67,7 +67,7 @@ if ($_GET["action"] == 'setvalue' && $user->admin) if ($error) { - dolibarr_print_error($db->error()); + dol_print_error($db->error()); } } @@ -90,7 +90,7 @@ if (! function_exists("ldap_connect")) if ($mesg) print '<div class="error">'.$mesg.'</div>'; -dolibarr_fiche_head($head, 'contacts', $langs->trans("LDAPSetup")); +dol_fiche_head($head, 'contacts', $langs->trans("LDAPSetup")); print $langs->trans("LDAPDescContact").'<br>'; diff --git a/htdocs/admin/ldap_groups.php b/htdocs/admin/ldap_groups.php index 30f0d5c3e09c7c48c9e4939892bc87e6743096df..b424d53e6bb2bd3420f9425d16a477f7bc4c8a04 100644 --- a/htdocs/admin/ldap_groups.php +++ b/htdocs/admin/ldap_groups.php @@ -58,7 +58,7 @@ if ($_GET["action"] == 'setvalue' && $user->admin) if ($error) { - dolibarr_print_error($db->error()); + dol_print_error($db->error()); } } @@ -81,7 +81,7 @@ if (! function_exists("ldap_connect")) if ($mesg) print '<div class="error">'.$mesg.'</div>'; -dolibarr_fiche_head($head, 'groups', $langs->trans("LDAPSetup")); +dol_fiche_head($head, 'groups', $langs->trans("LDAPSetup")); print $langs->trans("LDAPDescGroups").'<br>'; diff --git a/htdocs/admin/ldap_members.php b/htdocs/admin/ldap_members.php index 7c2362a05e599ea39d6cb4fa36bce8b5183c405f..d3ee7d0216bc44c23a914a7ea03f07feec085125 100644 --- a/htdocs/admin/ldap_members.php +++ b/htdocs/admin/ldap_members.php @@ -81,7 +81,7 @@ if ($_GET["action"] == 'setvalue' && $user->admin) if ($error) { - dolibarr_print_error($db->error()); + dol_print_error($db->error()); } } @@ -104,7 +104,7 @@ if (! function_exists("ldap_connect")) if ($mesg) print '<div class="error">'.$mesg.'</div>'; -dolibarr_fiche_head($head, 'members', $langs->trans("LDAPSetup")); +dol_fiche_head($head, 'members', $langs->trans("LDAPSetup")); print $langs->trans("LDAPDescMembers").'<br>'; diff --git a/htdocs/admin/ldap_users.php b/htdocs/admin/ldap_users.php index e9b068f46b61a323932b2bf729f13d26f07eef4c..449ad6e502a4e2e9f5ab92d74b33d33dcaeecf50 100644 --- a/htdocs/admin/ldap_users.php +++ b/htdocs/admin/ldap_users.php @@ -69,7 +69,7 @@ if ($_GET["action"] == 'setvalue' && $user->admin) if ($error) { - dolibarr_print_error($db->error()); + dol_print_error($db->error()); } } @@ -92,7 +92,7 @@ if (! function_exists("ldap_connect")) if ($mesg) print '<div class="error">'.$mesg.'</div>'; -dolibarr_fiche_head($head, 'users', $langs->trans("LDAPSetup")); +dol_fiche_head($head, 'users', $langs->trans("LDAPSetup")); print $langs->trans("LDAPDescUsers").'<br>'; diff --git a/htdocs/admin/livraison.php b/htdocs/admin/livraison.php index e4beef06754a0de0a7090c2b9689e9abd90e7b00..54a82d9d9f6ed691092d1ff6160fefa9ea6b156b 100644 --- a/htdocs/admin/livraison.php +++ b/htdocs/admin/livraison.php @@ -77,13 +77,13 @@ if ($_GET["action"] == 'specimen') else { $mesg='<div class="error">'.$obj->error.'</div>'; - dolibarr_syslog($obj->error, LOG_ERR); + dol_syslog($obj->error, LOG_ERR); } } else { $mesg='<div class="error">'.$langs->trans("ErrorModuleNotFound").'</div>'; - dolibarr_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR); + dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR); } } @@ -181,7 +181,7 @@ $hselected=$h; $h++; -dolibarr_fiche_head($head, $hselected, $langs->trans("ModuleSetup")); +dol_fiche_head($head, $hselected, $langs->trans("ModuleSetup")); /* * Module numerotation @@ -299,7 +299,7 @@ if ($resql) } else { - dolibarr_print_error($db); + dol_print_error($db); } print '<table class="noborder" width="100%">'; diff --git a/htdocs/admin/mailing.php b/htdocs/admin/mailing.php index c98a02578679399448001e5e9c0fc18d10814e8c..818bbe8c734f1940e7eb65f81e510638563bbb7f 100644 --- a/htdocs/admin/mailing.php +++ b/htdocs/admin/mailing.php @@ -43,7 +43,7 @@ if ($_POST["action"] == 'setvalue' && $user->admin) } else { - dolibarr_print_error($db); + dol_print_error($db); } } diff --git a/htdocs/admin/menus.php b/htdocs/admin/menus.php index 8ee7a40f010fba2c3904db4db8bdbb3c96b379ed..ba929ae0dd191e21e4580d4e847fe36bdd989788 100644 --- a/htdocs/admin/menus.php +++ b/htdocs/admin/menus.php @@ -107,7 +107,7 @@ $head[$h][2] = 'editor'; $h++; -dolibarr_fiche_head($head, 'handler', $langs->trans("Menus")); +dol_fiche_head($head, 'handler', $langs->trans("Menus")); if (isset($_GET["action"]) && $_GET["action"] == 'edit') diff --git a/htdocs/admin/menus/edit.php b/htdocs/admin/menus/edit.php index 4b6c2cead1c1f96ab2409bd521b694ce6bda810d..d1938afa8575b3b73d60f9c109427a359d7a1572 100644 --- a/htdocs/admin/menus/edit.php +++ b/htdocs/admin/menus/edit.php @@ -477,7 +477,7 @@ elseif (isset($_GET["action"]) && $_GET["action"] == 'edit') $sql.= ' WHERE c.rowid = mc.fk_constraint'; $sql.= ' AND mc.fk_menu = '.$_GET['menuId']; - dolibarr_syslog("Edit: sql=".$sql, LOG_DEBUG); + dol_syslog("Edit: sql=".$sql, LOG_DEBUG); $resql = $db->query($sql); if ($resql) { @@ -542,7 +542,7 @@ elseif (isset($_GET["action"]) && $_GET["action"] == 'edit') while ($i < $num) { $objc = $db->fetch_object($resql); - print '<option value="'.$objc->rowid.'">'.dolibarr_trunc($objc->action,70).'</option>'; + print '<option value="'.$objc->rowid.'">'.dol_trunc($objc->action,70).'</option>'; $i++; } diff --git a/htdocs/admin/menus/index.php b/htdocs/admin/menus/index.php index e11c05e8648ee271e97c07b7b324b2f8092e244f..028b87f177437608f0345d5c5c65fae47857c894 100644 --- a/htdocs/admin/menus/index.php +++ b/htdocs/admin/menus/index.php @@ -212,7 +212,7 @@ $head[$h][1] = $langs->trans("MenuAdmin"); $head[$h][2] = 'editor'; $h++; -dolibarr_fiche_head($head, 'editor', $langs->trans("Menus")); +dol_fiche_head($head, 'editor', $langs->trans("Menus")); // Confirmation de la suppression menu if ($_GET["action"] == 'delete') diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php index 4ec0641625a13d6c2ec596f3b45ea838a96e1e07..d55274a31d600624667d94905904061aa948a61a 100644 --- a/htdocs/admin/modules.php +++ b/htdocs/admin/modules.php @@ -161,7 +161,7 @@ function UnActivate($value,$requiredby=1) $genericMod->style_sheet=1; $genericMod->rights_class=strtolower(eregi_replace('^mod','',$modName)); $genericMod->const_name='MAIN_MODULE_'.strtoupper(eregi_replace('^mod','',$modName)); - dolibarr_syslog("modules::UnActivate Failed to find module file, we use generic function with name ".$genericMod->name); + dol_syslog("modules::UnActivate Failed to find module file, we use generic function with name ".$genericMod->name); $genericMod->_remove(); } } @@ -308,7 +308,7 @@ if (! empty($categ[$categidx])) $h++; } -dolibarr_fiche_head($head, $tagmode, $langs->trans("Modules")); +dol_fiche_head($head, $tagmode, $langs->trans("Modules")); if ($mesg) print '<div class="error">'.$mesg.'</div>'; diff --git a/htdocs/admin/notification.php b/htdocs/admin/notification.php index 15f2c82ef89924576569bb21988121cca59cee64..46028988891f62423bed71cecfc0581fc01ec545 100644 --- a/htdocs/admin/notification.php +++ b/htdocs/admin/notification.php @@ -45,7 +45,7 @@ if ($_POST["action"] == 'setvalue' && $user->admin) } else { - dolibarr_print_error($db); + dol_print_error($db); } } diff --git a/htdocs/admin/paybox.php b/htdocs/admin/paybox.php index a972468c3b7e17077764f4a03d4954932ace834b..5fb4261e317ae4ea3cfcd5b369020945c13a3259 100644 --- a/htdocs/admin/paybox.php +++ b/htdocs/admin/paybox.php @@ -52,7 +52,7 @@ if ($_POST["action"] == 'setvalue' && $user->admin) } else { - dolibarr_print_error($db); + dol_print_error($db); } } diff --git a/htdocs/admin/perms.php b/htdocs/admin/perms.php index b960132d1fc6fe3a81101c285eaede2cb8ba4e42..37728e7ad903a31c9e52edf7a3d61de4417b5c4b 100644 --- a/htdocs/admin/perms.php +++ b/htdocs/admin/perms.php @@ -59,7 +59,7 @@ print "<br>\n"; $head=security_prepare_head(); -dolibarr_fiche_head($head, 'default', $langs->trans("Security")); +dol_fiche_head($head, 'default', $langs->trans("Security")); print info_admin($langs->trans("WarningOnlyPermissionOfActivatedModules")); diff --git a/htdocs/admin/produit.php b/htdocs/admin/produit.php index 696194fcc87d81c648c9251d405aa9026a9d402b..f2d02bb59369920d395b3d09048cc15c2f33578d 100644 --- a/htdocs/admin/produit.php +++ b/htdocs/admin/produit.php @@ -59,7 +59,7 @@ if ($_POST["action"] == 'multiprix') // on ajoute le champ price_level dans la table societe if ($db->DDLAddField(MAIN_DB_PREFIX."societe","price_level",$field_desc) < 0) { - dolibarr_print_error($db); + dol_print_error($db); exit; } } @@ -68,7 +68,7 @@ if ($_POST["action"] == 'multiprix') } else { - dolibarr_syslog("Table definition for ".MAIN_DB_PREFIX."societe already ok"); + dol_syslog("Table definition for ".MAIN_DB_PREFIX."societe already ok"); dolibarr_set_const($db, "PRODUIT_MULTIPRICES", $_POST["activate_multiprix"]); dolibarr_set_const($db, "PRODUIT_MULTIPRICES_LIMIT", "6"); } @@ -86,7 +86,7 @@ else if ($_POST["action"] == 'sousproduits') $keys['idx_product_association_fk_product_fils'] = "fk_product_fils" ; if ($db->DDLCreateTable($table,$fields,"","InnoDB","","",$keys) < 0) { - dolibarr_print_error($db); + dol_print_error($db); exit; } else @@ -96,7 +96,7 @@ else if ($_POST["action"] == 'sousproduits') } else { - dolibarr_syslog("Table definition already ok"); + dol_syslog("Table definition already ok"); dolibarr_set_const($db, "PRODUIT_SOUSPRODUITS", $_POST["activate_sousproduits"]); } } diff --git a/htdocs/admin/propale.php b/htdocs/admin/propale.php index 185c1eeea9558ff5b3427e6e20f524ec7086a7cd..ed0de33d98a2c1e193d5629217200e423f085636 100644 --- a/htdocs/admin/propale.php +++ b/htdocs/admin/propale.php @@ -78,13 +78,13 @@ if ($_GET["action"] == 'specimen') else { $mesg='<div class="error">'.$module->error.'</div>'; - dolibarr_syslog($module->error, LOG_ERR); + dol_syslog($module->error, LOG_ERR); } } else { $mesg='<div class="error">'.$langs->trans("ErrorModuleNotFound").'</div>'; - dolibarr_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR); + dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR); } } @@ -318,7 +318,7 @@ if ($resql) } else { - dolibarr_print_error($db); + dol_print_error($db); } $dir = "../includes/modules/propale/"; diff --git a/htdocs/admin/security.php b/htdocs/admin/security.php index 08d7b4f073f2a03a8704c7ba8641dfa4ffaab1f6..0577f28743343b21a8eac1bf66eb2a4be7382d71 100644 --- a/htdocs/admin/security.php +++ b/htdocs/admin/security.php @@ -47,7 +47,7 @@ if ($_GET["action"] == 'setgeneraterule') { if (! dolibarr_set_const($db, 'USER_PASSWORD_GENERATED',$_GET["value"])) { - dolibarr_print_error($db); + dol_print_error($db); } else { @@ -78,7 +78,7 @@ if ($_GET["action"] == 'activate_encrypt') else { $db->rollback(); - dolibarr_print_error($db,''); + dol_print_error($db,''); } } else if ($_GET["action"] == 'disable_encrypt') @@ -169,7 +169,7 @@ print "<br>\n"; $head=security_prepare_head(); -dolibarr_fiche_head($head, 'passwords', $langs->trans("Security")); +dol_fiche_head($head, 'passwords', $langs->trans("Security")); $var=false; diff --git a/htdocs/admin/security_other.php b/htdocs/admin/security_other.php index b40a49484a0fa9f8b9a9139feb497c278f93b784..8f8597c27b76d819c52e278a4becd7919086dedf 100644 --- a/htdocs/admin/security_other.php +++ b/htdocs/admin/security_other.php @@ -40,7 +40,7 @@ if ($_GET["action"] == 'set_main_upload_doc') { if (! dolibarr_set_const($db, 'MAIN_UPLOAD_DOC',$_POST["MAIN_UPLOAD_DOC"])) { - dolibarr_print_error($db); + dol_print_error($db); } else { @@ -104,7 +104,7 @@ print "<br>\n"; $head=security_prepare_head(); -dolibarr_fiche_head($head, 'misc', $langs->trans("Security")); +dol_fiche_head($head, 'misc', $langs->trans("Security")); $var=false; diff --git a/htdocs/admin/societe.php b/htdocs/admin/societe.php index daa474d6ca374ae119c725023e4eaa1a43814354..a47d229d1febe1c29b63f541d52cc6607c0b7d8f 100644 --- a/htdocs/admin/societe.php +++ b/htdocs/admin/societe.php @@ -47,7 +47,7 @@ if ($_GET["action"] == 'setcodeclient') } else { - dolibarr_print_error($db); + dol_print_error($db); } } @@ -60,7 +60,7 @@ if ($_GET["action"] == 'setcodecompta') } else { - dolibarr_print_error($db); + dol_print_error($db); } } @@ -73,7 +73,7 @@ if ($_POST["action"] == 'usesearchtoselectcompany') } else { - dolibarr_print_error($db); + dol_print_error($db); } } diff --git a/htdocs/admin/stock.php b/htdocs/admin/stock.php index a8c5455435bcebd6aa8d2bc01daaea62517861db..297c3e7fdc003ada5024f303889211d985bb23bf 100644 --- a/htdocs/admin/stock.php +++ b/htdocs/admin/stock.php @@ -76,7 +76,7 @@ if ($_POST["action"] == 'STOCK_CALCULATE_ON_BILL' else { $db->rollback(); - dolibarr_print_error("Error in some requests", LOG_ERR); + dol_print_error("Error in some requests", LOG_ERR); } } // Mode of stock decrease @@ -98,7 +98,7 @@ if ($_POST["action"] == 'STOCK_CALCULATE_ON_SUPPLIER_BILL' else { $db->rollback(); - dolibarr_print_error("Error in some requests", LOG_ERR); + dol_print_error("Error in some requests", LOG_ERR); } } diff --git a/htdocs/admin/syslog.php b/htdocs/admin/syslog.php index 5f8d114ef238cc30e0764decffa3369e0f4c2417..55020ea9cb52bfea5c7f785f694d5cc3cdd0247a 100644 --- a/htdocs/admin/syslog.php +++ b/htdocs/admin/syslog.php @@ -40,7 +40,7 @@ $langs->load("other"); if (! empty($_POST["action"]) && $_POST["action"] == 'setlevel') { dolibarr_set_const($db,"SYSLOG_LEVEL",$_POST["level"]); - dolibarr_syslog("admin/syslog: level ".$_POST["level"]); + dol_syslog("admin/syslog: level ".$_POST["level"]); } if (! empty($_POST["action"]) && $_POST["action"] == 'set') @@ -55,7 +55,7 @@ if (! empty($_POST["action"]) && $_POST["action"] == 'set') dolibarr_del_const($db,"SYSLOG_FILE"); dolibarr_set_const($db,"SYSLOG_FACILITY",$_POST["facility"]); - dolibarr_syslog("admin/syslog: facility ".$_POST["facility"]); + dol_syslog("admin/syslog: facility ".$_POST["facility"]); } else { @@ -72,7 +72,7 @@ if (! empty($_POST["action"]) && $_POST["action"] == 'set') fclose($file); dolibarr_del_const($db,"SYSLOG_FACILITY"); dolibarr_set_const($db,"SYSLOG_FILE",$_POST["filename"]); - dolibarr_syslog("admin/syslog: file ".$_POST["filename"]); + dol_syslog("admin/syslog: file ".$_POST["filename"]); } else { diff --git a/htdocs/admin/system/dolibarr.php b/htdocs/admin/system/dolibarr.php index db82d25725f6e2bcb6467e7ff54c287fb3854304..a4ceb746e82a8b1602bdf67b3928ed1294146496 100644 --- a/htdocs/admin/system/dolibarr.php +++ b/htdocs/admin/system/dolibarr.php @@ -133,9 +133,9 @@ if (function_exists('date_default_timezone_get')) print "</td></tr>\n"; // value defined in http://fr3.php.net/manual/en/timezones.europe.php } $var=!$var; -print "<tr ".$bc[$var]."><td width=\"300\">=> ".$langs->trans("PHPServerOffsetWithGreenwich")."</td><td>".(- dolibarr_mktime(0,0,0,1,1,1970))."</td></tr>\n"; +print "<tr ".$bc[$var]."><td width=\"300\">=> ".$langs->trans("PHPServerOffsetWithGreenwich")."</td><td>".(- dol_mktime(0,0,0,1,1,1970))."</td></tr>\n"; $var=!$var; -print "<tr ".$bc[$var]."><td width=\"300\">=> ".$langs->trans("CurrentHour")."</td><td>".dolibarr_print_date(time(),'dayhour')."</td></tr>\n"; +print "<tr ".$bc[$var]."><td width=\"300\">=> ".$langs->trans("CurrentHour")."</td><td>".dol_print_date(time(),'dayhour')."</td></tr>\n"; $var=!$var; print "<tr ".$bc[$var].'><td width="300">=> dol_print_date(0,"dayhourtext")</td><td>'.dol_print_date(0,"dayhourtext")."</td>"; print '</table>'; diff --git a/htdocs/admin/tools/eaccelerator.php b/htdocs/admin/tools/eaccelerator.php index d7f7eee7ac801a8f8be2b0866e4b155624dcbaf6..ed648276a666f904453871eebb954ef56cf7944c 100644 --- a/htdocs/admin/tools/eaccelerator.php +++ b/htdocs/admin/tools/eaccelerator.php @@ -67,7 +67,7 @@ if (isset($_POST['caching'])) { } $info = eaccelerator_info(); if (!is_array($info)) { - dolibarr_print_error('','An error occured getting eAccelerator information, this is caused if eAccelerator isn\'t initalised properly'); + dol_print_error('','An error occured getting eAccelerator information, this is caused if eAccelerator isn\'t initalised properly'); exit; } @@ -151,8 +151,8 @@ function revcompare($x, $y) foreach($list as $script) { ?> <tr <?php $var = ! $var; print $bc[$var]; ?>> - <td><?php print dolibarr_trunc($script['file'],80,'left'); ?></td> - <td align="center" nowrap="nowrap"><?php print dolibarr_print_date($script['mtime'],'dayhour'); ?></td> + <td><?php print dol_trunc($script['file'],80,'left'); ?></td> + <td align="center" nowrap="nowrap"><?php print dol_print_date($script['mtime'],'dayhour'); ?></td> <td align="right" nowrap="nowrap"><?php print number_format($script['size'] / 1024, 2); ?> KB</td> <td align="right" nowrap="nowrap"><?php print $script['reloads']; ?> (<?php print $script['usecount']; ?>)</td> <td align="right" nowrap="nowrap"><?php print $script['hits']; ?></td> @@ -180,8 +180,8 @@ function create_key_table($list) foreach($list as $key) { ?> <tr <?php $var = ! $var; print $bc[$var]; ?>> - <td><?php print dolibarr_trunc($key['name'],80,'left'); ?></td> - <td align="center" nowrap="nowrap"><?php dolibarr_print_date($key['created'],'dayhour'); ?></td> + <td><?php print dol_trunc($key['name'],80,'left'); ?></td> + <td align="center" nowrap="nowrap"><?php dol_print_date($key['created'],'dayhour'); ?></td> <td align="right" nowrap="nowrap"><?php print number_format($key['size']/1024, 3); ?> KB</td> <td align="right" nowrap="nowrap"><?php if ($key['ttl'] == -1) { @@ -189,7 +189,7 @@ function create_key_table($list) } elseif ($key['ttl'] == 0) { print 'none'; } else { - print dolibarr_print_date($key['ttl'],'dayhour'); + print dol_print_date($key['ttl'],'dayhour'); } ?></td> </tr> diff --git a/htdocs/admin/tools/export.php b/htdocs/admin/tools/export.php index df998004ac5be88fd42fdd7e0cc35cb570f5d9e1..de509060a531e88cffa3cb74ae77919317ae8313 100644 --- a/htdocs/admin/tools/export.php +++ b/htdocs/admin/tools/export.php @@ -160,7 +160,7 @@ if ($what == 'mysql') if ($handle) { - dolibarr_syslog("Run command ".$fullcommandcrypted); + dol_syslog("Run command ".$fullcommandcrypted); $handlein = popen($fullcommandclear, 'r'); while (!feof($handlein)) { @@ -179,7 +179,7 @@ if ($what == 'mysql') else { $langs->load("errors"); - dolibarr_syslog("Failed to open file $outputfile",LOG_ERR); + dol_syslog("Failed to open file $outputfile",LOG_ERR); $errormsg=$langs->trans("ErrorFailedToWriteInDir"); } // Get errorstring diff --git a/htdocs/admin/tools/listevents.php b/htdocs/admin/tools/listevents.php index b3d70467b7596c6f54fe4082203a84e4ccffe087..b9bb8b6f35c37462d420abb41a7884443c9a18db 100644 --- a/htdocs/admin/tools/listevents.php +++ b/htdocs/admin/tools/listevents.php @@ -155,7 +155,7 @@ if ($result) print "<tr $bc[$var]>"; // Date - print '<td align="left" nowrap="nowrap">'.dolibarr_print_date($obj->dateevent,'%Y-%m-%d %H:%M:%S').'</td>'; + print '<td align="left" nowrap="nowrap">'.dol_print_date($obj->dateevent,'%Y-%m-%d %H:%M:%S').'</td>'; // Code print '<td>'.$obj->type.'</td>'; @@ -208,7 +208,7 @@ if ($result) } else { - dolibarr_print_error($db); + dol_print_error($db); } $db->close(); diff --git a/htdocs/ajaxbox.php b/htdocs/ajaxbox.php index 3745f5373375f0b76d15f0926e7ec9bd009494ea..73cd283a723a7f298c51589aa612fa1a838eac5b 100644 --- a/htdocs/ajaxbox.php +++ b/htdocs/ajaxbox.php @@ -36,7 +36,7 @@ require_once(DOL_DOCUMENT_ROOT."/boxes.php"); // Enregistrement de la position des boxes if((isset($_GET['boxorder']) && !empty($_GET['boxorder'])) && (isset($_GET['userid']) && !empty($_GET['userid']))) { - dolibarr_syslog("AjaxBox boxorder=".$_GET['boxorder']." userid=".$_GET['userid'], LOG_DEBUG); + dol_syslog("AjaxBox boxorder=".$_GET['boxorder']." userid=".$_GET['userid'], LOG_DEBUG); $infobox=new InfoBox($db); $result=$infobox->saveboxorder("0",$_GET['boxorder'],$_GET['userid']); diff --git a/htdocs/bookmarks/bookmark.class.php b/htdocs/bookmarks/bookmark.class.php index 2d8a2b30af93e6f127392ab717b6289833c91de7..8baec97e4c571616dd4d9754af31ec1c261dc040 100644 --- a/htdocs/bookmarks/bookmark.class.php +++ b/htdocs/bookmarks/bookmark.class.php @@ -67,7 +67,7 @@ class Bookmark $sql.= " FROM ".MAIN_DB_PREFIX."bookmark"; $sql.= " WHERE rowid = ".$id; - dolibarr_syslog("Bookmark::fetch sql=".$sql, LOG_DEBUG); + dol_syslog("Bookmark::fetch sql=".$sql, LOG_DEBUG); $resql = $this->db->query ($sql); if ($resql) { @@ -88,7 +88,7 @@ class Bookmark } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); return -1; } } @@ -116,7 +116,7 @@ class Bookmark if ($this->fk_soc) $sql.=",".$this->fk_soc; $sql.= ")"; - dolibarr_syslog("Bookmark::update sql=".$sql, LOG_DEBUG); + dol_syslog("Bookmark::update sql=".$sql, LOG_DEBUG); $resql = $this->db->query ($sql); if ($resql) { @@ -163,7 +163,7 @@ class Bookmark $sql.= " ,favicon = '".$this->favicon."'"; $sql.= " WHERE rowid = ".$this->id; - dolibarr_syslog("Bookmark::update sql=".$sql, LOG_DEBUG); + dol_syslog("Bookmark::update sql=".$sql, LOG_DEBUG); if ($this->db->query ($sql)) { return 1; @@ -185,7 +185,7 @@ class Bookmark $sql = "DELETE FROM ".MAIN_DB_PREFIX."bookmark"; $sql .= " WHERE rowid = ".$id; - dolibarr_syslog("Bookmark::remove sql=".$sql, LOG_DEBUG); + dol_syslog("Bookmark::remove sql=".$sql, LOG_DEBUG); $resql=$this->db->query ($sql); if ($resql) { diff --git a/htdocs/bookmarks/bookmarks.lib.php b/htdocs/bookmarks/bookmarks.lib.php index 5ecef2061a277923f5ab028e42a3b9f49e9e0346..7c2d5b819995eba321dc204cff9558f819bc73e1 100644 --- a/htdocs/bookmarks/bookmarks.lib.php +++ b/htdocs/bookmarks/bookmarks.lib.php @@ -73,13 +73,13 @@ function printBookmarksList ($aDb, $aLangs) { $ret.='<div class="menu_contenu"><a class="vsmenu" title="'.$obj->title.'" href="'.$obj->url.'"'.($obj->target == 1?' target="_blank"':'').'>'; $ret.=' '.img_object($langs->trans("BookmarkThisPage"),'bookmark').' '; - $ret.= dolibarr_trunc($obj->title, 20).'</a><br></div>'; + $ret.= dol_trunc($obj->title, 20).'</a><br></div>'; $i++; } } else { - dolibarr_print_error($db); + dol_print_error($db); } } diff --git a/htdocs/bookmarks/fiche.php b/htdocs/bookmarks/fiche.php index b7d2c8073dc3759907f6994eed8881ca1fe5552c..9e8eb60e9ed3dbc99b0faa661954ce16d77bfadb 100644 --- a/htdocs/bookmarks/fiche.php +++ b/htdocs/bookmarks/fiche.php @@ -175,7 +175,7 @@ if ($_GET["id"] > 0 && ! eregi('^add',$_GET["action"])) $bookmark->fetch($_GET["id"]); - dolibarr_fiche_head($head, $hselected, $langs->trans("Bookmark")); + dol_fiche_head($head, $hselected, $langs->trans("Bookmark")); if ($_GET["action"] == 'edit') { @@ -234,7 +234,7 @@ if ($_GET["id"] > 0 && ! eregi('^add',$_GET["action"])) } print '</td></tr>'; - print '<tr><td>'.$langs->trans("DateCreation").'</td><td>'.dolibarr_print_date($bookmark->datec,'dayhour').'</td></tr>'; + print '<tr><td>'.$langs->trans("DateCreation").'</td><td>'.dol_print_date($bookmark->datec,'dayhour').'</td></tr>'; if ($_GET["action"] == 'edit') print '<tr><td colspan="2" align="center"><input class="button" type="submit" name="save" value="'.$langs->trans("Save").'"> <input class="button" type="submit" name="cancel" value="'.$langs->trans("Cancel").'"></td></tr>'; diff --git a/htdocs/bookmarks/liste.php b/htdocs/bookmarks/liste.php index 56e0560c35ea1fa0c521c831fb8ea326ed1a68ed..b398f12fd5b95c47f5feaf4f69c37da8a677ef1a 100644 --- a/htdocs/bookmarks/liste.php +++ b/htdocs/bookmarks/liste.php @@ -112,8 +112,8 @@ if ($resql) print '</td>'; $lieninterne=0; - $title=dolibarr_trunc($obj->title,24); - $lien=dolibarr_trunc($obj->url,24); + $title=dol_trunc($obj->title,24); + $lien=dol_trunc($obj->url,24); // Title print "<td>"; @@ -165,7 +165,7 @@ if ($resql) print "</td>\n"; // Date creation - print '<td align="center">'.dolibarr_print_date($obj->dateb,'day') ."</td>"; + print '<td align="center">'.dol_print_date($obj->dateb,'day') ."</td>"; // Actions print "<td>"; @@ -186,7 +186,7 @@ if ($resql) } else { - dolibarr_print_error($db); + dol_print_error($db); } diff --git a/htdocs/boutique/client/fiche.php b/htdocs/boutique/client/fiche.php index 537c1f9d9c17d1f3f1714e0ab4f47812eee0407a..a8f7e1e4a33dc78ecf09951e53f3e688f9a0d011 100644 --- a/htdocs/boutique/client/fiche.php +++ b/htdocs/boutique/client/fiche.php @@ -80,7 +80,7 @@ if ($_GET['id']) print '<td><a href="'.DOL_URL_ROOT.'/boutique/commande/fiche.php?id='.$objp->orders_id.'"><img src="/theme/'.$conf->theme.'/img/filenew.png" border="0" alt="Fiche"> '; - print dolibarr_print_date($objp->date_purchased,'dayhour')."</a>\n"; + print dol_print_date($objp->date_purchased,'dayhour')."</a>\n"; print $objp->total . "</a></TD>\n"; print "</tr>\n"; $i++; @@ -91,14 +91,14 @@ if ($_GET['id']) else { print "<p>ERROR 1</p>\n"; - dolibarr_print_error($dbosc); + dol_print_error($dbosc); } } else { print "<p>ERROR 1</p>\n"; - dolibarr_print_error($dbosc); + dol_print_error($dbosc); } diff --git a/htdocs/boutique/client/index.php b/htdocs/boutique/client/index.php index ce3500baf89d1b979e8e3881b4ad6aa4936e1e5e..fbe3df3ddedcd3606407f31a423a3163a0a77b04 100644 --- a/htdocs/boutique/client/index.php +++ b/htdocs/boutique/client/index.php @@ -80,7 +80,7 @@ if ( $dbosc->query($sql) ) } else { - dolibarr_print_error($dbosc); + dol_print_error($dbosc); } $dbosc->close(); diff --git a/htdocs/boutique/commande/ca.php b/htdocs/boutique/commande/ca.php index aa0baedaacc39cfad5ec6a6ee1cb0af7ecee7e67..34c7cc72b5af2ca5d16fcc193c73c3847d706d29 100644 --- a/htdocs/boutique/commande/ca.php +++ b/htdocs/boutique/commande/ca.php @@ -75,7 +75,7 @@ if ( $dbosc->query($sql) ) } else { - dolibarr_print_error($dbosc); + dol_print_error($dbosc); } $sql = "SELECT sum(t.value) as value"; @@ -101,7 +101,7 @@ if ( $dbosc->query($sql) ) } else { - dolibarr_print_error($dbosc); + dol_print_error($dbosc); } diff --git a/htdocs/boutique/commande/commande.class.php b/htdocs/boutique/commande/commande.class.php index 97fe1fac5337ea036f9a95253db21ec3e98a63ac..61d8c348b7ab3785847fe2d9133cc4506de1c653 100644 --- a/htdocs/boutique/commande/commande.class.php +++ b/htdocs/boutique/commande/commande.class.php @@ -75,7 +75,7 @@ class Commande $this->payment_method = stripslashes($array["payment_method"]); - $this->date = dolibarr_print_date($array["date_purchased"],'dayhour'); + $this->date = dol_print_date($array["date_purchased"],'dayhour'); $this->delivery_adr->name = stripslashes($array["delivery_name"]); $this->delivery_adr->street = stripslashes($array["delivery_street_address"]); diff --git a/htdocs/boutique/commande/index.php b/htdocs/boutique/commande/index.php index 1c2f009d3f48a5b3e16803c1083e83c61b833ae7..b51ca81e21eb8ccf2573d6c5b0c72313b173be42 100644 --- a/htdocs/boutique/commande/index.php +++ b/htdocs/boutique/commande/index.php @@ -73,7 +73,7 @@ if ( $dbosc->query($sql) ) print '<td><a href="fiche.php?id='.$objp->orders_id.'"><img src="/theme/'.$conf->theme.'/img/filenew.png" border="0" alt="Fiche"> '; print $objp->orders_id ."</a></td><td>"; - print dolibarr_print_date($objp->date_purchased,'dayhour').'</td>'; + print dol_print_date($objp->date_purchased,'dayhour').'</td>'; print '<td><a href="../client/fiche.php?id='.$objp->customers_id.'">'.$objp->customers_name."</a></TD>\n"; print '<td align="right">'.price($objp->value).'</td>'; print "</tr>\n"; @@ -84,7 +84,7 @@ if ( $dbosc->query($sql) ) } else { - dolibarr_print_error($dbosc); + dol_print_error($dbosc); } $dbosc->close(); diff --git a/htdocs/boutique/critiques/bestproduct.php b/htdocs/boutique/critiques/bestproduct.php index 1126055f222b3488bbbf52c5e17ed276653daf82..52e7852c8f7287d704b117402cf53bbe5775bd19 100644 --- a/htdocs/boutique/critiques/bestproduct.php +++ b/htdocs/boutique/critiques/bestproduct.php @@ -85,7 +85,7 @@ if ($resql) } else { - dolibarr_print_error($dbosc); + dol_print_error($dbosc); } print "</TABLE>"; diff --git a/htdocs/boutique/critiques/index.php b/htdocs/boutique/critiques/index.php index 0bf8614d9d38a34b3739e768c9eda11cbac0de9f..a081a7c78beec868ebc2a7ed65a36b2c7b93a194 100644 --- a/htdocs/boutique/critiques/index.php +++ b/htdocs/boutique/critiques/index.php @@ -79,7 +79,7 @@ if ($resql) { } else { - dolibarr_print_error($dbosc); + dol_print_error($dbosc); } print "</TABLE>"; diff --git a/htdocs/boutique/index.php b/htdocs/boutique/index.php index 55193f73dd5902a4d55c23a5765943eab49e74db..7081e5cda0cd4dc701b64cb9ce3ff943241792a7 100644 --- a/htdocs/boutique/index.php +++ b/htdocs/boutique/index.php @@ -84,7 +84,7 @@ if ($result) } else { - dolibarr_print_error($dbosc); + dol_print_error($dbosc); } /* mensuel @@ -113,7 +113,7 @@ if ( $dbosc->query($sql) ) } else { - dolibarr_print_error($dbosc); + dol_print_error($dbosc); } */ @@ -155,7 +155,7 @@ if ( $dbosc->query($sql) ) } else { - dolibarr_print_error($dbosc); + dol_print_error($dbosc); } /* @@ -189,7 +189,7 @@ if ( $dbosc->query($sql) ) } else { - dolibarr_print_error($dbosc); + dol_print_error($dbosc); } /* @@ -223,7 +223,7 @@ if ( $dbosc->query($sql) ) } else { - dolibarr_print_error($dbosc); + dol_print_error($dbosc); } @@ -260,7 +260,7 @@ if ( $dbosc->query($sql) ) } else { - dolibarr_print_error($dbosc); + dol_print_error($dbosc); } print '</tr></table>'; diff --git a/htdocs/boutique/notification/index.php b/htdocs/boutique/notification/index.php index 56b478d162bdaaa5e80d2a690fde7cc077cbc25c..f110abc7255a664294cbc9fa2d8d6784e6aa0ad0 100644 --- a/htdocs/boutique/notification/index.php +++ b/htdocs/boutique/notification/index.php @@ -81,7 +81,7 @@ if ( $dbosc->query($sql) ) } else { - dolibarr_print_error($dbosc); + dol_print_error($dbosc); } $dbosc->close(); diff --git a/htdocs/boutique/notification/produits.php b/htdocs/boutique/notification/produits.php index 4ae8e737509d454cce1f7d2ec00a0005f3ee5849..3bcf0071de0d7a5bb73ec2b10ef798f709b91ee0 100644 --- a/htdocs/boutique/notification/produits.php +++ b/htdocs/boutique/notification/produits.php @@ -85,7 +85,7 @@ if ($resql) } else { - dolibarr_print_error($dbosc); + dol_print_error($dbosc); } $dbosc->close(); diff --git a/htdocs/boutique/osc_master.inc.php b/htdocs/boutique/osc_master.inc.php index 04f266c5482aecb427a7d50ad5cf05c48ad7e138..f866e0c104c28b5e6290921f561bd357274770ba 100644 --- a/htdocs/boutique/osc_master.inc.php +++ b/htdocs/boutique/osc_master.inc.php @@ -30,7 +30,7 @@ require_once(DOL_DOCUMENT_ROOT ."/lib/databases/".$conf->db->type.".lib.php"); $dbosc = new DoliDb($conf->db->type,$conf->global->OSC_DB_HOST,$conf->global->OSC_DB_USER,$conf->global->OSC_DB_PASS,$conf->global->OSC_DB_NAME,$conf->global->OSC_DB_PORT); if (! $dbosc->connected) { - dolibarr_syslog($dbosc,"host=".$conf->global->OSC_DB_HOST.", user=".$conf->global->OSC_DB_USER.", databasename=".$conf->global->OSC_DB_NAME.", ".$db->error,LOG_ERR); + dol_syslog($dbosc,"host=".$conf->global->OSC_DB_HOST.", user=".$conf->global->OSC_DB_USER.", databasename=".$conf->global->OSC_DB_NAME.", ".$db->error,LOG_ERR); llxHeader("",$langs->trans("OSCommerceShop"),""); print '<div class="error">Failed to connect to oscommerce database. Check your module setup</div>'; diff --git a/htdocs/boutique/produits/index.php b/htdocs/boutique/produits/index.php index 8acea35525a2a8403a1b88d0618777d1f1deb20f..f855acb4d85bb476e1a5c5ac22a4ab61c3d34784 100644 --- a/htdocs/boutique/produits/index.php +++ b/htdocs/boutique/produits/index.php @@ -79,7 +79,7 @@ if ( $dbosc->query($sql) ) } else { - dolibarr_print_error($dbosc); + dol_print_error($dbosc); } $dbosc->close(); diff --git a/htdocs/boutique/produits/osc-liste.php b/htdocs/boutique/produits/osc-liste.php index 24784bc7eba4c66b9564c16e2215f3ebe74b9b21..6d2f6dda0621299970be3c29ffc65ac7ead1152c 100644 --- a/htdocs/boutique/produits/osc-liste.php +++ b/htdocs/boutique/produits/osc-liste.php @@ -92,7 +92,7 @@ if ($resql) } else { - dolibarr_print_error($dbosc); + dol_print_error($dbosc); } print "</TABLE>"; diff --git a/htdocs/boutique/promotion/index.php b/htdocs/boutique/promotion/index.php index e0f63cc15d84a7ceb39618e4f4dd64bd4b738960..c5b5264cb39c720416ba0129a73d2c39f83daf47 100644 --- a/htdocs/boutique/promotion/index.php +++ b/htdocs/boutique/promotion/index.php @@ -103,7 +103,7 @@ if ($resql) print '<img src="/theme/'.$conf->theme.'/img/icon_status_green_light.png" border="0"></a></td>'; print '<td align="center"><img src="/theme/'.$conf->theme.'/img/icon_status_red.png" border="0" alt="inactif"></td>'; } - print "<td>".dolibarr_print_date($objp->fin,'day')."</td>"; + print "<td>".dol_print_date($objp->fin,'day')."</td>"; print '<td align="right">'.price($objp->products_price)."</td>"; print '<td align="right">'.price($objp->specials_new_products_price)."</td>"; print "</tr>"; @@ -114,7 +114,7 @@ if ($resql) } else { - dolibarr_print_error($dbosc); + dol_print_error($dbosc); } $dbosc->close(); diff --git a/htdocs/boxes.php b/htdocs/boxes.php index b856a86e980a248506e6a2b27fc8ec597cae9908..9fd939ac15210cd7c765cf366a1cb6f101171579 100644 --- a/htdocs/boxes.php +++ b/htdocs/boxes.php @@ -73,7 +73,7 @@ class InfoBox $sql.= " AND b.fk_user = ".$user->id; $sql.= " ORDER BY b.box_order"; - dolibarr_syslog("InfoBox::listBoxes get user box list sql=".$sql, LOG_DEBUG); + dol_syslog("InfoBox::listBoxes get user box list sql=".$sql, LOG_DEBUG); $result = $this->db->query($sql); if ($result) { @@ -105,7 +105,7 @@ class InfoBox } else { $this->error=$this->db->error(); - dolibarr_syslog("InfoBox::listBoxes Error ".$this->error, LOG_ERR); + dol_syslog("InfoBox::listBoxes Error ".$this->error, LOG_ERR); return array(); } } @@ -120,7 +120,7 @@ class InfoBox $sql.= " AND b.fk_user = 0"; $sql.= " ORDER BY b.box_order"; - dolibarr_syslog("InfoBox::listBoxes get default box list sql=".$sql, LOG_DEBUG); + dol_syslog("InfoBox::listBoxes get default box list sql=".$sql, LOG_DEBUG); $result = $this->db->query($sql); if ($result) { @@ -152,7 +152,7 @@ class InfoBox } else { $this->error=$this->db->error(); - dolibarr_syslog("InfoBox::listBoxes Error ".$this->error, LOG_ERR); + dol_syslog("InfoBox::listBoxes Error ".$this->error, LOG_ERR); return array(); } } @@ -172,7 +172,7 @@ class InfoBox { require_once(DOL_DOCUMENT_ROOT."/lib/functions2.lib.php"); - dolibarr_syslog("InfoBoxes::saveboxorder zone=".$zone." user=".$userid); + dol_syslog("InfoBoxes::saveboxorder zone=".$zone." user=".$userid); if (! $userid || $userid == 0) return 0; @@ -194,7 +194,7 @@ class InfoBox $sql.=" WHERE fk_user = ".$userid; $sql.=" AND position = ".$zone; - dolibarr_syslog("InfoBox::saveboxorder sql=".$sql); + dol_syslog("InfoBox::saveboxorder sql=".$sql); $result = $this->db->query($sql); if ($result) { @@ -204,7 +204,7 @@ class InfoBox $part=split(':',$collist); $colonne=$part[0]; $list=$part[1]; - dolibarr_syslog('InfoBox::saveboxorder colonne='.$colonne.' list='.$list); + dol_syslog('InfoBox::saveboxorder colonne='.$colonne.' list='.$list); $i=0; $listarray=split(',',$list); @@ -212,7 +212,7 @@ class InfoBox { if (is_numeric($id)) { - //dolibarr_syslog("aaaaa".sizeof($listarray)); + //dol_syslog("aaaaa".sizeof($listarray)); $i++; $ii=sprintf('%02d',$i); $sql = "INSERT INTO ".MAIN_DB_PREFIX."boxes"; @@ -224,7 +224,7 @@ class InfoBox $sql.= " ".$userid; $sql.= ")"; - dolibarr_syslog("InfoBox::saveboxorder sql=".$sql); + dol_syslog("InfoBox::saveboxorder sql=".$sql); $result = $this->db->query($sql); if ($result < 0) { diff --git a/htdocs/cactioncomm.class.php b/htdocs/cactioncomm.class.php index c441d74dcd4c0fc6d2b4dfbee29be3503e4362d8..4e2d184c7cc443e7181d7b9ff588844959f1b48c 100644 --- a/htdocs/cactioncomm.class.php +++ b/htdocs/cactioncomm.class.php @@ -115,7 +115,7 @@ class CActionComm { $sql.=" WHERE active=".$active; } - dolibarr_syslog("CActionComm::liste_array sql=".$sql); + dol_syslog("CActionComm::liste_array sql=".$sql); $resql=$this->db->query($sql); if ($resql) { diff --git a/htdocs/cashdesk/classes/Mysql.class.php b/htdocs/cashdesk/classes/Mysql.class.php index 813caa15e4e202f9d2b1e70f6a5db1f3a6a0a21d..dacd6cdef7293a06b397dd882ff26761d40b61f8 100644 --- a/htdocs/cashdesk/classes/Mysql.class.php +++ b/htdocs/cashdesk/classes/Mysql.class.php @@ -52,7 +52,7 @@ class Sql implements intSql { * @return Ressource vers la requ�te venant d'�tre effectu�e */ public function query ($aRequete) { - dolibarr_syslog("cashdesk query sql=".$aRequete, LOG_DEBUG); + dol_syslog("cashdesk query sql=".$aRequete, LOG_DEBUG); return mysql_query($aRequete); } diff --git a/htdocs/cashdesk/deconnexion.php b/htdocs/cashdesk/deconnexion.php index 62d0a0b24a111b82cb2b6957f66003dc071275c8..0b94f35b2a0beadd7fd0009fca9ebb2ad8b4e3e7 100644 --- a/htdocs/cashdesk/deconnexion.php +++ b/htdocs/cashdesk/deconnexion.php @@ -22,14 +22,14 @@ $sessionname="DOLSESSID_".$dolibarr_main_db_name; if (! empty($conf->global->MAIN_SESSION_TIMEOUT)) ini_set('session.gc_maxlifetime',$conf->global->MAIN_SESSION_TIMEOUT); session_name($sessionname); session_start(); -dolibarr_syslog("Start session name=".$sessionname." Session id()=".session_id().", _SESSION['dol_login']=".$_SESSION["dol_login"].", ".ini_get("session.gc_maxlifetime")); +dol_syslog("Start session name=".$sessionname." Session id()=".session_id().", _SESSION['dol_login']=".$_SESSION["dol_login"].", ".ini_get("session.gc_maxlifetime")); // Destroy session $sessionname="DOLSESSID_".$dolibarr_main_db_name; if (! empty($conf->global->MAIN_SESSION_TIMEOUT)) ini_set('session.gc_maxlifetime',$conf->global->MAIN_SESSION_TIMEOUT); session_name($sessionname); session_destroy(); -dolibarr_syslog("End session in DOLSESSID_".$dolibarr_main_db_name); +dol_syslog("End session in DOLSESSID_".$dolibarr_main_db_name); header ('Location: index.php'); diff --git a/htdocs/cashdesk/include/environnement.php b/htdocs/cashdesk/include/environnement.php index 88ec14e38ba25a5c2bebab58cfc54d641663c145..3fe3aad515a84568a5c41dc47634c1932069d0a1 100644 --- a/htdocs/cashdesk/include/environnement.php +++ b/htdocs/cashdesk/include/environnement.php @@ -21,7 +21,7 @@ $sessionname="DOLSESSID_".$dolibarr_main_db_name; if (! empty($conf->global->MAIN_SESSION_TIMEOUT)) ini_set('session.gc_maxlifetime',$conf->global->MAIN_SESSION_TIMEOUT); session_name($sessionname); session_start(); -dolibarr_syslog("Start session name=".$sessionname." Session id()=".session_id().", _SESSION['dol_login']=".$_SESSION["dol_login"].", ".ini_get("session.gc_maxlifetime")); +dol_syslog("Start session name=".$sessionname." Session id()=".session_id().", _SESSION['dol_login']=".$_SESSION["dol_login"].", ".ini_get("session.gc_maxlifetime")); $conf_db_type = $dolibarr_main_db_type; @@ -43,9 +43,9 @@ $conf_fkaccount = $conf->global->CASHDESK_ID_BANKACCOUNT > 0?$conf->global->CASH $conf_fkentrepot = $conf->global->CASHDESK_ID_WAREHOUSE > 0?$conf->global->CASHDESK_ID_WAREHOUSE:$_SESSION["CASHDESK_ID_WAREHOUSE"]; // Check if setup ok -if (empty($conf_fksoc)) dolibarr_print_error("Setup of CashDesk module not complete. Third party not defined."); -if ($conf->bank->enabled && empty($conf_fkaccount)) dolibarr_print_error("Setup of CashDesk module not complete. Bank account not defined."); -if ($conf->stock->enabled && empty($conf_fkentrepot)) dolibarr_print_error("Setup of CashDesk module not complete. Warehous not defined."); +if (empty($conf_fksoc)) dol_print_error("Setup of CashDesk module not complete. Third party not defined."); +if ($conf->bank->enabled && empty($conf_fkaccount)) dol_print_error("Setup of CashDesk module not complete. Bank account not defined."); +if ($conf->stock->enabled && empty($conf_fkentrepot)) dol_print_error("Setup of CashDesk module not complete. Warehous not defined."); // Parametres d'affichage $conf_taille_listes = 200; // Nombre max de lignes a afficher dans les listes diff --git a/htdocs/cashdesk/index.php b/htdocs/cashdesk/index.php index dc6308338c89dee7bb2650e5b9634845e57b193b..6a99ee8bac8eb258f82d564cb7668c213a4a006c 100644 --- a/htdocs/cashdesk/index.php +++ b/htdocs/cashdesk/index.php @@ -22,7 +22,7 @@ $sessionname="DOLSESSID_".$dolibarr_main_db_name; if (! empty($conf->global->MAIN_SESSION_TIMEOUT)) ini_set('session.gc_maxlifetime',$conf->global->MAIN_SESSION_TIMEOUT); session_name($sessionname); session_start(); -dolibarr_syslog("Start session name=".$sessionname." Session id()=".session_id().", _SESSION['dol_login']=".$_SESSION["dol_login"].", ".ini_get("session.gc_maxlifetime")); +dol_syslog("Start session name=".$sessionname." Session id()=".session_id().", _SESSION['dol_login']=".$_SESSION["dol_login"].", ".ini_get("session.gc_maxlifetime")); if ( $_SESSION['uid'] > 0 ) { diff --git a/htdocs/categories/categorie.class.php b/htdocs/categories/categorie.class.php index 9501430d62d4ca822a084adb6787a94b8c017469..0b7c4caec61ee6b6e3ac2a7a310e4a381792daaf 100644 --- a/htdocs/categories/categorie.class.php +++ b/htdocs/categories/categorie.class.php @@ -76,7 +76,7 @@ class Categorie $sql.= " FROM ".MAIN_DB_PREFIX."categorie"; $sql.= " WHERE rowid = ".$id; - dolibarr_syslog("Categorie::fetch sql=".$sql); + dol_syslog("Categorie::fetch sql=".$sql); $resql = $this->db->query ($sql); if ($resql) { @@ -93,7 +93,7 @@ class Categorie } else { - dolibarr_print_error ($this->db); + dol_print_error ($this->db); return -1; } @@ -101,7 +101,7 @@ class Categorie $sql.= " FROM ".MAIN_DB_PREFIX."categorie_association"; $sql.= " WHERE fk_categorie_fille = '".$id."'"; - dolibarr_syslog("Categorie::fetch sql=".$sql); + dol_syslog("Categorie::fetch sql=".$sql); $resql = $this->db->query ($sql); if ($resql) { @@ -111,7 +111,7 @@ class Categorie } else { - dolibarr_print_error ($this->db); + dol_print_error ($this->db); return -1; } } @@ -174,7 +174,7 @@ class Categorie } else { - dolibarr_print_error ($this->db); + dol_print_error ($this->db); return -1; } } @@ -198,11 +198,11 @@ class Categorie $sql = 'delete from '.MAIN_DB_PREFIX.'categorie_association'; $sql .= ' WHERE fk_categorie_fille = "'.$this->id.'"'; - dolibarr_syslog("Categorie::update sql=".$sql); + dol_syslog("Categorie::update sql=".$sql); if (! $this->db->query($sql)) { $this->db->rollback(); - dolibarr_print_error($this->db); + dol_print_error($this->db); return -1; } @@ -211,11 +211,11 @@ class Categorie $sql = 'insert into '.MAIN_DB_PREFIX.'categorie_association(fk_categorie_mere,fk_categorie_fille)'; $sql .= ' VALUES ("'.$this->id_mere.'","'.$this->id.'")'; - dolibarr_syslog("Categorie::update sql=".$sql); + dol_syslog("Categorie::update sql=".$sql); if (! $this->db->query($sql)) { $this->db->rollback(); - dolibarr_print_error($this->db); + dol_print_error($this->db); return -1; } } @@ -233,7 +233,7 @@ class Categorie $sql .= ", visible = '".$this->visible."'"; $sql .= " WHERE rowid = ".$this->id; - dolibarr_syslog("Categorie::update sql=".$sql); + dol_syslog("Categorie::update sql=".$sql); if ($this->db->query($sql)) { $this->db->commit(); @@ -242,7 +242,7 @@ class Categorie else { $this->db->rollback(); - dolibarr_print_error($this->db); + dol_print_error($this->db); return -1; } } @@ -260,7 +260,7 @@ class Categorie if (!$this->db->query($sql)) { - dolibarr_print_error($this->db); + dol_print_error($this->db); return -1; } @@ -270,7 +270,7 @@ class Categorie if (!$this->db->query($sql)) { - dolibarr_print_error($this->db); + dol_print_error($this->db); return -1; } @@ -279,7 +279,7 @@ class Categorie if (!$this->db->query($sql)) { - dolibarr_print_error($this->db); + dol_print_error($this->db); return -1; } else @@ -309,7 +309,7 @@ class Categorie } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); return -1; } } @@ -416,7 +416,7 @@ class Categorie $sql = "SELECT fk_".$field." FROM ".MAIN_DB_PREFIX."categorie_".$table; $sql .= " WHERE fk_categorie = ".$this->id; - dolibarr_syslog("Categorie::get_type sql=".$sql); + dol_syslog("Categorie::get_type sql=".$sql); $res = $this->db->query($sql); if ($res) { @@ -431,7 +431,7 @@ class Categorie else { $this->error=$this->db->error().' sql='.$sql; - dolibarr_syslog("Categorie::get_type ".$this->error, LOG_ERR); + dol_syslog("Categorie::get_type ".$this->error, LOG_ERR); return -1; } } @@ -461,7 +461,7 @@ class Categorie } else { - dolibarr_print_error ($this->db); + dol_print_error ($this->db); return -1; } } @@ -518,7 +518,7 @@ class Categorie $sql = "SELECT fk_categorie_mere as id_mere, fk_categorie_fille as id_fille"; $sql.= " FROM ".MAIN_DB_PREFIX."categorie_association"; - dolibarr_syslog("Categorie::get_full_arbo build motherof array sql=".$sql, LOG_DEBUG); + dol_syslog("Categorie::get_full_arbo build motherof array sql=".$sql, LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -529,7 +529,7 @@ class Categorie } else { - dolibarr_print_error ($this->db); + dol_print_error ($this->db); return -1; } @@ -541,7 +541,7 @@ class Categorie $sql.= " WHERE c.type = ".$type; $sql.= " ORDER BY c.label, c.rowid"; - dolibarr_syslog("Categorie::get_full_arbo get category list sql=".$sql, LOG_DEBUG); + dol_syslog("Categorie::get_full_arbo get category list sql=".$sql, LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -562,19 +562,19 @@ class Categorie } else { - dolibarr_print_error ($this->db); + dol_print_error ($this->db); return -1; } // We add the fulpath property to each elements of first level (no parent exists) - dolibarr_syslog("Categorie::get_full_arbo call to build_path_from_id_categ", LOG_DEBUG); + dol_syslog("Categorie::get_full_arbo call to build_path_from_id_categ", LOG_DEBUG); foreach($this->cats as $key => $val) { if (isset($this->motherof[$key])) continue; $this->build_path_from_id_categ($key,0); // Process a path of a root category (no parent exists) } - dolibarr_syslog("Categorie::get_full_arbo dol_sort_array", LOG_DEBUG); + dol_syslog("Categorie::get_full_arbo dol_sort_array", LOG_DEBUG); $this->cats=dol_sort_array($this->cats, 'fulllabel', 'asc', true, false); //$this->debug_cats(); @@ -589,12 +589,12 @@ class Categorie */ function build_path_from_id_categ($id_categ,$protection=0) { - dolibarr_syslog("Categorie::build_path_from_id_categ id_categ=".$id_categ." protection=".$protection, LOG_DEBUG); + dol_syslog("Categorie::build_path_from_id_categ id_categ=".$id_categ." protection=".$protection, LOG_DEBUG); //if (! empty($this->cats[$id_categ]['fullpath'])) //{ // Already defined - // dolibarr_syslog("Categorie::build_path_from_id_categ fullpath and fulllabel already defined", LOG_WARNING); + // dol_syslog("Categorie::build_path_from_id_categ fullpath and fulllabel already defined", LOG_WARNING); // return; //} @@ -623,7 +623,7 @@ class Categorie // Protection when a category has itself as a child (should not happen) if ($idchild == $id_categ) { - dolibarr_syslog("Categorie::build_path_from_id_categ bad couple (".$idchild.",".$id_categ.") in association table: An entry should not have itself has child", LOG_WARNING); + dol_syslog("Categorie::build_path_from_id_categ bad couple (".$idchild.",".$id_categ.") in association table: An entry should not have itself has child", LOG_WARNING); continue; } @@ -673,7 +673,7 @@ class Categorie } else { - dolibarr_print_error ($this->db); + dol_print_error ($this->db); return -1; } } @@ -694,7 +694,7 @@ class Categorie } else { - dolibarr_print_error ($this->db); + dol_print_error ($this->db); return -1; } } @@ -724,7 +724,7 @@ class Categorie } else { - dolibarr_print_error ($this->db); + dol_print_error ($this->db); return -1; } @@ -856,7 +856,7 @@ class Categorie } else { - dolibarr_print_error ($this->db); + dol_print_error ($this->db); return -1; } } @@ -914,7 +914,7 @@ class Categorie } else { - dolibarr_print_error ($this->db); + dol_print_error ($this->db); return -1; } } @@ -957,8 +957,8 @@ class Categorie else { $this->error=$this->db->error().' sql='.$sql; - //dolibarr_syslog($this->error); - dolibarr_print_error('',$this->error); + //dol_syslog($this->error); + dol_print_error('',$this->error); return -1; } } diff --git a/htdocs/categories/categorie.php b/htdocs/categories/categorie.php index 825ffab7cb18a5a892b9c0387dce2717342257d8..938dce0aa7809ea6cd36bfb1fc9a3c23fec7b383 100644 --- a/htdocs/categories/categorie.php +++ b/htdocs/categories/categorie.php @@ -136,7 +136,7 @@ if ($_GET["socid"]) */ $head = societe_prepare_head($soc); - dolibarr_fiche_head($head, 'category', $langs->trans("ThirdParty")); + dol_fiche_head($head, 'category', $langs->trans("ThirdParty")); print '<table class="border" width="100%">'; @@ -214,7 +214,7 @@ else if ($_GET["id"] || $_GET["ref"]) $head=product_prepare_head($product, $user); $titre=$langs->trans("CardProduct".$product->type); - dolibarr_fiche_head($head, 'category', $titre); + dol_fiche_head($head, 'category', $titre); print '<table class="border" width="100%">'; diff --git a/htdocs/categories/index.php b/htdocs/categories/index.php index 7c08afab80deb48121fbec33b0a4613f18411ef0..0cdbccf7f8f25cf5d08d4494e79f6b12237d9f12 100644 --- a/htdocs/categories/index.php +++ b/htdocs/categories/index.php @@ -249,14 +249,14 @@ foreach($fulltree as $key => $val) // Show link print '<td valign="middle">'; if ($section == $val['id']) print ' <u>'; - print dolibarr_trunc($val['label'],28); + print dol_trunc($val['label'],28); if ($section == $val['id']) print '</u>'; print '</td>'; print '</tr></table>'; print "</td>\n"; print '<td>'; - print dolibarr_trunc($categstatic->get_desc($val['id']),48); + print dol_trunc($categstatic->get_desc($val['id']),48); print '</td>'; // Edit link diff --git a/htdocs/categories/liste.php b/htdocs/categories/liste.php index 9f78de910f8c424d61b291eee7618a41272381dc..bfcf927a14dc2c7f322cfb20147cff8e3f1d83d8 100644 --- a/htdocs/categories/liste.php +++ b/htdocs/categories/liste.php @@ -56,7 +56,7 @@ if ($cats != -1) $var = ! $var; print "\t<tr ".$bc[$var].">\n"; print "\t\t<td><a href='viewcat.php?id=".$cat->id."'>".$cat->label."</a></td>\n"; - print "\t\t<td>".dolibarr_trunc($cat->description,36)."</td>\n"; + print "\t\t<td>".dol_trunc($cat->description,36)."</td>\n"; print '<td align="right">'; if ($cat->type == 0) print $langs->trans("Product"); elseif ($cat->type == 1) print $langs->trans("Supplier"); @@ -69,7 +69,7 @@ if ($cats != -1) } else { - dolibarr_print_error(); + dol_print_error(); } print '</td></tr></table>'; diff --git a/htdocs/categories/viewcat.php b/htdocs/categories/viewcat.php index 2b529106ad0f5419c5398bcba4e4ba7d6136cb00..a5fd3a72f0c821c09ed656cd9d1e44a87dceb5cc 100644 --- a/htdocs/categories/viewcat.php +++ b/htdocs/categories/viewcat.php @@ -30,7 +30,7 @@ require("./pre.inc.php"); if ($_REQUEST['id'] == "") { - dolibarr_print_error('','Missing parameter id'); + dol_print_error('','Missing parameter id'); exit(); } @@ -92,7 +92,7 @@ if ($type == 0) $title=$langs->trans("ProductsCategoryShort"); if ($type == 1) $title=$langs->trans("SuppliersCategoryShort"); if ($type == 2) $title=$langs->trans("CustomersCategoryShort"); -dolibarr_fiche_head($head, 'card', $title); +dol_fiche_head($head, 'card', $title); /* @@ -138,7 +138,7 @@ if ($type == 0 && $conf->global->CATEGORY_ASSIGNED_TO_A_CUSTOMER) if ($catsMeres < 0) { - dolibarr_print_error(); + dol_print_error(); } else if (count($catsMeres) > 0) { @@ -194,7 +194,7 @@ print "</div>"; $cats = $c->get_filles (); if ($cats < 0) { - dolibarr_print_error(); + dol_print_error(); } else { @@ -255,7 +255,7 @@ if ($c->type == 0) $prods = $c->get_type ("product","Product"); if ($prods < 0) { - dolibarr_print_error(); + dol_print_error(); } else { @@ -294,7 +294,7 @@ if ($c->type == 1) $socs = $c->get_type ("societe","Fournisseur","fournisseur"); if ($socs < 0) { - dolibarr_print_error(); + dol_print_error(); } else { @@ -331,7 +331,7 @@ if($c->type == 2) $socs = $c->get_type ("societe","Societe"); if ($socs < 0) { - dolibarr_print_error(); + dol_print_error(); } else { diff --git a/htdocs/chargesociales.class.php b/htdocs/chargesociales.class.php index 11cdb9a75b27de4c6cb997c3afa1fe68c938f132..5e3313fa660ec16e1cb8504919ad4f8d024734e9 100644 --- a/htdocs/chargesociales.class.php +++ b/htdocs/chargesociales.class.php @@ -68,7 +68,7 @@ class ChargeSociales extends CommonObject $sql.= " WHERE cs.fk_type = c.id"; $sql.= " AND cs.rowid = ".$id; - dolibarr_syslog("ChargesSociales::fetch sql=".$sql); + dol_syslog("ChargesSociales::fetch sql=".$sql); $resql=$this->db->query($sql); if ($resql) { @@ -126,13 +126,13 @@ class ChargeSociales extends CommonObject $sql.= " ".price2num($newamount); $sql.= ")"; - dolibarr_syslog("ChargesSociales::create sql=".$sql); + dol_syslog("ChargesSociales::create sql=".$sql); $resql=$this->db->query($sql); if ($resql) { $this->id=$this->db->last_insert_id(MAIN_DB_PREFIX."chargesociales"); - //dolibarr_syslog("ChargesSociales::create this->id=".$this->id); + //dol_syslog("ChargesSociales::create this->id=".$this->id); $this->db->commit(); return $this->id; } @@ -154,7 +154,7 @@ class ChargeSociales extends CommonObject { $sql = "DELETE FROM ".MAIN_DB_PREFIX."chargesociales where rowid='".$this->id."'"; - dolibarr_syslog("ChargesSociales::delete sql=".$sql); + dol_syslog("ChargesSociales::delete sql=".$sql); $resql=$this->db->query($sql); if ($resql) { @@ -183,7 +183,7 @@ class ChargeSociales extends CommonObject $sql.= " periode='".$this->periode."'"; $sql.= " WHERE rowid=".$this->id; - dolibarr_syslog("ChargesSociales::update sql=".$sql); + dol_syslog("ChargesSociales::update sql=".$sql); $resql=$this->db->query($sql); if ($resql) { @@ -309,7 +309,7 @@ class ChargeSociales extends CommonObject if ($withpicto) $result.=($lien.img_object($langs->trans("ShowSocialContribution"),'bill').$lienfin.' '); if ($withpicto && $withpicto != 2) $result.=' '; - if ($withpicto != 2) $result.=$lien.($maxlen?dolibarr_trunc($this->lib,$maxlen):$this->lib).$lienfin; + if ($withpicto != 2) $result.=$lien.($maxlen?dol_trunc($this->lib,$maxlen):$this->lib).$lienfin; return $result; } @@ -326,7 +326,7 @@ class ChargeSociales extends CommonObject $sql.= ' FROM '.MAIN_DB_PREFIX.$table; $sql.= ' WHERE '.$field.' = '.$this->id; - dolibarr_syslog("ChargeSociales::getSommePaiement sql=".$sql, LOG_DEBUG); + dol_syslog("ChargeSociales::getSommePaiement sql=".$sql, LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -401,7 +401,7 @@ class PaiementCharge $sql.= ", ".$this->paiementtype.", '".$this->num_paiement."', '".addslashes($this->note)."', ".$user->id.","; $sql.= "0)"; - dolibarr_syslog("PaiementCharge::create sql=".$sql); + dol_syslog("PaiementCharge::create sql=".$sql); $resql=$this->db->query($sql); if ($resql) { @@ -422,7 +422,7 @@ class PaiementCharge else { $this->error=$this->db->error(); - dolibarr_syslog("PaiementCharges::create ".$this->error, LOG_ERR); + dol_syslog("PaiementCharges::create ".$this->error, LOG_ERR); $this->db->rollback(); return -1; } @@ -437,7 +437,7 @@ class PaiementCharge { $sql = "UPDATE llx_paiementcharge set fk_bank = ".$id_bank." where rowid = ".$this->id; - dolibarr_syslog("PaiementCharge::update_fk_bank sql=".$sql); + dol_syslog("PaiementCharge::update_fk_bank sql=".$sql); $result = $this->db->query($sql); if ($result) { @@ -446,7 +446,7 @@ class PaiementCharge else { $this->error=$this->db->error(); - dolibarr_syslog("PaiementCharges::update_fk_bank ".$this->error, LOG_ERR); + dol_syslog("PaiementCharges::update_fk_bank ".$this->error, LOG_ERR); return 0; } } diff --git a/htdocs/client.class.php b/htdocs/client.class.php index 35972fe6ef08acd59ff40321b4c6c3d32af515a1..f47ccc05bb75a8361b6d52f9e695505bc00e8fc4 100644 --- a/htdocs/client.class.php +++ b/htdocs/client.class.php @@ -113,7 +113,7 @@ class Client extends Societe } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); $this->error=$this->db->error(); return -1; } diff --git a/htdocs/comm/action/document.php b/htdocs/comm/action/document.php index 4c61fb5f37178052d03dad9d42b3b5d2b188bdb7..4a02df48032ea1c6957d62912d590954dc0aaf92 100755 --- a/htdocs/comm/action/document.php +++ b/htdocs/comm/action/document.php @@ -144,7 +144,7 @@ if ($objectid > 0) $head[$h][1] = $langs->trans('Info'); $h++; - dolibarr_fiche_head($head, $hselected, $langs->trans("Action")); + dol_fiche_head($head, $hselected, $langs->trans("Action")); // Affichage fiche action en mode visu print '<table class="border" width="100%"'; @@ -202,7 +202,7 @@ if ($objectid > 0) } else { - dolibarr_print_error($db); + dol_print_error($db); } } else diff --git a/htdocs/comm/action/fiche.php b/htdocs/comm/action/fiche.php index 5134d127e4ad42d4fda85991d668c85a599c427d..0ef8572f9e0d30518dea328a65b9e030ec75e14d 100644 --- a/htdocs/comm/action/fiche.php +++ b/htdocs/comm/action/fiche.php @@ -86,25 +86,25 @@ if ($_POST["action"] == 'add_action') //if ($_POST["admin"] == -1) $_POST["admin"]='0'; //if ($_POST["a2hour"] == -1) $_POST["a2hour"]='0'; //if ($_POST["a2min"] == -1) $_POST["a2min"]='0'; - $datep=dolibarr_mktime($_POST["aphour"], + $datep=dol_mktime($_POST["aphour"], $_POST["apmin"], 0, $_POST["apmonth"], $_POST["apday"], $_POST["apyear"]); - $datep2=dolibarr_mktime($_POST["p2hour"], + $datep2=dol_mktime($_POST["p2hour"], $_POST["p2min"], 0, $_POST["p2month"], $_POST["p2day"], $_POST["p2year"]); - /*$datea=dolibarr_mktime($_POST["adhour"], // deprecated + /*$datea=dol_mktime($_POST["adhour"], // deprecated $_POST["admin"], 0, $_POST["admonth"], $_POST["adday"], $_POST["adyear"]); - $datea2=dolibarr_mktime($_POST["a2hour"], // deprecated + $datea2=dol_mktime($_POST["a2hour"], // deprecated $_POST["a2min"], 0, $_POST["a2month"], @@ -236,7 +236,7 @@ if ($_POST["action"] == 'add_action') $db->commit(); if ($_POST["from"]) { - dolibarr_syslog("Back to ".$_POST["from"]); + dol_syslog("Back to ".$_POST["from"]); Header("Location: ".$_POST["from"]); } elseif($idaction) @@ -310,26 +310,26 @@ if ($_POST["action"] == 'update') $actioncomm = new Actioncomm($db); $actioncomm->fetch($_POST["id"]); - $datep=dolibarr_mktime($_POST["aphour"], + $datep=dol_mktime($_POST["aphour"], $_POST["apmin"], 0, $_POST["apmonth"], $_POST["apday"], $_POST["apyear"]); - $datep2=dolibarr_mktime($_POST["p2hour"], + $datep2=dol_mktime($_POST["p2hour"], $_POST["p2min"], 0, $_POST["p2month"], $_POST["p2day"], $_POST["p2year"]); - /*$datea=dolibarr_mktime($_POST["adhour"], + /*$datea=dol_mktime($_POST["adhour"], $_POST["admin"], 0, $_POST["admonth"], $_POST["adday"], $_POST["adyear"]); - $datea2=dolibarr_mktime($_POST["a2hour"], + $datea2=dol_mktime($_POST["a2hour"], $_POST["a2min"], 0, $_POST["a2month"], @@ -512,7 +512,7 @@ if ($_GET["action"] == 'create') if (! empty($_GET["datep"]) && eregi('^([0-9][0-9][0-9][0-9])([0-9][0-9])([0-9][0-9])$',$_GET["datep"],$reg)) { - $actioncomm->datep=dolibarr_mktime(0,0,0,$reg[2],$reg[3],$reg[1]); + $actioncomm->datep=dol_mktime(0,0,0,$reg[2],$reg[3],$reg[1]); } // Date start @@ -594,7 +594,7 @@ if ($_GET["id"]) $act = new ActionComm($db); $result=$act->fetch($_GET["id"]); - if ($result < 0) dolibarr_print_error($db,$act->error); + if ($result < 0) dol_print_error($db,$act->error); $societe = new Societe($db); if ($act->societe->id) @@ -634,7 +634,7 @@ if ($_GET["id"]) $head[$h][1] = $langs->trans('Info'); $h++; - dolibarr_fiche_head($head, $hselected, $langs->trans("Action")); + dol_fiche_head($head, $hselected, $langs->trans("Action")); $now=gmmktime(); $delay_warning=$conf->global->MAIN_DELAY_ACTIONS_TODO*24*60*60; @@ -819,13 +819,13 @@ if ($_GET["id"]) // Date debut print '<tr><td width="30%">'.$langs->trans("DateActionStart").'</td><td colspan="3">'; - print dolibarr_print_date($act->datep,'dayhour'); + print dol_print_date($act->datep,'dayhour'); if ($act->percentage == 0 && $act->datep && $act->datep < ($now - $delay_warning)) print img_warning($langs->trans("Late")); print '</td></tr>'; // Date fin print '<tr><td>'.$langs->trans("DateActionEnd").'</td><td colspan="3">'; - print dolibarr_print_date($act->datef,'dayhour'); + print dol_print_date($act->datef,'dayhour'); if ($act->percentage > 0 && $act->percentage < 100 && $act->datef && $act->datef < ($now- $delay_warning)) print img_warning($langs->trans("Late")); print '</td></tr>'; diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index 27a2e4f542cf9dd1845db7eca183a503bcb22c4e..441dd0a6417528656466ddbeebbc2ac590b48f01 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -119,16 +119,16 @@ $next = dol_get_next_month($month, $year); $next_year = $next['year']; $next_month = $next['month']; -$max_day_in_prev_month = date("t",dolibarr_mktime(0,0,0,$prev_month,1,$prev_year)); // Nb of days in previous month -$max_day_in_month = date("t",dolibarr_mktime(0,0,0,$month,1,$year)); // Nb of days in next month -$tmpday = -date("w",dolibarr_mktime(0,0,0,$month,1,$year))+2; +$max_day_in_prev_month = date("t",dol_mktime(0,0,0,$prev_month,1,$prev_year)); // Nb of days in previous month +$max_day_in_month = date("t",dol_mktime(0,0,0,$month,1,$year)); // Nb of days in next month +$tmpday = -date("w",dol_mktime(0,0,0,$month,1,$year))+2; if ($tmpday >= 1) $tmpday -= 7; -$firstdaytoshow=dolibarr_mktime(0,0,0,$prev_month,$max_day_in_prev_month+$tmpday,$prev_year); +$firstdaytoshow=dol_mktime(0,0,0,$prev_month,$max_day_in_prev_month+$tmpday,$prev_year); $next_day=7-($max_day_in_month+1-$tmpday)%7; if ($next_day < 6) $next_day+=7; -$lastdaytoshow=dolibarr_mktime(0,0,0,$next_month,$next_day,$next_year); -//print dolibarr_print_date($firstdaytoshow,'day'); -//print dolibarr_print_date($lastdaytoshow,'day'); +$lastdaytoshow=dol_mktime(0,0,0,$next_month,$next_day,$next_year); +//print dol_print_date($firstdaytoshow,'day'); +//print dol_print_date($lastdaytoshow,'day'); $title=$langs->trans("DoneAndToDoActions"); if ($status == 'done') $title=$langs->trans("DoneActions"); @@ -147,7 +147,7 @@ if (! empty($_REQUEST["type"])) $param.="&type=".$_REQUEST["type"]; // Show navigation bar $nav ="<a href=\"?year=".$prev_year."&month=".$prev_month."&region=".$region.$param."\">".img_previous($langs->trans("Previous"))."</a>\n"; -$nav.=" <span id=\"month_name\">".dolibarr_print_date(dolibarr_mktime(0,0,0,$month,1,$year),"%b"); +$nav.=" <span id=\"month_name\">".dol_print_date(dol_mktime(0,0,0,$month,1,$year),"%b"); $nav.=" ".$year; $nav.=" </span>\n"; $nav.="<a href=\"?year=".$next_year."&month=".$next_month."&region=".$region.$param."\">".img_next($langs->trans("Next"))."</a>\n"; @@ -220,14 +220,14 @@ $sql.= ' FROM '.MAIN_DB_PREFIX.'actioncomm as a, '.MAIN_DB_PREFIX.'c_actioncomm $sql.= ' WHERE a.fk_action = ca.id'; if ($_GET["action"] == 'show_day') { - $sql.= ' AND datep BETWEEN '.$db->idate(dolibarr_mktime(0,0,0,$month,$_GET["day"],$year)); - $sql.= ' AND '.$db->idate(dolibarr_mktime(23,59,59,$month,$_GET["day"],$year)); + $sql.= ' AND datep BETWEEN '.$db->idate(dol_mktime(0,0,0,$month,$_GET["day"],$year)); + $sql.= ' AND '.$db->idate(dol_mktime(23,59,59,$month,$_GET["day"],$year)); } else { // To limit array - $sql.= ' AND datep BETWEEN '.$db->idate(dolibarr_mktime(0,0,0,$month,1,$year)-(60*60*24*7)); // Start 7 days before - $sql.= ' AND '.$db->idate(dolibarr_mktime(0,0,0,$month,28,$year)+(60*60*24*10)); // End 7 days after + 3 to go from 28 to 31 + $sql.= ' AND datep BETWEEN '.$db->idate(dol_mktime(0,0,0,$month,1,$year)-(60*60*24*7)); // Start 7 days before + $sql.= ' AND '.$db->idate(dol_mktime(0,0,0,$month,28,$year)+(60*60*24*10)); // End 7 days after + 3 to go from 28 to 31 } if ($filtera > 0 || $filtert > 0 || $filterd > 0) { @@ -290,7 +290,7 @@ if ($resql) $jour = date('d',$daycursor); $loop=true; - $daykey=dolibarr_mktime(0,0,0,$mois,$jour,$annee); + $daykey=dol_mktime(0,0,0,$mois,$jour,$annee); do { $actionarray[$daykey][]=$action; @@ -303,7 +303,7 @@ if ($resql) } else { - dolibarr_print_error($db); + dol_print_error($db); } if ($showbirthday) @@ -338,7 +338,7 @@ if ($showbirthday) $datebirth=dol_stringtotime($obj->birthday); //print 'ee'.$obj->birthday.'-'.$datebirth; $datearray=dol_getdate($datebirth,true); - $action->datep=dolibarr_mktime(0,0,0,$datearray['mon'],$datearray['mday'],$year); + $action->datep=dol_mktime(0,0,0,$datearray['mon'],$datearray['mday'],$year); $action->datef=$action->datep; $action->type_code='BIRTHDAY'; $action->libelle=$langs->trans("Birthday").' '.$obj->firstname.' '.$obj->name; @@ -355,7 +355,7 @@ if ($showbirthday) $jour = date('d',$daycursor); $loop=true; - $daykey=dolibarr_mktime(0,0,0,$mois,$jour,$annee); + $daykey=dol_mktime(0,0,0,$mois,$jour,$annee); do { $actionarray[$daykey][]=$action; @@ -368,7 +368,7 @@ if ($showbirthday) } else { - dolibarr_print_error($db); + dol_print_error($db); } } @@ -423,7 +423,7 @@ if ($_GET["action"] != 'show_day') /* Show days of the current month */ elseif(($tmpday <= $max_day_in_month)) { - $curtime = dolibarr_mktime (0, 0, 0, $month, $tmpday, $year); + $curtime = dol_mktime (0, 0, 0, $month, $tmpday, $year); if ($curtime < $now) $style='cal_current_month'; @@ -454,8 +454,8 @@ else { // Code to show just one day $style='cal_current_month'; - $timestamp=dolibarr_mktime(12,0,0,$month,$_GET["day"],$year); - $arraytimestamp=adodb_getdate(dolibarr_mktime(12,0,0,$month,$_GET["day"],$year)); + $timestamp=dol_mktime(12,0,0,$month,$_GET["day"],$year); + $arraytimestamp=adodb_getdate(dol_mktime(12,0,0,$month,$_GET["day"],$year)); $dayname=array('0'=>'Sunday','1'=>'Monday','2'=>'Tuesday','3'=>'Wednesday','4'=>'Thursday','5'=>'Friday','6'=>'Saturday'); echo '<table width="100%" class="nocellnopadd">'; echo ' <tr class="liste_titre">'; @@ -497,11 +497,11 @@ function show_day_events($db, $day, $month, $year, $style, $actionarray, $maxPri { $maxPrint=0; } - $curtime = dolibarr_mktime (0, 0, 0, $month, $day, $year); + $curtime = dol_mktime (0, 0, 0, $month, $day, $year); print '<table class="nobordernopadding" width="100%">'; print '<tr style="background: #EEEEEE"><td align="left" nowrap="nowrap">'; - print '<a href="'.DOL_URL_ROOT.'/comm/action/index.php?action=show_day&day='.str_pad($day, 2, "0", STR_PAD_LEFT).'&month='.$month.'&year='.$year.'">'.dolibarr_print_date($curtime,'%a %d').'</a>'; + print '<a href="'.DOL_URL_ROOT.'/comm/action/index.php?action=show_day&day='.str_pad($day, 2, "0", STR_PAD_LEFT).'&month='.$month.'&year='.$year.'">'.dol_print_date($curtime,'%a %d').'</a>'; print '</td><td align="right" nowrap="nowrap">'; print '<a href="'.DOL_URL_ROOT.'/comm/action/fiche.php?action=create&datep='.sprintf("%04d%02d%02d",$year,$month,$day).'">'; print img_picto($langs->trans("NewAction"),'edit_add.png'); @@ -509,7 +509,7 @@ function show_day_events($db, $day, $month, $year, $style, $actionarray, $maxPri print '</td></tr>'; print '<tr height="60"><td valign="top" colspan="2" nowrap="nowrap">'; // Minimum 60px height - //$curtime = dolibarr_mktime (0, 0, 0, $month, $day, $year); + //$curtime = dol_mktime (0, 0, 0, $month, $day, $year); $i=0; foreach ($actionarray as $daykey => $notused) @@ -543,7 +543,7 @@ function show_day_events($db, $day, $month, $year, $style, $actionarray, $maxPri // Hour start if ($tmpyearstart == $annee && $tmpmonthstart == $mois && $tmpdaystart == $jour) { - print dolibarr_print_date($action->date_start_in_calendar,'%H:%M'); + print dol_print_date($action->date_start_in_calendar,'%H:%M'); if ($action->date_end_in_calendar && $action->date_start_in_calendar != $action->date_end_in_calendar) { if ($tmpyearstart == $tmpyearend && $tmpmonthstart == $tmpmonthend && $tmpdaystart == $tmpdayend) @@ -563,7 +563,7 @@ function show_day_events($db, $day, $month, $year, $style, $actionarray, $maxPri if ($action->date_end_in_calendar && $action->date_start_in_calendar != $action->date_end_in_calendar) { if ($tmpyearend == $annee && $tmpmonthend == $mois && $tmpdayend == $jour) - print dolibarr_print_date($action->date_end_in_calendar,'%H:%M'); + print dol_print_date($action->date_end_in_calendar,'%H:%M'); } print '<br>'; print $action->getNomUrl(0,$nbofchartoshow,'cal_event'); diff --git a/htdocs/comm/action/info.php b/htdocs/comm/action/info.php index db78c34103f0df7b67bed4dbdc5aaa42d31208c9..8710ffc95a1bcc65eb96e7b43663022fd9128f78 100644 --- a/htdocs/comm/action/info.php +++ b/htdocs/comm/action/info.php @@ -67,7 +67,7 @@ $head[$h][1] = $langs->trans('Info'); $hselected=$h; $h++; -dolibarr_fiche_head($head, $hselected, $langs->trans("Action")); +dol_fiche_head($head, $hselected, $langs->trans("Action")); print '<table width="100%"><tr><td>'; diff --git a/htdocs/comm/action/listactions.php b/htdocs/comm/action/listactions.php index 38722e50c57e7baa570d3c830acf60f5840a8dc7..0ef4a4823db97cd51bbc0eeacde9915cd2bf3706 100644 --- a/htdocs/comm/action/listactions.php +++ b/htdocs/comm/action/listactions.php @@ -149,7 +149,7 @@ $sql .= " ORDER BY ".$sortfield." ".$sortorder; $sql .= $db->plimit( $limit + 1, $offset); //print $sql; -dolibarr_syslog("comm/action/listactions.php sql=".$sql); +dol_syslog("comm/action/listactions.php sql=".$sql); $resql=$db->query($sql); if ($resql) { @@ -266,11 +266,11 @@ if ($resql) // Titre //print '<td>'; - //print dolibarr_trunc($obj->label,12); + //print dol_trunc($obj->label,12); //print '</td>'; print '<td align="center" nowrap="nowrap">'; - print dolibarr_print_date($db->jdate($obj->dp),"day"); + print dol_print_date($db->jdate($obj->dp),"day"); $late=0; if ($obj->percent == 0 && $obj->dp && $db->jdate($obj->dp) < ($now - $delay_warning)) $late=1; if ($obj->percent == 0 && ! $obj->dp && $obj->dp2 && $db->jdate($obj->dp) < ($now - $delay_warning)) $late=1; @@ -280,7 +280,7 @@ if ($resql) print '</td>'; print '<td align="center" nowrap="nowrap">'; - print dolibarr_print_date($db->jdate($obj->dp2),"day"); + print dol_print_date($db->jdate($obj->dp2),"day"); print '</td>'; // Third party @@ -358,7 +358,7 @@ if ($resql) } else { - dolibarr_print_error($db); + dol_print_error($db); } diff --git a/htdocs/comm/action/rapport/index.php b/htdocs/comm/action/rapport/index.php index dcb8fc6da7c23b2e088f5e0a4a4d067b476cdd34..30bca16ab216055a23b4e0ec52d4baa4eee73d2f 100644 --- a/htdocs/comm/action/rapport/index.php +++ b/htdocs/comm/action/rapport/index.php @@ -112,7 +112,7 @@ if ($resql) if (file_exists($file)) { print '<td align="center"><a href="'.DOL_URL_ROOT.'/document.php?page='.$page.'&file='.urlencode($relativepath).'&modulepart=actionsreport">'.img_pdf().'</a></td>'; - print '<td align="center">'.dolibarr_print_date(filemtime($file),'dayhour').'</td>'; + print '<td align="center">'.dol_print_date(filemtime($file),'dayhour').'</td>'; print '<td align="center">'.filesize($file). ' '.$langs->trans("Bytes").'</td>'; } else { @@ -130,7 +130,7 @@ if ($resql) } else { - dolibarr_print_error($db); + dol_print_error($db); } diff --git a/htdocs/comm/addpropal.php b/htdocs/comm/addpropal.php index 43eec8437eb0ef6a501a5589226a4b9b2de09083..9f3a64216af53591f87c7e56dc7c07fb2baadb21 100644 --- a/htdocs/comm/addpropal.php +++ b/htdocs/comm/addpropal.php @@ -71,7 +71,7 @@ if ($_GET["action"] == 'create') $result=$soc->fetch($_GET["socid"]); if ($result < 0) { - dolibarr_print_error($db,$soc->error); + dol_print_error($db,$soc->error); exit; } @@ -238,7 +238,7 @@ if ($_GET["action"] == 'create') } else { - dolibarr_print_error($db); + dol_print_error($db); } print '</td></tr>'; diff --git a/htdocs/comm/adresse_livraison.class.php b/htdocs/comm/adresse_livraison.class.php index 4defc6c70febcd9f672bc348476a845a4f132fbc..e5074617fbb85c766d8969910fee89c3acb9f8e9 100644 --- a/htdocs/comm/adresse_livraison.class.php +++ b/htdocs/comm/adresse_livraison.class.php @@ -82,7 +82,7 @@ class AdresseLivraison $this->nom=trim($this->nom); $this->label=trim($this->label); - dolibarr_syslog("societe.class.php::create delivery adress ".$this->label); + dol_syslog("societe.class.php::create delivery adress ".$this->label); $this->db->begin(); @@ -102,13 +102,13 @@ class AdresseLivraison if ($ret >= 0) { - dolibarr_syslog("Societe::Create delivery adress success id=".$this->id); + dol_syslog("Societe::Create delivery adress success id=".$this->id); $this->db->commit(); return 0; } else { - dolibarr_syslog("Societe::Create delivery adress echec update"); + dol_syslog("Societe::Create delivery adress echec update"); $this->db->rollback(); return -3; } @@ -123,7 +123,7 @@ class AdresseLivraison } else { - dolibarr_syslog("Societe::Create echec insert sql=$sql"); + dol_syslog("Societe::Create echec insert sql=$sql"); } $this->db->rollback(); return -2; @@ -133,7 +133,7 @@ class AdresseLivraison else { $this->db->rollback(); - dolibarr_syslog("Societe::Create echec verify sql=$sql"); + dol_syslog("Societe::Create echec verify sql=$sql"); return -1; } } @@ -167,7 +167,7 @@ class AdresseLivraison { global $langs; - dolibarr_syslog("Societe::Update"); + dol_syslog("Societe::Update"); // Nettoyage des param�tres @@ -190,7 +190,7 @@ class AdresseLivraison if ($result >= 0) { - dolibarr_syslog("Societe::Update delivery adress verify ok"); + dol_syslog("Societe::Update delivery adress verify ok"); $sql = "UPDATE ".MAIN_DB_PREFIX."societe_adresse_livraison"; $sql.= " SET label = '" . addslashes($this->label) ."'"; // Champ obligatoire @@ -232,7 +232,7 @@ class AdresseLivraison { $this->error = $langs->trans("Error sql=$sql"); - dolibarr_syslog("Societe::Update delivery adress echec sql=$sql"); + dol_syslog("Societe::Update delivery adress echec sql=$sql"); $result = -2; } } @@ -320,19 +320,19 @@ class AdresseLivraison } else { - dolibarr_syslog('Erreur AdresseLivraison::Fetch aucune adresse dde livraison'); + dol_syslog('Erreur AdresseLivraison::Fetch aucune adresse dde livraison'); return -1; } } else { - dolibarr_syslog('AdresseLivraison::Societe inconnue'); + dol_syslog('AdresseLivraison::Societe inconnue'); return -2; } } else { - dolibarr_syslog('Erreur Societe::Fetch '.$this->db->error()); + dol_syslog('Erreur Societe::Fetch '.$this->db->error()); $this->error=$this->db->error(); } } @@ -387,7 +387,7 @@ class AdresseLivraison } else { - dolibarr_syslog('Erreur Societe::Fetch aucune adresse de livraison avec id='.$this->id.' - '.$sql); + dol_syslog('Erreur Societe::Fetch aucune adresse de livraison avec id='.$this->id.' - '.$sql); $this->error='Erreur Societe::Fetch aucune adresse de livraison avec id='.$this->id.' - '.$sql; $result = -2; } @@ -396,8 +396,8 @@ class AdresseLivraison } else { - dolibarr_syslog('Erreur Societe::Fetch echec sql='.$sql); - dolibarr_syslog('Erreur Societe::Fetch '.$this->db->error()); + dol_syslog('Erreur Societe::Fetch echec sql='.$sql); + dol_syslog('Erreur Societe::Fetch '.$this->db->error()); $this->error=$this->db->error(); $result = -3; } @@ -412,7 +412,7 @@ class AdresseLivraison */ function delete($idl,$socid) { - dolibarr_syslog("Societe::Delete delivery adress"); + dol_syslog("Societe::Delete delivery adress"); $sql = "DELETE FROM ".MAIN_DB_PREFIX."societe_adresse_livraison"; $sql .= " WHERE rowid=".$idl." AND fk_societe = ".$socid; @@ -467,7 +467,7 @@ class AdresseLivraison } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); } } diff --git a/htdocs/comm/adresse_livraison.php b/htdocs/comm/adresse_livraison.php index d0774841ee5b6978177809ddcbe0c732ba9f46a4..48e45fedbdd3ab57b35a068102d53afdbd702c77 100644 --- a/htdocs/comm/adresse_livraison.php +++ b/htdocs/comm/adresse_livraison.php @@ -170,7 +170,7 @@ if ($_GET["action"] == 'create' || $_POST["action"] == 'create') $societe->fetch($_GET["socid"]); $head = societe_prepare_head($societe); - dolibarr_fiche_head($head, 'customer', $societe->nom); + dol_fiche_head($head, 'customer', $societe->nom); if ($_POST["label"] && $_POST["nom"]) { @@ -197,7 +197,7 @@ if ($_GET["action"] == 'create' || $_POST["action"] == 'create') } else { - dolibarr_print_error($db); + dol_print_error($db); } $livraison->pays_code=$obj->code; $livraison->pays=$obj->libelle; @@ -266,7 +266,7 @@ elseif ($_GET["action"] == 'edit' || $_POST["action"] == 'edit') $societe->fetch($_GET["socid"]); $head = societe_prepare_head($societe); - dolibarr_fiche_head($head, 'customer', $societe->nom); + dol_fiche_head($head, 'customer', $societe->nom); print_titre($langs->trans("EditDeliveryAddress")); print "<br>\n"; @@ -303,7 +303,7 @@ elseif ($_GET["action"] == 'edit' || $_POST["action"] == 'edit') } else { - dolibarr_print_error($db); + dol_print_error($db); } $livraison->pays_code=$obj->code; $livraison->pays=$langs->trans("Country".$obj->code)?$langs->trans("Country".$obj->code):$obj->libelle; @@ -368,7 +368,7 @@ else $result=$livraison->fetch($socid); if ($result < 0) { - dolibarr_print_error($db,$livraison->error); + dol_print_error($db,$livraison->error); exit; } @@ -376,7 +376,7 @@ else $societe->fetch($livraison->socid); $head = societe_prepare_head($societe); - dolibarr_fiche_head($head, 'customer', $societe->nom); + dol_fiche_head($head, 'customer', $societe->nom); // Confirmation de la suppression de la facture diff --git a/htdocs/comm/bookmark.php b/htdocs/comm/bookmark.php index 1d090a0fc1225861c402e6b29f37d0450ce70059..7596a6b74de59a92f78ee522239a5f1a2ff8099a 100644 --- a/htdocs/comm/bookmark.php +++ b/htdocs/comm/bookmark.php @@ -130,7 +130,7 @@ if ($resql) //print "<td>" . ($i + 1 + ($limit * $page)) . "</td>"; print "<td align=\"center\"><b>".$obj->bid."</b></td>"; print "<td><a href='".DOL_URL_ROOT."/user/fiche.php?id=".$obj->fk_user."'>".img_object($langs->trans("ShowUser"),"user").' '.$obj->name." ".$obj->firstname."</a></td>\n"; - print '<td align="center">'.dolibarr_print_date($obj->dateb) ."</td>"; + print '<td align="center">'.dol_print_date($obj->dateb) ."</td>"; print "<td><a href=\"index.php?socid=".$obj->rowid."\">".img_object($langs->trans("ShowCompany"),"company").' '.$obj->nom."</a></td>\n"; print '<td align="center">'.$obj->url."</td>"; print '<td align="center">'.$obj->target."</td>"; @@ -143,7 +143,7 @@ if ($resql) } else { - dolibarr_print_error($db); + dol_print_error($db); } diff --git a/htdocs/comm/clients.php b/htdocs/comm/clients.php index 358f2164be32a789a3113d8ed6a7f3dba97ee219..2a240bd5e8cdb9fa6eaa76e35b779572acea8f7c 100644 --- a/htdocs/comm/clients.php +++ b/htdocs/comm/clients.php @@ -129,7 +129,7 @@ if ($result) print '</a> <a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$obj->rowid.'">'.stripslashes($obj->nom).'</a></td>'; print '<td>'.$obj->ville.'</td>'; print '<td>'.$obj->code_client.'</td>'; - print '<td align="right">'.dolibarr_print_date($obj->datec).'</td>'; + print '<td align="right">'.dol_print_date($obj->datec).'</td>'; print "</tr>\n"; $i++; } @@ -140,7 +140,7 @@ if ($result) } else { - dolibarr_print_error($db); + dol_print_error($db); } $db->close(); diff --git a/htdocs/comm/contact.php b/htdocs/comm/contact.php index 77041745127f52069b97f26cdba3fd752b85cf2a..100c31c362601ba8e75e33dffaeab4cf30b7aabe 100644 --- a/htdocs/comm/contact.php +++ b/htdocs/comm/contact.php @@ -179,7 +179,7 @@ if ($resql) } else { - dolibarr_print_error($db); + dol_print_error($db); } $db->close(); diff --git a/htdocs/comm/fiche.php b/htdocs/comm/fiche.php index c6626f0433c8b54ef910fd5bcccac19827fe28d2..a15bdaaac20684118922f68ffa4963ea14e9096e 100644 --- a/htdocs/comm/fiche.php +++ b/htdocs/comm/fiche.php @@ -73,7 +73,7 @@ if ($_POST["action"] == 'setconditions' && $user->rights->societe->creer) $sql = "UPDATE ".MAIN_DB_PREFIX."societe SET cond_reglement='".$_POST['cond_reglement_id']; $sql.= "' WHERE rowid='".$_GET["socid"]."'"; $result = $db->query($sql); - if (! $result) dolibarr_print_error($result); + if (! $result) dol_print_error($result); } // mode de reglement if ($_POST["action"] == 'setmode' && $user->rights->societe->creer) @@ -83,7 +83,7 @@ if ($_POST["action"] == 'setmode' && $user->rights->societe->creer) $sql = "UPDATE ".MAIN_DB_PREFIX."societe SET mode_reglement='".$_POST['mode_reglement_id']; $sql.= "' WHERE rowid='".$_GET["socid"]."'"; $result = $db->query($sql); - if (! $result) dolibarr_print_error($result); + if (! $result) dol_print_error($result); } // assujetissement a la TVA if ($_POST["action"] == 'setassujtva' && $user->rights->societe->creer) @@ -92,7 +92,7 @@ if ($_POST["action"] == 'setassujtva' && $user->rights->societe->creer) $societe->tva_assuj=$_POST['assujtva_value']; $sql = "UPDATE ".MAIN_DB_PREFIX."societe SET tva_assuj='".$_POST['assujtva_value']."' WHERE rowid='".$socid."'"; $result = $db->query($sql); - if (! $result) dolibarr_print_error($result); + if (! $result) dol_print_error($result); } @@ -151,7 +151,7 @@ if ($socid > 0) $head = societe_prepare_head($objsoc); - dolibarr_fiche_head($head, 'customer', $langs->trans("ThirdParty")); + dol_fiche_head($head, 'customer', $langs->trans("ThirdParty")); /* @@ -274,7 +274,7 @@ if ($socid > 0) print '</td>'; print '<td colspan="3">'; $amount_discount=$objsoc->getAvailableDiscounts(); - if ($amount_discount < 0) dolibarr_print_error($db,$societe->error); + if ($amount_discount < 0) dol_print_error($db,$societe->error); if ($amount_discount > 0) print price($amount_discount).' '.$langs->trans("Currency".$conf->monnaie); else print $langs->trans("DiscountNone"); print '</td>'; @@ -323,7 +323,7 @@ if ($socid > 0) } else { - dolibarr_print_error($db); + dol_print_error($db); } print '</td>'; @@ -389,7 +389,7 @@ if ($socid > 0) { print " ".img_warning(); } - print '</td><td align="right" width="80">'.dolibarr_print_date($objp->dp,'day')."</td>\n"; + print '</td><td align="right" width="80">'.dol_print_date($objp->dp,'day')."</td>\n"; print '<td align="right" width="120">'.price($objp->total_ht).'</td>'; print '<td align="right" nowrap="nowrap">'.$propal_static->LibStatut($objp->fk_statut,5).'</td></tr>'; $var=!$var; @@ -398,7 +398,7 @@ if ($socid > 0) $db->free($resql); } else { - dolibarr_print_error($db); + dol_print_error($db); } print "</table>"; } @@ -438,7 +438,7 @@ if ($socid > 0) $var=!$var; print "<tr $bc[$var]>"; print '<td nowrap="nowrap"><a href="'.DOL_URL_ROOT.'/commande/fiche.php?id='.$objp->cid.'">'.img_object($langs->trans("ShowOrder"),"order").' '.$objp->ref."</a>\n"; - print '</td><td align="right" width="80">'.dolibarr_print_date($objp->dc,'day')."</td>\n"; + print '</td><td align="right" width="80">'.dol_print_date($objp->dc,'day')."</td>\n"; print '<td align="right" width="120">'.price($objp->total_ht).'</td>'; print '<td align="right" width="100">'.$commande_static->LibStatut($objp->fk_statut,$objp->facture,5).'</td></tr>'; $i++; @@ -446,7 +446,7 @@ if ($socid > 0) $db->free($resql); } else { - dolibarr_print_error($db); + dol_print_error($db); } print "</table>"; } @@ -491,7 +491,7 @@ if ($socid > 0) $contrat->ref=$objp->ref?$objp->ref:$objp->id; print $contrat->getNomUrl(1); print "</td>\n"; - print '<td align="right" width="80">'.dolibarr_print_date($objp->dc,'day')."</td>\n"; + print '<td align="right" width="80">'.dol_print_date($objp->dc,'day')."</td>\n"; print '<td width="20"> </td>'; print '<td align="right" nowrap="nowrap">'; $contrat->fetch_lignes(); @@ -503,7 +503,7 @@ if ($socid > 0) $db->free($resql); } else { - dolibarr_print_error($db); + dol_print_error($db); } print "</table>"; } @@ -539,7 +539,7 @@ if ($socid > 0) $objp = $db->fetch_object($resql); print "<tr $bc[$var]>"; print '<td nowrap><a href="'.DOL_URL_ROOT."/fichinter/fiche.php?id=".$objp->id."\">".img_object($langs->trans("ShowPropal"),"propal")." ".$objp->ref."</a>\n"; - print "</td><td align=\"right\">".dolibarr_print_date($objp->di,'day')."</td>\n"; + print "</td><td align=\"right\">".dol_print_date($objp->di,'day')."</td>\n"; print '</tr>'; $var=!$var; $i++; @@ -547,7 +547,7 @@ if ($socid > 0) $db->free($resql); } else { - dolibarr_print_error($db); + dol_print_error($db); } print "</table>"; } @@ -587,7 +587,7 @@ if ($socid > 0) } else { - dolibarr_print_error($db); + dol_print_error($db); } print "</table>"; } @@ -618,8 +618,8 @@ if ($socid > 0) print "<tr $bc[$var]>"; print '<td><a href="'.DOL_URL_ROOT.'/chronodocs/fiche.php?id='.$obj->fichid.'">'.img_object($langs->trans("ShowChronodocs"),"generic")." ".$obj->ref.'</a></td>'; - print "<td align=\"left\">".dolibarr_trunc($obj->title,30) ."</td>"; - print "<td align=\"right\">".dolibarr_print_date($obj->dp,'day')."</td>\n"; + print "<td align=\"left\">".dol_trunc($obj->title,30) ."</td>"; + print "<td align=\"right\">".dol_print_date($obj->dp,'day')."</td>\n"; print "</tr>"; $i++; @@ -698,7 +698,7 @@ if ($socid > 0) } else { - dolibarr_print_error($db,'Bad value for socid parameter'); + dol_print_error($db,'Bad value for socid parameter'); } $db->close(); diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php index d51e5f2f47f1415f01c9f4cc1c6aedff6e8a22e1..d8e80c93e47ec33e056697506bb2cb05cc112503 100644 --- a/htdocs/comm/index.php +++ b/htdocs/comm/index.php @@ -64,12 +64,12 @@ if (isset($_GET["action"]) && $_GET["action"] == 'add_bookmark') $sql = "DELETE FROM ".MAIN_DB_PREFIX."bookmark WHERE fk_soc = ".$_GET["socid"]." AND fk_user=".$user->id; if (! $db->query($sql) ) { - dolibarr_print_error($db); + dol_print_error($db); } $sql = "INSERT INTO ".MAIN_DB_PREFIX."bookmark (fk_soc, dateb, fk_user) VALUES (".$_GET["socid"].", ".$db->idate(mktime()).",".$user->id.");"; if (! $db->query($sql) ) { - dolibarr_print_error($db); + dol_print_error($db); } } @@ -163,7 +163,7 @@ if ($conf->propal->enabled && $user->rights->propale->lire) $obj = $db->fetch_object($resql); $var=!$var; print '<tr '.$bc[$var].'><td nowrap="nowrap">'."<a href=\"".DOL_URL_ROOT."/comm/propal.php?propalid=".$obj->rowid."\">".img_object($langs->trans("ShowPropal"),"propal")." ".$obj->ref.'</a></td>'; - print '<td nowrap="nowrap"><a href="fiche.php?socid='.$obj->socid.'">'.dolibarr_trunc($obj->nom,18).'</a></td>'; + print '<td nowrap="nowrap"><a href="fiche.php?socid='.$obj->socid.'">'.dol_trunc($obj->nom,18).'</a></td>'; print '<td align="right" nowrap="nowrap">'.price($obj->total_ht).'</td></tr>'; $i++; $total += $obj->price; @@ -215,7 +215,7 @@ if ($conf->commande->enabled && $user->rights->commande->lire) $var=!$var; $obj = $db->fetch_object($resql); print '<tr '.$bc[$var].'><td nowrap="nowrap"><a href="../commande/fiche.php?id='.$obj->rowid.'">'.img_object($langs->trans("ShowOrder"),"order").' '.$obj->ref.'</a></td>'; - print '<td nowrap="nowrap"><a href="fiche.php?socid='.$obj->socid.'">'.dolibarr_trunc($obj->nom,18).'</a></td>'; + print '<td nowrap="nowrap"><a href="fiche.php?socid='.$obj->socid.'">'.dol_trunc($obj->nom,18).'</a></td>'; print '<td align="right" nowrap="nowrap">'.price($obj->total_ttc).'</td></tr>'; $i++; $total += $obj->total_ttc; @@ -295,7 +295,7 @@ if ($user->rights->societe->lire) if ($objp->client == 1) print $langs->trans("Customer"); if ($objp->client == 2) print $langs->trans("Prospect"); print "</td>"; - print '<td align="right" nowrap>'.dolibarr_print_date($objp->datec,'day')."</td>"; + print '<td align="right" nowrap>'.dol_print_date($objp->datec,'day')."</td>"; print '</tr>'; $i++; $var=!$var; @@ -360,7 +360,7 @@ if ($conf->contrat->enabled && $user->rights->contrat->lire && 0) // \todo A REF } else { - dolibarr_print_error($db); + dol_print_error($db); } } @@ -423,9 +423,9 @@ if ($conf->propal->enabled && $user->rights->propale->lire) print "</td>"; - print "<td align=\"left\"><a href=\"fiche.php?socid=".$obj->rowid."\">".img_object($langs->trans("ShowCompany"),"company")." ".dolibarr_trunc($obj->nom,44)."</a></td>\n"; + print "<td align=\"left\"><a href=\"fiche.php?socid=".$obj->rowid."\">".img_object($langs->trans("ShowCompany"),"company")." ".dol_trunc($obj->nom,44)."</a></td>\n"; print "<td align=\"right\">"; - print dolibarr_print_date($obj->dp,'day')."</td>\n"; + print dol_print_date($obj->dp,'day')."</td>\n"; print "<td align=\"right\">".price($obj->total_ttc)."</td>"; print "<td align=\"center\" width=\"14\">".$propalstatic->LibStatut($obj->fk_statut,3)."</td>\n"; print "</tr>\n"; @@ -440,7 +440,7 @@ if ($conf->propal->enabled && $user->rights->propale->lire) } else { - dolibarr_print_error($db); + dol_print_error($db); } } @@ -500,9 +500,9 @@ if ($conf->propal->enabled && $user->rights->propale->lire) print '</td>'; - print '<td align="left"><a href="fiche.php?socid='.$objp->rowid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.dolibarr_trunc($objp->nom,44).'</a></td>'; + print '<td align="left"><a href="fiche.php?socid='.$objp->rowid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($objp->nom,44).'</a></td>'; print "<td align=\"right\">"; - print dolibarr_print_date($objp->dp,'day')."</td>\n"; + print dol_print_date($objp->dp,'day')."</td>\n"; print "<td align=\"right\">".price($objp->total_ht)."</td>\n"; print "<td align=\"center\" width=\"14\">".$propalstatic->LibStatut($objp->fk_statut,3)."</td>\n"; print "</tr>\n"; diff --git a/htdocs/comm/mailing/cibles.php b/htdocs/comm/mailing/cibles.php index 87d4694a13c0c8195da549a54a7e2f118b87676a..70a010343c980ed7e6767477e7bc538479dec826 100644 --- a/htdocs/comm/mailing/cibles.php +++ b/htdocs/comm/mailing/cibles.php @@ -131,7 +131,7 @@ if ($_GET["action"] == 'delete') } else { - dolibarr_print_error($db); + dol_print_error($db); } } @@ -171,7 +171,7 @@ if ($mil->fetch($_REQUEST["id"]) >= 0) $head[$h][1] = $langs->trans("MailHistory"); $h++; */ - dolibarr_fiche_head($head, $hselected, $langs->trans("Mailing")); + dol_fiche_head($head, $hselected, $langs->trans("Mailing")); print '<table class="border" width="100%">'; @@ -444,7 +444,7 @@ if ($mil->fetch($_REQUEST["id"]) >= 0) } else { - dolibarr_print_error($db); + dol_print_error($db); } print '</form>'; diff --git a/htdocs/comm/mailing/fiche.php b/htdocs/comm/mailing/fiche.php index c67b24068e7dc48f1c0707563da2c4817424e83a..58374cb50f6c3de71158401ca7560a34b463e0a5 100644 --- a/htdocs/comm/mailing/fiche.php +++ b/htdocs/comm/mailing/fiche.php @@ -105,7 +105,7 @@ if ($_POST["action"] == 'sendallconfirmed') if ($mil->statut == 0) { - dolibarr_print_error('','ErrorMailIsNotValidated'); + dol_print_error('','ErrorMailIsNotValidated'); exit; } @@ -129,7 +129,7 @@ if ($_POST["action"] == 'sendallconfirmed') $sql .= " FROM ".MAIN_DB_PREFIX."mailing_cibles as mc"; $sql .= " WHERE mc.statut < 1 AND mc.fk_mailing = ".$id; - dolibarr_syslog("fiche.php: select targets sql=".$sql, LOG_DEBUG); + dol_syslog("fiche.php: select targets sql=".$sql, LOG_DEBUG); $resql=$db->query($sql); if ($resql) { @@ -137,14 +137,14 @@ if ($_POST["action"] == 'sendallconfirmed') if ($num) { - dolibarr_syslog("fiche.php: nb of targets = ".$num, LOG_DEBUG); + dol_syslog("fiche.php: nb of targets = ".$num, LOG_DEBUG); // Positionne date debut envoi $sql="UPDATE ".MAIN_DB_PREFIX."mailing SET date_envoi=".$db->idate(gmmktime())." WHERE rowid=".$id; $resql2=$db->query($sql); if (! $resql2) { - dolibarr_print_error($db); + dol_print_error($db); } // Boucle sur chaque adresse et envoie le mail @@ -211,14 +211,14 @@ if ($_POST["action"] == 'sendallconfirmed') // Mail envoye avec succes $nbok++; - dolibarr_syslog("mailing-send: ok for #".$i.($mail->error?' - '.$mail->error:''), LOG_DEBUG); + dol_syslog("mailing-send: ok for #".$i.($mail->error?' - '.$mail->error:''), LOG_DEBUG); $sql="UPDATE ".MAIN_DB_PREFIX."mailing_cibles"; $sql.=" SET statut=1, date_envoi=".$db->idate(gmmktime())." WHERE rowid=".$obj->rowid; $resql2=$db->query($sql); if (! $resql2) { - dolibarr_print_error($db); + dol_print_error($db); } } else @@ -226,14 +226,14 @@ if ($_POST["action"] == 'sendallconfirmed') // Mail en echec $nbko++; - dolibarr_syslog("mailing-send: error for #".$i.($mail->error?' - '.$mail->error:''), LOG_DEBUG); + dol_syslog("mailing-send: error for #".$i.($mail->error?' - '.$mail->error:''), LOG_DEBUG); $sql="UPDATE ".MAIN_DB_PREFIX."mailing_cibles"; $sql.=" SET statut=-1, date_envoi=".$db->idate(gmmktime())." WHERE rowid=".$obj->rowid; $resql2=$db->query($sql); if (! $resql2) { - dolibarr_print_error($db); + dol_print_error($db); } } @@ -253,17 +253,17 @@ if ($_POST["action"] == 'sendallconfirmed') } $sql="UPDATE ".MAIN_DB_PREFIX."mailing SET statut=".$statut." WHERE rowid=".$id; - dolibarr_syslog("mailing-send: update global status sql=".$sql, LOG_DEBUG); + dol_syslog("mailing-send: update global status sql=".$sql, LOG_DEBUG); $resql2=$db->query($sql); if (! $resql2) { - dolibarr_print_error($db); + dol_print_error($db); } } else { - dolibarr_syslog($db->error()); - dolibarr_print_error($db); + dol_syslog($db->error()); + dol_print_error($db); } $message=''; $_GET["action"] = ''; @@ -378,7 +378,7 @@ if ($_POST["action"] == 'confirm_valide') } else { - dolibarr_print_error($db); + dol_print_error($db); } } else @@ -419,7 +419,7 @@ if ($_POST["action"] == 'confirm_reset') } else { - dolibarr_print_error($db); + dol_print_error($db); } } else @@ -521,7 +521,7 @@ else $head[$h][1] = $langs->trans("MailHistory"); $h++; */ - dolibarr_fiche_head($head, $hselected, $langs->trans("Mailing")); + dol_fiche_head($head, $hselected, $langs->trans("Mailing")); // Confirmation de la validation du mailing if ($_GET["action"] == 'valide') @@ -586,7 +586,7 @@ else $uc->fetch(); print '<tr><td>'.$langs->trans("CreatedBy").'</td><td>'.$uc->getNomUrl(1).'</td>'; print '<td>'.$langs->trans("Date").'</td>'; - print '<td>'.dolibarr_print_date($mil->date_creat,"dayhour").'</td></tr>'; + print '<td>'.dol_print_date($mil->date_creat,"dayhour").'</td></tr>'; if ($mil->statut > 0) { @@ -594,14 +594,14 @@ else $uv->fetch(); print '<tr><td>'.$langs->trans("ValidatedBy").'</td><td>'.$uv->getNomUrl(1).'</td>'; print '<td>'.$langs->trans("Date").'</td>'; - print '<td>'.dolibarr_print_date($mil->date_valid,"dayhour").'</td></tr>'; + print '<td>'.dol_print_date($mil->date_valid,"dayhour").'</td></tr>'; } if ($mil->statut > 1) { print '<tr><td>'.$langs->trans("SentBy").'</td><td>'.$langs->trans("Unknown").'</td>'; print '<td>'.$langs->trans("Date").'</td>'; - print '<td>'.dolibarr_print_date($mil->date_envoi,"dayhour").'</td></tr>'; + print '<td>'.dol_print_date($mil->date_envoi,"dayhour").'</td></tr>'; } // Sujet diff --git a/htdocs/comm/mailing/index.php b/htdocs/comm/mailing/index.php index e306d654cbc3ab8c5dfc729052f151fa3998bba5..73b0bdea37512410c2383c2b2cbd88c3ff3b7e24 100644 --- a/htdocs/comm/mailing/index.php +++ b/htdocs/comm/mailing/index.php @@ -122,7 +122,7 @@ while (($file = readdir($handle))!==false) } else { - dolibarr_print_error($db); + dol_print_error($db); } print '</tr>'; } @@ -170,8 +170,8 @@ if ($result) print "<tr $bc[$var]>"; print '<td nowrap="nowrap"><a href="fiche.php?id='.$obj->rowid.'">'.img_object($langs->trans("ShowEMail"),"email").' '.$obj->rowid.'</a></td>'; - print '<td>'.dolibarr_trunc($obj->titre,38).'</td>'; - print '<td align="center">'.dolibarr_print_date($obj->date_creat,'day').'</td>'; + print '<td>'.dol_trunc($obj->titre,38).'</td>'; + print '<td align="center">'.dol_print_date($obj->date_creat,'day').'</td>'; print '<td align="center">'.($obj->nbemail?$obj->nbemail:"0").'</td>'; $mailstatic=new Mailing($db); print '<td align="right">'.$mailstatic->LibStatut($obj->statut,5).'</td>'; @@ -189,7 +189,7 @@ if ($result) } else { - dolibarr_print_error($db); + dol_print_error($db); } diff --git a/htdocs/comm/mailing/liste.php b/htdocs/comm/mailing/liste.php index ae8e7b550d6ca93bda2b7e41bc1fbf1e9521c254..144dc5ac2994ef8b61855cb4eac26c4e551c0a01 100644 --- a/htdocs/comm/mailing/liste.php +++ b/htdocs/comm/mailing/liste.php @@ -112,7 +112,7 @@ if ($result) print '<td><a href="'.DOL_URL_ROOT.'/comm/mailing/fiche.php?id='.$obj->rowid.'">'; print img_object($langs->trans("ShowEMail"),"email").' '.stripslashes($obj->rowid).'</a></td>'; print '<td>'.$obj->titre.'</td>'; - print '<td align="center">'.dolibarr_print_date($obj->datec,'day').'</td>'; + print '<td align="center">'.dol_print_date($obj->datec,'day').'</td>'; print '<td align="center">'.$obj->nbemail.'</td>'; print '<td align="right">'.$email->LibStatut($obj->statut,5).'</td>'; print "</tr>\n"; @@ -123,7 +123,7 @@ if ($result) } else { - dolibarr_print_error($db); + dol_print_error($db); } $db->close(); diff --git a/htdocs/comm/mailing/mailing.class.php b/htdocs/comm/mailing/mailing.class.php index 92f8ea56aa3d1e7d0e5bf832d587538bd515b8c9..75d6b003e989fdbac0cfd5ff0f17362e0df42ace 100644 --- a/htdocs/comm/mailing/mailing.class.php +++ b/htdocs/comm/mailing/mailing.class.php @@ -103,7 +103,7 @@ class Mailing extends CommonObject $this->titre = $langs->trans("NoTitle"); } - dolibarr_syslog("Mailing::Create sql=".$sql); + dol_syslog("Mailing::Create sql=".$sql); $result=$this->db->query($sql); if ($result) { @@ -124,7 +124,7 @@ class Mailing extends CommonObject else { $this->error=$this->db->lasterror(); - dolibarr_syslog("Mailing::Create ".$this->error, LOG_ERR); + dol_syslog("Mailing::Create ".$this->error, LOG_ERR); $this->db->rollback(); return -1; } @@ -143,7 +143,7 @@ class Mailing extends CommonObject $sql .= " , email_from = '".$this->email_from."'"; $sql .= " WHERE rowid = ".$this->id; - dolibarr_syslog("Mailing::Update sql=".$sql); + dol_syslog("Mailing::Update sql=".$sql); $result=$this->db->query($sql); if ($result) { @@ -152,7 +152,7 @@ class Mailing extends CommonObject else { $this->error=$this->db->lasterror(); - dolibarr_syslog("Mailing::Update ".$this->error, LOG_ERR); + dol_syslog("Mailing::Update ".$this->error, LOG_ERR); return -1; } } @@ -174,7 +174,7 @@ class Mailing extends CommonObject $sql .= " FROM ".MAIN_DB_PREFIX."mailing as m"; $sql .= " WHERE m.rowid = ".$rowid; - dolibarr_syslog("Mailing.class::fetch sql=".$sql); + dol_syslog("Mailing.class::fetch sql=".$sql); $result=$this->db->query($sql); if ($result) { @@ -205,13 +205,13 @@ class Mailing extends CommonObject } else { - dolibarr_syslog("Mailing::Fetch Erreur -1"); + dol_syslog("Mailing::Fetch Erreur -1"); return -1; } } else { - dolibarr_syslog("Mailing::Fetch Erreur -2"); + dol_syslog("Mailing::Fetch Erreur -2"); return -2; } } @@ -310,7 +310,7 @@ class Mailing extends CommonObject else { $this->error=$this->db->lasterror(); - dolibarr_syslog("Mailing::Valid ".$this->error, LOG_ERR); + dol_syslog("Mailing::Valid ".$this->error, LOG_ERR); return -1; } } @@ -335,7 +335,7 @@ class Mailing extends CommonObject else { $this->error=$this->db->lasterror(); - dolibarr_syslog("Mailing::Valid ".$this->error, LOG_ERR); + dol_syslog("Mailing::Valid ".$this->error, LOG_ERR); return -1; } } diff --git a/htdocs/comm/multiprix.php b/htdocs/comm/multiprix.php index 8c26eb1267ad8ca7a1a22538312e7264b7ac2507..ee4ab3caee809e598db437a6906633a2017b5adb 100644 --- a/htdocs/comm/multiprix.php +++ b/htdocs/comm/multiprix.php @@ -82,7 +82,7 @@ if ($_socid > 0) $head = societe_prepare_head($objsoc); - dolibarr_fiche_head($head, 'customer', $langs->trans("ThirdParty")); + dol_fiche_head($head, 'customer', $langs->trans("ThirdParty")); print '<form method="POST" action="multiprix.php?id='.$objsoc->id.'">'; @@ -146,7 +146,7 @@ if ($_socid > 0) $obj = $db->fetch_object($resql); $tag = !$tag; print '<tr '.$bc[$tag].'>'; - print '<td>'.dolibarr_print_date($obj->dc,"dayhour").'</td>'; + print '<td>'.dol_print_date($obj->dc,"dayhour").'</td>'; print '<td>'.$obj->price_level.' </td>'; $userstatic->id=$obj->uid; $userstatic->nom=$obj->login; @@ -159,7 +159,7 @@ if ($_socid > 0) } else { - dolibarr_print_error($db); + dol_print_error($db); } } diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index 6d5df60a0674fe2e23ee820c447d712fca26f403..c84fe2bd0fd3101777868c1ede9437037cf29519 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -179,15 +179,15 @@ if ($_POST['action'] == 'setecheance') { $propal = new Propal($db); $propal->fetch($_GET['propalid']); - $result=$propal->set_echeance($user,dolibarr_mktime(12, 0, 0, $_POST['echmonth'], $_POST['echday'], $_POST['echyear'])); - if ($result < 0) dolibarr_print_error($db,$propal->error); + $result=$propal->set_echeance($user,dol_mktime(12, 0, 0, $_POST['echmonth'], $_POST['echday'], $_POST['echyear'])); + if ($result < 0) dol_print_error($db,$propal->error); } if ($_POST['action'] == 'setdate_livraison') { $propal = new Propal($db); $propal->fetch($_GET['propalid']); - $result=$propal->set_date_livraison($user,dolibarr_mktime(12, 0, 0, $_POST['liv_month'], $_POST['liv_day'], $_POST['liv_year'])); - if ($result < 0) dolibarr_print_error($db,$propal->error); + $result=$propal->set_date_livraison($user,dol_mktime(12, 0, 0, $_POST['liv_month'], $_POST['liv_day'], $_POST['liv_year'])); + if ($result < 0) dol_print_error($db,$propal->error); } if ($_POST['action'] == 'setdeliveryadress' && $user->rights->propale->creer) @@ -195,7 +195,7 @@ if ($_POST['action'] == 'setdeliveryadress' && $user->rights->propale->creer) $propal = new Propal($db); $propal->fetch($_GET['propalid']); $result=$propal->set_adresse_livraison($user,$_POST['adresse_livraison_id']); - if ($result < 0) dolibarr_print_error($db,$propal->error); + if ($result < 0) dol_print_error($db,$propal->error); } // Positionne ref client @@ -222,8 +222,8 @@ if ($_POST['action'] == 'add' && $user->rights->propale->creer) { if ($propal->fetch($_POST['copie_propal']) > 0) { - $propal->datep = dolibarr_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); - $propal->date_livraison = dolibarr_mktime(12, 0, 0, $_POST['liv_month'], $_POST['liv_day'], $_POST['liv_year']); + $propal->datep = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); + $propal->date_livraison = dol_mktime(12, 0, 0, $_POST['liv_month'], $_POST['liv_day'], $_POST['liv_year']); $propal->adresse_livraison_id = $_POST['adresse_livraison_id']; $propal->duree_validite = $_POST['duree_validite']; $propal->cond_reglement_id = $_POST['cond_reglement_id']; @@ -248,8 +248,8 @@ if ($_POST['action'] == 'add' && $user->rights->propale->creer) } else { - $propal->datep = dolibarr_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); - $propal->date_livraison = dolibarr_mktime(12, 0, 0, $_POST['liv_month'], $_POST['liv_day'], $_POST['liv_year']); + $propal->datep = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); + $propal->date_livraison = dol_mktime(12, 0, 0, $_POST['liv_month'], $_POST['liv_day'], $_POST['liv_year']); $propal->adresse_livraison_id = $_POST['adresse_livraison_id']; $propal->duree_validite = $_POST['duree_validite']; $propal->cond_reglement_id = $_POST['cond_reglement_id']; @@ -309,7 +309,7 @@ if ($_POST['action'] == 'add' && $user->rights->propale->creer) $outputlangs->setDefaultLang($_REQUEST['lang_id']); } propale_pdf_create($db, $id, $_REQUEST['model'], $outputlangs); - dolibarr_syslog('Redirect to '.$_SERVER["PHP_SELF"].'?propalid='.$id); + dol_syslog('Redirect to '.$_SERVER["PHP_SELF"].'?propalid='.$id); Header ('Location: '.$_SERVER["PHP_SELF"].'?propalid='.$id); exit; } @@ -320,7 +320,7 @@ if ($_POST['action'] == 'add' && $user->rights->propale->creer) } else { - dolibarr_print_error($db,$propal->error); + dol_print_error($db,$propal->error); $db->rollback(); exit; } @@ -493,7 +493,7 @@ if ($_POST['action'] == 'send' && ! $_POST['addfile'] && ! $_POST['cancel']) if ($error) { - dolibarr_print_error($db); + dol_print_error($db); } else { @@ -524,21 +524,21 @@ if ($_POST['action'] == 'send' && ! $_POST['addfile'] && ! $_POST['cancel']) { $langs->load("other"); $mesg='<div class="error">'.$langs->trans('ErrorMailRecipientIsEmpty').' !</div>'; - dolibarr_syslog('Recipient email is empty'); + dol_syslog('Recipient email is empty'); } } else { $langs->load("other"); $mesg='<div class="error">'.$langs->trans('ErrorCantReadFile',$file).'</div>'; - dolibarr_syslog('Failed to read file: '.$file); + dol_syslog('Failed to read file: '.$file); } } else { $langs->load("other"); $mesg='<div class="error">'.$langs->trans('ErrorFailedToReadEntity',$langs->trans("Proposal")).'</div>'; - dolibarr_syslog('Impossible de lire les donnees de la facture. Le fichier propal n\'a peut-etre pas ete genere.'); + dol_syslog('Impossible de lire les donnees de la facture. Le fichier propal n\'a peut-etre pas ete genere.'); } } @@ -587,7 +587,7 @@ if ($_POST['action'] == "setabsolutediscount" && $user->rights->propale->creer) } else { - dolibarr_print_error($db,$prop->error); + dol_print_error($db,$prop->error); } } } @@ -603,7 +603,7 @@ if ($_POST['action'] == "addligne" && $user->rights->propale->creer) $ret=$propal->fetch($_POST['propalid']); if ($ret < 0) { - dolibarr_print_error($db,$propal->error); + dol_print_error($db,$propal->error); exit; } $ret=$propal->fetch_client(); @@ -711,7 +711,7 @@ if ($_POST['action'] == 'updateligne' && $user->rights->propale->creer && $_POST $propal = new Propal($db); if (! $propal->fetch($_POST['propalid']) > 0) { - dolibarr_print_error($db,$propal->error); + dol_print_error($db,$propal->error); exit; } @@ -776,7 +776,7 @@ if ($_REQUEST['action'] == 'builddoc' && $user->rights->propale->creer) $result=propale_pdf_create($db, $propal->id, $propal->modelpdf, $outputlangs); if ($result <= 0) { - dolibarr_print_error($db,$result); + dol_print_error($db,$result); exit; } else @@ -895,7 +895,7 @@ if ($id > 0 || ! empty($ref)) $societe->fetch($propal->socid); $head = propal_prepare_head($propal); - dolibarr_fiche_head($head, 'comm', $langs->trans('Proposal')); + dol_fiche_head($head, 'comm', $langs->trans('Proposal')); // Clone confirmation if ($_GET["action"] == 'clone') @@ -1009,7 +1009,7 @@ if ($id > 0 || ! empty($ref)) // Dates print '<tr><td>'.$langs->trans('Date').'</td><td colspan="3">'; - print dolibarr_print_date($propal->date,'daytext'); + print dol_print_date($propal->date,'daytext'); print '</td>'; if ($conf->projet->enabled) $rowspan++; @@ -1040,7 +1040,7 @@ if ($id > 0 || ! empty($ref)) { if ($propal->fin_validite) { - print dolibarr_print_date($propal->fin_validite,'daytext'); + print dol_print_date($propal->fin_validite,'daytext'); if ($propal->statut == 1 && $propal->fin_validite < ($now - $conf->propal->cloture->warning_delay)) print img_warning($langs->trans("Late")); } else @@ -1070,7 +1070,7 @@ if ($id > 0 || ! empty($ref)) } else { - print dolibarr_print_date($propal->date_livraison,'daytext'); + print dol_print_date($propal->date_livraison,'daytext'); } print '</td>'; print '</tr>'; @@ -1528,7 +1528,7 @@ if ($id > 0 || ! empty($ref)) } else { - dolibarr_print_error($db); + dol_print_error($db); } /* @@ -1829,7 +1829,7 @@ if ($id > 0 || ! empty($ref)) $var=!$var; print '<tr '.$bc[$var].'><td>'; print '<a href="'.DOL_URL_ROOT.'/commande/fiche.php?id='.$coms[$i]->id.'">'.img_object($langs->trans("ShowOrder"),"order").' '.$coms[$i]->ref."</a></td>\n"; - print '<td align="center">'.dolibarr_print_date($coms[$i]->date,'day').'</td>'; + print '<td align="center">'.dol_print_date($coms[$i]->date,'day').'</td>'; print '<td align="right">'.price($coms[$i]->total_ttc).'</td>'; print '<td align="right">'.$coms[$i]->getLibStatut(3).'</td>'; print "</tr>\n"; @@ -2075,10 +2075,10 @@ else // Date propale print '<td align="center">'; - $y = dolibarr_print_date($objp->dp,'%Y'); - $m = dolibarr_print_date($objp->dp,'%m'); - $mt= dolibarr_print_date($objp->dp,'%b'); - $d = dolibarr_print_date($objp->dp,'%d'); + $y = dol_print_date($objp->dp,'%Y'); + $m = dol_print_date($objp->dp,'%m'); + $mt= dol_print_date($objp->dp,'%b'); + $d = dol_print_date($objp->dp,'%d'); print $d."\n"; print ' <a href="'.$_SERVER["PHP_SELF"].'?year='.$y.'&month='.$m.'">'; print $mt."</a>\n"; @@ -2088,7 +2088,7 @@ else // Date fin validite if ($objp->dfv) { - print '<td align="center">'.dolibarr_print_date($objp->dfv,'day'); + print '<td align="center">'.dol_print_date($objp->dfv,'day'); print '</td>'; } else @@ -2112,7 +2112,7 @@ else } else { - dolibarr_print_error($db); + dol_print_error($db); } } $db->close(); diff --git a/htdocs/comm/propal/aideremise.php b/htdocs/comm/propal/aideremise.php index a61dcec701c717f0ed5636d6cc8279d8f22ac8ac..a94e5f7ce5ebbeb54aef65de74daf10ac8f559a9 100644 --- a/htdocs/comm/propal/aideremise.php +++ b/htdocs/comm/propal/aideremise.php @@ -73,7 +73,7 @@ if ($_GET["propalid"]) $head[$h][0] = DOL_URL_ROOT.'/comm/propal/info.php?propalid='.$propal->id; $head[$h][1] = "Info"; - dolibarr_fiche_head($head, $a, $societe->nom); + dol_fiche_head($head, $a, $societe->nom); $price = $propal->price + $propal->remise; diff --git a/htdocs/comm/propal/apercu.php b/htdocs/comm/propal/apercu.php index 9c82a94a2142911971f9771544393d021a59fc63..eb1ccd56b08fbe4636b6450f3583db9c0a50449a 100644 --- a/htdocs/comm/propal/apercu.php +++ b/htdocs/comm/propal/apercu.php @@ -68,7 +68,7 @@ if ($_GET["propalid"] > 0) $soc->fetch($propal->socid); $head = propal_prepare_head($propal); - dolibarr_fiche_head($head, 'preview', $langs->trans('Proposal')); + dol_fiche_head($head, 'preview', $langs->trans('Proposal')); /* @@ -124,7 +124,7 @@ if ($_GET["propalid"] > 0) // ligne // partie Gauche print '<tr><td>'.$langs->trans('Date').'</td><td colspan="3">'; - print dolibarr_print_date($propal->date,'daytext'); + print dol_print_date($propal->date,'daytext'); print '</td>'; // partie Droite sur $rowspan lignes @@ -159,7 +159,7 @@ if ($_GET["propalid"] > 0) print '<td><a href="'.DOL_URL_ROOT . '/document.php?modulepart=propal&file='.urlencode($relativepath).'">'.$propal->ref.'.pdf</a></td>'; print '<td align="right">'.filesize($file). ' bytes</td>'; - print '<td align="right">'.dolibarr_print_date(filemtime($file),'dayhour').'</td>'; + print '<td align="right">'.dol_print_date(filemtime($file),'dayhour').'</td>'; print '</tr>'; // Si fichier detail PDF existe @@ -168,7 +168,7 @@ if ($_GET["propalid"] > 0) print '<td><a href="'.DOL_URL_ROOT . '/document.php?modulepart=propal&file='.urlencode($relativepathdetail).'">'.$propal->ref.'-detail.pdf</a></td>'; print '<td align="right">'.filesize($filedetail). ' bytes</td>'; - print '<td align="right">'.dolibarr_print_date(filemtime($filedetail),'dayhour').'</td>'; + print '<td align="right">'.dol_print_date(filemtime($filedetail),'dayhour').'</td>'; print '</tr>'; } print "</table>\n"; @@ -210,7 +210,7 @@ if ($_GET["propalid"] > 0) print '</table>'; } } else { - dolibarr_print_error($db); + dol_print_error($db); } } else { // Propal non trouv�e diff --git a/htdocs/comm/propal/contact.php b/htdocs/comm/propal/contact.php index e690c8651bab7c94805323c4fffa8f80b036b068..f3cd51346217b4cae62fd7072feea42280ecb374 100644 --- a/htdocs/comm/propal/contact.php +++ b/htdocs/comm/propal/contact.php @@ -92,12 +92,12 @@ if ($_POST["action"] == 'updateligne' && $user->rights->propale->creer) $db->commit(); } else { - dolibarr_print_error($db, "result=$result"); + dol_print_error($db, "result=$result"); $db->rollback(); } } else { - dolibarr_print_error($db); + dol_print_error($db); } } @@ -117,12 +117,12 @@ if ($_GET["action"] == 'swapstatut' && $user->rights->propale->creer) $db->commit(); } else { - dolibarr_print_error($db, "result=$result"); + dol_print_error($db, "result=$result"); $db->rollback(); } } else { - dolibarr_print_error($db); + dol_print_error($db); } } @@ -139,7 +139,7 @@ if ($_GET["action"] == 'deleteline' && $user->rights->propale->creer) exit; } else { - dolibarr_print_error($db); + dol_print_error($db); } } @@ -173,7 +173,7 @@ if ($id > 0) $head = propal_prepare_head($propal); - dolibarr_fiche_head($head, 'contact', $langs->trans("Proposal")); + dol_fiche_head($head, 'contact', $langs->trans("Proposal")); /* diff --git a/htdocs/comm/propal/document.php b/htdocs/comm/propal/document.php index 305e1f266278db80f18f5c8d49d00008bbb6ff09..4a12df9f6ccd0a28d6ece3e22bcb8108b4a0ca62 100644 --- a/htdocs/comm/propal/document.php +++ b/htdocs/comm/propal/document.php @@ -125,7 +125,7 @@ if ($propalid > 0) $societe->fetch($propal->socid); $head = propal_prepare_head($propal); - dolibarr_fiche_head($head, 'document', $langs->trans('Proposal')); + dol_fiche_head($head, 'document', $langs->trans('Proposal')); // Construit liste des fichiers @@ -166,7 +166,7 @@ if ($propalid > 0) } else { - dolibarr_print_error($db); + dol_print_error($db); } } else diff --git a/htdocs/comm/propal/info.php b/htdocs/comm/propal/info.php index 49b0e20cca0abe213ac3614e1c5f28b3fc422aed..ad4fb299a34a14be9ce4c1a826761a31041e64a4 100644 --- a/htdocs/comm/propal/info.php +++ b/htdocs/comm/propal/info.php @@ -54,7 +54,7 @@ $societe = new Societe($db); $societe->fetch($propal->socid); $head = propal_prepare_head($propal); -dolibarr_fiche_head($head, 'info', $langs->trans('Proposal')); +dol_fiche_head($head, 'info', $langs->trans('Proposal')); $propal->info($propal->id); diff --git a/htdocs/comm/propal/note.php b/htdocs/comm/propal/note.php index eb6ba741996d7017455ec93ad745ace83507937d..cd95ae9ca5fade8e24955fd384660b43b0e631dd 100644 --- a/htdocs/comm/propal/note.php +++ b/htdocs/comm/propal/note.php @@ -107,7 +107,7 @@ if ($_GET['propalid']) if ( $societe->fetch($propal->socid) ) { $head = propal_prepare_head($propal); - dolibarr_fiche_head($head, 'note', $langs->trans('Proposal')); + dol_fiche_head($head, 'note', $langs->trans('Proposal')); print '<table class="border" width="100%">'; @@ -129,7 +129,7 @@ if ($_GET['propalid']) // Date print '<tr><td>'.$langs->trans('Date').'</td><td colspan="3">'; - print dolibarr_print_date($propal->date,'daytext'); + print dol_print_date($propal->date,'daytext'); print '</td>'; print '</tr>'; @@ -138,7 +138,7 @@ if ($_GET['propalid']) print '<td>'.$langs->trans('DateEndPropal').'</td><td colspan="3">'; if ($propal->fin_validite) { - print dolibarr_print_date($propal->fin_validite,'daytext'); + print dol_print_date($propal->fin_validite,'daytext'); if ($propal->statut == 1 && $propal->fin_validite < ($now - $conf->propal->cloture->warning_delay)) print img_warning($langs->trans("Late")); } else diff --git a/htdocs/comm/propal/stats/month.php b/htdocs/comm/propal/stats/month.php index dde41bd2848387e5556145ccc6911f10e14f50ad..4f604738b5d4e7bc71b7d6c0e77715e8bb824413 100644 --- a/htdocs/comm/propal/stats/month.php +++ b/htdocs/comm/propal/stats/month.php @@ -125,7 +125,7 @@ $data = array(); for ($i = 1 ; $i < 13 ; $i++) { - $data[$i-1] = array(ucfirst(substr(dolibarr_print_date(dolibarr_mktime(12,0,0,$i,1,$year),"%b"),0,3)), $res[$i]); + $data[$i-1] = array(ucfirst(substr(dol_print_date(dol_mktime(12,0,0,$i,1,$year),"%b"),0,3)), $res[$i]); } if (!$user->rights->societe->client->voir || $user->societe_id) diff --git a/htdocs/comm/prospect/fiche.php b/htdocs/comm/prospect/fiche.php index febba5ee10a2ac3695bff5fe156dfadfdc8e693c..f8a2c3d72b2c84c24a18b3150c540a291f7dcb83 100644 --- a/htdocs/comm/prospect/fiche.php +++ b/htdocs/comm/prospect/fiche.php @@ -62,7 +62,7 @@ if ($_POST["action"] == 'setprospectlevel' && $user->rights->societe->creer) $sql = "UPDATE ".MAIN_DB_PREFIX."societe SET fk_prospectlevel='".$_POST['prospect_level_id']; $sql.= "' WHERE rowid='".$_GET["socid"]."'"; $result = $db->query($sql); - if (! $result) dolibarr_print_error($result); + if (! $result) dol_print_error($result); } @@ -84,7 +84,7 @@ if ($socid > 0) $result = $societe->fetch($socid); if ($result < 0) { - dolibarr_print_error($db); + dol_print_error($db); exit; } @@ -93,7 +93,7 @@ if ($socid > 0) */ $head = societe_prepare_head($societe); - dolibarr_fiche_head($head, 'prospect', $langs->trans("ThirdParty")); + dol_fiche_head($head, 'prospect', $langs->trans("ThirdParty")); print '<table width="100%" class="notopnoleftnoright">'; print '<tr><td valign="top" width="50%" class="notopnoleft">'; @@ -209,7 +209,7 @@ if ($socid > 0) { print " ".img_warning(); } - print "</td><td align=\"right\">".dolibarr_print_date($objp->dp,"day")."</td>\n"; + print "</td><td align=\"right\">".dol_print_date($objp->dp,"day")."</td>\n"; print "<td align=\"right\">".price($objp->total_ht)."</td>\n"; print "<td align=\"right\">".$propal_static->LibStatut($objp->fk_statut,5)."</td></tr>\n"; $i++; @@ -218,7 +218,7 @@ if ($socid > 0) } else { - dolibarr_print_error($db); + dol_print_error($db); } print "</table>"; diff --git a/htdocs/comm/prospect/index.php b/htdocs/comm/prospect/index.php index f1b30c0ef41239c53472e8f6f3c0e049065d671e..0f6e48d72b84a8bb86c9754ee85e868d27c8bb90 100644 --- a/htdocs/comm/prospect/index.php +++ b/htdocs/comm/prospect/index.php @@ -198,7 +198,7 @@ if ($conf->propal->enabled && $user->rights->propale->lire) print "<td><a href=\"fiche.php?id=".$obj->socid."\">".img_object($langs->trans("ShowCompany"),"company").' '.$obj->nom."</a></td>\n"; print "<td align=\"right\">"; - print dolibarr_print_date($obj->dp,'day')."</td>\n"; + print dol_print_date($obj->dp,'day')."</td>\n"; print "<td align=\"right\">".price($obj->total_ttc)."</td></tr>\n"; $i++; $total += $obj->price; @@ -211,7 +211,7 @@ if ($conf->propal->enabled && $user->rights->propale->lire) } else { - dolibarr_print_error($db); + dol_print_error($db); } } diff --git a/htdocs/comm/prospect/prospects.php b/htdocs/comm/prospect/prospects.php index 289278c8d786e07df521abfba6f88a5c273e2187..725e053894a4e31ccae72db251a0d2444da8a6a4 100644 --- a/htdocs/comm/prospect/prospects.php +++ b/htdocs/comm/prospect/prospects.php @@ -96,7 +96,7 @@ else } // Select every potentiels, and note each potentiels which fit in search parameters -dolibarr_syslog('prospects::prospects_prospect_level',LOG_DEBUG); +dol_syslog('prospects::prospects_prospect_level',LOG_DEBUG); $sql = "SELECT code, label, sortorder, ".$sortwhere; $sql.= " FROM ".MAIN_DB_PREFIX."c_prospectlevel"; $sql.= " WHERE active > 0"; @@ -129,7 +129,7 @@ if ($resql) // If no paramters was set, $search_levels will be empty $search_levels = implode(',', $search_levels); } -else dolibarr_print_error($db); +else dol_print_error($db); // Load sale and categ filters $search_sale = isset($_GET["search_sale"])?$_GET["search_sale"]:$_POST["search_sale"]; @@ -309,7 +309,7 @@ if ($resql) } else { - dolibarr_print_error($db); + dol_print_error($db); } print '</select> '; } @@ -426,7 +426,7 @@ if ($resql) print "<td>".$obj->ville." </td>"; print "<td align=\"center\">$obj->departement</td>"; // Creation date - print "<td align=\"center\">".dolibarr_print_date($obj->datec)."</td>"; + print "<td align=\"center\">".dol_print_date($obj->datec)."</td>"; // Level print "<td align=\"center\">"; print $prospectstatic->LibLevel($obj->fk_prospectlevel); @@ -463,7 +463,7 @@ if ($resql) } else { - dolibarr_print_error($db); + dol_print_error($db); } $db->close(); diff --git a/htdocs/comm/prospect/recap-prospect.php b/htdocs/comm/prospect/recap-prospect.php index fee032f93de178540957763c5e514b2981b4c449..034aaead30dbc16117121772ce52f83cadeecc24 100644 --- a/htdocs/comm/prospect/recap-prospect.php +++ b/htdocs/comm/prospect/recap-prospect.php @@ -59,7 +59,7 @@ if ($socid > 0) */ $head = societe_prepare_head($societe); - dolibarr_fiche_head($head, 'prospect', $langs->trans("ThirdParty")); + dol_fiche_head($head, 'prospect', $langs->trans("ThirdParty")); print "<table width=\"100%\">\n"; @@ -86,7 +86,7 @@ if ($socid > 0) } else { - dolibarr_print_error($db); + dol_print_error($db); } diff --git a/htdocs/comm/recap-client.php b/htdocs/comm/recap-client.php index 7889ef3cb304e3bc22c2522abf37c648590a8a32..c1941cb871c8399697b4798fd711ed08500fb51e 100644 --- a/htdocs/comm/recap-client.php +++ b/htdocs/comm/recap-client.php @@ -59,7 +59,7 @@ if ($socid > 0) */ $head = societe_prepare_head($societe); - dolibarr_fiche_head($head, 'customer', $langs->trans("ThirdParty")); + dol_fiche_head($head, 'customer', $langs->trans("ThirdParty")); print "<table width=\"100%\">\n"; @@ -86,7 +86,7 @@ if ($socid > 0) } else { - dolibarr_print_error($db); + dol_print_error($db); } diff --git a/htdocs/comm/remise.php b/htdocs/comm/remise.php index cf878e209b0739cee1e5f99bd359b875c3b375e8..97c77fc89668f4d014dc7eb1a6e620b35e2fd48d 100644 --- a/htdocs/comm/remise.php +++ b/htdocs/comm/remise.php @@ -88,7 +88,7 @@ if ($_socid > 0) */ $head = societe_prepare_head($objsoc); - dolibarr_fiche_head($head, 'relativediscount', $objsoc->nom); + dol_fiche_head($head, 'relativediscount', $objsoc->nom); /* @@ -153,7 +153,7 @@ if ($_socid > 0) $obj = $db->fetch_object($resql); $tag = !$tag; print '<tr '.$bc[$tag].'>'; - print '<td>'.dolibarr_print_date($obj->dc,"dayhour").'</td>'; + print '<td>'.dol_print_date($obj->dc,"dayhour").'</td>'; print '<td align="center">'.$obj->remise_client.' %</td>'; print '<td align="left">'.$obj->note.'</td>'; print '<td align="center"><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$obj->user_id.'">'.img_object($langs->trans("ShowUser"),'user').' '.$obj->login.'</a></td>'; @@ -165,7 +165,7 @@ if ($_socid > 0) } else { - dolibarr_print_error($db); + dol_print_error($db); } } diff --git a/htdocs/comm/remx.php b/htdocs/comm/remx.php index 1d94133f35a01016e84e211a8561d057fcf5baf2..e638e2f94ea4b85cfa9bc63328b9c1ab3763dfa8 100644 --- a/htdocs/comm/remx.php +++ b/htdocs/comm/remx.php @@ -117,7 +117,7 @@ if ($_socid > 0) */ $head = societe_prepare_head($objsoc); - dolibarr_fiche_head($head, 'absolutediscount', $objsoc->nom); + dol_fiche_head($head, 'absolutediscount', $objsoc->nom); print '<form method="POST" action="remx.php?id='.$objsoc->id.'">'; @@ -141,7 +141,7 @@ if ($_socid > 0) } else { - dolibarr_print_error($db); + dol_print_error($db); } print '<tr><td width="38%">'.$langs->trans("CustomerAbsoluteDiscountAllUsers").'</td>'; @@ -208,7 +208,7 @@ if ($_socid > 0) $obj = $db->fetch_object($resql); $var = !$var; print "<tr $bc[$var]>"; - print '<td>'.dolibarr_print_date($obj->dc,'dayhour').'</td>'; + print '<td>'.dol_print_date($obj->dc,'dayhour').'</td>'; print '<td>'; if ($obj->description == '(CREDIT_NOTE)') { @@ -238,7 +238,7 @@ if ($_socid > 0) } else { - dolibarr_print_error($db); + dol_print_error($db); } print '<br>'; @@ -327,7 +327,7 @@ if ($_socid > 0) $obj = array_shift($tab_sqlobj); $var = !$var; print "<tr $bc[$var]>"; - print '<td>'.dolibarr_print_date($obj->dc,'dayhour').'</td>'; + print '<td>'.dol_print_date($obj->dc,'dayhour').'</td>'; print '<td>'; if ($obj->description == '(CREDIT_NOTE)') { @@ -356,7 +356,7 @@ if ($_socid > 0) } else { - print dolibarr_print_error($db); + print dol_print_error($db); } } diff --git a/htdocs/comm/stats.php b/htdocs/comm/stats.php index eb6e2372ab17fdfac22d2b2ea5c18d63ef82ad70..cb9dd0d2ad5f891cb60860f0a99fff7255eb8438 100644 --- a/htdocs/comm/stats.php +++ b/htdocs/comm/stats.php @@ -55,14 +55,14 @@ $msq = '' ; // Date de d�but du graphe $date_debut = time() ; $annees = "" ; -if ($conf->global->SOCIETE_FISCAL_MONTH_START < dolibarr_date("m",time()) ){ +if ($conf->global->SOCIETE_FISCAL_MONTH_START < dol_date("m",time()) ){ // Si le mois actuel est plus grand, l'ann�e de d�part est l� m�me que l'ann�e actuelle - $date_debut = mktime(0,0,0,$conf->global->SOCIETE_FISCAL_MONTH_START,1,dolibarr_date("Y",time())) ; - $annees = dolibarr_date("Y",time()) ; + $date_debut = mktime(0,0,0,$conf->global->SOCIETE_FISCAL_MONTH_START,1,dol_date("Y",time())) ; + $annees = dol_date("Y",time()) ; } else { // Sinon le d�but de l'ann�e comptable �tait l'ann�e d'avant - $date_debut = mktime(0,0,0,$conf->global->SOCIETE_FISCAL_MONTH_START,1,dolibarr_date("Y",time())-1) ; - $annees = (dolibarr_date("Y",time())-1).' - '.(dolibarr_date("Y",time())) ; + $date_debut = mktime(0,0,0,$conf->global->SOCIETE_FISCAL_MONTH_START,1,dol_date("Y",time())-1) ; + $annees = (dol_date("Y",time())-1).' - '.(dol_date("Y",time())) ; } /********************************************** @@ -85,7 +85,7 @@ $recapMoisMR = array() ; if($result){ if($db->num_rows($result)>0){ while($obj = $db->fetch_object($result)){ - if($obj->date != dolibarr_date("Ym",time())){ + if($obj->date != dol_date("Ym",time())){ $recapAnneeCA[] = array( $obj->month, $obj->CAMois ) ; $recapAnneeMR[] = array( $obj->month, $obj->MRMois ) ; }else{ @@ -113,12 +113,12 @@ $graphfiles=array( ), 'recapMoisCA' =>array( 'file' => 'recapMoisCA.png', - 'label' => $langs->trans('CAOrder').' '.$langs->trans('FromTo',dolibarr_date("01/m/Y",time()),dolibarr_date("d/m/Y",time())), + 'label' => $langs->trans('CAOrder').' '.$langs->trans('FromTo',dol_date("01/m/Y",time()),dol_date("d/m/Y",time())), 'data' => $recapMoisCA ), 'recapMoisMR'=>array( 'file' => 'recapMoisMR.png', - 'label' => $langs->trans('MargeOrder').' '.$langs->trans('FromTo',dolibarr_date("01/m/Y",time()),dolibarr_date("d/m/Y",time())), + 'label' => $langs->trans('MargeOrder').' '.$langs->trans('FromTo',dol_date("01/m/Y",time()),dol_date("d/m/Y",time())), 'data' => $recapMoisMR ) ) ; @@ -151,7 +151,7 @@ if (! $mesg) } else { - dolibarr_print_error($db,'Error for calculating graph on key='.$key.' - '.$product->error); + dol_print_error($db,'Error for calculating graph on key='.$key.' - '.$product->error); } } @@ -164,7 +164,7 @@ if (! $mesg) ************/ // en-t�te if($mesg) print '<div class="error">'.$mesg.'</div>' ; -dolibarr_fiche_head(array(array('stats.php',$langs->trans("Commercial"))), 0, $langs->trans("Stats")); +dol_fiche_head(array(array('stats.php',$langs->trans("Commercial"))), 0, $langs->trans("Stats")); /***************************** * Rappel Infos du Commercial *****************************/ @@ -180,7 +180,7 @@ print '<table class="border" width="100%"> </tr> </table>' ; -print "</div>" ; // Fin de dolibarr_fiche_head +print "</div>" ; // Fin de dol_fiche_head /*************************** * Affichage des Graphiques @@ -189,7 +189,7 @@ print "</div>" ; // Fin de dolibarr_fiche_head foreach($graphfiles as $graph){ // donn�es $url=DOL_URL_ROOT.'/viewimage.php?modulepart=graph_comm&file='.urlencode($user->id .'/'.$graph['file']); - $generateOn = (file_exists($dir."/".$graph['file']))? $langs->trans("GeneratedOn",dolibarr_print_date(filemtime($dir."/".$graph['file']),"dayhour")) : "" ; + $generateOn = (file_exists($dir."/".$graph['file']))? $langs->trans("GeneratedOn",dol_print_date(filemtime($dir."/".$graph['file']),"dayhour")) : "" ; // html print '<table class="border" style="float:left;margin:5px;width:48%;min-width:400px;"> diff --git a/htdocs/commande/apercu.php b/htdocs/commande/apercu.php index c52764dff2c7affc1a7a1492e838eab7489ddfb0..c1046f0992310c1a13bebd4be2ebe73b108d9d55 100644 --- a/htdocs/commande/apercu.php +++ b/htdocs/commande/apercu.php @@ -80,7 +80,7 @@ if ($_GET["id"] > 0) { $head = commande_prepare_head($commande); - dolibarr_fiche_head($head, 'preview', $langs->trans("CustomerOrder")); + dol_fiche_head($head, 'preview', $langs->trans("CustomerOrder")); /* @@ -161,7 +161,7 @@ if ($_GET["id"] > 0) { print '<td><a href="'.DOL_URL_ROOT . '/document.php?modulepart=commande&file='.urlencode($relativepath).'">'.$commande->ref.'.pdf</a></td>'; print '<td align="right">'.filesize($file). ' bytes</td>'; - print '<td align="right">'.dolibarr_print_date(filemtime($file),'dayhour').'</td>'; + print '<td align="right">'.dol_print_date(filemtime($file),'dayhour').'</td>'; print '</tr>'; // Si fichier detail PDF existe @@ -170,7 +170,7 @@ if ($_GET["id"] > 0) { print '<td><a href="'.DOL_URL_ROOT . '/document.php?modulepart=commande&file='.urlencode($relativepathdetail).'">'.$commande->ref.'-detail.pdf</a></td>'; print '<td align="right">'.filesize($filedetail). ' bytes</td>'; - print '<td align="right">'.dolibarr_print_date(filemtime($filedetail),'dayhour').'</td>'; + print '<td align="right">'.dol_print_date(filemtime($filedetail),'dayhour').'</td>'; print '</tr>'; } print "</table>\n"; @@ -220,7 +220,7 @@ if ($_GET["id"] > 0) { // Date print '<tr><td>'.$langs->trans("Date").'</td>'; - print "<td colspan=\"2\">".dolibarr_print_date($commande->date,"daytext")."</td>\n"; + print "<td colspan=\"2\">".dol_print_date($commande->date,"daytext")."</td>\n"; print '</tr>'; // ligne 6 @@ -237,7 +237,7 @@ if ($_GET["id"] > 0) { print '</table>'; } } else { - dolibarr_print_error($db); + dol_print_error($db); } } else { // Commande non trouv�e diff --git a/htdocs/commande/commande.class.php b/htdocs/commande/commande.class.php index 660194a69cc6d00cda8d13f4aae44b82be30cecb..6e522a91954cc0283a79566bba7daf4b6413cbba 100644 --- a/htdocs/commande/commande.class.php +++ b/htdocs/commande/commande.class.php @@ -104,7 +104,7 @@ class Commande extends CommonObject */ function create_from_propale($user, $propale_id) { - dolibarr_syslog("Commande::create_from_propale propale_id=$propale_id"); + dol_syslog("Commande::create_from_propale propale_id=$propale_id"); $propal = new Propal($this->db); $propal->fetch($propale_id); @@ -181,7 +181,7 @@ class Commande extends CommonObject } else { - dolibarr_print_error($db,"Commande::getNextNumRef ".$obj->error); + dol_print_error($db,"Commande::getNextNumRef ".$obj->error); return ""; } } @@ -342,7 +342,7 @@ class Commande extends CommonObject $sql = "UPDATE ".MAIN_DB_PREFIX."commande SET fk_statut = 0"; $sql .= " WHERE rowid = ".$this->id; - dolibarr_syslog("Commande::set_draft sql=".$sql, LOG_DEBUG); + dol_syslog("Commande::set_draft sql=".$sql, LOG_DEBUG); if ($this->db->query($sql)) { // If stock is decremented on validate order, we must reincrement it @@ -380,7 +380,7 @@ class Commande extends CommonObject { $this->error=$this->db->error(); $this->db->rollback(); - dolibarr_syslog($this->error, LOG_ERR); + dol_syslog($this->error, LOG_ERR); return -1; } } @@ -409,7 +409,7 @@ class Commande extends CommonObject else { $this->error=$this->db->error(); - dolibarr_syslog($this->error, LOG_ERR); + dol_syslog($this->error, LOG_ERR); return -1; } } @@ -461,7 +461,7 @@ class Commande extends CommonObject { $this->error=$this->db->error(); $this->db->rollback(); - dolibarr_syslog($this->error, LOG_ERR); + dol_syslog($this->error, LOG_ERR); return -1; } } @@ -478,13 +478,13 @@ class Commande extends CommonObject // Nettoyage parametres $this->brouillon = 1; // On positionne en mode brouillon la commande - dolibarr_syslog("Commande::create"); + dol_syslog("Commande::create"); // Verification parametres if (! empty($conf->global->COMMANDE_REQUIRE_SOURCE) && $this->source < 0) { $this->error=$langs->trans("ErrorFieldRequired",$langs->trans("Source")); - dolibarr_syslog("Commande::create ".$this->error, LOG_ERR); + dol_syslog("Commande::create ".$this->error, LOG_ERR); return -1; } if (! $remise) $remise=0; @@ -495,7 +495,7 @@ class Commande extends CommonObject if ($result < 0) { $this->error="Failed to fetch company"; - dolibarr_syslog("Commande::create ".$this->error, LOG_ERR); + dol_syslog("Commande::create ".$this->error, LOG_ERR); return -2; } @@ -516,7 +516,7 @@ class Commande extends CommonObject $sql.= " ".($this->remise_absolue>0?$this->remise_absolue:'NULL').","; $sql.= " '".$this->remise_percent."')"; - dolibarr_syslog("Commande::create sql=".$sql); + dol_syslog("Commande::create sql=".$sql); $resql=$this->db->query($sql); if ($resql) { @@ -551,7 +551,7 @@ class Commande extends CommonObject if ($resql < 0) { $this->error=$this->db->error; - dolibarr_print_error($this->db); + dol_print_error($this->db); break; } } @@ -606,7 +606,7 @@ class Commande extends CommonObject } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); $this->db->rollback(); return -1; } @@ -637,7 +637,7 @@ class Commande extends CommonObject */ function addline($commandeid, $desc, $pu_ht, $qty, $txtva, $fk_product=0, $remise_percent=0, $info_bits=0, $fk_remise_except=0, $price_base_type='HT', $pu_ttc=0, $date_start='', $date_end='') { - dolibarr_syslog("Commande::addline commandeid=$commandeid, desc=$desc, pu_ht=$pu_ht, qty=$qty, txtva=$txtva, fk_product=$fk_product, remise_percent=$remise_percent, info_bits=$info_bits, fk_remise_except=$fk_remise_except, price_base_type=$price_base_type, pu_ttc=$pu_ttc, date_start=$date_start, date_end=$date_end", LOG_DEBUG); + dol_syslog("Commande::addline commandeid=$commandeid, desc=$desc, pu_ht=$pu_ht, qty=$qty, txtva=$txtva, fk_product=$fk_product, remise_percent=$remise_percent, info_bits=$info_bits, fk_remise_except=$fk_remise_except, price_base_type=$price_base_type, pu_ttc=$pu_ttc, date_start=$date_start, date_end=$date_end", LOG_DEBUG); include_once(DOL_DOCUMENT_ROOT.'/lib/price.lib.php'); // Clean parameters @@ -719,7 +719,7 @@ class Commande extends CommonObject else { $this->error=$this->db->error(); - dolibarr_syslog("Error sql=$sql, error=".$this->error); + dol_syslog("Error sql=$sql, error=".$this->error); $this->db->rollback(); return -1; } @@ -832,7 +832,7 @@ class Commande extends CommonObject if ($ref) $sql.= " WHERE c.ref='".$ref."'"; else $sql.= " WHERE c.rowid=".$id; - dolibarr_syslog("Commande::fetch sql=".$sql, LOG_DEBUG); + dol_syslog("Commande::fetch sql=".$sql, LOG_DEBUG); $result = $this->db->query($sql) ; if ($result) { @@ -902,14 +902,14 @@ class Commande extends CommonObject } else { - dolibarr_syslog('Commande::Fetch Error rowid='.$rowid.' numrows=0 sql='.$sql); + dol_syslog('Commande::Fetch Error rowid='.$rowid.' numrows=0 sql='.$sql); $this->error='Order with id '.$rowid.' not found sql='.$sql; return -2; } } else { - dolibarr_syslog('Commande::Fetch Error rowid='.$rowid.' Erreur dans fetch de la commande'); + dol_syslog('Commande::Fetch Error rowid='.$rowid.' Erreur dans fetch de la commande'); $this->error=$this->db->error(); return -1; } @@ -1009,7 +1009,7 @@ class Commande extends CommonObject if ($only_product) $sql .= ' AND p.fk_product_type = 0'; $sql .= ' ORDER BY l.rang'; - dolibarr_syslog("Commande::fetch_lines sql=".$sql,LOG_DEBUG); + dol_syslog("Commande::fetch_lines sql=".$sql,LOG_DEBUG); $result = $this->db->query($sql); if ($result) { @@ -1059,7 +1059,7 @@ class Commande extends CommonObject else { $this->error=$this->db->error(); - dolibarr_syslog('Commande::fetch_lines: Error '.$this->error); + dol_syslog('Commande::fetch_lines: Error '.$this->error); return -3; } } @@ -1102,7 +1102,7 @@ class Commande extends CommonObject $sql.= ' GROUP BY cd.rowid, cd.fk_product'; //print $sql; - dolibarr_syslog("Commande::loadExpeditions sql=".$sql,LOG_DEBUG); + dol_syslog("Commande::loadExpeditions sql=".$sql,LOG_DEBUG); $result = $this->db->query($sql); if ($result) { @@ -1120,7 +1120,7 @@ class Commande extends CommonObject else { $this->error=$this->db->lasterror(); - dolibarr_syslog("Commande::loadExpeditions ".$this->error,LOG_ERR); + dol_syslog("Commande::loadExpeditions ".$this->error,LOG_ERR); return -1; } @@ -1337,7 +1337,7 @@ class Commande extends CommonObject $sql.= ' SET remise_absolue = '.$remise; $sql.= ' WHERE rowid = '.$this->id.' AND fk_statut = 0 ;'; - dolibarr_syslog("Commande::set_remise_absolue sql=$sql"); + dol_syslog("Commande::set_remise_absolue sql=$sql"); if ($this->db->query($sql)) { @@ -1368,7 +1368,7 @@ class Commande extends CommonObject $sql.= " SET date_livraison = ".($date_livraison ? $this->db->idate($date_livraison) : 'null'); $sql.= " WHERE rowid = ".$this->id." AND fk_statut = 0"; - dolibarr_syslog("Commande::set_date_livraison sql=$sql",LOG_DEBUG); + dol_syslog("Commande::set_date_livraison sql=$sql",LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -1378,7 +1378,7 @@ class Commande extends CommonObject else { $this->error=$this->db->error(); - dolibarr_syslog("Commande::set_date_livraison ".$this->error,LOG_ERR); + dol_syslog("Commande::set_date_livraison ".$this->error,LOG_ERR); return -1; } } @@ -1409,7 +1409,7 @@ class Commande extends CommonObject else { $this->error=$this->db->error(); - dolibarr_syslog("Commande::set_adresse_livraison Erreur SQL"); + dol_syslog("Commande::set_adresse_livraison Erreur SQL"); return -1; } } @@ -1476,7 +1476,7 @@ class Commande extends CommonObject */ function cond_reglement($cond_reglement_id) { - dolibarr_syslog('Commande::cond_reglement('.$cond_reglement_id.')'); + dol_syslog('Commande::cond_reglement('.$cond_reglement_id.')'); if ($this->statut >= 0) { $sql = 'UPDATE '.MAIN_DB_PREFIX.'commande'; @@ -1489,14 +1489,14 @@ class Commande extends CommonObject } else { - dolibarr_syslog('Commande::cond_reglement Erreur '.$sql.' - '.$this->db->error()); + dol_syslog('Commande::cond_reglement Erreur '.$sql.' - '.$this->db->error()); $this->error=$this->db->error(); return -1; } } else { - dolibarr_syslog('Commande::cond_reglement, etat commande incompatible'); + dol_syslog('Commande::cond_reglement, etat commande incompatible'); $this->error='Etat commande incompatible '.$this->statut; return -2; } @@ -1510,7 +1510,7 @@ class Commande extends CommonObject */ function mode_reglement($mode_reglement_id) { - dolibarr_syslog('Commande::mode_reglement('.$mode_reglement_id.')'); + dol_syslog('Commande::mode_reglement('.$mode_reglement_id.')'); if ($this->statut >= 0) { $sql = 'UPDATE '.MAIN_DB_PREFIX.'commande'; @@ -1523,14 +1523,14 @@ class Commande extends CommonObject } else { - dolibarr_syslog('Commande::mode_reglement Erreur '.$sql.' - '.$this->db->error()); + dol_syslog('Commande::mode_reglement Erreur '.$sql.' - '.$this->db->error()); $this->error=$this->db->error(); return -1; } } else { - dolibarr_syslog('Commande::mode_reglement, etat facture incompatible'); + dol_syslog('Commande::mode_reglement, etat facture incompatible'); $this->error='Etat commande incompatible '.$this->statut; return -2; } @@ -1546,7 +1546,7 @@ class Commande extends CommonObject { if ($user->rights->commande->creer) { - dolibarr_syslog('Commande::set_ref_client this->id='.$this->id.', ref_client='.$ref_client); + dol_syslog('Commande::set_ref_client this->id='.$this->id.', ref_client='.$ref_client); $sql = 'UPDATE '.MAIN_DB_PREFIX.'commande SET ref_client = '.(empty($ref_client) ? 'NULL' : '\''.addslashes($ref_client).'\''); $sql.= ' WHERE rowid = '.$this->id; @@ -1558,7 +1558,7 @@ class Commande extends CommonObject else { $this->error=$this->db->error(); - dolibarr_syslog('Commande::set_ref_client Erreur '.$this->error.' - '.$sql); + dol_syslog('Commande::set_ref_client Erreur '.$this->error.' - '.$sql); return -2; } } @@ -1591,7 +1591,7 @@ class Commande extends CommonObject } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); } } @@ -1612,7 +1612,7 @@ class Commande extends CommonObject */ function updateline($rowid, $desc, $pu, $qty, $remise_percent=0, $txtva, $price_base_type='HT', $info_bits=0, $date_start='', $date_end='') { - dolibarr_syslog("Commande::UpdateLine $rowid, $desc, $pu, $qty, $remise_percent, $txtva, $price_base_type, $info_bits, $date_start, $date_end"); + dol_syslog("Commande::UpdateLine $rowid, $desc, $pu, $qty, $remise_percent, $txtva, $price_base_type, $info_bits, $date_start, $date_end"); include_once(DOL_DOCUMENT_ROOT.'/lib/price.lib.php'); if ($this->brouillon) @@ -1994,7 +1994,7 @@ class Commande extends CommonObject } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); } } @@ -2007,7 +2007,7 @@ class Commande extends CommonObject { global $user,$langs; - dolibarr_syslog("Commande::initAsSpecimen"); + dol_syslog("Commande::initAsSpecimen"); // Charge tableau des id de societe socids $socids = array(); @@ -2109,7 +2109,7 @@ class Commande extends CommonObject } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); $this->error=$this->db->error(); return -1; } @@ -2223,7 +2223,7 @@ class CommandeLigne } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); } } @@ -2238,7 +2238,7 @@ class CommandeLigne $sql = 'DELETE FROM '.MAIN_DB_PREFIX."commandedet WHERE rowid='".$this->id."';"; - dolibarr_syslog("CommandeLigne::delete sql=".$sql); + dol_syslog("CommandeLigne::delete sql=".$sql); $resql=$this->db->query($sql); if ($resql) { @@ -2254,7 +2254,7 @@ class CommandeLigne else { $this->error=$this->db->lasterror(); - dolibarr_syslog("CommandeLigne::delete ".$this->error); + dol_syslog("CommandeLigne::delete ".$this->error); return -1; } } @@ -2268,7 +2268,7 @@ class CommandeLigne { global $langs, $conf, $user; - dolibarr_syslog("CommandeLigne::insert rang=".$this->rang); + dol_syslog("CommandeLigne::insert rang=".$this->rang); $this->db->begin(); $rangtouse=$this->rang; @@ -2285,7 +2285,7 @@ class CommandeLigne } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); $this->db->rollback(); return -1; } @@ -2328,7 +2328,7 @@ class CommandeLigne else { $sql.='null'; } $sql.= ')'; - dolibarr_syslog("CommandeLigne::insert sql=$sql"); + dol_syslog("CommandeLigne::insert sql=$sql"); $resql=$this->db->query($sql); if ($resql) { @@ -2350,7 +2350,7 @@ class CommandeLigne else { $this->error=$this->db->error(); - dolibarr_syslog("CommandeLigne::insert Error ".$this->error); + dol_syslog("CommandeLigne::insert Error ".$this->error); $this->db->rollback(); return -2; } @@ -2372,7 +2372,7 @@ class CommandeLigne $sql.= ",total_ttc='".price2num($this->total_ttc)."'"; $sql.= " WHERE rowid = ".$this->rowid; - dolibarr_syslog("CommandeLigne::update_total sql=$sql"); + dol_syslog("CommandeLigne::update_total sql=$sql"); $resql=$this->db->query($sql); if ($resql) @@ -2383,7 +2383,7 @@ class CommandeLigne else { $this->error=$this->db->error(); - dolibarr_syslog("CommandeLigne::update_total Error ".$this->error); + dol_syslog("CommandeLigne::update_total Error ".$this->error); $this->db->rollback(); return -2; } diff --git a/htdocs/commande/contact.php b/htdocs/commande/contact.php index 7ae753948a850822e7c9fb67b4b3d89519b1dba5..1ccc56884960fdc13d173f16940b563ccf0ab418 100644 --- a/htdocs/commande/contact.php +++ b/htdocs/commande/contact.php @@ -92,12 +92,12 @@ if ($_POST["action"] == 'updateligne' && $user->rights->commande->creer) $db->commit(); } else { - dolibarr_print_error($db, "result=$result"); + dol_print_error($db, "result=$result"); $db->rollback(); } } else { - dolibarr_print_error($db); + dol_print_error($db); } } @@ -117,12 +117,12 @@ if ($_GET["action"] == 'swapstatut' && $user->rights->commande->creer) $db->commit(); } else { - dolibarr_print_error($db, "result=$result"); + dol_print_error($db, "result=$result"); $db->rollback(); } } else { - dolibarr_print_error($db); + dol_print_error($db); } } @@ -139,7 +139,7 @@ if ($_GET["action"] == 'deleteline' && $user->rights->commande->creer) exit; } else { - dolibarr_print_error($db); + dol_print_error($db); } } @@ -171,7 +171,7 @@ if ($id > 0 || ! empty($ref)) $head = commande_prepare_head($commande); - dolibarr_fiche_head($head, 'contact', $langs->trans("CustomerOrder")); + dol_fiche_head($head, 'contact', $langs->trans("CustomerOrder")); /* diff --git a/htdocs/commande/document.php b/htdocs/commande/document.php index 2dae3cf5a394bf6a64ddea075312fb1d719e6b43..22817576444e1cf7a97ae50dc217126596f8277e 100644 --- a/htdocs/commande/document.php +++ b/htdocs/commande/document.php @@ -67,7 +67,7 @@ $ref= $_GET['ref']; $commande = new Commande($db); if (! $commande->fetch($_GET['id'],$_GET['ref']) > 0) { - dolibarr_print_error($db); + dol_print_error($db); } @@ -123,7 +123,7 @@ if ($id > 0 || ! empty($ref)) $societe->fetch($commande->socid); $head = commande_prepare_head($commande); - dolibarr_fiche_head($head, 'documents', $langs->trans('CustomerOrder')); + dol_fiche_head($head, 'documents', $langs->trans('CustomerOrder')); // Construit liste des fichiers diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index 236029b153239f65c61a1558fb1426ccbbe2d1e9..e047fde01dd2dc813374ecd86c06900122b4ae2e 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -125,8 +125,8 @@ if ($_POST['action'] == 'classin') if ($_POST['action'] == 'add' && $user->rights->commande->creer) { $datecommande=''; - $datecommande = dolibarr_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); - $datelivraison = dolibarr_mktime(12, 0, 0, $_POST['liv_month'],$_POST['liv_day'],$_POST['liv_year']); + $datecommande = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); + $datelivraison = dol_mktime(12, 0, 0, $_POST['liv_month'],$_POST['liv_day'],$_POST['liv_year']); $commande = new Commande($db); $commande->socid=$_POST['socid']; @@ -226,7 +226,7 @@ if ($_POST['action'] == "setabsolutediscount" && $user->rights->commande->creer) } else { - dolibarr_print_error($db,$com->error); + dol_print_error($db,$com->error); } } } @@ -234,7 +234,7 @@ if ($_POST['action'] == "setabsolutediscount" && $user->rights->commande->creer) if ($_POST['action'] == 'setdate_livraison' && $user->rights->commande->creer) { //print "x ".$_POST['liv_month'].", ".$_POST['liv_day'].", ".$_POST['liv_year']; - $datelivraison=dolibarr_mktime(0, 0, 0, $_POST['liv_month'], $_POST['liv_day'], $_POST['liv_year']); + $datelivraison=dol_mktime(0, 0, 0, $_POST['liv_month'], $_POST['liv_day'], $_POST['liv_year']); $commande = new Commande($db); $commande->fetch($_GET['id']); @@ -257,7 +257,7 @@ if ($_POST['action'] == 'setmode' && $user->rights->commande->creer) $commande = new Commande($db); $commande->fetch($_GET['id']); $result=$commande->mode_reglement($_POST['mode_reglement_id']); - if ($result < 0) dolibarr_print_error($db,$commande->error); + if ($result < 0) dol_print_error($db,$commande->error); } if ($_POST['action'] == 'setconditions' && $user->rights->commande->creer) @@ -265,7 +265,7 @@ if ($_POST['action'] == 'setconditions' && $user->rights->commande->creer) $commande = new Commande($db); $commande->fetch($_GET['id']); $result=$commande->cond_reglement($_POST['cond_reglement_id']); - if ($result < 0) dolibarr_print_error($db,$commande->error); + if ($result < 0) dol_print_error($db,$commande->error); } if ($_REQUEST['action'] == 'setremisepercent' && $user->rights->facture->creer) @@ -295,15 +295,15 @@ if ($_POST['action'] == 'addligne' && $user->rights->commande->creer) $ret=$commande->fetch($_POST['id']); if ($ret < 0) { - dolibarr_print_error($db,$commande->error); + dol_print_error($db,$commande->error); exit; } $ret=$commande->fetch_client(); // Clean parameters $suffixe = $_POST['idprod'] ? '_prod' : ''; - $date_start=dolibarr_mktime(0, 0, 0, $_POST['date_start'.$suffixe.'month'], $_POST['date_start'.$suffixe.'day'], $_POST['date_start'.$suffixe.'year']); - $date_end=dolibarr_mktime(0, 0, 0, $_POST['date_end'.$suffixe.'month'], $_POST['date_end'.$suffixe.'day'], $_POST['date_end'.$suffixe.'year']); + $date_start=dol_mktime(0, 0, 0, $_POST['date_start'.$suffixe.'month'], $_POST['date_start'.$suffixe.'day'], $_POST['date_start'.$suffixe.'year']); + $date_end=dol_mktime(0, 0, 0, $_POST['date_end'.$suffixe.'month'], $_POST['date_end'.$suffixe.'day'], $_POST['date_end'.$suffixe.'year']); $price_base_type = 'HT'; // Ecrase $pu par celui du produit @@ -408,12 +408,12 @@ if ($_POST['action'] == 'addligne' && $user->rights->commande->creer) if ($_POST['action'] == 'updateligne' && $user->rights->commande->creer && $_POST['save'] == $langs->trans('Save')) { $commande = new Commande($db,'',$_POST['id']); - if (! $commande->fetch($_POST['id']) > 0) dolibarr_print_error($db); + if (! $commande->fetch($_POST['id']) > 0) dol_print_error($db); // Clean parameters $description=dol_htmlcleanlastbr($_POST['eldesc']); - $date_start=dolibarr_mktime(0, 0, 0, $_POST['date_start'.$suffixe.'month'], $_POST['date_start'.$suffixe.'day'], $_POST['date_start'.$suffixe.'year']); - $date_end=dolibarr_mktime(0, 0, 0, $_POST['date_end'.$suffixe.'month'], $_POST['date_end'.$suffixe.'day'], $_POST['date_end'.$suffixe.'year']); + $date_start=dol_mktime(0, 0, 0, $_POST['date_start'.$suffixe.'month'], $_POST['date_start'.$suffixe.'day'], $_POST['date_start'.$suffixe.'year']); + $date_end=dol_mktime(0, 0, 0, $_POST['date_end'.$suffixe.'month'], $_POST['date_end'.$suffixe.'day'], $_POST['date_end'.$suffixe.'year']); // Define info_bits $info_bits=0; @@ -453,7 +453,7 @@ if ($_POST['action'] == 'updateligne' && $user->rights->commande->creer && $_POS } else { - dolibarr_print_error($db,$commande->error); + dol_print_error($db,$commande->error); exit; } } @@ -582,7 +582,7 @@ if ($_REQUEST['action'] == 'builddoc') // In get or post $result=commande_pdf_create($db, $commande->id, $commande->modelpdf, $outputlangs); if ($result <= 0) { - dolibarr_print_error($db,$result); + dol_print_error($db,$result); exit; } else @@ -746,7 +746,7 @@ if ($_POST['action'] == 'send' && ! $_POST['addfile'] && ! $_POST['cancel']) if ($error) { - dolibarr_print_error($db); + dol_print_error($db); } else { @@ -777,21 +777,21 @@ if ($_POST['action'] == 'send' && ! $_POST['addfile'] && ! $_POST['cancel']) $langs->load("other"); $mesg='<div class="error">'.$langs->trans('ErrorMailRecipientIsEmpty').' !</div>'; $_GET["action"]='presend'; - dolibarr_syslog('Recipient email is empty'); + dol_syslog('Recipient email is empty'); } } else { $langs->load("other"); $mesg='<div class="error">'.$langs->trans('ErrorCantReadFile',$file).'</div>'; - dolibarr_syslog('Failed to read file: '.$file); + dol_syslog('Failed to read file: '.$file); } } else { $langs->load("other"); $mesg='<div class="error">'.$langs->trans('ErrorFailedToReadEntity',$langs->trans("Invoice")).'</div>'; - dolibarr_syslog('Impossible de lire les donnees de la facture. Le fichier facture n\'a peut-etre pas ete genere.'); + dol_syslog('Impossible de lire les donnees de la facture. Le fichier facture n\'a peut-etre pas ete genere.'); } } @@ -1083,7 +1083,7 @@ if ($_GET['action'] == 'create' && $user->rights->commande->creer) } else { - dolibarr_print_error($db); + dol_print_error($db); } print '</table>'; @@ -1092,7 +1092,7 @@ if ($_GET['action'] == 'create' && $user->rights->commande->creer) } else { - dolibarr_print_error($db); + dol_print_error($db); } } else @@ -1122,7 +1122,7 @@ else $author->fetch(); $head = commande_prepare_head($commande); - dolibarr_fiche_head($head, 'order', $langs->trans("CustomerOrder")); + dol_fiche_head($head, 'order', $langs->trans("CustomerOrder")); /* * Confirmation de la suppression de la commande @@ -1255,7 +1255,7 @@ else // Date print '<tr><td>'.$langs->trans('Date').'</td>'; - print '<td colspan="2">'.dolibarr_print_date($commande->date,'daytext').'</td>'; + print '<td colspan="2">'.dol_print_date($commande->date,'daytext').'</td>'; print '<td width="50%">'.$langs->trans('Source').' : '.$commande->getLabelSource(); if ($commande->source == 0 && $conf->propal->enabled && $commande->propale_id) { @@ -1286,7 +1286,7 @@ else } else { - print $commande->date_livraison ? dolibarr_print_date($commande->date_livraison,'daytext') : ' '; + print $commande->date_livraison ? dol_print_date($commande->date_livraison,'daytext') : ' '; } print '</td>'; print '<td rowspan="'.$nbrow.'" valign="top">'.$langs->trans('NotePublic').' :<br>'; @@ -1661,7 +1661,7 @@ else } else { - dolibarr_print_error($db); + dol_print_error($db); } /* @@ -1992,7 +1992,7 @@ else $var=!$var; print '<tr '.$bc[$var].'>'; print '<td><a href="../compta/facture.php?facid='.$objp->rowid.'">'.img_object($langs->trans('ShowBill'),'bill').' '.$objp->facnumber.'</a></td>'; - print '<td align="center">'.dolibarr_print_date($objp->df,'day').'</td>'; + print '<td align="center">'.dol_print_date($objp->df,'day').'</td>'; print '<td align="right">'.$objp->total_ttc.'</td></tr>'; $i++; } @@ -2001,7 +2001,7 @@ else } else { - dolibarr_print_error($db); + dol_print_error($db); } print '</td><td valign="top" width="50%">'; @@ -2074,7 +2074,7 @@ else else { // Commande non trouvee - dolibarr_print_error($db); + dol_print_error($db); } } } diff --git a/htdocs/commande/index.php b/htdocs/commande/index.php index 60bb9d2fd2181180574e6098367011a9243d34de..6d8da82a3622ac12a29d1cf266a00617c411fb6f 100644 --- a/htdocs/commande/index.php +++ b/htdocs/commande/index.php @@ -102,7 +102,7 @@ if ( $db->query($sql) ) print "<tr $bc[$var]>"; print '<td nowrap="nowrap">'; print "<a href=\"fiche.php?id=".$obj->rowid."\">".img_object($langs->trans("ShowOrder"),"order").' '.$obj->ref."</a></td>"; - print '<td><a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$obj->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.dolibarr_trunc($obj->nom,24).'</a></td></tr>'; + print '<td><a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$obj->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($obj->nom,24).'</a></td></tr>'; $i++; } print "</table><br>"; @@ -159,7 +159,7 @@ if ( $db->query($sql) ) print '</td></tr></table>'; print '</td>'; - print '<td><a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$obj->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.dolibarr_trunc($obj->nom,24).'</a></td></tr>'; + print '<td><a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$obj->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($obj->nom,24).'</a></td></tr>'; $i++; } } @@ -290,7 +290,7 @@ if ($resql) print '</td>'; print '<td><a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$obj->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.$obj->nom.'</a></td>'; - print '<td>'.dolibarr_print_date($obj->datec).'</td>'; + print '<td>'.dol_print_date($obj->datec).'</td>'; print '<td align="right">'.$commandestatic->LibStatut($obj->fk_statut,$obj->facture,5).'</td>'; print '</tr>'; $i++; diff --git a/htdocs/commande/info.php b/htdocs/commande/info.php index ec2f8b7b0639a5ab2994210c036a975b69709986..cce814102cbc5bffb28ce9a0414b4bf74434a735 100644 --- a/htdocs/commande/info.php +++ b/htdocs/commande/info.php @@ -50,7 +50,7 @@ $soc = new Societe($db, $commande->socid); $soc->fetch($commande->socid); $head = commande_prepare_head($commande); -dolibarr_fiche_head($head, 'info', $langs->trans("CustomerOrder")); +dol_fiche_head($head, 'info', $langs->trans("CustomerOrder")); print '<table width="100%"><tr><td>'; diff --git a/htdocs/commande/liste.php b/htdocs/commande/liste.php index b436f5fb776f435fc14c04991ec0229f9592e0e8..e8b4818c86059fb8a1e195a5e44750e93f7669af 100644 --- a/htdocs/commande/liste.php +++ b/htdocs/commande/liste.php @@ -223,10 +223,10 @@ if ($resql) print '<td>'.$objp->ref_client.'</td>'; // Date - $y = dolibarr_print_date($objp->date_commande,'%Y'); - $m = dolibarr_print_date($objp->date_commande,'%m'); - $ml = dolibarr_print_date($objp->date_commande,'%B'); - $d = dolibarr_print_date($objp->date_commande,'%d'); + $y = dol_print_date($objp->date_commande,'%Y'); + $m = dol_print_date($objp->date_commande,'%m'); + $ml = dol_print_date($objp->date_commande,'%B'); + $d = dol_print_date($objp->date_commande,'%d'); print '<td align="right">'; print $d; print ' <a href="liste.php?year='.$y.'&month='.$m.'">'.$ml.'</a>'; @@ -243,7 +243,7 @@ if ($resql) } else { - print dolibarr_print_error($db); + print dol_print_error($db); } $db->close(); diff --git a/htdocs/commande/note.php b/htdocs/commande/note.php index dc30f43ca1431c522656713e977d94b533561036..2f63397adf20daa4e94b7fbe4c683e6ef941158e 100644 --- a/htdocs/commande/note.php +++ b/htdocs/commande/note.php @@ -50,7 +50,7 @@ $ref= $_GET['ref']; $commande = new Commande($db); if (! $commande->fetch($_GET['id'],$_GET['ref']) > 0) { - dolibarr_print_error($db); + dol_print_error($db); } @@ -93,7 +93,7 @@ if ($id > 0 || ! empty($ref)) $head = commande_prepare_head($commande); - dolibarr_fiche_head($head, 'note', $langs->trans("CustomerOrder")); + dol_fiche_head($head, 'note', $langs->trans("CustomerOrder")); print '<table class="border" width="100%">'; diff --git a/htdocs/commande/stats/month.php b/htdocs/commande/stats/month.php index f506caae1f35c1da3648d91aea6e95da58344021..d72cb9bf042a09ae21f84827b94cc55c521170f3 100644 --- a/htdocs/commande/stats/month.php +++ b/htdocs/commande/stats/month.php @@ -140,7 +140,7 @@ $data = array(); for ($i = 1 ; $i < 13 ; $i++) { - $data[$i-1] = array(ucfirst(substr(dolibarr_print_date(dolibarr_mktime(12,0,0,$i,1,$year),"%b"),0,3)), $res[$i]); + $data[$i-1] = array(ucfirst(substr(dol_print_date(dol_mktime(12,0,0,$i,1,$year),"%b"),0,3)), $res[$i]); } if (!$user->rights->societe->client->voir || $user->societe_id) diff --git a/htdocs/commonobject.class.php b/htdocs/commonobject.class.php index aad56a340a4fdc9ad1fd2d30d06c798f042b920b..a69bf05a834aaa5644371919213039c5b7800231 100644 --- a/htdocs/commonobject.class.php +++ b/htdocs/commonobject.class.php @@ -17,45 +17,45 @@ */ /** - \file htdocs/commonobject.class.php - \ingroup core - \brief Fichier de la classe mere des classes metiers (facture, contrat, propal, commande, etc...) - \version $Id$ -*/ + \file htdocs/commonobject.class.php + \ingroup core + \brief Fichier de la classe mere des classes metiers (facture, contrat, propal, commande, etc...) + \version $Id$ + */ /** - \class CommonObject - \brief Classe mere pour h�ritage des classes metiers -*/ + \class CommonObject + \brief Classe mere pour h�ritage des classes metiers + */ class CommonObject { /** - * \brief Ajoute un contact associ� au l'entit� d�finie dans $this->element - * \param fk_socpeople Id du contact a ajouter + * \brief Ajoute un contact associe au l'entite definie dans $this->element + * \param fk_socpeople Id du contact a ajouter * \param type_contact Type de contact (code ou id) - * \param source external=Contact externe (llx_socpeople), internal=Contact interne (llx_user) - * \return int <0 si erreur, >0 si ok - */ + * \param source external=Contact externe (llx_socpeople), internal=Contact interne (llx_user) + * \return int <0 si erreur, >0 si ok + */ function add_contact($fk_socpeople, $type_contact, $source='external') { global $langs; - dolibarr_syslog("CommonObject::add_contact $fk_socpeople, $type_contact, $source"); + dol_syslog("CommonObject::add_contact $fk_socpeople, $type_contact, $source"); // V�rification parametres if ($fk_socpeople <= 0) { $this->error=$langs->trans("ErrorWrongValueForParameter","1"); - dolibarr_syslog("CommonObject::add_contact ".$this->error,LOG_ERR); + dol_syslog("CommonObject::add_contact ".$this->error,LOG_ERR); return -1; } if (! $type_contact) { $this->error=$langs->trans("ErrorWrongValueForParameter","2"); - dolibarr_syslog("CommonObject::add_contact ".$this->error,LOG_ERR); + dol_syslog("CommonObject::add_contact ".$this->error,LOG_ERR); return -2; } @@ -80,24 +80,24 @@ class CommonObject } } - $datecreate = time(); + $datecreate = time(); - // Insertion dans la base - $sql = "INSERT INTO ".MAIN_DB_PREFIX."element_contact"; - $sql.= " (element_id, fk_socpeople, datecreate, statut, fk_c_type_contact) "; - $sql.= " VALUES (".$this->id.", ".$fk_socpeople." , " ; + // Insertion dans la base + $sql = "INSERT INTO ".MAIN_DB_PREFIX."element_contact"; + $sql.= " (element_id, fk_socpeople, datecreate, statut, fk_c_type_contact) "; + $sql.= " VALUES (".$this->id.", ".$fk_socpeople." , " ; $sql.= $this->db->idate($datecreate); $sql.= ", 4, '". $id_type_contact . "' "; - $sql.= ")"; - dolibarr_syslog("CommonObject::add_contact sql=".$sql); + $sql.= ")"; + dol_syslog("CommonObject::add_contact sql=".$sql); $resql=$this->db->query($sql); if ($resql) - { - return 1; - } - else - { + { + return 1; + } + else + { if ($this->db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') { $this->error=$this->db->errno(); @@ -106,287 +106,287 @@ class CommonObject else { $this->error=$this->db->error()." - $sql"; - dolibarr_syslog($this->error,LOG_ERR); + dol_syslog($this->error,LOG_ERR); return -1; } - } + } } - /** + /** * \brief Mise a jour du statut d'un contact - * \param rowid La reference du lien contact-entit� - * \param statut Le nouveau statut - * \param type_contact_id Description du type de contact - * \return int <0 si erreur, =0 si ok - */ + * \param rowid La reference du lien contact-entit� + * \param statut Le nouveau statut + * \param type_contact_id Description du type de contact + * \return int <0 si erreur, =0 si ok + */ function update_contact($rowid, $statut, $type_contact_id) { - // Insertion dans la base - $sql = "UPDATE ".MAIN_DB_PREFIX."element_contact set"; - $sql.= " statut = ".$statut.","; - $sql.= " fk_c_type_contact = '".$type_contact_id ."'"; - $sql.= " where rowid = ".$rowid; - // Retour - if ( $this->db->query($sql) ) - { - return 0; - } - else - { - dolibarr_print_error($this->db); - return -1; - } - } + // Insertion dans la base + $sql = "UPDATE ".MAIN_DB_PREFIX."element_contact set"; + $sql.= " statut = ".$statut.","; + $sql.= " fk_c_type_contact = '".$type_contact_id ."'"; + $sql.= " where rowid = ".$rowid; + // Retour + if ( $this->db->query($sql) ) + { + return 0; + } + else + { + dol_print_error($this->db); + return -1; + } + } /** - * \brief Supprime une ligne de contact - * \param rowid La reference du contact - * \return statur >0 si ok, <0 si ko - */ - function delete_contact($rowid) - { - $sql = "DELETE FROM ".MAIN_DB_PREFIX."element_contact"; - $sql.= " WHERE rowid =".$rowid; - - dolibarr_syslog("CommonObject::delete_contact sql=".$sql); - if ($this->db->query($sql)) - { - return 1; - } - else - { + * \brief Supprime une ligne de contact + * \param rowid La reference du contact + * \return statur >0 si ok, <0 si ko + */ + function delete_contact($rowid) + { + $sql = "DELETE FROM ".MAIN_DB_PREFIX."element_contact"; + $sql.= " WHERE rowid =".$rowid; + + dol_syslog("CommonObject::delete_contact sql=".$sql); + if ($this->db->query($sql)) + { + return 1; + } + else + { $this->error=$this->db->lasterror(); - dolibarr_syslog("CommonObject::delete_contact error=".$this->error, LOG_ERR); - return -1; - } - } - - /** - * \brief R�cup�re les lignes de contact de l'objet - * \param statut Statut des lignes detail � r�cup�rer - * \param source Source du contact external (llx_socpeople) ou internal (llx_user) - * \return array Tableau des rowid des contacts - */ - function liste_contact($statut=-1,$source='external') - { - global $langs; - - $tab=array(); - - $sql = "SELECT ec.rowid, ec.statut, ec.fk_socpeople as id,"; - if ($source == 'internal') $sql.=" '-1' as socid,"; - if ($source == 'external') $sql.=" t.fk_soc as socid,"; - $sql.=" t.name as nom,"; - $sql.= "tc.source, tc.element, tc.code, tc.libelle"; - $sql.= " FROM ".MAIN_DB_PREFIX."c_type_contact tc,"; - $sql.= " ".MAIN_DB_PREFIX."element_contact ec"; - if ($source == 'internal') $sql.=" LEFT JOIN ".MAIN_DB_PREFIX."user t on ec.fk_socpeople = t.rowid"; - if ($source == 'external') $sql.=" LEFT JOIN ".MAIN_DB_PREFIX."socpeople t on ec.fk_socpeople = t.rowid"; - $sql.= " WHERE ec.element_id =".$this->id; - $sql.= " AND ec.fk_c_type_contact=tc.rowid"; - $sql.= " AND tc.element='".$this->element."'"; - if ($source == 'internal') $sql.= " AND tc.source = 'internal'"; - if ($source == 'external') $sql.= " AND tc.source = 'external'"; - $sql.= " AND tc.active=1"; - if ($statut >= 0) $sql.= " AND ec.statut = '".$statut."'"; - $sql.=" ORDER BY t.name ASC"; - - dolibarr_syslog("CommonObject::liste_contact sql=".$sql); - $resql=$this->db->query($sql); - if ($resql) - { - $num=$this->db->num_rows($resql); - $i=0; - while ($i < $num) - { - $obj = $this->db->fetch_object($resql); - - $transkey="TypeContact_".$obj->element."_".$obj->source."_".$obj->code; - $libelle_type=($langs->trans($transkey)!=$transkey ? $langs->trans($transkey) : $obj->libelle); - $tab[$i]=array('source'=>$obj->source,'socid'=>$obj->socid,'id'=>$obj->id,'nom'=>$obj->nom, + dol_syslog("CommonObject::delete_contact error=".$this->error, LOG_ERR); + return -1; + } + } + + /** + * \brief R�cup�re les lignes de contact de l'objet + * \param statut Statut des lignes detail � r�cup�rer + * \param source Source du contact external (llx_socpeople) ou internal (llx_user) + * \return array Tableau des rowid des contacts + */ + function liste_contact($statut=-1,$source='external') + { + global $langs; + + $tab=array(); + + $sql = "SELECT ec.rowid, ec.statut, ec.fk_socpeople as id,"; + if ($source == 'internal') $sql.=" '-1' as socid,"; + if ($source == 'external') $sql.=" t.fk_soc as socid,"; + $sql.=" t.name as nom,"; + $sql.= "tc.source, tc.element, tc.code, tc.libelle"; + $sql.= " FROM ".MAIN_DB_PREFIX."c_type_contact tc,"; + $sql.= " ".MAIN_DB_PREFIX."element_contact ec"; + if ($source == 'internal') $sql.=" LEFT JOIN ".MAIN_DB_PREFIX."user t on ec.fk_socpeople = t.rowid"; + if ($source == 'external') $sql.=" LEFT JOIN ".MAIN_DB_PREFIX."socpeople t on ec.fk_socpeople = t.rowid"; + $sql.= " WHERE ec.element_id =".$this->id; + $sql.= " AND ec.fk_c_type_contact=tc.rowid"; + $sql.= " AND tc.element='".$this->element."'"; + if ($source == 'internal') $sql.= " AND tc.source = 'internal'"; + if ($source == 'external') $sql.= " AND tc.source = 'external'"; + $sql.= " AND tc.active=1"; + if ($statut >= 0) $sql.= " AND ec.statut = '".$statut."'"; + $sql.=" ORDER BY t.name ASC"; + + dol_syslog("CommonObject::liste_contact sql=".$sql); + $resql=$this->db->query($sql); + if ($resql) + { + $num=$this->db->num_rows($resql); + $i=0; + while ($i < $num) + { + $obj = $this->db->fetch_object($resql); + + $transkey="TypeContact_".$obj->element."_".$obj->source."_".$obj->code; + $libelle_type=($langs->trans($transkey)!=$transkey ? $langs->trans($transkey) : $obj->libelle); + $tab[$i]=array('source'=>$obj->source,'socid'=>$obj->socid,'id'=>$obj->id,'nom'=>$obj->nom, 'rowid'=>$obj->rowid,'code'=>$obj->code,'libelle'=>$libelle_type,'status'=>$obj->statut); - $i++; - } - return $tab; - } - else - { - $this->error=$this->db->error(); - dolibarr_print_error($this->db); - return -1; - } - } - - /** - * \brief Le d�tail d'un contact - * \param rowid L'identifiant du contact - * \return object L'objet construit par DoliDb.fetch_object - */ - function detail_contact($rowid) - { - $sql = "SELECT ec.datecreate, ec.statut, ec.fk_socpeople, ec.fk_c_type_contact,"; - $sql.= " tc.code, tc.libelle,"; - $sql.= " s.fk_soc"; - $sql.= " FROM (".MAIN_DB_PREFIX."element_contact as ec, ".MAIN_DB_PREFIX."c_type_contact as tc)"; - $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."socpeople as s ON ec.fk_socpeople=s.rowid"; // Si contact de type external, alors il est li� � une societe - $sql.= " WHERE ec.rowid =".$rowid; - $sql.= " AND ec.fk_c_type_contact=tc.rowid"; - $sql.= " AND tc.element = '".$this->element."'"; - - $resql=$this->db->query($sql); - if ($resql) - { - $obj = $this->db->fetch_object($resql); - return $obj; - } - else - { - $this->error=$this->db->error(); - dolibarr_print_error($this->db); - return null; - } - } - - /** - * \brief La liste des valeurs possibles de type de contacts - * \param source internal ou externam - * \return array La liste des natures - */ - function liste_type_contact($source) - { - global $langs; - - $tab = array(); - - $sql = "SELECT distinct tc.rowid, tc.code, tc.libelle"; - $sql.= " FROM ".MAIN_DB_PREFIX."c_type_contact as tc"; - $sql.= " WHERE element='".$this->element."'"; - $sql.= " AND source='".$source."'"; - $sql.= " ORDER by tc.code"; - - $resql=$this->db->query($sql); - if ($resql) - { - $num=$this->db->num_rows($resql); - $i=0; - while ($i < $num) - { - $obj = $this->db->fetch_object($resql); - - $transkey="TypeContact_".$this->element."_".$source."_".$obj->code; - $libelle_type=($langs->trans($transkey)!=$transkey ? $langs->trans($transkey) : $obj->libelle); - $tab[$obj->rowid]=$libelle_type; - $i++; - } - return $tab; - } - else - { - $this->error=$this->db->error(); -// dolibarr_print_error($this->db); - return null; - } - } - - /** - * \brief Retourne id des contacts d'une source et d'un type actif donn� - * Exemple: contact client de facturation ('external', 'BILLING') - * Exemple: contact client de livraison ('external', 'SHIPPING') - * Exemple: contact interne suivi paiement ('internal', 'SALESREPFOLL') + $i++; + } + return $tab; + } + else + { + $this->error=$this->db->error(); + dol_print_error($this->db); + return -1; + } + } + + /** + * \brief Le detail d'un contact + * \param rowid L'identifiant du contact + * \return object L'objet construit par DoliDb.fetch_object + */ + function detail_contact($rowid) + { + $sql = "SELECT ec.datecreate, ec.statut, ec.fk_socpeople, ec.fk_c_type_contact,"; + $sql.= " tc.code, tc.libelle,"; + $sql.= " s.fk_soc"; + $sql.= " FROM (".MAIN_DB_PREFIX."element_contact as ec, ".MAIN_DB_PREFIX."c_type_contact as tc)"; + $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."socpeople as s ON ec.fk_socpeople=s.rowid"; // Si contact de type external, alors il est li� � une societe + $sql.= " WHERE ec.rowid =".$rowid; + $sql.= " AND ec.fk_c_type_contact=tc.rowid"; + $sql.= " AND tc.element = '".$this->element."'"; + + $resql=$this->db->query($sql); + if ($resql) + { + $obj = $this->db->fetch_object($resql); + return $obj; + } + else + { + $this->error=$this->db->error(); + dol_print_error($this->db); + return null; + } + } + + /** + * \brief La liste des valeurs possibles de type de contacts + * \param source internal ou externam + * \return array La liste des natures + */ + function liste_type_contact($source) + { + global $langs; + + $tab = array(); + + $sql = "SELECT distinct tc.rowid, tc.code, tc.libelle"; + $sql.= " FROM ".MAIN_DB_PREFIX."c_type_contact as tc"; + $sql.= " WHERE element='".$this->element."'"; + $sql.= " AND source='".$source."'"; + $sql.= " ORDER by tc.code"; + + $resql=$this->db->query($sql); + if ($resql) + { + $num=$this->db->num_rows($resql); + $i=0; + while ($i < $num) + { + $obj = $this->db->fetch_object($resql); + + $transkey="TypeContact_".$this->element."_".$source."_".$obj->code; + $libelle_type=($langs->trans($transkey)!=$transkey ? $langs->trans($transkey) : $obj->libelle); + $tab[$obj->rowid]=$libelle_type; + $i++; + } + return $tab; + } + else + { + $this->error=$this->db->error(); + // dol_print_error($this->db); + return null; + } + } + + /** + * \brief Retourne id des contacts d'une source et d'un type actif donn� + * Exemple: contact client de facturation ('external', 'BILLING') + * Exemple: contact client de livraison ('external', 'SHIPPING') + * Exemple: contact interne suivi paiement ('internal', 'SALESREPFOLL') * \param source 'external' or 'internal' * \param code 'BILLING', 'SHIPPING', 'SALESREPFOLL', ... - * \return array Liste des id contacts - */ - function getIdContact($source,$code) - { - $result=array(); - $i=0; - - $sql = "SELECT ec.fk_socpeople"; - $sql.= " FROM ".MAIN_DB_PREFIX."element_contact as ec, ".MAIN_DB_PREFIX."c_type_contact as tc"; - $sql.= " WHERE ec.element_id = ".$this->id; - $sql.= " AND ec.fk_c_type_contact=tc.rowid"; - $sql.= " AND tc.element = '".$this->element."'"; - $sql.= " AND tc.source = '".$source."'"; - $sql.= " AND tc.code = '".$code."'"; - $sql.= " AND tc.active = 1"; - - dolibarr_syslog("CommonObject::getIdContact sql=".$sql); - $resql=$this->db->query($sql); - if ($resql) - { - while ($obj = $this->db->fetch_object($resql)) - { - $result[$i]=$obj->fk_socpeople; - $i++; - } - } - else - { - $this->error=$this->db->error(); - dolibarr_syslog("CommonObject::getIdContact ".$this->error, LOG_ERR); - return null; - } - - return $result; - } - - /** - * \brief Charge le contact d'id $id dans this->contact - * \param contactid Id du contact - * \return int <0 if KO, >0 if OK - */ - function fetch_contact($contactid) - { + * \return array Liste des id contacts + */ + function getIdContact($source,$code) + { + $result=array(); + $i=0; + + $sql = "SELECT ec.fk_socpeople"; + $sql.= " FROM ".MAIN_DB_PREFIX."element_contact as ec, ".MAIN_DB_PREFIX."c_type_contact as tc"; + $sql.= " WHERE ec.element_id = ".$this->id; + $sql.= " AND ec.fk_c_type_contact=tc.rowid"; + $sql.= " AND tc.element = '".$this->element."'"; + $sql.= " AND tc.source = '".$source."'"; + $sql.= " AND tc.code = '".$code."'"; + $sql.= " AND tc.active = 1"; + + dol_syslog("CommonObject::getIdContact sql=".$sql); + $resql=$this->db->query($sql); + if ($resql) + { + while ($obj = $this->db->fetch_object($resql)) + { + $result[$i]=$obj->fk_socpeople; + $i++; + } + } + else + { + $this->error=$this->db->error(); + dol_syslog("CommonObject::getIdContact ".$this->error, LOG_ERR); + return null; + } + + return $result; + } + + /** + * \brief Charge le contact d'id $id dans this->contact + * \param contactid Id du contact + * \return int <0 if KO, >0 if OK + */ + function fetch_contact($contactid) + { require_once(DOL_DOCUMENT_ROOT."/contact.class.php"); $contact = new Contact($this->db); $result=$contact->fetch($contactid); $this->contact = $contact; return $result; - } - - /** - * \brief Charge le tiers d'id $this->socid dans this->client - * \return int <0 if KO, >0 if OK - */ - function fetch_client() - { - $client = new Societe($this->db); - $result=$client->fetch($this->socid); - $this->client = $client; + } + + /** + * \brief Charge le tiers d'id $this->socid dans this->client + * \return int <0 if KO, >0 if OK + */ + function fetch_client() + { + $client = new Societe($this->db); + $result=$client->fetch($this->socid); + $this->client = $client; return $result; - } - - /** - * \brief Charge le projet d'id $this->projet_id dans this->projet - * \return int <0 if KO, >0 if OK - */ - function fetch_projet() - { - $projet = new Project($this->db); - $result=$projet->fetch($this->projet_id); - $this->projet = $projet; + } + + /** + * \brief Charge le projet d'id $this->projet_id dans this->projet + * \return int <0 if KO, >0 if OK + */ + function fetch_projet() + { + $projet = new Project($this->db); + $result=$projet->fetch($this->projet_id); + $this->projet = $projet; return $result; - } + } /** - * \brief Charge le user d'id userid dans this->user - * \param userid Id du contact - * \return int <0 if KO, >0 if OK - */ - function fetch_user($userid) - { + * \brief Charge le user d'id userid dans this->user + * \param userid Id du contact + * \return int <0 if KO, >0 if OK + */ + function fetch_user($userid) + { $user = new User($this->db, $userid); $result=$user->fetch(); $this->user = $user; return $result; - } + } /** - * \brief Charge l'adresse de livraison d'id $this->adresse_livraison_id dans this->deliveryaddress - * \param userid Id du contact - * \return int <0 if KO, >0 if OK - */ + * \brief Charge l'adresse de livraison d'id $this->adresse_livraison_id dans this->deliveryaddress + * \param userid Id du contact + * \return int <0 if KO, >0 if OK + */ function fetch_adresse_livraison($deliveryaddressid) { $address = new Societe($this->db); @@ -397,16 +397,16 @@ class CommonObject /** - * \brief Load properties id_previous and id_next - * \param filter Optional filter - * \param fieldid Nom du champ a utiliser pour select next et previous - * \return int <0 if KO, >0 if OK - */ + * \brief Load properties id_previous and id_next + * \param filter Optional filter + * \param fieldid Nom du champ a utiliser pour select next et previous + * \return int <0 if KO, >0 if OK + */ function load_previous_next_ref($filter='',$fieldid) { if (! $this->table_element) { - dolibarr_syslog("CommonObject::load_previous_next was called on objet with property table_element not defined", LOG_ERR); + dol_syslog("CommonObject::load_previous_next was called on objet with property table_element not defined", LOG_ERR); return -1; } @@ -446,36 +446,36 @@ class CommonObject } - /** - * \brief On r�cup�re les id de liste_contact - * \param source Source du contact external (llx_socpeople) ou internal (llx_user) - * \return array - */ - function getListContactId($source='external') - { - $contactAlreadySelected = array(); - $tab = $this->liste_contact(-1,$source); - $num=sizeof($tab); - $i = 0; - while ($i < $num) - { - $contactAlreadySelected[$i] = $tab[$i]['id']; - $i++; - } - return $contactAlreadySelected; - } + /** + * \brief On r�cup�re les id de liste_contact + * \param source Source du contact external (llx_socpeople) ou internal (llx_user) + * \return array + */ + function getListContactId($source='external') + { + $contactAlreadySelected = array(); + $tab = $this->liste_contact(-1,$source); + $num=sizeof($tab); + $i = 0; + while ($i < $num) + { + $contactAlreadySelected[$i] = $tab[$i]['id']; + $i++; + } + return $contactAlreadySelected; + } /** - * \brief Link ekement with a project - * \param projid Project id to link element to - * \return int <0 if KO, >0 if OK - */ + * \brief Link ekement with a project + * \param projid Project id to link element to + * \return int <0 if KO, >0 if OK + */ function setProject($projid) { if (! $this->table_element) { - dolibarr_syslog("CommonObject::setProject was called on objet with property table_element not defined",LOG_ERR); + dol_syslog("CommonObject::setProject was called on objet with property table_element not defined",LOG_ERR); return -1; } @@ -484,30 +484,30 @@ class CommonObject else $sql.= ' SET fk_projet = NULL'; $sql.= ' WHERE rowid = '.$this->id; - dolibarr_syslog("CommonObject::set_project sql=".$sql); + dol_syslog("CommonObject::set_project sql=".$sql); if ($this->db->query($sql)) { return 1; } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); return -1; } } /** - * \brief Set last model used by doc generator - * \param user User object that make change - * \param modelpdf Modele name - * \return int <0 if KO, >0 if OK - */ + * \brief Set last model used by doc generator + * \param user User object that make change + * \param modelpdf Modele name + * \return int <0 if KO, >0 if OK + */ function setDocModel($user, $modelpdf) { if (! $this->table_element) { - dolibarr_syslog("CommonObject::setDocModel was called on objet with property table_element not defined",LOG_ERR); + dol_syslog("CommonObject::setDocModel was called on objet with property table_element not defined",LOG_ERR); return -1; } @@ -517,7 +517,7 @@ class CommonObject // if ($this->element == 'facture') $sql.= " AND fk_statut < 2"; // if ($this->element == 'propal') $sql.= " AND fk_statut = 0"; - dolibarr_syslog("CommonObject::setDocModel sql=".$sql); + dol_syslog("CommonObject::setDocModel sql=".$sql); $resql=$this->db->query($sql); if ($resql) { @@ -526,26 +526,26 @@ class CommonObject } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); return 0; } } /** - * \brief Stocke un num�ro de rang pour toutes les lignes de - * detail d'une facture qui n'en ont pas. - */ + * \brief Stocke un num�ro de rang pour toutes les lignes de + * detail d'une facture qui n'en ont pas. + */ function line_order() { if (! $this->table_element_line) { - dolibarr_syslog("CommonObject::line_order was called on objet with property table_element_line not defined",LOG_ERR); + dol_syslog("CommonObject::line_order was called on objet with property table_element_line not defined",LOG_ERR); return -1; } if (! $this->fk_element) { - dolibarr_syslog("CommonObject::line_order was called on objet with property fk_element not defined",LOG_ERR); + dol_syslog("CommonObject::line_order was called on objet with property fk_element not defined",LOG_ERR); return -1; } @@ -581,7 +581,7 @@ class CommonObject $sql.= ' WHERE rowid = '.$li[$i]; if (!$this->db->query($sql) ) { - dolibarr_syslog($this->db->error()); + dol_syslog($this->db->error()); } } } @@ -612,12 +612,12 @@ class CommonObject $sql.= ' WHERE rowid = '.$rowid; if (! $this->db->query($sql) ) { - dolibarr_print_error($this->db); + dol_print_error($this->db); } } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); } } } @@ -657,26 +657,26 @@ class CommonObject $sql.= ' WHERE rowid = '.$rowid; if (! $this->db->query($sql) ) { - dolibarr_print_error($this->db); + dol_print_error($this->db); } } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); } } } /** - * \brief Update private note of element - * \param note New value for note - * \return int <0 if KO, >0 if OK - */ + * \brief Update private note of element + * \param note New value for note + * \return int <0 if KO, >0 if OK + */ function update_note($note) { if (! $this->table_element) { - dolibarr_syslog("CommonObject::update_note was called on objet with property table_element not defined", LOG_ERR); + dol_syslog("CommonObject::update_note was called on objet with property table_element not defined", LOG_ERR); return -1; } @@ -685,7 +685,7 @@ class CommonObject else $sql.= " SET note = '".addslashes($note)."'"; $sql.= " WHERE rowid =". $this->id; - dolibarr_syslog("CommonObject::update_note sql=".$sql, LOG_DEBUG); + dol_syslog("CommonObject::update_note sql=".$sql, LOG_DEBUG); if ($this->db->query($sql)) { $this->note = $note; @@ -694,21 +694,21 @@ class CommonObject else { $this->error=$this->db->error(); - dolibarr_syslog("CommonObject::update_note error=".$this->error, LOG_ERR); + dol_syslog("CommonObject::update_note error=".$this->error, LOG_ERR); return -1; } } /** - * \brief Update public note of element - * \param note_public New value for note - * \return int <0 if KO, >0 if OK - */ + * \brief Update public note of element + * \param note_public New value for note + * \return int <0 if KO, >0 if OK + */ function update_note_public($note_public) { if (! $this->table_element) { - dolibarr_syslog("CommonObject::update_note_public was called on objet with property table_element not defined",LOG_ERR); + dol_syslog("CommonObject::update_note_public was called on objet with property table_element not defined",LOG_ERR); return -1; } @@ -716,7 +716,7 @@ class CommonObject $sql.= " SET note_public = '".addslashes($note_public)."'"; $sql.= " WHERE rowid =". $this->id; - dolibarr_syslog("CommonObject::update_note_public sql=".$sql); + dol_syslog("CommonObject::update_note_public sql=".$sql); if ($this->db->query($sql)) { $this->note_public = $note_public; @@ -730,9 +730,9 @@ class CommonObject } /** - * \brief Update total_ht, total_ttc and total_vat for an object (sum of lines) - * \return int <0 si ko, >0 si ok - */ + * \brief Update total_ht, total_ttc and total_vat for an object (sum of lines) + * \return int <0 si ko, >0 si ok + */ function update_price() { include_once(DOL_DOCUMENT_ROOT.'/lib/price.lib.php'); @@ -747,7 +747,7 @@ class CommonObject $sql.= ' FROM '.MAIN_DB_PREFIX.$this->table_element_line; $sql.= ' WHERE '.$this->fk_element.' = '.$this->id; - dolibarr_syslog("CommonObject::update_price sql=".$sql); + dol_syslog("CommonObject::update_price sql=".$sql); $resql = $this->db->query($sql); if ($resql) { @@ -785,7 +785,7 @@ class CommonObject $sql .= ' WHERE rowid = '.$this->id; //print "xx".$sql; - dolibarr_syslog("CommonObject::update_price sql=".$sql); + dol_syslog("CommonObject::update_price sql=".$sql); $resql=$this->db->query($sql); if ($resql) { @@ -794,14 +794,14 @@ class CommonObject else { $this->error=$this->db->error(); - dolibarr_syslog("CommonObject::update_price error=".$this->error,LOG_ERR); + dol_syslog("CommonObject::update_price error=".$this->error,LOG_ERR); return -1; } } else { $this->error=$this->db->error(); - dolibarr_syslog("CommonObject::update_price error=".$this->error,LOG_ERR); + dol_syslog("CommonObject::update_price error=".$this->error,LOG_ERR); return -1; } } diff --git a/htdocs/companybankaccount.class.php b/htdocs/companybankaccount.class.php index 81df314c1a00cbffd74e9369cfde0322e1eeff7c..72b35e4e57c67a36fc1c63d54bd3c8f3f6765ab2 100644 --- a/htdocs/companybankaccount.class.php +++ b/htdocs/companybankaccount.class.php @@ -126,7 +126,7 @@ class CompanyBankAccount } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); return 0; } } @@ -167,7 +167,7 @@ class CompanyBankAccount } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); } } diff --git a/htdocs/compta/bank/account.class.php b/htdocs/compta/bank/account.class.php index a4bac6c2f0ac6390e26ecb918c2761659a1bed72..4092f39eae9fd57fb28d8e11e6cad9b6f5e69570 100644 --- a/htdocs/compta/bank/account.class.php +++ b/htdocs/compta/bank/account.class.php @@ -110,7 +110,7 @@ class Account extends CommonObject $sql = "INSERT INTO ".MAIN_DB_PREFIX."bank_url (fk_bank, url_id, url, label, type)"; $sql .= " VALUES ('".$line_id."', '".$url_id."', '".$url."', '".addslashes($label)."', '".$type."')"; - dolibarr_syslog("Account::add_url_line sql=".$sql); + dol_syslog("Account::add_url_line sql=".$sql); if ($this->db->query($sql)) { $rowid = $this->db->last_insert_id(MAIN_DB_PREFIX."bank_url"); @@ -235,7 +235,7 @@ class Account extends CommonObject $sql.= " ".($banque?"'".addslashes($banque)."'":"null"); $sql.= ")"; - dolibarr_syslog("Account::addline sql=".$sql); + dol_syslog("Account::addline sql=".$sql); if ($this->db->query($sql)) { $rowid = $this->db->last_insert_id(MAIN_DB_PREFIX."bank"); @@ -256,7 +256,7 @@ class Account extends CommonObject else { $this->error=$this->db->lasterror(); - dolibarr_syslog("Account::addline ".$this->error, LOG_ERR); + dol_syslog("Account::addline ".$this->error, LOG_ERR); $this->db->rollback(); return -2; } @@ -294,7 +294,7 @@ class Account extends CommonObject $sql.= "'".addslashes($this->comment)."'"; $sql.= ")"; - dolibarr_syslog("Account::create sql=".$sql); + dol_syslog("Account::create sql=".$sql); $resql=$this->db->query($sql); if ($resql) { @@ -315,12 +315,12 @@ class Account extends CommonObject if ($this->db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') { $this->error=$langs->trans("ErrorBankLabelAlreadyExists"); - dolibarr_syslog($this->error); + dol_syslog($this->error); return -1; } else { $this->error=$this->db->error()." sql=".$sql; - dolibarr_syslog($this->error); + dol_syslog($this->error); return -2; } } @@ -342,7 +342,7 @@ class Account extends CommonObject if (! $this->ref) { $this->error=$langs->trans("ErrorFieldRequired",$langs->trans("Ref")); - dolibarr_syslog("Account::update ".$this->error); + dol_syslog("Account::update ".$this->error); return -1; } if (! $this->label) $this->label = "???"; @@ -366,7 +366,7 @@ class Account extends CommonObject $sql .= " WHERE rowid = ".$this->id; - dolibarr_syslog("Account::update sql=".$sql); + dol_syslog("Account::update sql=".$sql); $result = $this->db->query($sql); if ($result) { @@ -375,7 +375,7 @@ class Account extends CommonObject else { $this->error=$this->db.' sql='.$sql; - dolibarr_print_error($this->error); + dol_print_error($this->error); return -1; } } @@ -393,7 +393,7 @@ class Account extends CommonObject // Chargement librairie pour acces fonction controle RIB require_once(DOL_DOCUMENT_ROOT.'/lib/bank.lib.php'); - dolibarr_syslog("Account::update_bban $this->code_banque,$this->code_guichet,$this->number,$this->cle_rib,$this->iban"); + dol_syslog("Account::update_bban $this->code_banque,$this->code_guichet,$this->number,$this->cle_rib,$this->iban"); // Check parameters if (! $this->ref) @@ -415,7 +415,7 @@ class Account extends CommonObject $sql .= ",adresse_proprio = '".addslashes($this->adresse_proprio)."'"; $sql .= " WHERE rowid = ".$this->id; - dolibarr_syslog("Account::update_bban sql=$sql"); + dol_syslog("Account::update_bban sql=$sql"); $result = $this->db->query($sql); if ($result) @@ -425,7 +425,7 @@ class Account extends CommonObject else { $this->error=$this->db.' sql='.$sql; - dolibarr_print_error($this->error); + dol_print_error($this->error); return -1; } } @@ -447,7 +447,7 @@ class Account extends CommonObject if ($id) $sql.= " WHERE rowid = ".$id; if ($ref) $sql.= " WHERE ref = '".addslashes($ref)."'"; - dolibarr_syslog("Account::fetch sql=".$sql); + dol_syslog("Account::fetch sql=".$sql); $result = $this->db->query($sql); if ($result) { @@ -493,7 +493,7 @@ class Account extends CommonObject } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); return -1; } } @@ -507,13 +507,13 @@ class Account extends CommonObject $sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_account"; $sql .= " WHERE rowid = ".$this->rowid; - dolibarr_syslog("Account::delete sql=".$sql); + dol_syslog("Account::delete sql=".$sql); $result = $this->db->query($sql); if ($result) { return 1; } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); return -1; } } @@ -590,7 +590,7 @@ class Account extends CommonObject if ($obj->nb <= 1) $can_be_deleted=true; // Juste le solde } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); } return $can_be_deleted; } @@ -650,7 +650,7 @@ class Account extends CommonObject } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); return 0; } } @@ -677,7 +677,7 @@ class Account extends CommonObject } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); return 0; } } @@ -717,7 +717,7 @@ class Account extends CommonObject } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); $this->error=$this->db->error(); return -1; } @@ -834,7 +834,7 @@ class AccountLine $sql.= " FROM ".MAIN_DB_PREFIX."bank as b, ".MAIN_DB_PREFIX."bank_account as ba"; $sql.= " WHERE b.fk_account = ba.rowid AND b.rowid = ".$rowid; - dolibarr_syslog("AccountLine::fetch sql=".$sql); + dol_syslog("AccountLine::fetch sql=".$sql); $result = $this->db->query($sql); if ($result) { @@ -870,7 +870,7 @@ class AccountLine } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); return -1; } } @@ -895,17 +895,17 @@ class AccountLine $this->db->begin(); $sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_class WHERE lineid=".$this->rowid; - dolibarr_syslog("AccountLine::delete sql=".$sql); + dol_syslog("AccountLine::delete sql=".$sql); $result = $this->db->query($sql); if (! $result) $nbko++; $sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_url WHERE fk_bank=".$this->rowid; - dolibarr_syslog("AccountLine::delete sql=".$sql); + dol_syslog("AccountLine::delete sql=".$sql); $result = $this->db->query($sql); if (! $result) $nbko++; $sql = "DELETE FROM ".MAIN_DB_PREFIX."bank WHERE rowid=".$this->rowid; - dolibarr_syslog("AccountLine::delete sql=".$sql); + dol_syslog("AccountLine::delete sql=".$sql); $result = $this->db->query($sql); if (! $result) $nbko++; @@ -1036,7 +1036,7 @@ class AccountLine } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); } } diff --git a/htdocs/compta/bank/account.php b/htdocs/compta/bank/account.php index 10c40200ebd74db0a4896b32d90030d0290b78b2..0f97d1692ed17989fe7c787adf986503908fd3e2 100644 --- a/htdocs/compta/bank/account.php +++ b/htdocs/compta/bank/account.php @@ -75,7 +75,7 @@ if ($_POST["action"] == 'add' && $account && ! isset($_POST["cancel"]) && $user- $amount = - price2num($_POST["debit"]); } - $dateop = dolibarr_mktime(12,0,0,$_POST["opmonth"],$_POST["opday"],$_POST["opyear"]); + $dateop = dol_mktime(12,0,0,$_POST["opmonth"],$_POST["opday"],$_POST["opyear"]); $operation=$_POST["operation"]; $num_chq=$_POST["num_chq"]; $label=$_POST["label"]; @@ -96,7 +96,7 @@ if ($_POST["action"] == 'add' && $account && ! isset($_POST["cancel"]) && $user- } else { - dolibarr_print_error($db,$acct->error); + dol_print_error($db,$acct->error); } } else @@ -209,7 +209,7 @@ if ($account || $_GET["ref"]) $sql.= " WHERE b.fk_account=".$acct->id; $sql.= $sql_rech; - dolibarr_syslog("account.php count transactions - sql=".$sql); + dol_syslog("account.php count transactions - sql=".$sql); $result=$db->query($sql); if ($result) { @@ -229,7 +229,7 @@ if ($account || $_GET["ref"]) $db->free($result); } else { - dolibarr_print_error($db); + dol_print_error($db); } if ($page > 0) @@ -249,7 +249,7 @@ if ($account || $_GET["ref"]) // Onglets $head=bank_prepare_head($acct); - dolibarr_fiche_head($head,'journal',$langs->trans("FinancialAccount"),0); + dol_fiche_head($head,'journal',$langs->trans("FinancialAccount"),0); print '<table class="border" width="100%">'; @@ -439,7 +439,7 @@ if ($account || $_GET["ref"]) $sql.= " ORDER BY b.datev ASC"; $sql.= $db->plimit($limitsql, 0); - dolibarr_syslog("account.php get transactions - sql=".$sql); + dol_syslog("account.php get transactions - sql=".$sql); $result = $db->query($sql); if ($result) { @@ -470,9 +470,9 @@ if ($account || $_GET["ref"]) print "<tr $bc[$var]>"; - print "<td nowrap>".dolibarr_print_date($objp->do,"day")."</td>\n"; + print "<td nowrap>".dol_print_date($objp->do,"day")."</td>\n"; - print "<td nowrap> ".dolibarr_print_date($objp->dv,"day")."</td>\n"; + print "<td nowrap> ".dol_print_date($objp->dv,"day")."</td>\n"; print "<td nowrap> ".$langs->trans($objp->fk_type)." ".($objp->num_chq?$objp->num_chq:"")."</td>\n"; @@ -498,7 +498,7 @@ if ($account || $_GET["ref"]) } else { - print dolibarr_trunc($objp->label,60); + print dol_trunc($objp->label,60); } } @@ -671,7 +671,7 @@ if ($account || $_GET["ref"]) } else { - dolibarr_print_error($db); + dol_print_error($db); } diff --git a/htdocs/compta/bank/annuel.php b/htdocs/compta/bank/annuel.php index 05f8762ce20a61385f8e7f1594f0020787dcd542..5e4c9e941462b560434407126350e44558a4974b 100644 --- a/htdocs/compta/bank/annuel.php +++ b/htdocs/compta/bank/annuel.php @@ -90,7 +90,7 @@ if ($resql) } else { - dolibarr_print_error($db); + dol_print_error($db); } $sql = "SELECT sum(f.amount), date_format(f.dateo,'%Y-%m') as dm"; @@ -112,13 +112,13 @@ if ($resql) } else { - dolibarr_print_error($db); + dol_print_error($db); } // Onglets $head=bank_prepare_head($acct); -dolibarr_fiche_head($head,'annual',$langs->trans("FinancialAccount"),0); +dol_fiche_head($head,'annual',$langs->trans("FinancialAccount"),0); $title=$langs->trans("FinancialAccount")." : ".$acct->label; $lien=($year_start?"<a href='".$_SERVER["PHP_SELF"]."?account=".$acct->id."&year_start=".($year_start-1)."'>".img_previous()."</a> ".$langs->trans("Year")." <a href='".$_SERVER["PHP_SELF"]."?account=".$acct->id."&year_start=".($year_start+1)."'>".img_next()."</a>":""); @@ -192,7 +192,7 @@ for ($mois = 1 ; $mois < 13 ; $mois++) { $var=!$var; print '<tr '.$bc[$var].'>'; - print "<td>".dolibarr_print_date(dolibarr_mktime(1,1,1,$mois,1,2000),"%B")."</td>"; + print "<td>".dol_print_date(dol_mktime(1,1,1,$mois,1,2000),"%B")."</td>"; for ($annee = $year_start ; $annee <= $year_end ; $annee++) { $case = sprintf("%04s-%02s",$annee,$mois); @@ -245,7 +245,7 @@ if ($resql) if ($obj) $balance=$obj->total; } else { - dolibarr_print_error($db); + dol_print_error($db); } print '<tr class="liste_total"><td><b>'.$langs->trans("CurrentBalance")."</b></td>"; print '<td colspan="'.($nbcol).'" align="right">'.price($balance).'</td>'; diff --git a/htdocs/compta/bank/bankcateg.class.php b/htdocs/compta/bank/bankcateg.class.php index 92f989ca9edf677111dc90048eb2290bb2797c6c..c7e230fac2cc2fe1a27fa6c8057586b970be2439 100644 --- a/htdocs/compta/bank/bankcateg.class.php +++ b/htdocs/compta/bank/bankcateg.class.php @@ -97,7 +97,7 @@ class BankCateg // extends CommonObject $this->db->begin(); - dolibarr_syslog(get_class($this)."::create sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::create sql=".$sql, LOG_DEBUG); $resql=$this->db->query($sql); if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); } @@ -124,7 +124,7 @@ class BankCateg // extends CommonObject { foreach($this->errors as $errmsg) { - dolibarr_syslog(get_class($this)."::create ".$errmsg, LOG_ERR); + dol_syslog(get_class($this)."::create ".$errmsg, LOG_ERR); $this->error.=($this->error?', '.$errmsg:$errmsg); } $this->db->rollback(); @@ -155,7 +155,7 @@ class BankCateg // extends CommonObject $sql.= " FROM ".MAIN_DB_PREFIX."bank_categ as t"; $sql.= " WHERE t.rowid = ".$id; - dolibarr_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -176,7 +176,7 @@ class BankCateg // extends CommonObject else { $this->error="Error ".$this->db->lasterror(); - dolibarr_syslog(get_class($this)."::fetch ".$this->error, LOG_ERR); + dol_syslog(get_class($this)."::fetch ".$this->error, LOG_ERR); return -1; } } @@ -212,7 +212,7 @@ class BankCateg // extends CommonObject $this->db->begin(); - dolibarr_syslog(get_class($this)."::update sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::update sql=".$sql, LOG_DEBUG); $resql = $this->db->query($sql); if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); } @@ -237,7 +237,7 @@ class BankCateg // extends CommonObject { foreach($this->errors as $errmsg) { - dolibarr_syslog(get_class($this)."::update ".$errmsg, LOG_ERR); + dol_syslog(get_class($this)."::update ".$errmsg, LOG_ERR); $this->error.=($this->error?', '.$errmsg:$errmsg); } $this->db->rollback(); @@ -267,7 +267,7 @@ class BankCateg // extends CommonObject $this->db->begin(); - dolibarr_syslog(get_class($this)."::delete sql=".$sql); + dol_syslog(get_class($this)."::delete sql=".$sql); $resql = $this->db->query($sql); if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); } @@ -292,7 +292,7 @@ class BankCateg // extends CommonObject { foreach($this->errors as $errmsg) { - dolibarr_syslog(get_class($this)."::delete ".$errmsg, LOG_ERR); + dol_syslog(get_class($this)."::delete ".$errmsg, LOG_ERR); $this->error.=($this->error?', '.$errmsg:$errmsg); } $this->db->rollback(); diff --git a/htdocs/compta/bank/bankid_fr.php b/htdocs/compta/bank/bankid_fr.php index 5f3b6bfd4d954c13fe819d2a31f4e653a146e87c..a2e89084809d5ac7d91059dfae0887410ac4594c 100644 --- a/htdocs/compta/bank/bankid_fr.php +++ b/htdocs/compta/bank/bankid_fr.php @@ -112,7 +112,7 @@ if (($_GET["id"] || $_GET["ref"]) && $_GET["action"] != 'edit') */ // Onglets $head=bank_prepare_head($account); - dolibarr_fiche_head($head, 'bankid', $langs->trans("FinancialAccount")); + dol_fiche_head($head, 'bankid', $langs->trans("FinancialAccount")); /* * Confirmation de la suppression diff --git a/htdocs/compta/bank/budget.php b/htdocs/compta/bank/budget.php index 6e40d5362efde755aae858202034e4690b593f14..359ae48329c05595a307531c0d9fcec796130b28 100644 --- a/htdocs/compta/bank/budget.php +++ b/htdocs/compta/bank/budget.php @@ -85,7 +85,7 @@ if ($result) } else { - dolibarr_print_error($db); + dol_print_error($db); } print "</table>"; diff --git a/htdocs/compta/bank/categ.php b/htdocs/compta/bank/categ.php index b711311e91e4e5d1a706351dc41f552c5adbe72e..1018fd19ac80d2dde61a37d6743f90a33a6eb206 100644 --- a/htdocs/compta/bank/categ.php +++ b/htdocs/compta/bank/categ.php @@ -43,7 +43,7 @@ if ($_POST["action"] == 'add') if (!$result) { - dolibarr_print_error($db); + dol_print_error($db); } } } @@ -60,7 +60,7 @@ if ( $_REQUEST['action'] == 'delete' ) if (!$result) { - dolibarr_print_error($db); + dol_print_error($db); } } } diff --git a/htdocs/compta/bank/fiche.php b/htdocs/compta/bank/fiche.php index e00f60bc9ee137d50833062b53d8f0b88af5b497..f0a50c8cf6c3b8a440f02102a1121847a0e2d611 100644 --- a/htdocs/compta/bank/fiche.php +++ b/htdocs/compta/bank/fiche.php @@ -52,7 +52,7 @@ if ($_POST["action"] == 'add') $account->account_number = trim($_POST["account_number"]); $account->solde = $_POST["solde"]; - $account->date_solde = dolibarr_mktime(12,0,0,$_POST["remonth"],$_POST["reday"],$_POST["reyear"]); + $account->date_solde = dol_mktime(12,0,0,$_POST["remonth"],$_POST["reday"],$_POST["reyear"]); $account->currency_code = trim($_POST["account_currency_code"]); $account->country_code = trim($_POST["account_country_code"]); @@ -275,7 +275,7 @@ else // Onglets $head=bank_prepare_head($account); - dolibarr_fiche_head($head, 'bankname', $langs->trans("FinancialAccount")); + dol_fiche_head($head, 'bankname', $langs->trans("FinancialAccount")); /* * Confirmation de la suppression diff --git a/htdocs/compta/bank/graph.php b/htdocs/compta/bank/graph.php index 0279ffc052a11d310129b79c0e4bb47ecc87c9f4..9ad632ff1c97ca1fa294c291ae348d489cecca80 100644 --- a/htdocs/compta/bank/graph.php +++ b/htdocs/compta/bank/graph.php @@ -54,9 +54,9 @@ if (! empty($_GET["lib"])) $conf->global->MAIN_GRAPH_LIBRARY=$_GET["lib"]; $datetime = time(); -$year = dolibarr_print_date($datetime, "%Y"); -$month = dolibarr_print_date($datetime, "%m"); -$day = dolibarr_print_date($datetime, "%d"); +$year = dol_print_date($datetime, "%Y"); +$month = dol_print_date($datetime, "%m"); +$day = dol_print_date($datetime, "%d"); if (! empty($_GET["year"])) $year=sprintf("%04d",$_GET["year"]); if (! empty($_GET["month"])) $month=sprintf("%02d",$_GET["month"]); @@ -100,10 +100,10 @@ else } else { - dolibarr_print_error($db); + dol_print_error($db); } $log="graph.php: min=".$min." max=".$max; - dolibarr_syslog($log); + dol_syslog($log); // Tableau 1 @@ -135,7 +135,7 @@ else } else { - dolibarr_print_error($db); + dol_print_error($db); } // Calcul de $solde avant le debut du graphe @@ -153,7 +153,7 @@ else } else { - dolibarr_print_error($db); + dol_print_error($db); } // Chargement de labels et datas pour tableau 1 @@ -162,7 +162,7 @@ else $datamin = array(); $subtotal = 0; - $day = dolibarr_mktime(12,0,0,$month,1,$year); + $day = dol_mktime(12,0,0,$month,1,$year); $textdate = strftime("%Y%m%d",$day); $xyear = substr($textdate,0,4); $xday = substr($textdate,6,2); @@ -261,7 +261,7 @@ else } else { - dolibarr_print_error($db); + dol_print_error($db); } // Calcul de $solde avant le debut du graphe @@ -279,7 +279,7 @@ else } else { - dolibarr_print_error($db); + dol_print_error($db); } // Chargement de labels et datas pour tableau 2 @@ -289,7 +289,7 @@ else $subtotal = 0; $now = time(); - $day = dolibarr_mktime(12,0,0,1,1,$year); + $day = dol_mktime(12,0,0,1,1,$year); $textdate = strftime("%Y%m%d",$day); $xyear = substr($textdate,0,4); $xday = substr($textdate,6,2); @@ -309,7 +309,7 @@ else $datamin[$i] = $acct->min_desired; if ($xday == '15') { - $labels[$i] = dolibarr_print_date($day,"%b"); + $labels[$i] = dol_print_date($day,"%b"); } $day += 86400; $textdate = strftime("%Y%m%d",$day); @@ -378,7 +378,7 @@ else } else { - dolibarr_print_error($db); + dol_print_error($db); } // Calcul de $solde avant le debut du graphe @@ -481,7 +481,7 @@ else } else { - dolibarr_print_error($db); + dol_print_error($db); } $sql = "SELECT date_format(datev,'%d'), sum(amount)"; $sql .= " FROM ".MAIN_DB_PREFIX."bank"; @@ -503,7 +503,7 @@ else } else { - dolibarr_print_error($db); + dol_print_error($db); } @@ -579,7 +579,7 @@ else } else { - dolibarr_print_error($db); + dol_print_error($db); } $sql = "SELECT date_format(datev,'%m'), sum(amount)"; $sql .= " FROM ".MAIN_DB_PREFIX."bank"; @@ -599,7 +599,7 @@ else } else { - dolibarr_print_error($db); + dol_print_error($db); } @@ -611,7 +611,7 @@ else { $data_credit[$i] = isset($credits[substr("0".($i+1),-2)]) ? $credits[substr("0".($i+1),-2)] : 0; $data_debit[$i] = isset($debits[substr("0".($i+1),-2)]) ? $debits[substr("0".($i+1),-2)] : 0; - $labels[$i] = dolibarr_print_date(dolibarr_mktime(12,0,0,$i+1,1,2000),"%b"); + $labels[$i] = dol_print_date(dol_mktime(12,0,0,$i+1,1,2000),"%b"); $datamin[$i] = $acct->min_desired; } @@ -650,7 +650,7 @@ else // Onglets $head=bank_prepare_head($acct); -dolibarr_fiche_head($head,'graph',$langs->trans("FinancialAccount"),0); +dol_fiche_head($head,'graph',$langs->trans("FinancialAccount"),0); if ($mesg) print $mesg.'<br>'; diff --git a/htdocs/compta/bank/info.php b/htdocs/compta/bank/info.php index 89563dd2fcde7f1f4f9a05867ec669745da33fb6..87de14ce12f42dfa92ac44def2f3221a3feb2ee6 100644 --- a/htdocs/compta/bank/info.php +++ b/htdocs/compta/bank/info.php @@ -55,7 +55,7 @@ $hselected = $h; $h++; -dolibarr_fiche_head($head, $hselected, $langs->trans("LineRecord")); +dol_fiche_head($head, $hselected, $langs->trans("LineRecord")); print '<table width="100%"><tr><td>'; dol_print_object_info($line); diff --git a/htdocs/compta/bank/ligne.php b/htdocs/compta/bank/ligne.php index 7754e26b9be5d164001403fd0f66a41d9c3af841..0f682cd6f186fd72989b1c1a75cad1df9979559c 100644 --- a/htdocs/compta/bank/ligne.php +++ b/htdocs/compta/bank/ligne.php @@ -63,7 +63,7 @@ if ($_POST["action"] == 'confirm_delete_categ' && $_POST["confirm"] == "yes") $sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_class WHERE lineid = $rowid AND fk_categ = ".$_GET["cat1"]; if (! $db->query($sql)) { - dolibarr_print_error($db); + dol_print_error($db); } } @@ -72,13 +72,13 @@ if ($_POST["action"] == 'class') $sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_class WHERE lineid = $rowid AND fk_categ = ".$_POST["cat1"]; if (! $db->query($sql)) { - dolibarr_print_error($db); + dol_print_error($db); } $sql = "INSERT INTO ".MAIN_DB_PREFIX."bank_class (lineid, fk_categ) VALUES (".$_GET["rowid"].", ".$_POST["cat1"].")"; if (! $db->query($sql)) { - dolibarr_print_error($db); + dol_print_error($db); } } @@ -114,7 +114,7 @@ if ($_POST["action"] == "update") else { $db->rollback(); - dolibarr_print_error($db); + dol_print_error($db); } } @@ -156,7 +156,7 @@ if ($user->rights->banque->consolidate && $_POST["action"] == 'num_releve') else { $db->rollback(); - dolibarr_print_error($db); + dol_print_error($db); } } @@ -200,7 +200,7 @@ $head[$h][0] = DOL_URL_ROOT.'/compta/bank/info.php?rowid='.$_GET["rowid"]; $head[$h][1] = $langs->trans("Info"); $h++; -dolibarr_fiche_head($head, $hselected, $langs->trans('LineRecord')); +dol_fiche_head($head, $hselected, $langs->trans('LineRecord')); $sql = "SELECT b.rowid,".$db->pdate("b.dateo")." as do,".$db->pdate("b.datev")." as dv, b.amount, b.label, b.rappro,"; @@ -279,7 +279,7 @@ if ($result) else { print '<td colspan="4">'; - print dolibarr_print_date($objp->do); + print dol_print_date($objp->do); } print '</td></tr>'; @@ -300,7 +300,7 @@ if ($result) else { print '<td colspan="4">'; - print dolibarr_print_date($objp->dv,"day"); + print dol_print_date($objp->dv,"day"); print '</td>'; } print "</tr>"; diff --git a/htdocs/compta/bank/rappro.php b/htdocs/compta/bank/rappro.php index 3f3f19d6e45bc5dd55aa5e2fdb54ecc4d608730e..1dc10c8dd31d1114df37a8858ab22bb06c72f3c6 100644 --- a/htdocs/compta/bank/rappro.php +++ b/htdocs/compta/bank/rappro.php @@ -81,7 +81,7 @@ if ($_GET["action"] == 'del') $result=$accline->delete(); if ($result < 0) { - dolibarr_print_error($db,$accline->error); + dol_print_error($db,$accline->error); } } @@ -159,7 +159,7 @@ if ($resql) } else { - dolibarr_print_error($db); + dol_print_error($db); } print '<table class="border" width="100%">'; @@ -188,13 +188,13 @@ if ($resql) print "<input type=\"hidden\" name=\"rowid\" value=\"".$objp->rowid."\">"; // Date op - print '<td align="center" nowrap="nowrap">'.dolibarr_print_date($objp->do,"day").'</td>'; + print '<td align="center" nowrap="nowrap">'.dol_print_date($objp->do,"day").'</td>'; // Date value if (! $objp->rappro && ($user->rights->banque->modifier || $user->rights->banque->consolidate)) { print '<td align="center" nowrap="nowrap">'; - print dolibarr_print_date($objp->dv,"day"); + print dol_print_date($objp->dv,"day"); print ' '; print '<a href="'.$_SERVER['PHP_SELF'].'?action=dvprev&account='.$_GET["account"].'&rowid='.$objp->rowid.'">'; print img_edit_remove() . "</a> "; @@ -205,7 +205,7 @@ if ($resql) else { print '<td align="center">'; - print dolibarr_print_date($objp->dv,"day"); + print dol_print_date($objp->dv,"day"); print '</td>'; } @@ -255,7 +255,7 @@ if ($resql) elseif ($links[$key]['type']=='company') { print '<a href="'.$links[$key]['url'].$links[$key]['url_id'].'">'; print img_object($langs->trans('ShowCustomer'),'company').' '; - print dolibarr_trunc($links[$key]['label'],24); + print dol_trunc($links[$key]['label'],24); print '</a>'; $newline=0; } @@ -369,7 +369,7 @@ if ($resql) } else { - dolibarr_print_error($db); + dol_print_error($db); } $db->close(); diff --git a/htdocs/compta/bank/releve.php b/htdocs/compta/bank/releve.php index affa50ee2250a221745c5790def49315a29a6159..b4ea48a5125a6e05c056c6b2208cf07e73c403d3 100644 --- a/htdocs/compta/bank/releve.php +++ b/htdocs/compta/bank/releve.php @@ -99,7 +99,7 @@ if (! isset($_GET["num"])) // Onglets $head=bank_prepare_head($acct); - dolibarr_fiche_head($head,'statement',$langs->trans("FinancialAccount"),0); + dol_fiche_head($head,'statement',$langs->trans("FinancialAccount"),0); print '<table class="border" width="100%">'; @@ -146,7 +146,7 @@ if (! isset($_GET["num"])) } else { - dolibarr_print_error($db); + dol_print_error($db); } } else @@ -264,13 +264,13 @@ else print "<tr $bc[$var]>"; // Date operation - print '<td nowrap="nowrap" align="center">'.dolibarr_print_date($objp->do,"day").'</td>'; + print '<td nowrap="nowrap" align="center">'.dol_print_date($objp->do,"day").'</td>'; // Date de valeur print '<td align="center" valign="center" nowrap="nowrap">'; print '<a href="releve.php?action=dvprev&num='.$num.'&account='.$_GET["account"].'&dvid='.$objp->rowid.'">'; print img_previous().'</a> '; - print dolibarr_print_date($objp->dv,"day") .' '; + print dol_print_date($objp->dv,"day") .' '; print '<a href="releve.php?action=dvnext&num='.$num.'&account='.$_GET["account"].'&dvid='.$objp->rowid.'">'; print img_next().'</a>'; print "</td>\n"; @@ -313,7 +313,7 @@ else elseif ($links[$key]['type']=='company') { print '<a href="'.DOL_URL_ROOT.'/soc.php?socid='.$links[$key]['url_id'].'">'; print img_object($langs->trans('ShowCustomer'),'company').' '; - print dolibarr_trunc($links[$key]['label'],24); + print dol_trunc($links[$key]['label'],24); print '</a>'; $newline=0; } @@ -374,7 +374,7 @@ else } else { - dolibarr_print_error($db); + dol_print_error($db); } } diff --git a/htdocs/compta/bank/search.php b/htdocs/compta/bank/search.php index 47772ab380b1e78bb39eebf6800bd846186258c5..a66f3a68f31b82e03918638191a4b219c488bcc2 100644 --- a/htdocs/compta/bank/search.php +++ b/htdocs/compta/bank/search.php @@ -181,13 +181,13 @@ if ($resql) print '</td>'; // Date - print '<td align="left" nowrap="nowrap">'.dolibarr_print_date($db->jdate($objp->do),"day")." </td>\n"; + print '<td align="left" nowrap="nowrap">'.dol_print_date($db->jdate($objp->do),"day")." </td>\n"; print "<td><a href=\"ligne.php?rowid=$objp->rowid&account=$objp->fk_account\">"; $reg=array(); eregi('\((.+)\)',$objp->label,$reg); // Si texte entour� de parenth�e on tente recherche de traduction if ($reg[1] && $langs->trans($reg[1])!=$reg[1]) print $langs->trans($reg[1]); - else print dolibarr_trunc($objp->label,40); + else print dol_trunc($objp->label,40); print "</a> "; // Third party @@ -234,7 +234,7 @@ if ($resql) } else { - dolibarr_print_error($db); + dol_print_error($db); } // Si acc�s issu d'une recherche et rien de trouv� diff --git a/htdocs/compta/bank/treso.php b/htdocs/compta/bank/treso.php index 557f6d0a4d9c565109fc00556edb258abcfb1824..eace637a5d6d5e646f00197ed4df2f88e0104046 100644 --- a/htdocs/compta/bank/treso.php +++ b/htdocs/compta/bank/treso.php @@ -87,7 +87,7 @@ if ($_REQUEST["account"] || $_REQUEST["ref"]) */ // Onglets $head=bank_prepare_head($acct); - dolibarr_fiche_head($head,'cash',$langs->trans("FinancialAccount"),0); + dol_fiche_head($head,'cash',$langs->trans("FinancialAccount"),0); print '<table class="border" width="100%">'; @@ -293,7 +293,7 @@ if ($_REQUEST["account"] || $_REQUEST["ref"]) $solde += $total_ttc; print "<tr $bc[$var]>"; - print '<td>'.dolibarr_print_date($obj->dlr,"day")."</td>"; + print '<td>'.dol_print_date($obj->dlr,"day")."</td>"; print "<td>".$ref."</td>"; print "<td>".$refcomp."</td>"; if ($obj->total_ttc < 0) { print "<td align=\"right\">".price($total_ttc)."</td><td> </td>"; }; @@ -305,7 +305,7 @@ if ($_REQUEST["account"] || $_REQUEST["ref"]) } else { - dolibarr_print_error($db); + dol_print_error($db); } // Solde actuel diff --git a/htdocs/compta/bank/virement.php b/htdocs/compta/bank/virement.php index 1e15f017fd741d54658ded8b4c8a3074bc88f113..edc13845d411f1149856806fc0ad5683f42f86c9 100644 --- a/htdocs/compta/bank/virement.php +++ b/htdocs/compta/bank/virement.php @@ -41,7 +41,7 @@ if ($_POST["action"] == 'add') $langs->load("errors"); $mesg=''; - $dateo = dolibarr_mktime(12,0,0,$_POST["remonth"],$_POST["reday"],$_POST["reyear"]); + $dateo = dol_mktime(12,0,0,$_POST["remonth"],$_POST["reday"],$_POST["reyear"]); $label = $_POST["label"]; $amount= $_POST["amount"]; diff --git a/htdocs/compta/charges/index.php b/htdocs/compta/charges/index.php index 0d3a105fc5a43152579190df9dc9b81f74751b26..00475c92fe73bd982a4593b836b196d53bb790b1 100644 --- a/htdocs/compta/charges/index.php +++ b/htdocs/compta/charges/index.php @@ -104,7 +104,7 @@ if ($resql) } else { - dolibarr_print_error($db); + dol_print_error($db); } print '</table>'; @@ -147,7 +147,7 @@ if (empty($_GET["mode"]) || $_GET["mode"] != 'sconly') $obj = $db->fetch_object($result); $var=!$var; print "<tr $bc[$var]>"; - print '<td align="left">'.dolibarr_print_date($obj->dm,'day')."</td>\n"; + print '<td align="left">'.dol_print_date($obj->dm,'day')."</td>\n"; print "<td>".$obj->label."</td>\n"; $total = $total + $obj->amount; @@ -164,7 +164,7 @@ if (empty($_GET["mode"]) || $_GET["mode"] != 'sconly') } else { - dolibarr_print_error($db); + dol_print_error($db); } } diff --git a/htdocs/compta/clients.php b/htdocs/compta/clients.php index 090ba11bd1ab5e3652c94036804cd44767243fd9..abca12b441e973199cded496049c1e7dcde2f15f 100644 --- a/htdocs/compta/clients.php +++ b/htdocs/compta/clients.php @@ -202,7 +202,7 @@ if ($result) print '<td>'.$obj->ville.' </td>'; print '<td align="left">'.$obj->code_client.' </td>'; print '<td align="left">'.$obj->code_compta.' </td>'; - print '<td align="right">'.dolibarr_print_date($obj->datec).'</td>'; + print '<td align="right">'.dol_print_date($obj->datec).'</td>'; print "</tr>\n"; $i++; } @@ -214,7 +214,7 @@ if ($result) } else { - dolibarr_print_error($db); + dol_print_error($db); } $db->close(); diff --git a/htdocs/compta/commande/fiche.php b/htdocs/compta/commande/fiche.php index 1de2310460388d473e17ab6951ffd713ff926e3e..01ac0e1f4c6541c02660d187767aabdbd4cc3f7b 100644 --- a/htdocs/compta/commande/fiche.php +++ b/htdocs/compta/commande/fiche.php @@ -70,7 +70,7 @@ if ($_POST['action'] == 'set_ref_client' && $user->rights->commande->creer) if ($_POST['action'] == 'setdate_livraison' && $user->rights->commande->creer) { //print "x ".$_POST['liv_month'].", ".$_POST['liv_day'].", ".$_POST['liv_year']; - $datelivraison=dolibarr_mktime(0, 0, 0, $_POST['liv_month'], $_POST['liv_day'], $_POST['liv_year']); + $datelivraison=dol_mktime(0, 0, 0, $_POST['liv_month'], $_POST['liv_day'], $_POST['liv_year']); $commande = new Commande($db); $commande->fetch($_GET['id']); @@ -93,7 +93,7 @@ if ($_POST['action'] == 'setmode' && $user->rights->commande->creer) $commande = new Commande($db); $commande->fetch($_GET['id']); $result=$commande->mode_reglement($_POST['mode_reglement_id']); - if ($result < 0) dolibarr_print_error($db,$commande->error); + if ($result < 0) dol_print_error($db,$commande->error); } if ($_POST['action'] == 'setconditions' && $user->rights->commande->creer) @@ -101,7 +101,7 @@ if ($_POST['action'] == 'setconditions' && $user->rights->commande->creer) $commande = new Commande($db); $commande->fetch($_GET['id']); $result=$commande->cond_reglement($_POST['cond_reglement_id']); - if ($result < 0) dolibarr_print_error($db,$commande->error); + if ($result < 0) dol_print_error($db,$commande->error); } @@ -129,7 +129,7 @@ if ($id > 0 || ! empty($ref)) $author->fetch(); $head = commande_prepare_head($commande); - dolibarr_fiche_head($head, 'accountancy', $langs->trans("CustomerOrder")); + dol_fiche_head($head, 'accountancy', $langs->trans("CustomerOrder")); /* * Commande @@ -205,7 +205,7 @@ if ($id > 0 || ! empty($ref)) // Date print '<tr><td>'.$langs->trans('Date').'</td>'; - print '<td colspan="2">'.dolibarr_print_date($commande->date,'daytext').'</td>'; + print '<td colspan="2">'.dol_print_date($commande->date,'daytext').'</td>'; print '<td width="50%">'.$langs->trans('Source').' : '.$commande->getLabelSource(); if ($commande->source == 0 && $conf->propal->enabled) { @@ -236,7 +236,7 @@ if ($id > 0 || ! empty($ref)) } else { - print dolibarr_print_date($commande->date_livraison,'daytext'); + print dol_print_date($commande->date_livraison,'daytext'); } print '</td>'; print '<td rowspan="'.$nbrow.'" valign="top">'.$langs->trans('NotePublic').' :<br>'; @@ -468,7 +468,7 @@ if ($id > 0 || ! empty($ref)) } else { - dolibarr_print_error($db); + dol_print_error($db); } print '</table>'; @@ -543,7 +543,7 @@ if ($id > 0 || ! empty($ref)) $var=!$var; print "<tr $bc[$var]>"; print '<td><a href="../facture.php?facid='.$objp->rowid.'">'.img_object($langs->trans("ShowBill"),"bill").' '.$objp->facnumber.'</a></td>'; - print '<td align="center">'.dolibarr_print_date($objp->df).'</td>'; + print '<td align="center">'.dol_print_date($objp->df).'</td>'; print '<td align="right">'.$objp->total_ttc.'</td></tr>'; $i++; } @@ -552,7 +552,7 @@ if ($id > 0 || ! empty($ref)) } else { - dolibarr_print_error($db); + dol_print_error($db); } print '</td><td valign="top" width="50%">'; diff --git a/htdocs/compta/commande/liste.php b/htdocs/compta/commande/liste.php index d0194da62b0481b58143fdec6027896422e9adf1..c0773de49b431ee21790488dfd5bd0df7f216e62 100644 --- a/htdocs/compta/commande/liste.php +++ b/htdocs/compta/commande/liste.php @@ -166,10 +166,10 @@ if ($resql) print "</td>"; print "<td align=\"center\">"; - $y = dolibarr_print_date($objp->date_commande,"%Y"); - $m = dolibarr_print_date($objp->date_commande,"%m"); - $mt = dolibarr_print_date($objp->date_commande,"%b"); - $d = dolibarr_print_date($objp->date_commande,"%d"); + $y = dol_print_date($objp->date_commande,"%Y"); + $m = dol_print_date($objp->date_commande,"%m"); + $mt = dol_print_date($objp->date_commande,"%b"); + $d = dol_print_date($objp->date_commande,"%d"); print $d."\n"; print " <a href=\"liste.php?year=$y&month=$m\">"; print $mt."</a>\n"; @@ -190,7 +190,7 @@ if ($resql) } else { - print dolibarr_print_error($db); + print dol_print_error($db); } diff --git a/htdocs/compta/comptacompte.class.php b/htdocs/compta/comptacompte.class.php index 3cd4328196dbe5f45c98612468f676044757a0d5..a0bf2840dba95f92281428637f534d5aa0400750 100644 --- a/htdocs/compta/comptacompte.class.php +++ b/htdocs/compta/comptacompte.class.php @@ -84,31 +84,31 @@ class ComptaCompte else { $result = -2; - dolibarr_syslog("ComptaCompte::Create Erreur $result lecture ID"); + dol_syslog("ComptaCompte::Create Erreur $result lecture ID"); } } else { $result = -1; - dolibarr_syslog("ComptaCompte::Create Erreur $result INSERT Mysql"); + dol_syslog("ComptaCompte::Create Erreur $result INSERT Mysql"); } } else { $result = -3; - dolibarr_syslog("ComptaCompte::Create Erreur $result SELECT Mysql"); + dol_syslog("ComptaCompte::Create Erreur $result SELECT Mysql"); } } else { $result = -5; - dolibarr_syslog("ComptaCompte::Create Erreur $result SELECT Mysql"); + dol_syslog("ComptaCompte::Create Erreur $result SELECT Mysql"); } } else { $result = -4; - dolibarr_syslog("ComptaCompte::Create Erreur $result Valeur Manquante"); + dol_syslog("ComptaCompte::Create Erreur $result Valeur Manquante"); } return $result; diff --git a/htdocs/compta/deplacement/deplacement.class.php b/htdocs/compta/deplacement/deplacement.class.php index b07b8a9987d4b18a80b0995aa47f2327b7e6f47a..b588b00d44761e8bfe4023e53203ae8394ce08ce 100644 --- a/htdocs/compta/deplacement/deplacement.class.php +++ b/htdocs/compta/deplacement/deplacement.class.php @@ -80,7 +80,7 @@ class Deplacement extends CommonObject $sql.= " (datec, fk_user_author, fk_user, type)"; $sql.= " VALUES (".$this->db->idate(mktime()).", ".$user->id.", ".$this->fk_user.", '".$this->type."')"; - dolibarr_syslog("Deplacement::create sql=".$sql, LOG_DEBUG); + dol_syslog("Deplacement::create sql=".$sql, LOG_DEBUG); $result = $this->db->query($sql); if ($result) { @@ -138,7 +138,7 @@ class Deplacement extends CommonObject $sql .= " , fk_soc = ".($this->socid > 0?$this->socid:'null'); $sql .= " WHERE rowid = ".$this->id; - dolibarr_syslog("Deplacement::update sql=".$sql, LOG_DEBUG); + dol_syslog("Deplacement::update sql=".$sql, LOG_DEBUG); $result = $this->db->query($sql); if ($result) { @@ -160,7 +160,7 @@ class Deplacement extends CommonObject $sql.= " FROM ".MAIN_DB_PREFIX."deplacement"; $sql.= " WHERE rowid = ".$id; - dolibarr_syslog("Deplacement::fetch sql=".$sql, LOG_DEBUG); + dol_syslog("Deplacement::fetch sql=".$sql, LOG_DEBUG); $result = $this->db->query($sql) ; if ( $result ) { diff --git a/htdocs/compta/deplacement/fiche.php b/htdocs/compta/deplacement/fiche.php index 4c22a2d04876b5d23d337ddbb7ccd6fa3e85fcc7..988e66baa005c0e05ad2f4418aea0ae97d526af5 100644 --- a/htdocs/compta/deplacement/fiche.php +++ b/htdocs/compta/deplacement/fiche.php @@ -52,7 +52,7 @@ if ($_POST["action"] == 'add' && $user->rights->deplacement->creer) { $deplacement = new Deplacement($db); - $deplacement->date = dolibarr_mktime(12, 0, 0, + $deplacement->date = dol_mktime(12, 0, 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]); @@ -89,7 +89,7 @@ if ($_POST["action"] == 'update' && $user->rights->deplacement->creer) $deplacement = new Deplacement($db); $result = $deplacement->fetch($_POST["id"]); - $deplacement->date = dolibarr_mktime(12, 0 , 0, + $deplacement->date = dol_mktime(12, 0 , 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]); @@ -183,7 +183,7 @@ else $head[$h][0] = DOL_URL_ROOT."/compta/deplacement/fiche.php?id=$deplacement->id"; $head[$h][1] = $langs->trans("Card"); - dolibarr_fiche_head($head, $hselected, $langs->trans("TripCard")); + dol_fiche_head($head, $hselected, $langs->trans("TripCard")); print "<form name='update' action=\"fiche.php\" method=\"post\">\n"; print '<input type="hidden" name="action" value="update">'; @@ -230,7 +230,7 @@ else $head[$h][0] = DOL_URL_ROOT."/compta/deplacement/fiche.php?id=$deplacement->id"; $head[$h][1] = $langs->trans("Card"); - dolibarr_fiche_head($head, $hselected, $langs->trans("TripCard")); + dol_fiche_head($head, $hselected, $langs->trans("TripCard")); /* * Confirmation de la suppression du d�placement @@ -268,7 +268,7 @@ else print '</td></tr>'; print '<tr><td>'.$langs->trans("Date").'</td><td>'; - print dolibarr_print_date($deplacement->date); + print dol_print_date($deplacement->date); print '</td></tr>'; print '<tr><td>'.$langs->trans("FeesKilometersOrAmout").'</td><td>'.$deplacement->km.'</td></tr>'; @@ -281,7 +281,7 @@ else } else { - dolibarr_print_error($db); + dol_print_error($db); } } } diff --git a/htdocs/compta/deplacement/index.php b/htdocs/compta/deplacement/index.php index 517beb81dfa075f3177dca8c65737760e3c8d7ed..4638173502e987da29b5b8a3e9dbb9ac3b6caf29 100644 --- a/htdocs/compta/deplacement/index.php +++ b/htdocs/compta/deplacement/index.php @@ -108,7 +108,7 @@ if ($resql) print "<tr $bc[$var]>"; print '<td><a href="fiche.php?id='.$objp->rowid.'">'.img_object($langs->trans("ShowTrip"),"trip").' '.$objp->rowid.'</a></td>'; print '<td>'.$langs->trans($objp->type).'</td>'; - print '<td>'.dolibarr_print_date($objp->dd,'day').'</td>'; + print '<td>'.dol_print_date($objp->dd,'day').'</td>'; if ($objp->socid) print '<td>'.$soc->getNomUrl(1).'</td>'; else print '<td> </td>'; print '<td align="left"><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$objp->rowid.'">'.img_object($langs->trans("ShowUser"),"user").' '.$objp->firstname.' '.$objp->name.'</a></td>'; @@ -123,7 +123,7 @@ if ($resql) } else { - dolibarr_print_error($db); + dol_print_error($db); } $db->close(); diff --git a/htdocs/compta/dons/fiche.php b/htdocs/compta/dons/fiche.php index 1c29b2967fdf9989617620692be95135fc91e856..efa2f8e6291a7733a6b77dd84d63eb40208910e4 100644 --- a/htdocs/compta/dons/fiche.php +++ b/htdocs/compta/dons/fiche.php @@ -178,7 +178,7 @@ if ($_REQUEST['action'] == 'builddoc') $result=don_create($db, $donation->id, '', $donation->modelpdf, $outputlangs); if ($result <= 0) { - dolibarr_print_error($db,$result); + dol_print_error($db,$result); exit; } else @@ -273,7 +273,7 @@ if ($_GET["rowid"] && $_GET["action"] == 'edit') $hselected=$h; $h++; - dolibarr_fiche_head($head, $hselected, $langs->trans("Ref")); + dol_fiche_head($head, $hselected, $langs->trans("Ref")); print '<form name="update" action="fiche.php" method="post">'; print '<table class="border" width="100%">'; @@ -317,7 +317,7 @@ if ($_GET["rowid"] && $_GET["action"] == 'edit') } else { - dolibarr_print_error($db); + dol_print_error($db); } print "</select><br>"; print "</td></tr>\n"; @@ -373,7 +373,7 @@ if ($_GET["rowid"] && $_GET["action"] != 'edit') $hselected=$h; $h++; - dolibarr_fiche_head($head, $hselected, $langs->trans("Ref").": ".$_GET["rowid"]); + dol_fiche_head($head, $hselected, $langs->trans("Ref").": ".$_GET["rowid"]); print "<form action=\"fiche.php\" method=\"post\">"; print '<table class="border" width="100%">'; @@ -386,7 +386,7 @@ if ($_GET["rowid"] && $_GET["action"] != 'edit') // Date print "<tr><td>".$langs->trans("Date")."</td><td>"; - print dolibarr_print_date($don->date,"day"); + print dol_print_date($don->date,"day"); print "</td>"; $nbrows=12; diff --git a/htdocs/compta/dons/index.php b/htdocs/compta/dons/index.php index 64771d3d02d8c5ba3d8015b670d1c841b09e1e15..1f62547fc75fd1c94b94fb527bc1b3752cbc797a 100644 --- a/htdocs/compta/dons/index.php +++ b/htdocs/compta/dons/index.php @@ -63,7 +63,7 @@ if ($result) } $db->free($result); } else { - dolibarr_print_error($db); + dol_print_error($db); } print_fiche_titre($langs->trans("DonationsArea")); diff --git a/htdocs/compta/dons/liste.php b/htdocs/compta/dons/liste.php index 17317ed3e26826383b3a51616b7114f42910b5e0..abc3fd1c052d9514f03b0b9d548983c43f8b6814 100644 --- a/htdocs/compta/dons/liste.php +++ b/htdocs/compta/dons/liste.php @@ -108,7 +108,7 @@ if ($result) print "<td>".stripslashes($objp->prenom)."</td>\n"; print "<td>".stripslashes($objp->nom)."</td>\n"; print "<td>".stripslashes($objp->societe)."</td>\n"; - print '<td align="center">'.dolibarr_print_date($objp->datedon).'</td>'; + print '<td align="center">'.dol_print_date($objp->datedon).'</td>'; if ($conf->projet->enabled) { print "<td>$objp->projet</td>\n"; } @@ -122,7 +122,7 @@ if ($result) } else { - dolibarr_print_error($db); + dol_print_error($db); } diff --git a/htdocs/compta/dons/stats.php b/htdocs/compta/dons/stats.php index 0dab88c86ea74cf39c21c5b7c904ee77a9733ec4..18330a813b13cdc429868242bf185b908aa38e83 100644 --- a/htdocs/compta/dons/stats.php +++ b/htdocs/compta/dons/stats.php @@ -75,7 +75,7 @@ if ($result) } else { - dolibarr_print_error($db); + dol_print_error($db); } diff --git a/htdocs/compta/export/liste.php b/htdocs/compta/export/liste.php index d873a9d4af325c3d85627f6b453e55dc61e9f3f9..f25ae417f5e833f2f3d18ef8102f2fd39aa9449c 100644 --- a/htdocs/compta/export/liste.php +++ b/htdocs/compta/export/liste.php @@ -89,7 +89,7 @@ if ($result) print "<tr $bc[$var]>"; print '<td>'.$obj->ref.'</td>'; - print '<td>'.dolibarr_print_date($obj->date_export,"dayhour").'</td>'; + print '<td>'.dol_print_date($obj->date_export,"dayhour").'</td>'; print '<td><a href="index.php?action=export&id='.$obj->rowid.'">'.$langs->trans("ReBuild").'</a></td>'; print "</tr>\n"; $i++; @@ -99,7 +99,7 @@ if ($result) } else { - dolibarr_print_error($db); + dol_print_error($db); } $db->close(); diff --git a/htdocs/compta/export/modules/compta.export.class.php b/htdocs/compta/export/modules/compta.export.class.php index 9c92c82b091e93f240e51ee9137a9026d0d72695..092224d68b7054662914d885a06998b025ca8548 100644 --- a/htdocs/compta/export/modules/compta.export.class.php +++ b/htdocs/compta/export/modules/compta.export.class.php @@ -58,7 +58,7 @@ class ComptaExport { global $langs; - dolibarr_syslog("ComptaExport::ReadLines id=".$id); + dol_syslog("ComptaExport::ReadLines id=".$id); $error = 0; @@ -134,7 +134,7 @@ class ComptaExport function ReadLinesPayment($id=0) { - dolibarr_syslog("ComptaExport::ReadLinesPayment id=".$id); + dol_syslog("ComptaExport::ReadLinesPayment id=".$id); $error = 0; $sql = "SELECT p.rowid as paymentid, f.facnumber"; @@ -209,13 +209,13 @@ class ComptaExport { $error = 0; - dolibarr_syslog("ComptaExport::Export"); + dol_syslog("ComptaExport::Export"); $error += $this->ReadLines($id); $error += $this->ReadLinesPayment($id); - dolibarr_syslog("ComptaExport::Export Lignes de factures : ".sizeof($this->linec)); - dolibarr_syslog("ComptaExport::Export Lignes de paiements : ".sizeof($this->linep)); + dol_syslog("ComptaExport::Export Lignes de factures : ".sizeof($this->linec)); + dol_syslog("ComptaExport::Export Lignes de paiements : ".sizeof($this->linep)); if (!$error && (sizeof($this->linec) > 0 || sizeof($this->linep) > 0)) { diff --git a/htdocs/compta/export/modules/compta.export.poivre.class.php b/htdocs/compta/export/modules/compta.export.poivre.class.php index c6d91d99a8bc077cdcc3e799f01d486c77e12690..47489d5af47a2f990298b04105e1c022c552f7f4 100644 --- a/htdocs/compta/export/modules/compta.export.poivre.class.php +++ b/htdocs/compta/export/modules/compta.export.poivre.class.php @@ -57,8 +57,8 @@ class ComptaExportPoivre extends ComptaExport */ function Agregate($line_in) { - dolibarr_syslog("ComptaExportPoivre::Agregate"); - dolibarr_syslog("ComptaExportPoivre::Agregate " . sizeof($line_in) . " lignes en entr�es"); + dol_syslog("ComptaExportPoivre::Agregate"); + dol_syslog("ComptaExportPoivre::Agregate " . sizeof($line_in) . " lignes en entr�es"); $i = 0; $j = 0; $n = sizeof($line_in); @@ -84,7 +84,7 @@ class ComptaExportPoivre extends ComptaExport } } - dolibarr_syslog("ComptaExportPoivre::Agregate " . sizeof($this->line_out) . " lignes en sorties"); + dol_syslog("ComptaExportPoivre::Agregate " . sizeof($this->line_out) . " lignes en sorties"); return 0; } @@ -96,8 +96,8 @@ class ComptaExportPoivre extends ComptaExport { $error = 0; - dolibarr_syslog("ComptaExportPoivre::Export"); - dolibarr_syslog("ComptaExportPoivre::Export " . sizeof($linec) . " lignes en entr�es"); + dol_syslog("ComptaExportPoivre::Export"); + dol_syslog("ComptaExportPoivre::Export " . sizeof($linec) . " lignes en entr�es"); $this->Agregate($linec); @@ -118,7 +118,7 @@ class ComptaExportPoivre extends ComptaExport else { $error++; - dolibarr_syslog("ComptaExportPoivre::Export Erreur Select"); + dol_syslog("ComptaExportPoivre::Export Erreur Select"); } @@ -136,7 +136,7 @@ class ComptaExportPoivre extends ComptaExport else { $error++; - dolibarr_syslog("ComptaExportPoivre::Export Erreur INSERT"); + dol_syslog("ComptaExportPoivre::Export Erreur INSERT"); } } } @@ -157,14 +157,14 @@ class ComptaExportPoivre extends ComptaExport else { $error++; - dolibarr_syslog("ComptaExportPoivre::Export Erreur Select"); + dol_syslog("ComptaExportPoivre::Export Erreur Select"); } } if (!$error) { - dolibarr_syslog("ComptaExportPoivre::Export ref : ".$this->ref); + dol_syslog("ComptaExportPoivre::Export ref : ".$this->ref); $fxname = $dir . "/".$this->ref.".xls"; @@ -358,12 +358,12 @@ class ComptaExportPoivre extends ComptaExport if (!$error) { $this->db->commit(); - dolibarr_syslog("ComptaExportPoivre::Export COMMIT"); + dol_syslog("ComptaExportPoivre::Export COMMIT"); } else { $this->db->rollback(); - dolibarr_syslog("ComptaExportPoivre::Export ROLLBACK"); + dol_syslog("ComptaExportPoivre::Export ROLLBACK"); } return 0; diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 9c1494489d199878ab6205e3ae3619f3f1460747..4d19d4a4d0501ed09c3c335a7fd2b29253a6344b 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -218,25 +218,25 @@ if ($_POST['action'] == 'setmode') $facture = new Facture($db); $facture->fetch($_GET['facid']); $result=$facture->mode_reglement($_POST['mode_reglement_id']); - if ($result < 0) dolibarr_print_error($facture->db,$facture->error); + if ($result < 0) dol_print_error($facture->db,$facture->error); } if ($_POST['action'] == 'setpaymentterm') { $facture = new Facture($db); $facture->fetch($_GET['facid']); - $date_lim_reglement=dolibarr_mktime(12,0,0,$_POST['paymenttermmonth'],$_POST['paymenttermday'],$_POST['paymenttermyear']); + $date_lim_reglement=dol_mktime(12,0,0,$_POST['paymenttermmonth'],$_POST['paymenttermday'],$_POST['paymenttermyear']); $result=$facture->cond_reglement($facture->cond_reglement_id,$date_lim_reglement); - if ($result < 0) dolibarr_print_error($facture->db,$facture->error); + if ($result < 0) dol_print_error($facture->db,$facture->error); } if ($_POST['action'] == 'setinvoicedate') { $facture = new Facture($db); $facture->fetch($_GET['facid']); - $facture->date=dolibarr_mktime(12,0,0,$_POST['invoicedatemonth'],$_POST['invoicedateday'],$_POST['invoicedateyear']); + $facture->date=dol_mktime(12,0,0,$_POST['invoicedatemonth'],$_POST['invoicedateday'],$_POST['invoicedateyear']); $result=$facture->update($user); - if ($result < 0) dolibarr_print_error($facture->db,$facture->error); + if ($result < 0) dol_print_error($facture->db,$facture->error); } if ($_POST['action'] == 'setconditions') @@ -244,7 +244,7 @@ if ($_POST['action'] == 'setconditions') $facture = new Facture($db); $facture->fetch($_GET['facid']); $result=$facture->cond_reglement($_POST['cond_reglement_id']); - if ($result < 0) dolibarr_print_error($facture->db,$facture->error); + if ($result < 0) dol_print_error($facture->db,$facture->error); } if ($_REQUEST['action'] == 'setremisepercent' && $user->rights->facture->creer) @@ -273,7 +273,7 @@ if ($_POST['action'] == "setabsolutediscount" && $user->rights->facture->creer) } else { - dolibarr_print_error($db,$fac->error); + dol_print_error($db,$fac->error); } } if (! empty($_POST["remise_id_for_payment"])) @@ -491,7 +491,7 @@ if ($_POST['action'] == 'add' && $user->rights->facture->creer) // Replacement invoice if ($_POST['type'] == 1) { - $datefacture = dolibarr_mktime(12, 0 , 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); + $datefacture = dol_mktime(12, 0 , 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); if (empty($datefacture)) { $error=1; @@ -537,7 +537,7 @@ if ($_POST['action'] == 'add' && $user->rights->facture->creer) $mesg='<div class="error">'.$langs->trans("ErrorFieldRequired",$langs->trans("CorrectInvoice")).'</div>'; } - $datefacture = dolibarr_mktime(12, 0 , 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); + $datefacture = dol_mktime(12, 0 , 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); if (empty($datefacture)) { $error=1; @@ -547,7 +547,7 @@ if ($_POST['action'] == 'add' && $user->rights->facture->creer) if (! $error) { // Si facture avoir - $datefacture = dolibarr_mktime(12, 0 , 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); + $datefacture = dol_mktime(12, 0 , 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); //$result=$facture->fetch($_POST['fac_avoir']); @@ -575,7 +575,7 @@ if ($_POST['action'] == 'add' && $user->rights->facture->creer) if ($_POST['type'] == 0 && $_POST['fac_rec'] > 0) { // Si facture r�currente - $datefacture = dolibarr_mktime(12, 0 , 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); + $datefacture = dol_mktime(12, 0 , 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); $facture->socid = $_POST['socid']; $facture->type = $_POST['type']; @@ -595,7 +595,7 @@ if ($_POST['action'] == 'add' && $user->rights->facture->creer) if ($_POST['type'] == 0 && $_POST['fac_rec'] <= 0) { - $datefacture = dolibarr_mktime(12, 0 , 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); + $datefacture = dol_mktime(12, 0 , 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); if (empty($datefacture)) { $error=1; @@ -627,8 +627,8 @@ if ($_POST['action'] == 'add' && $user->rights->facture->creer) { if ($_POST['idprod'.$i]) { - $startday=dolibarr_mktime(12, 0 , 0, $_POST['date_start'.$i.'month'], $_POST['date_start'.$i.'day'], $_POST['date_start'.$i.'year']); - $endday=dolibarr_mktime(12, 0 , 0, $_POST['date_end'.$i.'month'], $_POST['date_end'.$i.'day'], $_POST['date_end'.$i.'year']); + $startday=dol_mktime(12, 0 , 0, $_POST['date_start'.$i.'month'], $_POST['date_start'.$i.'day'], $_POST['date_start'.$i.'year']); + $endday=dol_mktime(12, 0 , 0, $_POST['date_end'.$i.'month'], $_POST['date_end'.$i.'day'], $_POST['date_end'.$i.'year']); $facture->add_product($_POST['idprod'.$i], $_POST['qty'.$i], $_POST['remise_percent'.$i], $startday, $endday); } } @@ -840,7 +840,7 @@ if (($_POST['action'] == 'addligne' || $_POST['action'] == 'addligne_predef') && $ret=$fac->fetch($_POST['facid']); if ($ret < 0) { - dolibarr_print_error($db,$fac->error); + dol_print_error($db,$fac->error); exit; } $ret=$fac->fetch_client(); @@ -955,7 +955,7 @@ if (($_POST['action'] == 'addligne' || $_POST['action'] == 'addligne_predef') && if ($_POST['action'] == 'updateligne' && $user->rights->facture->creer && $_POST['save'] == $langs->trans('Save')) { $fac = new Facture($db,'',$_POST['facid']); - if (! $fac->fetch($_POST['facid']) > 0) dolibarr_print_error($db); + if (! $fac->fetch($_POST['facid']) > 0) dol_print_error($db); $date_start=''; $date_end=''; @@ -1205,7 +1205,7 @@ if (($_POST['action'] == 'send' || $_POST['action'] == 'relance') && ! $_POST['a if ($error) { - dolibarr_print_error($db); + dol_print_error($db); } else { @@ -1236,21 +1236,21 @@ if (($_POST['action'] == 'send' || $_POST['action'] == 'relance') && ! $_POST['a { $langs->load("other"); $mesg='<div class="error">'.$langs->trans('ErrorMailRecipientIsEmpty').'</div>'; - dolibarr_syslog('Recipient email is empty'); + dol_syslog('Recipient email is empty'); } } else { $langs->load("other"); $mesg='<div class="error">'.$langs->trans('ErrorCantReadFile',$file).'</div>'; - dolibarr_syslog('Failed to read file: '.$file); + dol_syslog('Failed to read file: '.$file); } } else { $langs->load("other"); $mesg='<div class="error">'.$langs->trans('ErrorFailedToReadEntity',$langs->trans("Invoice")).'</div>'; - dolibarr_syslog('Impossible de lire les donn�es de la facture. Le fichier facture n\'a peut-�tre pas �t� g�n�r�.'); + dol_syslog('Impossible de lire les donn�es de la facture. Le fichier facture n\'a peut-�tre pas �t� g�n�r�.'); } } @@ -1276,7 +1276,7 @@ if ($_REQUEST['action'] == 'builddoc') // En get ou en post $result=facture_pdf_create($db, $fac->id, '', $fac->modelpdf, $outputlangs); if ($result <= 0) { - dolibarr_print_error($db,$result); + dol_print_error($db,$result); exit; } else @@ -1424,7 +1424,7 @@ if ($_GET['action'] == 'create') } else { - dolibarr_print_error($db); + dol_print_error($db); } } } @@ -1440,7 +1440,7 @@ if ($_GET['action'] == 'create') $facids=$facturestatic->list_replacable_invoices($soc->id); if ($facids < 0) { - dolibarr_print_error($db,$facturestatic); + dol_print_error($db,$facturestatic); exit; } $options=""; @@ -1456,7 +1456,7 @@ if ($_GET['action'] == 'create') $facids=$facturestatic->list_qualified_avoir_invoices($soc->id); if ($facids < 0) { - dolibarr_print_error($db,$facturestatic); + dol_print_error($db,$facturestatic); exit; } $optionsav=""; @@ -1836,7 +1836,7 @@ if ($_GET['action'] == 'create') } else { - print dolibarr_trunc($objp->description,60); + print dol_trunc($objp->description,60); } } print '</td>'; @@ -1854,7 +1854,7 @@ if ($_GET['action'] == 'create') } else { - dolibarr_print_error($db); + dol_print_error($db); } print '</table>'; @@ -1915,7 +1915,7 @@ else $head = facture_prepare_head($fac); - dolibarr_fiche_head($head, 'compta', $langs->trans('InvoiceCustomer')); + dol_fiche_head($head, 'compta', $langs->trans('InvoiceCustomer')); // Confirmation de la conversion de l'avoir en reduc if ($_GET['action'] == 'converttoreduc') @@ -2076,7 +2076,7 @@ else } if ($result < 0) { - dolibarr_print_error('',$discount->error); + dol_print_error('',$discount->error); } print $html->showrefnav($fac,'ref','',1,'facnumber','ref',$morehtmlref); print '</td></tr>'; @@ -2209,7 +2209,7 @@ else } else { - print dolibarr_print_date($fac->date,'daytext'); + print dol_print_date($fac->date,'daytext'); } } else @@ -2259,7 +2259,7 @@ else $var=!$var; print '<tr '.$bc[$var].'><td>'; print '<a href="'.DOL_URL_ROOT.'/compta/paiement/fiche.php?id='.$objp->rowid.'">'.img_object($langs->trans('ShowPayment'),'payment').' '; - print dolibarr_print_date($objp->dp,'day').'</a></td>'; + print dol_print_date($objp->dp,'day').'</a></td>'; print '<td>'.$objp->paiement_type.' '.$objp->num_paiement.'</td>'; print '<td align="right">'.price($objp->amount).'</td>'; print '<td> </td>'; @@ -2304,7 +2304,7 @@ else } else { - dolibarr_print_error($db); + dol_print_error($db); } // Pay� partiellement 'escompte' @@ -2359,7 +2359,7 @@ else } else { - dolibarr_print_error($db); + dol_print_error($db); } print '</td></tr>'; @@ -2380,7 +2380,7 @@ else } else { - print dolibarr_print_date($fac->date_lim_reglement,'daytext'); + print dol_print_date($fac->date_lim_reglement,'daytext'); if ($fac->date_lim_reglement < ($now - $conf->facture->client->warning_delay) && ! $fac->paye && $fac->statut == 1 && ! $fac->am) print img_warning($langs->trans('Late')); } } @@ -2759,7 +2759,7 @@ else } else { - dolibarr_print_error($db); + dol_print_error($db); } /* @@ -3111,7 +3111,7 @@ else $sql .= ", ".MAIN_DB_PREFIX."fa_pr as fp"; $sql .= " WHERE fp.fk_propal = p.rowid AND fp.fk_facture = ".$fac->id; - dolibarr_syslog("facture.php: sql=".$sql); + dol_syslog("facture.php: sql=".$sql); $resql = $db->query($sql); if ($resql) { @@ -3138,7 +3138,7 @@ else print '<tr '.$bc[$var].'>'; print '<td><a href="propal.php?propalid='.$objp->propalid.'">'.img_object($langs->trans('ShowPropal'),'propal').' '.$objp->ref.'</a></td>'; print '<td>'.$objp->ref_client.'</td>'; - print '<td align="center">'.dolibarr_print_date($objp->dp,'day').'</td>'; + print '<td align="center">'.dol_print_date($objp->dp,'day').'</td>'; print '<td align="right">'.price($objp->total_ht).'</td>'; print '</tr>'; $total = $total + $objp->total_ht; @@ -3154,7 +3154,7 @@ else } else { - dolibarr_print_error($db); + dol_print_error($db); } /* @@ -3191,7 +3191,7 @@ else print '<tr '.$bc[$var].'><td>'; print '<a href="'.DOL_URL_ROOT.'/commande/fiche.php?id='.$objp->id.'">'.img_object($langs->trans('ShowOrder'), 'order').' '.$objp->ref."</a></td>\n"; print '<td>'.$objp->ref_client.'</td>'; - print '<td align="center">'.dolibarr_print_date($objp->date_commande,'day').'</td>'; + print '<td align="center">'.dol_print_date($objp->date_commande,'day').'</td>'; print '<td align="right">'.price($objp->total_ht).'</td>'; print "</tr>\n"; $total = $total + $objp->total_ht; @@ -3207,7 +3207,7 @@ else } else { - dolibarr_print_error($db); + dol_print_error($db); } } @@ -3243,7 +3243,7 @@ else $result=facture_pdf_create($db, $fac->id, '', $_REQUEST['model'], $outputlangs); if ($result <= 0) { - dolibarr_print_error($db,$result); + dol_print_error($db,$result); exit; } } @@ -3310,7 +3310,7 @@ else $result=facture_pdf_create($db, $fac->id, '', $_REQUEST['model'], $outputlangs); if ($result <= 0) { - dolibarr_print_error($db,$result); + dol_print_error($db,$result); exit; } } @@ -3359,7 +3359,7 @@ else } else { - dolibarr_print_error($db,$fac->error); + dol_print_error($db,$fac->error); } } else @@ -3553,10 +3553,10 @@ else if ($objp->df > 0) { - $y = dolibarr_print_date($objp->df,'%Y'); - $m = dolibarr_print_date($objp->df,'%m'); - $mt = dolibarr_print_date($objp->df,'%b'); - $d = dolibarr_print_date($objp->df,'%d'); + $y = dol_print_date($objp->df,'%Y'); + $m = dol_print_date($objp->df,'%m'); + $mt = dol_print_date($objp->df,'%b'); + $d = dol_print_date($objp->df,'%d'); print '<td align="center" nowrap>'; print $d; print ' <a href="'.$_SERVER["PHP_SELF"].'?year='.$y.'&month='.$m.'">'; @@ -3568,7 +3568,7 @@ else { print '<td align="center"><b>!!!</b></td>'; } - print '<td><a href="fiche.php?socid='.$objp->socid.'">'.img_object($langs->trans('ShowCompany'),'company').' '.dolibarr_trunc($objp->nom,48).'</a></td>'; + print '<td><a href="fiche.php?socid='.$objp->socid.'">'.img_object($langs->trans('ShowCompany'),'company').' '.dol_trunc($objp->nom,48).'</a></td>'; print '<td align="right">'.price($objp->total).'</td>'; print '<td align="right">'.price($objp->total_ttc).'</td>'; print '<td align="right">'.price($objp->am).'</td>'; @@ -3604,7 +3604,7 @@ else } else { - dolibarr_print_error($db); + dol_print_error($db); } } } diff --git a/htdocs/compta/facture/apercu.php b/htdocs/compta/facture/apercu.php index 04ae706134f3ca0b861781237c6d68786d794c85..3b91b86a2f3c14a6858f93c091d73b554217378e 100644 --- a/htdocs/compta/facture/apercu.php +++ b/htdocs/compta/facture/apercu.php @@ -79,7 +79,7 @@ if ($_GET["facid"] > 0) } $head = facture_prepare_head($fac); - dolibarr_fiche_head($head, 'preview', $langs->trans("InvoiceCustomer")); + dol_fiche_head($head, 'preview', $langs->trans("InvoiceCustomer")); /* @@ -98,8 +98,8 @@ if ($_GET["facid"] > 0) // Dates print '<tr><td>'.$langs->trans("Date").'</td>'; - print '<td colspan="3">'.dolibarr_print_date($fac->date,"daytext").'</td>'; - print '<td>'.$langs->trans("DateMaxPayment").'</td><td>' . dolibarr_print_date($fac->date_lim_reglement,"daytext"); + print '<td colspan="3">'.dol_print_date($fac->date,"daytext").'</td>'; + print '<td>'.$langs->trans("DateMaxPayment").'</td><td>' . dol_print_date($fac->date_lim_reglement,"daytext"); if ($fac->paye == 0 && $fac->date_lim_reglement < ($now - $conf->facture->client->warning_delay)) print img_warning($langs->trans("Late")); print "</td></tr>"; @@ -163,7 +163,7 @@ if ($_GET["facid"] > 0) print '<td><a href="'.DOL_URL_ROOT . '/document.php?modulepart=facture&file='.urlencode($relativepath).'">'.$fac->ref.'.pdf</a></td>'; print '<td align="right">'.filesize($file). ' bytes</td>'; - print '<td align="right">'.dolibarr_print_date(filemtime($file),'dayhour').'</td>'; + print '<td align="right">'.dol_print_date(filemtime($file),'dayhour').'</td>'; print '</tr>'; // Si fichier detail PDF existe @@ -173,7 +173,7 @@ if ($_GET["facid"] > 0) print '<td><a href="'.DOL_URL_ROOT . '/document.php?modulepart=facture&file='.urlencode($relativepathdetail).'">'.$fac->ref.'-detail.pdf</a></td>'; print '<td align="right">'.filesize($filedetail). ' bytes</td>'; - print '<td align="right">'.dolibarr_print_date(filemtime($filedetail),"%d %b %Y %H:%M:%S").'</td>'; + print '<td align="right">'.dol_print_date(filemtime($filedetail),"%d %b %Y %H:%M:%S").'</td>'; print '</tr>'; } diff --git a/htdocs/compta/facture/contact.php b/htdocs/compta/facture/contact.php index fdc2d1cf35b92d1bf2acdf3c91a90b4ab11ad213..de4a435cb3b7039194d7c827c4cabe43fffaa80b 100644 --- a/htdocs/compta/facture/contact.php +++ b/htdocs/compta/facture/contact.php @@ -90,12 +90,12 @@ if ($_POST["action"] == 'updateligne' && $user->rights->facture->creer) $db->commit(); } else { - dolibarr_print_error($db, "result=$result"); + dol_print_error($db, "result=$result"); $db->rollback(); } } else { - dolibarr_print_error($db); + dol_print_error($db); } } @@ -115,12 +115,12 @@ if ($_GET["action"] == 'swapstatut' && $user->rights->facture->creer) $db->commit(); } else { - dolibarr_print_error($db, "result=$result"); + dol_print_error($db, "result=$result"); $db->rollback(); } } else { - dolibarr_print_error($db); + dol_print_error($db); } } @@ -137,7 +137,7 @@ if ($_GET["action"] == 'deleteline' && $user->rights->facture->creer) exit; } else { - dolibarr_print_error($db); + dol_print_error($db); } } @@ -165,7 +165,7 @@ if ($id > 0) $head = facture_prepare_head($facture); - dolibarr_fiche_head($head, 'contact', $langs->trans('InvoiceCustomer')); + dol_fiche_head($head, 'contact', $langs->trans('InvoiceCustomer')); /* * Facture synthese pour rappel diff --git a/htdocs/compta/facture/document.php b/htdocs/compta/facture/document.php index 06e4896cf3ac7d1e7d316e2e2f61d514dee0179b..106b92a697b4dae37f7e688cbb2da152d6825ecb 100644 --- a/htdocs/compta/facture/document.php +++ b/htdocs/compta/facture/document.php @@ -125,7 +125,7 @@ if ($facid > 0) $societe->fetch($facture->socid); $head = facture_prepare_head($facture); - dolibarr_fiche_head($head, 'documents', $langs->trans('InvoiceCustomer')); + dol_fiche_head($head, 'documents', $langs->trans('InvoiceCustomer')); // Construit liste des fichiers @@ -166,7 +166,7 @@ if ($facid > 0) } else { - dolibarr_print_error($db); + dol_print_error($db); } } else diff --git a/htdocs/compta/facture/facture-rec.class.php b/htdocs/compta/facture/facture-rec.class.php index 6ba2c1e06df06284f3593805e6add789204b9f28..9abc4785ebda43621968bc4084d689399db1d617 100644 --- a/htdocs/compta/facture/facture-rec.class.php +++ b/htdocs/compta/facture/facture-rec.class.php @@ -161,7 +161,7 @@ class FactureRec extends Facture */ function fetch($rowid, $societe_id=0) { - dolibarr_syslog("Facture::Fetch rowid=".$rowid.", societe_id=".$societe_id, LOG_DEBUG); + dol_syslog("Facture::Fetch rowid=".$rowid.", societe_id=".$societe_id, LOG_DEBUG); $sql = 'SELECT f.titre,f.fk_soc,f.amount,f.tva,f.total,f.total_ttc,f.remise_percent,f.remise_absolue,f.remise'; $sql.= ','.$this->db->pdate('f.date_lim_reglement').' as dlr'; @@ -248,7 +248,7 @@ class FactureRec extends Facture if ($result < 0) { $this->error=$this->db->error(); - dolibarr_syslog('Facture::Fetch Error '.$this->error); + dol_syslog('Facture::Fetch Error '.$this->error); return -3; } return 1; @@ -256,14 +256,14 @@ class FactureRec extends Facture else { $this->error='Bill with id '.$rowid.' not found sql='.$sql; - dolibarr_syslog('Facture::Fetch Error '.$this->error); + dol_syslog('Facture::Fetch Error '.$this->error); return -2; } } else { $this->error=$this->db->error(); - dolibarr_syslog('Facture::Fetch Error '.$this->error); + dol_syslog('Facture::Fetch Error '.$this->error); return -1; } } @@ -283,7 +283,7 @@ class FactureRec extends Facture $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON l.fk_product = p.rowid'; $sql.= ' WHERE l.fk_facture = '.$this->id; - dolibarr_syslog('Facture::fetch_lines', LOG_DEBUG); + dol_syslog('Facture::fetch_lines', LOG_DEBUG); $result = $this->db->query($sql); if ($result) { @@ -328,7 +328,7 @@ class FactureRec extends Facture else { $this->error=$this->db->error(); - dolibarr_syslog('Facture::fetch_lines: Error '.$this->error); + dol_syslog('Facture::fetch_lines: Error '.$this->error); return -3; } } @@ -408,7 +408,7 @@ class FactureRec extends Facture $sql .= ",'".price2num($total_tva)."'"; $sql .= ",'".price2num($total_ttc)."') ;"; - dolibarr_syslog("Facture-rec::addline sql=".$sql, LOG_DEBUG); + dol_syslog("Facture-rec::addline sql=".$sql, LOG_DEBUG); if ($this->db->query( $sql)) { $this->id=$facid; // \TODO A virer @@ -418,7 +418,7 @@ class FactureRec extends Facture else { $this->error=$this->db->lasterror(); - dolibarr_syslog("Facture-rec::addline sql=".$this->error, LOG_ERR); + dol_syslog("Facture-rec::addline sql=".$this->error, LOG_ERR); return -1; } } diff --git a/htdocs/compta/facture/fiche-rec.php b/htdocs/compta/facture/fiche-rec.php index 7439c19e287ea8ac3df3ff6b69f993899b8ad7bc..a9c5280c5891a4b283a3ee807017ce7547e74eb2 100644 --- a/htdocs/compta/facture/fiche-rec.php +++ b/htdocs/compta/facture/fiche-rec.php @@ -474,7 +474,7 @@ else } else { - dolibarr_print_error($db); + dol_print_error($db); } } diff --git a/htdocs/compta/facture/impayees.php b/htdocs/compta/facture/impayees.php index bd1dce3577fa1bff72985082a00d729252506056..67321b5c2db754e06bc8c7e1b2eaad910466820f 100644 --- a/htdocs/compta/facture/impayees.php +++ b/htdocs/compta/facture/impayees.php @@ -100,7 +100,7 @@ if ($_POST["action"] == "builddoc" && $user->rights->facture->lire) if ($option=='late') $filename.='_'.strtolower(sanitizeFileName($langs->transnoentities("Late"))); if ($pagecount) { - $file=$diroutputpdf.'/'.$filename.'_'.dolibarr_print_date(mktime(),'dayhourlog').'.pdf'; + $file=$diroutputpdf.'/'.$filename.'_'.dol_print_date(mktime(),'dayhourlog').'.pdf'; $pdf->Output($file); if (! empty($conf->global->MAIN_UMASK)) @chmod($file, octdec($conf->global->MAIN_UMASK)); @@ -346,10 +346,10 @@ if ($result) print "</td>\n"; - print "<td nowrap align=\"center\">".dolibarr_print_date($objp->df)."</td>\n"; - print "<td nowrap align=\"center\">".dolibarr_print_date($objp->datelimite)."</td>\n"; + print "<td nowrap align=\"center\">".dol_print_date($objp->df)."</td>\n"; + print "<td nowrap align=\"center\">".dol_print_date($objp->datelimite)."</td>\n"; - print '<td><a href="'.DOL_URL_ROOT.'/compta/fiche.php?socid='.$objp->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.dolibarr_trunc($objp->nom,32).'</a></td>'; + print '<td><a href="'.DOL_URL_ROOT.'/compta/fiche.php?socid='.$objp->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($objp->nom,32).'</a></td>'; print "<td align=\"right\">".price($objp->total_ht)."</td>"; print "<td align=\"right\">".price($objp->total_ttc)."</td>"; diff --git a/htdocs/compta/facture/info.php b/htdocs/compta/facture/info.php index 4aaf1ff2b1bfb20ead8936ce780cf4119d80d295..b8d648bbe02bc2a33a1997e40617c7160f5ba11b 100644 --- a/htdocs/compta/facture/info.php +++ b/htdocs/compta/facture/info.php @@ -46,7 +46,7 @@ $soc = new Societe($db, $fac->socid); $soc->fetch($fac->socid); $head = facture_prepare_head($fac); -dolibarr_fiche_head($head, 'info', $langs->trans("InvoiceCustomer")); +dol_fiche_head($head, 'info', $langs->trans("InvoiceCustomer")); print '<table width="100%"><tr><td>'; diff --git a/htdocs/compta/facture/note.php b/htdocs/compta/facture/note.php index c25b99ffa2b71526f945e4b90dc93390b0312c71..11023885a9b0654e6d351b24e280afd31555f16a 100644 --- a/htdocs/compta/facture/note.php +++ b/htdocs/compta/facture/note.php @@ -99,7 +99,7 @@ if ($_GET["facid"]) $soc->fetch($fac->socid); $head = facture_prepare_head($fac); - dolibarr_fiche_head($head, 'note', $langs->trans("InvoiceCustomer")); + dol_fiche_head($head, 'note', $langs->trans("InvoiceCustomer")); print '<table class="border" width="100%">'; diff --git a/htdocs/compta/facture/prelevement.php b/htdocs/compta/facture/prelevement.php index 20b0efcc68cb7e20d68716c8aca1ef93442ba81f..a1d3c64b927522cfbbcf587f196d57b66bcdee41 100644 --- a/htdocs/compta/facture/prelevement.php +++ b/htdocs/compta/facture/prelevement.php @@ -115,7 +115,7 @@ if ($_GET["facid"] > 0) } $head = facture_prepare_head($fac); - dolibarr_fiche_head($head, 'standingorders', $langs->trans('InvoiceCustomer')); + dol_fiche_head($head, 'standingorders', $langs->trans('InvoiceCustomer')); /* * Facture @@ -135,8 +135,8 @@ if ($_GET["facid"] > 0) // Dates print '<tr><td>'.$langs->trans("Date").'</td>'; - print '<td colspan="3">'.dolibarr_print_date($fac->date,"daytext").'</td>'; - print '<td>'.$langs->trans("DateMaxPayment").'</td><td>' . dolibarr_print_date($fac->date_lim_reglement,"daytext"); + print '<td colspan="3">'.dol_print_date($fac->date,"daytext").'</td>'; + print '<td>'.$langs->trans("DateMaxPayment").'</td><td>' . dol_print_date($fac->date_lim_reglement,"daytext"); if ($fac->date_lim_reglement < ($now - $conf->facture->client->warning_delay) && ! $fac->paye && $fac->statut == 1 && ! $fac->am) print img_warning($langs->trans("Late")); print "</td></tr>"; @@ -223,7 +223,7 @@ if ($_GET["facid"] > 0) $var=!$var; print "<tr $bc[$var]>"; - print '<td align="left">'.dolibarr_print_date($obj->date_demande,'day')."</td>\n"; + print '<td align="left">'.dol_print_date($obj->date_demande,'day')."</td>\n"; print '<td align="center">En attente de traitement</td>'; print '<td align="center">'.price($obj->amount).'</td>'; print '<td align="center">-</td>'; @@ -241,7 +241,7 @@ if ($_GET["facid"] > 0) } else { - dolibarr_print_error($db); + dol_print_error($db); } $sql = "SELECT pfd.rowid, pfd.traite,".$db->pdate("pfd.date_demande")." as date_demande"; @@ -268,9 +268,9 @@ if ($_GET["facid"] > 0) print "<tr $bc[$var]>"; - print '<td align="center">'.dolibarr_print_date($obj->date_demande)."</td>\n"; + print '<td align="center">'.dol_print_date($obj->date_demande)."</td>\n"; - print '<td align="center">'.dolibarr_print_date($obj->date_traite)."</td>\n"; + print '<td align="center">'.dol_print_date($obj->date_traite)."</td>\n"; print '<td align="center">'.price($obj->amount).'</td>'; @@ -291,7 +291,7 @@ if ($_GET["facid"] > 0) } else { - dolibarr_print_error($db); + dol_print_error($db); } print "</table>"; diff --git a/htdocs/compta/facture/stats/month.php b/htdocs/compta/facture/stats/month.php index 82907b5364931faa71fb450e61cf7652fd361362..822d697a1635d6e14cfed4819bf69c904424546f 100644 --- a/htdocs/compta/facture/stats/month.php +++ b/htdocs/compta/facture/stats/month.php @@ -124,7 +124,7 @@ $data = array(); for ($i = 1 ; $i < 13 ; $i++) { - $data[$i-1] = array(ucfirst(substr(dolibarr_print_date(dolibarr_mktime(12,0,0,$i,1,$year),"%b"),0,3)), $res[$i]); + $data[$i-1] = array(ucfirst(substr(dol_print_date(dol_mktime(12,0,0,$i,1,$year),"%b"),0,3)), $res[$i]); } $filename_avg = $dir."/invoicesaverage-".$year.".png"; diff --git a/htdocs/compta/fiche.php b/htdocs/compta/fiche.php index aa875d13d040e491caddbcfa887ffb665c9d7284..c11027955c0ec3131a66b3f8d4e2edd5b8980687 100644 --- a/htdocs/compta/fiche.php +++ b/htdocs/compta/fiche.php @@ -86,7 +86,7 @@ if ($socid > 0) $societe->fetch($socid, $to); // si $to='next' ajouter " AND s.rowid > $socid ORDER BY idp ASC LIMIT 1"; if ($societe->id <= 0) { - dolibarr_print_error($db,$societe->error); + dol_print_error($db,$societe->error); } /* @@ -94,7 +94,7 @@ if ($socid > 0) */ $head = societe_prepare_head($societe); - dolibarr_fiche_head($head, 'compta', $langs->trans("ThirdParty")); + dol_fiche_head($head, 'compta', $langs->trans("ThirdParty")); print '<table width="100%" class="notopnoleftnoright">'; @@ -193,7 +193,7 @@ if ($socid > 0) print '</td>'; print '<td colspan="3">'; $amount_discount=$societe->getAvailableDiscounts(); - if ($amount_discount < 0) dolibarr_print_error($db,$societe->error); + if ($amount_discount < 0) dol_print_error($db,$societe->error); if ($amount_discount > 0) print price($amount_discount).' '.$langs->trans("Currency".$conf->monnaie); else print $langs->trans("DiscountNone"); print '</td>'; @@ -266,7 +266,7 @@ if ($socid > 0) print '</td>'; if ($objp->df > 0) { - print "<td align=\"right\">".dolibarr_print_date($objp->df)."</td>\n"; + print "<td align=\"right\">".dol_print_date($objp->df)."</td>\n"; } else { @@ -282,7 +282,7 @@ if ($socid > 0) } else { - dolibarr_print_error($db); + dol_print_error($db); } print "</table>"; } @@ -318,14 +318,14 @@ if ($socid > 0) print "<tr $bc[$var]>"; print '<td><a href="../projet/fiche.php?id='.$obj->rowid.'">'.img_object($langs->trans("ShowProject"),"project")." ".$obj->title.'</a></td>'; - print "<td align=\"right\">".dolibarr_print_date($obj->do,"day") ."</td></tr>"; + print "<td align=\"right\">".dol_print_date($obj->do,"day") ."</td></tr>"; $i++; } $db->free(); } else { - dolibarr_print_error($db); + dol_print_error($db); } print "</table>"; } @@ -385,7 +385,7 @@ if ($socid > 0) } else { - dolibarr_print_error($db,'Bad value for socid parameter'); + dol_print_error($db,'Bad value for socid parameter'); } $db->close(); diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php index fa232644ffeb457f92862a8905bce68d3c0c51b5..3bbf46c1e93e32626d9a77adeae07196c2a38da6 100644 --- a/htdocs/compta/index.php +++ b/htdocs/compta/index.php @@ -19,11 +19,11 @@ */ /** - \file htdocs/compta/index.php - \ingroup compta - \brief Page accueil zone comptabilit� - \version $Id$ -*/ + \file htdocs/compta/index.php + \ingroup compta + \brief Page accueil zone comptabilit� + \version $Id$ + */ require("./pre.inc.php"); require_once(DOL_DOCUMENT_ROOT."/html.formfile.class.php"); @@ -48,8 +48,8 @@ if ($conf->commande->enabled) $langs->load("orders"); $socid=''; if ($user->societe_id > 0) { - $action = ''; - $socid = $user->societe_id; + $action = ''; + $socid = $user->societe_id; } @@ -59,22 +59,22 @@ if ($user->societe_id > 0) if (isset($_GET["action"]) && $_GET["action"] == 'add_bookmark') { - $sql = "DELETE FROM ".MAIN_DB_PREFIX."bookmark WHERE fk_soc = ".$socid." AND fk_user=".$user->id; - if (! $db->query($sql) ) - { - dolibarr_print_error($db); - } - $sql = "INSERT INTO ".MAIN_DB_PREFIX."bookmark (fk_soc, dateb, fk_user) VALUES (".$socid.", ".$db->idate(mktime()).",".$user->id.");"; - if (! $db->query($sql) ) - { - dolibarr_print_error($db); - } + $sql = "DELETE FROM ".MAIN_DB_PREFIX."bookmark WHERE fk_soc = ".$socid." AND fk_user=".$user->id; + if (! $db->query($sql) ) + { + dol_print_error($db); + } + $sql = "INSERT INTO ".MAIN_DB_PREFIX."bookmark (fk_soc, dateb, fk_user) VALUES (".$socid.", ".$db->idate(mktime()).",".$user->id.");"; + if (! $db->query($sql) ) + { + dol_print_error($db); + } } if (isset($_GET["action"]) && $_GET["action"] == 'del_bookmark') { - $sql = "DELETE FROM ".MAIN_DB_PREFIX."bookmark WHERE rowid=".$_GET["bid"]; - $result = $db->query($sql); + $sql = "DELETE FROM ".MAIN_DB_PREFIX."bookmark WHERE rowid=".$_GET["bid"]; + $result = $db->query($sql); } @@ -197,7 +197,7 @@ if ($conf->facture->enabled && $user->rights->facture->lire) } else { - dolibarr_print_error($db); + dol_print_error($db); } } @@ -270,7 +270,7 @@ if ($conf->facture->enabled && $user->rights->facture->lire) } else { - dolibarr_print_error($db); + dol_print_error($db); } } @@ -279,58 +279,58 @@ if ($conf->facture->enabled && $user->rights->facture->lire) */ if ($conf->tax->enabled) { - if ($user->societe_id == 0) - { + if ($user->societe_id == 0) + { $chargestatic=new ChargeSociales($db); - $sql = "SELECT c.rowid, c.amount, ".$db->pdate("c.date_ech")." as date_ech,"; + $sql = "SELECT c.rowid, c.amount, ".$db->pdate("c.date_ech")." as date_ech,"; $sql.= " cc.libelle"; - $sql.= " FROM ".MAIN_DB_PREFIX."chargesociales as c, ".MAIN_DB_PREFIX."c_chargesociales as cc"; - $sql.= " WHERE c.fk_type = cc.id AND c.paye=0"; + $sql.= " FROM ".MAIN_DB_PREFIX."chargesociales as c, ".MAIN_DB_PREFIX."c_chargesociales as cc"; + $sql.= " WHERE c.fk_type = cc.id AND c.paye=0"; - $resql = $db->query($sql); - if ( $resql ) - { - $var = false; + $resql = $db->query($sql); + if ( $resql ) + { + $var = false; $num = $db->num_rows($resql); print '<table class="noborder" width="100%">'; print '<tr class="liste_titre">'; print '<td colspan="2">'.$langs->trans("ContributionsToPay").($num?' ('.$num.')':'').'</td></tr>'; - if ($num) - { - $i = 0; - $tot_ttc=0; - while ($i < $num) - { - $obj = $db->fetch_object($resql); - print "<tr $bc[$var]>"; + if ($num) + { + $i = 0; + $tot_ttc=0; + while ($i < $num) + { + $obj = $db->fetch_object($resql); + print "<tr $bc[$var]>"; $chargestatic->id=$obj->rowid; - $chargestatic->lib=$obj->libelle; - print '<td>'.$chargestatic->getNomUrl(1).'</td>'; - print '<td align="right">'.price($obj->amount).'</td>'; - print '</tr>'; - $tot_ttc+=$obj->amount; - $var = !$var; - $i++; - } - - print '<tr class="liste_total"><td align="left">'.$langs->trans("Total").'</td>'; - print '<td align="right">'.price($tot_ttc).'</td>'; - print '</tr>'; - } + $chargestatic->lib=$obj->libelle; + print '<td>'.$chargestatic->getNomUrl(1).'</td>'; + print '<td align="right">'.price($obj->amount).'</td>'; + print '</tr>'; + $tot_ttc+=$obj->amount; + $var = !$var; + $i++; + } + + print '<tr class="liste_total"><td align="left">'.$langs->trans("Total").'</td>'; + print '<td align="right">'.price($tot_ttc).'</td>'; + print '</tr>'; + } else { print '<tr colspan="2" '.$bc[$var].'><td>'.$langs->trans("None").'</td></tr>'; } print "</table><br>"; - $db->free($resql); - } - else - { - dolibarr_print_error($db); - } - } + $db->free($resql); + } + else + { + dol_print_error($db); + } + } } @@ -384,12 +384,12 @@ if ($user->societe->enabled && $user->rights->societe->lire) $var=!$var; print '<tr '.$bc[$var].'>'; print '<td>'.$customerstatic->getNomUrl(1).'</td>'; - print '<td align="right">'.dolibarr_print_date($objp->dc,'day').'</td>'; + print '<td align="right">'.dol_print_date($objp->dc,'day').'</td>'; print '</tr>'; $i++; } - + } else { @@ -444,12 +444,12 @@ if ($user->fournisseur->enabled && $user->rights->societe->lire) $customerstatic->nom=$objp->nom; print '<tr '.$bc[$var].'>'; print '<td>'.$customerstatic->getNomUrl(1).'</td>'; - print '<td align="right">'.dolibarr_print_date($objp->dc,'day').'</td>'; + print '<td align="right">'.dol_print_date($objp->dc,'day').'</td>'; print '</tr>'; $var=!$var; $i++; } - + } else { @@ -458,7 +458,7 @@ if ($user->fournisseur->enabled && $user->rights->societe->lire) print '</table><br>'; } } - + /* * Commandes clients � facturer */ @@ -491,7 +491,7 @@ if ($conf->facture->enabled && $conf->commande->enabled && $user->rights->comman { $var=false; $num = $db->num_rows($resql); - + if ($num) { $i = 0; @@ -509,10 +509,10 @@ if ($conf->facture->enabled && $conf->commande->enabled && $user->rights->comman $obj = $db->fetch_object($resql); print "<tr $bc[$var]>"; print '<td nowrap="nowrap">'; - + $commandestatic->id=$obj->rowid; $commandestatic->ref=$obj->ref; - + print '<table class="nobordernopadding"><tr class="nocellnopadd">'; print '<td width="100" class="nobordernopadding" nowrap="nowrap">'; print $commandestatic->getNomUrl(1); @@ -526,11 +526,11 @@ if ($conf->facture->enabled && $conf->commande->enabled && $user->rights->comman $urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->rowid; $formfile->show_documents('commande',$filename,$filedir,$urlsource,'','','','','',1); print '</td></tr></table>'; - + print '</td>'; print '<td align="left"><a href="fiche.php?socid='.$obj->socid.'">'.img_object($langs->trans("ShowCompany"),"company").'</a> '; - print '<a href="fiche.php?socid='.$obj->socid.'">'.dolibarr_trunc($obj->nom,44).'</a></td>'; + print '<a href="fiche.php?socid='.$obj->socid.'">'.dol_trunc($obj->nom,44).'</a></td>'; if ($conf->global->MAIN_SHOW_HT_ON_SUMMARY) print '<td align="right">'.price($obj->total_ht).'</td>'; print '<td align="right">'.price($obj->total_ttc).'</td>'; print '<td align="right">'.price($obj->total_ttc-$obj->tot_fttc).'</td>'; @@ -556,7 +556,7 @@ if ($conf->facture->enabled && $conf->commande->enabled && $user->rights->comman } else { - dolibarr_print_error($db); + dol_print_error($db); } } @@ -604,7 +604,7 @@ if ($conf->facture->enabled && $user->rights->facture->lire) print '<tr '.$bc[$var].'>'; print '<td nowrap="nowrap">'; - + print '<table class="nobordernopadding"><tr class="nocellnopadd">'; print '<td width="100" class="nobordernopadding" nowrap="nowrap">'; $facturestatic->ref=$obj->facnumber; @@ -621,9 +621,9 @@ if ($conf->facture->enabled && $user->rights->facture->lire) $urlsource=$_SERVER['PHP_SELF'].'?facid='.$obj->rowid; $formfile->show_documents('facture',$filename,$filedir,$urlsource,'','','','','',1); print '</td></tr></table>'; - + print '</td>'; - print '<td align="left"><a href="fiche.php?socid='.$obj->socid.'">'.img_object($langs->trans("ShowCustomer"),"company").' '.dolibarr_trunc($obj->nom,44).'</a></td>'; + print '<td align="left"><a href="fiche.php?socid='.$obj->socid.'">'.img_object($langs->trans("ShowCustomer"),"company").' '.dol_trunc($obj->nom,44).'</a></td>'; if ($conf->global->MAIN_SHOW_HT_ON_SUMMARY) print '<td align="right">'.price($obj->total).'</td>'; print '<td align="right">'.price($obj->total_ttc).'</td>'; print '<td align="right">'.price($obj->am).'</td>'; @@ -655,7 +655,7 @@ if ($conf->facture->enabled && $user->rights->facture->lire) } else { - dolibarr_print_error($db); + dol_print_error($db); } } @@ -704,7 +704,7 @@ if ($conf->facture->enabled && $user->rights->facture->lire) $facstatic->id=$obj->rowid; print $facstatic->getNomUrl(1,''); print '</td>'; - print '<td><a href="fiche.php?socid='.$obj->socid.'">'.img_object($langs->trans("ShowSupplier"),"company").' '.dolibarr_trunc($obj->nom,44).'</a></td>'; + print '<td><a href="fiche.php?socid='.$obj->socid.'">'.img_object($langs->trans("ShowSupplier"),"company").' '.dol_trunc($obj->nom,44).'</a></td>'; if ($conf->global->MAIN_SHOW_HT_ON_SUMMARY) print '<td align="right">'.price($obj->total_ht).'</td>'; print '<td align="right">'.price($obj->total_ttc).'</td>'; print '<td align="right">'.price($obj->am).'</td>'; @@ -734,7 +734,7 @@ if ($conf->facture->enabled && $user->rights->facture->lire) } else { - dolibarr_print_error($db); + dol_print_error($db); } } @@ -744,22 +744,22 @@ if ($conf->facture->enabled && $user->rights->facture->lire) $resql = 0; if ($resql) { - print '<table class="noborder" width="100%">'; - print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("TasksToDo").'</td>'; - print "</tr>\n"; - $var = True; - $i = 0; - while ($i < $db->num_rows($resql)) - { - $obj = $db->fetch_object($resql); - $var=!$var; - - print "<tr $bc[$var]><td>".dolibarr_print_date($obj->da,"day")."</td>"; - print "<td><a href=\"action/fiche.php\">$obj->libelle $obj->label</a></td></tr>"; - $i++; - } - $db->free($resql); - print "</table><br>"; + print '<table class="noborder" width="100%">'; + print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("TasksToDo").'</td>'; + print "</tr>\n"; + $var = True; + $i = 0; + while ($i < $db->num_rows($resql)) + { + $obj = $db->fetch_object($resql); + $var=!$var; + + print "<tr $bc[$var]><td>".dol_print_date($obj->da,"day")."</td>"; + print "<td><a href=\"action/fiche.php\">$obj->libelle $obj->label</a></td></tr>"; + $i++; + } + $db->free($resql); + print "</table><br>"; } print '</td></tr>'; diff --git a/htdocs/compta/paiement.php b/htdocs/compta/paiement.php index c044730ce2943ab921072b053b351135f7ad9dcb..edba3008c3e71e708522d2507b3fe4355311361c 100644 --- a/htdocs/compta/paiement.php +++ b/htdocs/compta/paiement.php @@ -53,7 +53,7 @@ if ($_POST['action'] == 'add_paiement' || $_POST['action'] == 'confirm_paiement' { $error = 0; - $datepaye = dolibarr_mktime(12, 0 , 0, + $datepaye = dol_mktime(12, 0 , 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); @@ -130,7 +130,7 @@ if ($_POST['action'] == 'add_paiement') */ if ($_POST['action'] == 'confirm_paiement' && $_POST['confirm'] == 'yes') { - $datepaye = dolibarr_mktime(12, 0 , 0, + $datepaye = dol_mktime(12, 0 , 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); @@ -280,7 +280,7 @@ if ($_GET['action'] == 'create' || $_POST['action'] == 'confirm_paiement' || $_P // Date payment print '<tr><td>'.$langs->trans('Date').'</td><td>'; - $datepayment = dolibarr_mktime(12, 0 , 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); + $datepayment = dol_mktime(12, 0 , 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); $datepayment= ($datepayment == '' ? (empty($conf->global->MAIN_AUTOFILL_DATE)?-1:0) : $datepayment); $html->select_date($datepayment,'','','',0,"add_paiement"); print '</td>'; @@ -385,7 +385,7 @@ if ($_GET['action'] == 'create' || $_POST['action'] == 'confirm_paiement' || $_P print "</td>\n"; // Date - print '<td align="center">'.dolibarr_print_date($objp->df,'day')."</td>\n"; + print '<td align="center">'.dol_print_date($objp->df,'day')."</td>\n"; // Prix print '<td align="right">'.price($objp->total_ttc).'</td>'; @@ -441,7 +441,7 @@ if ($_GET['action'] == 'create' || $_POST['action'] == 'confirm_paiement' || $_P } else { - dolibarr_print_error($db); + dol_print_error($db); } @@ -523,7 +523,7 @@ if (! $_GET['action'] && ! $_POST['action']) $var=!$var; print '<tr '.$bc[$var].'>'; print '<td><a href="facture.php?facid='.$objp->facid.'">'.$objp->facnumber."</a></td>\n"; - print '<td>'.dolibarr_print_date($objp->dp)."</td>\n"; + print '<td>'.dol_print_date($objp->dp)."</td>\n"; print '<td>'.$objp->paiement_type.' '.$objp->num_paiement."</td>\n"; print '<td align="right">'.price($objp->amount).'</td><td> </td>'; print '</tr>'; diff --git a/htdocs/compta/paiement/avalider.php b/htdocs/compta/paiement/avalider.php index 825a34993b9f849c84d72f14bc6e936d3c460d5e..8fc80493b45c6035287cad9e8410490e6b969332 100644 --- a/htdocs/compta/paiement/avalider.php +++ b/htdocs/compta/paiement/avalider.php @@ -96,7 +96,7 @@ if ($resql) $var=!$var; print "<tr $bc[$var]>"; print '<td>'.'<a href="'.DOL_URL_ROOT.'/compta/paiement/fiche.php?id='.$objp->rowid.'">'.img_object($langs->trans("ShowPayment"),"payment").' '.$objp->rowid.'</a></td>'; - print '<td width="80" align="center">'.dolibarr_print_date($objp->dp,'day')."</td>\n"; + print '<td width="80" align="center">'.dol_print_date($objp->dp,'day')."</td>\n"; print "<td>$objp->paiement_type $objp->num_paiement</td>\n"; print '<td align="right">'.price($objp->amount).'</td>'; print '<td align="center">'; diff --git a/htdocs/compta/paiement/cheque/fiche.php b/htdocs/compta/paiement/cheque/fiche.php index ac5266e82dfaf0bc340919cc4bd4506436508088..b290ca56e7777ca1592ff16a0af432afbbd43140 100644 --- a/htdocs/compta/paiement/cheque/fiche.php +++ b/htdocs/compta/paiement/cheque/fiche.php @@ -137,7 +137,7 @@ if ($_POST['action'] == 'builddoc' && $user->rights->banque) $result = $remisecheque->GeneratePdf($_POST["model"], $outputlangs); if ($result <= 0) { - dolibarr_print_error($db,$remisecheque->error); + dol_print_error($db,$remisecheque->error); exit; } else @@ -165,7 +165,7 @@ if ($_GET['action'] == 'new') $hselected = $h; $h++; - dolibarr_fiche_head($head, $hselected, $langs->trans("Cheques")); + dol_fiche_head($head, $hselected, $langs->trans("Cheques")); } else { @@ -190,7 +190,7 @@ else // $head[$h][1] = $langs->trans("Info"); // $h++; - dolibarr_fiche_head($head, $hselected, $langs->trans("Cheques")); + dol_fiche_head($head, $hselected, $langs->trans("Cheques")); /* * Confirmation de la suppression du bordereau @@ -223,7 +223,7 @@ if ($_GET['action'] == 'new') $now=time(); print '<table class="border" width="100%">'; - print '<tr><td width="30%">'.$langs->trans('Date').'</td><td width="70%">'.dolibarr_print_date($now,'day').'</td></tr>'; + print '<tr><td width="30%">'.$langs->trans('Date').'</td><td width="70%">'.dol_print_date($now,'day').'</td></tr>'; print '</table><br />'; $sql = "SELECT ba.rowid as bid, ".$db->pdate("b.dateo")." as date,"; @@ -278,7 +278,7 @@ if ($_GET['action'] == 'new') $accounts[$objp->bid] += 1; print "<tr ".$bc[$var].">"; - print '<td width="120">'.dolibarr_print_date($value["date"],'day').'</td>'; + print '<td width="120">'.dol_print_date($value["date"],'day').'</td>'; print '<td>'.$value["numero"]."</td>\n"; print '<td>'.$value["emetteur"]."</td>\n"; print '<td>'.$value["banque"]."</td>\n"; @@ -318,7 +318,7 @@ else print "</td>"; print "</tr>\n"; - print '<tr><td>'.$langs->trans('DateCreation').'</td><td colspan="2">'.dolibarr_print_date($remisecheque->date_bordereau,'day').'</td></tr>'; + print '<tr><td>'.$langs->trans('DateCreation').'</td><td colspan="2">'.dol_print_date($remisecheque->date_bordereau,'day').'</td></tr>'; print '<tr><td>'.$langs->trans('Account').'</td><td colspan="2">'; print $accountstatic->getNomUrl(1); @@ -374,8 +374,8 @@ else print "<tr $bc[$var]>"; print '<td align="center" width="24">'.$i.'</td>'; print '<td align="center">'.($objp->num_chq?$objp->num_chq:' ').'</td>'; - print '<td>'.dolibarr_trunc($objp->emetteur,24).'</td>'; - print '<td>'.dolibarr_trunc($objp->banque,24).'</td>'; + print '<td>'.dol_trunc($objp->emetteur,24).'</td>'; + print '<td>'.dol_trunc($objp->banque,24).'</td>'; print '<td align="right">'.price($objp->amount).'</td>'; print '<td align="center">'; $accountlinestatic->rowid=$objp->rowid; @@ -388,7 +388,7 @@ else print ' '; } print '</td>'; - print '<td align="center">'.dolibarr_print_date($objp->datec,'day').'</td>'; + print '<td align="center">'.dol_print_date($objp->datec,'day').'</td>'; if($remisecheque->statut == 0) { print '<td align="right"><a href="fiche.php?id='.$remisecheque->id.'&action=remove&lineid='.$objp->rowid.'">'.img_delete().'</a></td>'; @@ -405,7 +405,7 @@ else } else { - dolibarr_print_error($db); + dol_print_error($db); } } diff --git a/htdocs/compta/paiement/cheque/index.php b/htdocs/compta/paiement/cheque/index.php index 2d550eccc4a41dde17286c5be25a976cd2406b7c..3377f29e061b4c65b2c477c01b9485b19be4ff53 100644 --- a/htdocs/compta/paiement/cheque/index.php +++ b/htdocs/compta/paiement/cheque/index.php @@ -79,7 +79,7 @@ if ($resql) } else { - dolibarr_print_error($db); + dol_print_error($db); } @@ -123,7 +123,7 @@ if ($resql) print "<tr $bc[$var]>\n"; print '<td>'.$checkdepositstatic->getNomUrl(1).'</td>'; - print '<td>'.dolibarr_print_date($objp->db,'day').'</td>'; + print '<td>'.dol_print_date($objp->db,'day').'</td>'; print '<td>'.$accountstatic->getNomUrl(1).'</td>'; print '<td align="right">'.$objp->nbcheque.'</td>'; print '<td align="right">'.price($objp->amount).'</td>'; @@ -136,7 +136,7 @@ if ($resql) } else { - dolibarr_print_error($db); + dol_print_error($db); } print "</td></tr>\n"; diff --git a/htdocs/compta/paiement/cheque/liste.php b/htdocs/compta/paiement/cheque/liste.php index e24f352d35baf4e92324d9256405b70e848aa9e7..deee749cce515e6da206227b1c5da92c33800f8c 100644 --- a/htdocs/compta/paiement/cheque/liste.php +++ b/htdocs/compta/paiement/cheque/liste.php @@ -116,7 +116,7 @@ if ($resql) print '</td>'; // Date - print '<td align="center">'.dolibarr_print_date($objp->dp,'day').'</td>'; + print '<td align="center">'.dol_print_date($objp->dp,'day').'</td>'; // Banque print '<td>'; @@ -141,7 +141,7 @@ if ($resql) } else { - dolibarr_print_error($db); + dol_print_error($db); } $db->close(); diff --git a/htdocs/compta/paiement/cheque/remisecheque.class.php b/htdocs/compta/paiement/cheque/remisecheque.class.php index fec22a33ba50fc87f8432b28cce882e0c57a02cf..e3277b99061bbb6ce829b214463fddedffa5bb77 100644 --- a/htdocs/compta/paiement/cheque/remisecheque.class.php +++ b/htdocs/compta/paiement/cheque/remisecheque.class.php @@ -72,7 +72,7 @@ class RemiseCheque extends CommonObject if ($id) $sql.= " WHERE bc.rowid = ".$id; if ($ref) $sql.= " WHERE bc.number = '".addslashes($ref)."'"; - dolibarr_syslog("RemiseCheque::fetch sql=".$sql, LOG_DEBUG); + dol_syslog("RemiseCheque::fetch sql=".$sql, LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -124,7 +124,7 @@ class RemiseCheque extends CommonObject $sql = "INSERT INTO ".MAIN_DB_PREFIX."bordereau_cheque (datec, date_bordereau, fk_user_author, fk_bank_account, amount, number, nbcheque)"; $sql.= " VALUES (".$this->db->idate(mktime()).",".$this->db->idate(mktime()).",".$user->id.",".$account_id.",0,0,0)"; - dolibarr_syslog("RemiseCheque::Create sql=".$sql, LOG_DEBUG); + dol_syslog("RemiseCheque::Create sql=".$sql, LOG_DEBUG); $resql = $this->db->query($sql); if ( $resql ) { @@ -132,7 +132,7 @@ class RemiseCheque extends CommonObject if ($this->id == 0) { $this->errno = -1024; - dolibarr_syslog("Remisecheque::Create Erreur Lecture ID ($this->errno)", LOG_ERR); + dol_syslog("Remisecheque::Create Erreur Lecture ID ($this->errno)", LOG_ERR); } if ($this->id > 0 && $this->errno == 0) @@ -141,12 +141,12 @@ class RemiseCheque extends CommonObject $sql.= " SET number='(PROV".$this->id.")'"; $sql.= " WHERE rowid='".$this->id."';"; - dolibarr_syslog("RemiseCheque::Create sql=".$sql, LOG_DEBUG); + dol_syslog("RemiseCheque::Create sql=".$sql, LOG_DEBUG); $resql = $this->db->query($sql); if (! $resql) { $this->errno = -1025; - dolibarr_syslog("RemiseCheque::Create ERREUR UPDATE ($this->errno)", LOG_ERR); + dol_syslog("RemiseCheque::Create ERREUR UPDATE ($this->errno)", LOG_ERR); } } @@ -159,7 +159,7 @@ class RemiseCheque extends CommonObject $sql.= " AND b.fk_bordereau = 0 AND b.fk_account='".$account_id."'"; $sql.= " LIMIT 40"; // On limite a 40 pour ne g�n�rer des PDF que d'une page - dolibarr_syslog("RemiseCheque::Create sql=".$sql, LOG_DEBUG); + dol_syslog("RemiseCheque::Create sql=".$sql, LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -172,7 +172,7 @@ class RemiseCheque extends CommonObject else { $this->errno = -1026; - dolibarr_syslog("RemiseCheque::Create Error ($this->errno)", LOG_ERR); + dol_syslog("RemiseCheque::Create Error ($this->errno)", LOG_ERR); } } @@ -184,12 +184,12 @@ class RemiseCheque extends CommonObject $sql.= " SET fk_bordereau = ".$this->id; $sql.= " WHERE rowid = ".$lineid; - dolibarr_syslog("RemiseCheque::Create sql=".$sql, LOG_DEBUG); + dol_syslog("RemiseCheque::Create sql=".$sql, LOG_DEBUG); $resql = $this->db->query($sql); if (!$resql) { $this->errno = -18; - dolibarr_syslog("RemiseCheque::Create Error update bank ($this->errno)", LOG_ERR); + dol_syslog("RemiseCheque::Create Error update bank ($this->errno)", LOG_ERR); } } } @@ -199,7 +199,7 @@ class RemiseCheque extends CommonObject if ($this->UpdateAmount() <> 0) { $this->errno = -1027; - dolibarr_syslog("RemiseCheque::Create ERREUR ($this->errno)"); + dol_syslog("RemiseCheque::Create ERREUR ($this->errno)"); } } } @@ -208,7 +208,7 @@ class RemiseCheque extends CommonObject $result = -1; $this->error=$this->db->lasterror(); $this->errno=$this->db->lasterrno(); - dolibarr_syslog("RemiseCheque::Create Erreur $result INSERT Mysql"); + dol_syslog("RemiseCheque::Create Erreur $result INSERT Mysql"); } @@ -220,7 +220,7 @@ class RemiseCheque extends CommonObject else { $this->db->rollback(); - dolibarr_syslog("RemiseCheque::Create ROLLBACK ($this->errno)"); + dol_syslog("RemiseCheque::Create ROLLBACK ($this->errno)"); return $this->errno; } @@ -246,7 +246,7 @@ class RemiseCheque extends CommonObject if ($num <> 1) { $this->errno = -2; - dolibarr_syslog("Remisecheque::Delete Erreur Lecture ID ($this->errno)"); + dol_syslog("Remisecheque::Delete Erreur Lecture ID ($this->errno)"); } if ( $this->errno === 0) @@ -258,7 +258,7 @@ class RemiseCheque extends CommonObject if (!$resql) { $this->errno = -1028; - dolibarr_syslog("RemiseCheque::Delete ERREUR UPDATE ($this->errno)"); + dol_syslog("RemiseCheque::Delete ERREUR UPDATE ($this->errno)"); } } } @@ -270,7 +270,7 @@ class RemiseCheque extends CommonObject else { $this->db->rollback(); - dolibarr_syslog("RemiseCheque::Delete ROLLBACK ($this->errno)"); + dol_syslog("RemiseCheque::Delete ROLLBACK ($this->errno)"); } return $this->errno; @@ -296,7 +296,7 @@ class RemiseCheque extends CommonObject $sql.= " SET statut=1, number='".$num."'"; $sql .= " WHERE rowid = $this->id AND statut=0;"; - dolibarr_syslog("RemiseCheque::Validate sql=".$sql, LOG_DEBUG); + dol_syslog("RemiseCheque::Validate sql=".$sql, LOG_DEBUG); $resql = $this->db->query($sql); if ( $resql ) { @@ -309,13 +309,13 @@ class RemiseCheque extends CommonObject else { $this->errno = -1029; - dolibarr_syslog("Remisecheque::Validate Error ".$this->errno, LOG_ERR); + dol_syslog("Remisecheque::Validate Error ".$this->errno, LOG_ERR); } } else { $this->errno = -1033; - dolibarr_syslog("Remisecheque::Validate Error ".$this->errno, LOG_ERR); + dol_syslog("Remisecheque::Validate Error ".$this->errno, LOG_ERR); } } @@ -327,7 +327,7 @@ class RemiseCheque extends CommonObject else { $this->db->rollback(); - dolibarr_syslog("RemiseCheque::Validate ".$this->errno, LOG_ERR); + dol_syslog("RemiseCheque::Validate ".$this->errno, LOG_ERR); } return $this->errno; @@ -346,7 +346,7 @@ class RemiseCheque extends CommonObject // We use +0 to convert varchar to number $sql = "SELECT MAX(number+0) FROM ".MAIN_DB_PREFIX."bordereau_cheque"; - dolibarr_syslog("Remisecheque::getNextNumber sql=".$sql); + dol_syslog("Remisecheque::getNextNumber sql=".$sql); $resql = $this->db->query($sql); if ($resql) { @@ -357,7 +357,7 @@ class RemiseCheque extends CommonObject else { $this->errno = -1034; - dolibarr_syslog("Remisecheque::Validate Erreur SELECT ($this->errno)", LOG_ERR); + dol_syslog("Remisecheque::Validate Erreur SELECT ($this->errno)", LOG_ERR); } $num++; @@ -396,7 +396,7 @@ class RemiseCheque extends CommonObject } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); $this->error=$this->db->error(); return -1; } @@ -414,7 +414,7 @@ class RemiseCheque extends CommonObject if (empty($model)) $model='blochet'; - dolibarr_syslog("RemiseCheque::GeneratePdf model=".$model, LOG_DEBUG); + dol_syslog("RemiseCheque::GeneratePdf model=".$model, LOG_DEBUG); $dir=DOL_DOCUMENT_ROOT ."/includes/modules/cheque/pdf/"; @@ -435,7 +435,7 @@ class RemiseCheque extends CommonObject $sql.= " AND bc.rowid = ".$this->id; $sql.= " ORDER BY b.emetteur ASC, b.rowid ASC;"; - dolibarr_syslog("RemiseCheque::GeneratePdf sql=".$sql, LOG_DEBUG); + dol_syslog("RemiseCheque::GeneratePdf sql=".$sql, LOG_DEBUG); $result = $this->db->query($sql); if ($result) { @@ -471,8 +471,8 @@ class RemiseCheque extends CommonObject else { $outputlangs->charset_output=$sav_charset_output; - dolibarr_syslog("Error"); - dolibarr_print_error($db,$pdf->pdferror()); + dol_syslog("Error"); + dol_print_error($db,$pdf->pdferror()); return 0; } } @@ -516,13 +516,13 @@ class RemiseCheque extends CommonObject if (!$resql) { $this->errno = -1030; - dolibarr_syslog("RemiseCheque::UpdateAmount ERREUR UPDATE ($this->errno)"); + dol_syslog("RemiseCheque::UpdateAmount ERREUR UPDATE ($this->errno)"); } } else { $this->errno = -1031; - dolibarr_syslog("RemiseCheque::UpdateAmount ERREUR SELECT ($this->errno)"); + dol_syslog("RemiseCheque::UpdateAmount ERREUR SELECT ($this->errno)"); } if ($this->errno === 0) @@ -532,7 +532,7 @@ class RemiseCheque extends CommonObject else { $this->db->rollback(); - dolibarr_syslog("RemiseCheque::UpdateAmount ROLLBACK ($this->errno)"); + dol_syslog("RemiseCheque::UpdateAmount ROLLBACK ($this->errno)"); } return $this->errno; @@ -560,7 +560,7 @@ class RemiseCheque extends CommonObject else { $this->errno = -1032; - dolibarr_syslog("RemiseCheque::RemoveCheck ERREUR UPDATE ($this->errno)"); + dol_syslog("RemiseCheque::RemoveCheck ERREUR UPDATE ($this->errno)"); } } return 0; diff --git a/htdocs/compta/paiement/fiche.php b/htdocs/compta/paiement/fiche.php index e668e259fcbc21e592ef23b19653843015ece3d4..0495fa8ca9591a8e4844050ce37e0619712b14e4 100644 --- a/htdocs/compta/paiement/fiche.php +++ b/htdocs/compta/paiement/fiche.php @@ -110,7 +110,7 @@ $paiement = new Paiement($db); $result=$paiement->fetch($_GET['id']); if ($result <= 0) { - dolibarr_print_error($db,'Payement '.$_GET['id'].' not found in database'); + dol_print_error($db,'Payement '.$_GET['id'].' not found in database'); exit; } @@ -128,7 +128,7 @@ $head[$h][1] = $langs->trans("Info"); $h++; -dolibarr_fiche_head($head, $hselected, $langs->trans("PaymentCustomerInvoice")); +dol_fiche_head($head, $hselected, $langs->trans("PaymentCustomerInvoice")); /* * Confirmation de la suppression du paiement @@ -159,7 +159,7 @@ print '<table class="border" width="100%">'; print '<tr><td valign="top" width="140">'.$langs->trans('Ref').'</td><td colspan="3">'.$paiement->id.'</td></tr>'; // Date -print '<tr><td valign="top" width="120">'.$langs->trans('Date').'</td><td colspan="3">'.dolibarr_print_date($paiement->date,'day').'</td></tr>'; +print '<tr><td valign="top" width="120">'.$langs->trans('Date').'</td><td colspan="3">'.dol_print_date($paiement->date,'day').'</td></tr>'; // Mode print '<tr><td valign="top">'.$langs->trans('Mode').'</td><td colspan="3">'.$langs->trans("PaymentType".$paiement->type_code).'</td></tr>'; @@ -253,7 +253,7 @@ if ($resql) } else { - dolibarr_print_error($db); + dol_print_error($db); } print '</div>'; diff --git a/htdocs/compta/paiement/info.php b/htdocs/compta/paiement/info.php index f9e80ba1cc03713b8cb3b517d16bb3e900cdc6d0..1719160c8632d7588fe08a69c0975b2ea133f884 100644 --- a/htdocs/compta/paiement/info.php +++ b/htdocs/compta/paiement/info.php @@ -55,7 +55,7 @@ $hselected = $h; $h++; -dolibarr_fiche_head($head, $hselected, $langs->trans("PaymentCustomerInvoice")); +dol_fiche_head($head, $hselected, $langs->trans("PaymentCustomerInvoice")); print '<table class="border" width="100%">'; diff --git a/htdocs/compta/paiement/liste.php b/htdocs/compta/paiement/liste.php index 6c59afb2501032cf4098a4a13cc9b85cbc818f65..80415b31bf2d74dbe27b775aa930a6743a4dada4 100644 --- a/htdocs/compta/paiement/liste.php +++ b/htdocs/compta/paiement/liste.php @@ -159,7 +159,7 @@ if ($resql) print $paymentstatic->getNomUrl(1); print '</td>'; - print '<td align="center">'.dolibarr_print_date($objp->dp,'day').'</td>'; + print '<td align="center">'.dol_print_date($objp->dp,'day').'</td>'; // Company print '<td>'; @@ -202,7 +202,7 @@ if ($resql) } else { - dolibarr_print_error($db); + dol_print_error($db); } $db->close(); diff --git a/htdocs/compta/paiement/rapport.php b/htdocs/compta/paiement/rapport.php index 3cc96c8f9f120fbcafbbbf2d5d6ab7eaceba701d..032cdd6e5ccaa0bf24bfa113ab751db05c6f7742 100644 --- a/htdocs/compta/paiement/rapport.php +++ b/htdocs/compta/paiement/rapport.php @@ -70,8 +70,8 @@ if ($_POST["action"] == 'gen') else { $outputlangs->charset_output=$sav_charset_output; - dolibarr_syslog("Erreur dans commande_pdf_create"); - dolibarr_print_error($db,$obj->pdferror()); + dol_syslog("Erreur dans commande_pdf_create"); + dol_print_error($db,$obj->pdferror()); } $year = $_POST["reyear"]; @@ -98,11 +98,11 @@ for ($month = 1 ; $month < 13 ; $month++) { if ($month == $cmonth) { - print "<option value=\"$month\" selected=\"true\">" . dolibarr_print_date(mktime(0,0,0,$month),"%B"); + print "<option value=\"$month\" selected=\"true\">" . dol_print_date(mktime(0,0,0,$month),"%B"); } else { - print "<option value=\"$month\">" . dolibarr_print_date(mktime(0,0,0,$month),"%B"); + print "<option value=\"$month\">" . dol_print_date(mktime(0,0,0,$month),"%B"); } } print "</select>"; @@ -171,7 +171,7 @@ if ($year) $relativepath = $year.'/'.$file; print "<tr $bc[$var]>".'<td><a href="'.DOL_URL_ROOT . '/document.php?modulepart=facture_paiement&file='.urlencode($relativepath).'">'.img_pdf().' '.$file.'</a></td>'; print '<td align="right">'.filesize($tfile). ' '.$langs->trans("Bytes").'</td>'; - print '<td align="right">'.dolibarr_print_date(filemtime($tfile),"dayhour").'</td></tr>'; + print '<td align="right">'.dol_print_date(filemtime($tfile),"dayhour").'</td></tr>'; } } print '</table>'; diff --git a/htdocs/compta/paiement_charge.php b/htdocs/compta/paiement_charge.php index 52dae0b469e7b1a0dc853b635259b821992cc8c5..b9c7586ddc6370d8a4bbc04d7369ddfa51d8d6fd 100755 --- a/htdocs/compta/paiement_charge.php +++ b/htdocs/compta/paiement_charge.php @@ -51,7 +51,7 @@ if ($_POST["action"] == 'add_paiement') exit; } - $datepaye = dolibarr_mktime(12, 0 , 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]); + $datepaye = dol_mktime(12, 0 , 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]); if (! $_POST["paiementtype"] > 0) { @@ -182,9 +182,9 @@ if ($_GET["action"] == 'create') print '<tr><td>'.$langs->trans("Ref").'</td><td colspan="2">'; print '<a href="'.DOL_URL_ROOT.'/compta/sociales/charges.php?id='.$chid.'">'.$chid.'</a></td></tr>'; print '<tr><td>'.$langs->trans("Type")."</td><td colspan=\"2\">".$charge->type_libelle."</td></tr>\n"; - print '<tr><td>'.$langs->trans("Period")."</td><td colspan=\"2\">".dolibarr_print_date($charge->periode,'day')."</td></tr>\n"; + print '<tr><td>'.$langs->trans("Period")."</td><td colspan=\"2\">".dol_print_date($charge->periode,'day')."</td></tr>\n"; print '<tr><td>'.$langs->trans("Label").'</td><td colspan="2">'.$charge->lib."</td></tr>\n"; - print '<tr><td>'.$langs->trans("DateDue")."</td><td colspan=\"2\">".dolibarr_print_date($charge->date_ech,'day')."</td></tr>\n"; + print '<tr><td>'.$langs->trans("DateDue")."</td><td colspan=\"2\">".dol_print_date($charge->date_ech,'day')."</td></tr>\n"; print '<tr><td>'.$langs->trans("AmountTTC")."</td><td colspan=\"2\"><b>".price($charge->amount).'</b> '.$langs->trans("Currency".$conf->monnaie).'</td></tr>'; @@ -260,7 +260,7 @@ if ($_GET["action"] == 'create') if ($objp->date_ech > 0) { - print "<td align=\"left\">".dolibarr_print_date($objp->date_ech,'day')."</td>\n"; + print "<td align=\"left\">".dol_print_date($objp->date_ech,'day')."</td>\n"; } else { diff --git a/htdocs/compta/param/comptes/liste.php b/htdocs/compta/param/comptes/liste.php index a36bb855438a265da1588409ec34752bec3f5251..90507df71c3886b8d3be35ea1c68b8c815461e29 100644 --- a/htdocs/compta/param/comptes/liste.php +++ b/htdocs/compta/param/comptes/liste.php @@ -109,7 +109,7 @@ if ($resql) print '<td>'.$obj->numero.'</td>'."\n"; print '<td>'.$obj->intitule.'</td>'; print '<td align="right" width="100">'; - print dolibarr_print_date($obj->dc); + print dol_print_date($obj->dc); print '</td>'; print "</tr>\n"; @@ -120,7 +120,7 @@ if ($resql) } else { - dolibarr_print_error($db); + dol_print_error($db); } $db->close(); diff --git a/htdocs/compta/prelevement/bon-prelevement.class.php b/htdocs/compta/prelevement/bon-prelevement.class.php index d0fe39b2e68d42c8d418bb7bd781c67310596ac3..5e0ef0d52deba2f81c13fceabf37b7a774ecac2a 100644 --- a/htdocs/compta/prelevement/bon-prelevement.class.php +++ b/htdocs/compta/prelevement/bon-prelevement.class.php @@ -104,19 +104,19 @@ class BonPrelevement extends CommonObject else { $result = -1; - dolibarr_syslog("BonPrelevement::AddFacture Erreur $result"); + dol_syslog("BonPrelevement::AddFacture Erreur $result"); } } else { $result = -2; - dolibarr_syslog("BonPrelevement::AddFacture Erreur $result"); + dol_syslog("BonPrelevement::AddFacture Erreur $result"); } } else { $result = -3; - dolibarr_syslog("BonPrelevement::AddFacture Erreur $result"); + dol_syslog("BonPrelevement::AddFacture Erreur $result"); } return $result; @@ -175,7 +175,7 @@ class BonPrelevement extends CommonObject } else { - dolibarr_syslog("BonPrelevement::AddLigne Erreur -2"); + dol_syslog("BonPrelevement::AddLigne Erreur -2"); $result = -2; } @@ -213,7 +213,7 @@ class BonPrelevement extends CommonObject $sql .= " FROM ".MAIN_DB_PREFIX."prelevement_bons as p"; $sql .= " WHERE p.rowid=".$rowid; - dolibarr_syslog("Bon-prelevement::fetch sql=".$sql, LOG_DEBUG); + dol_syslog("Bon-prelevement::fetch sql=".$sql, LOG_DEBUG); $result=$this->db->query($sql); if ($result) { @@ -243,14 +243,14 @@ class BonPrelevement extends CommonObject } else { - dolibarr_syslog("BonPrelevement::Fetch Erreur aucune ligne retourn�e"); + dol_syslog("BonPrelevement::Fetch Erreur aucune ligne retourn�e"); return -1; } } else { - dolibarr_syslog("BonPrelevement::Fetch Erreur "); - dolibarr_syslog($sql); + dol_syslog("BonPrelevement::Fetch Erreur "); + dol_syslog($sql); return -2; } } @@ -274,7 +274,7 @@ class BonPrelevement extends CommonObject $result=$this->db->query($sql); if (! $result) { - dolibarr_syslog("bon-prelevement::set_credite Erreur 1"); + dol_syslog("bon-prelevement::set_credite Erreur 1"); $error++; } @@ -286,7 +286,7 @@ class BonPrelevement extends CommonObject for ($i = 0 ; $i < sizeof($facs) ; $i++) { /* Tag la facture comme impay�e */ - dolibarr_syslog("BonPrelevement::set_credite set_payed fac ".$facs[$i]); + dol_syslog("BonPrelevement::set_credite set_payed fac ".$facs[$i]); $fac = new Facture($this->db); $fac->fetch($facs[$i]); $result = $fac->set_payed($user); @@ -302,7 +302,7 @@ class BonPrelevement extends CommonObject if (! $this->db->query($sql)) { - dolibarr_syslog("BonPrelevement::set_credite Erreur 1"); + dol_syslog("BonPrelevement::set_credite Erreur 1"); $error++; } } @@ -320,7 +320,7 @@ class BonPrelevement extends CommonObject { $this->db->rollback(); - dolibarr_syslog("BonPrelevement::set_credite ROLLBACK "); + dol_syslog("BonPrelevement::set_credite ROLLBACK "); return -1; } @@ -330,7 +330,7 @@ class BonPrelevement extends CommonObject else { - dolibarr_syslog("BonPrelevement::set_credite Ouverture transaction SQL impossible "); + dol_syslog("BonPrelevement::set_credite Ouverture transaction SQL impossible "); return -2; } } @@ -361,13 +361,13 @@ class BonPrelevement extends CommonObject $subject = "Cr�dit pr�l�vement ".$this->ref." � la banque"; $message = "Le bon de pr�l�vement ".$this->ref; $message .= " a �t� cr�dit� par la banque.\n"; - $message .= "Date cr�dit : ".dolibarr_print_date($date,'dayhour'); + $message .= "Date cr�dit : ".dol_print_date($date,'dayhour'); $this->Notify($user, "cr", $subject, $message); } else { - dolibarr_syslog("BonPrelevement::set_infocredit Erreur 1"); + dol_syslog("BonPrelevement::set_infocredit Erreur 1"); $error++; } @@ -383,19 +383,19 @@ class BonPrelevement extends CommonObject else { $this->db->rollback(); - dolibarr_syslog("bon-prelevment::set_infocredit ROLLBACK "); + dol_syslog("bon-prelevment::set_infocredit ROLLBACK "); return -1; } } else { - dolibarr_syslog("bon-prelevement::set_infocredit Ouverture transaction SQL impossible "); + dol_syslog("bon-prelevement::set_infocredit Ouverture transaction SQL impossible "); return -1025; } } else { - dolibarr_syslog("bon-prelevment::set_infocredit 1027 Date de credit < Date de trans "); + dol_syslog("bon-prelevment::set_infocredit 1027 Date de credit < Date de trans "); return -1027; } } @@ -412,7 +412,7 @@ class BonPrelevement extends CommonObject function set_infotrans($user, $date, $method) { $error == 0; - dolibarr_syslog("bon-prelevement::set_infotrans Start",LOG_INFO); + dol_syslog("bon-prelevement::set_infotrans Start",LOG_INFO); if ($this->db->begin()) { $sql = "UPDATE ".MAIN_DB_PREFIX."prelevement_bons "; @@ -433,14 +433,14 @@ class BonPrelevement extends CommonObject $message .= "\n\n"; $message .= "\nMontant : ".price($this->amount); $message .= "\nM�thode : ".$this->methodes_trans[$this->method_trans]; - $message .= "\nDate : ".dolibarr_print_date($date,'day'); + $message .= "\nDate : ".dol_print_date($date,'day'); $this->Notify($user,"tr", $subject, $message, 1); } else { - dolibarr_syslog("bon-prelevement::set_infotrans Erreur 1", LOG_ERR); - dolibarr_syslog($this->db->error()); + dol_syslog("bon-prelevement::set_infotrans Erreur 1", LOG_ERR); + dol_syslog($this->db->error()); $error++; } @@ -456,7 +456,7 @@ class BonPrelevement extends CommonObject else { $this->db->rollback(); - dolibarr_syslog("BonPrelevement::set_infotrans ROLLBACK", LOG_ERR); + dol_syslog("BonPrelevement::set_infotrans ROLLBACK", LOG_ERR); return -1; } @@ -464,7 +464,7 @@ class BonPrelevement extends CommonObject else { - dolibarr_syslog("BonPrelevement::set_infotrans Ouverture transaction SQL impossible", LOG_CRIT); + dol_syslog("BonPrelevement::set_infotrans Ouverture transaction SQL impossible", LOG_CRIT); return -2; } } @@ -559,7 +559,7 @@ class BonPrelevement extends CommonObject } else { - dolibarr_syslog("Bon-Prelevement::_get_list_factures Erreur"); + dol_syslog("Bon-Prelevement::_get_list_factures Erreur"); } return $arr; @@ -595,8 +595,8 @@ class BonPrelevement extends CommonObject else { $error = 1; - dolibarr_syslog("BonPrelevement::SommeAPrelever Erreur -1"); - dolibarr_syslog($this->db->error()); + dol_syslog("BonPrelevement::SommeAPrelever Erreur -1"); + dol_syslog($this->db->error()); } } @@ -641,7 +641,7 @@ class BonPrelevement extends CommonObject else { $this->error="BonPrelevement::SommeAPrelever Erreur -1 sql=".$this->db->error(); - dolibarr_syslog($this->error); + dol_syslog($this->error); return -1; } } @@ -655,7 +655,7 @@ class BonPrelevement extends CommonObject { global $conf; - dolibarr_syslog("BonPrelevement::Create banque=$banque guichet=$guichet"); + dol_syslog("BonPrelevement::Create banque=$banque guichet=$guichet"); require_once (DOL_DOCUMENT_ROOT."/compta/prelevement/bon-prelevement.class.php"); require_once (DOL_DOCUMENT_ROOT."/facture.class.php"); @@ -704,7 +704,7 @@ class BonPrelevement extends CommonObject $sql .= " AND sr.code_guichet = '".PRELEVEMENT_CODE_GUICHET."'"; } - dolibarr_syslog("Bon-Prelevement::Create sql=".$sql, LOG_DEBUG); + dol_syslog("Bon-Prelevement::Create sql=".$sql, LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -718,13 +718,13 @@ class BonPrelevement extends CommonObject $i++; } $this->db->free($resql); - dolibarr_syslog($i." invoices to withdraw"); + dol_syslog($i." invoices to withdraw"); } else { $error = 1; - dolibarr_syslog("Erreur -1"); - dolibarr_syslog($this->db->error()); + dol_syslog("Erreur -1"); + dol_syslog($this->db->error()); } } @@ -732,7 +732,7 @@ class BonPrelevement extends CommonObject { // Check RIB $i = 0; - dolibarr_syslog("Start RIB check"); + dol_syslog("Start RIB check"); if (sizeof($factures) > 0) { @@ -754,30 +754,30 @@ class BonPrelevement extends CommonObject } else { - dolibarr_syslog("Erreur de RIB societe $fact->socid $soc->nom", LOG_ERR); + dol_syslog("Erreur de RIB societe $fact->socid $soc->nom", LOG_ERR); $facture_errors[$fac[0]]="Erreur de RIB societe $fact->socid $soc->nom"; } } else { - dolibarr_syslog("Failed to read company", LOG_ERR); + dol_syslog("Failed to read company", LOG_ERR); } } else { - dolibarr_syslog("Impossible de lire la facture", LOG_ERR); + dol_syslog("Impossible de lire la facture", LOG_ERR); } } } else { - dolibarr_syslog("Aucune factures a traiter"); + dol_syslog("Aucune factures a traiter"); } } // Withdraw invoices in factures_prev array - dolibarr_syslog(sizeof($factures_prev)." invoices will be withdrawed"); + dol_syslog(sizeof($factures_prev)." invoices will be withdrawed"); if (sizeof($factures_prev) > 0) { @@ -802,7 +802,7 @@ class BonPrelevement extends CommonObject $sql = "SELECT count(*) FROM ".MAIN_DB_PREFIX."prelevement_bons"; $sql .= " WHERE ref LIKE '$ref%'"; - dolibarr_syslog("Bon-Prelevement::Create sql=".$sql, LOG_DEBUG); + dol_syslog("Bon-Prelevement::Create sql=".$sql, LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) @@ -812,7 +812,7 @@ class BonPrelevement extends CommonObject else { $error++; - dolibarr_syslog("Erreur recherche reference"); + dol_syslog("Erreur recherche reference"); } $ref = $ref . substr("00".($row[0]+1), -2); @@ -823,7 +823,7 @@ class BonPrelevement extends CommonObject $sql = "INSERT INTO ".MAIN_DB_PREFIX."prelevement_bons (ref,datec)"; $sql .= " VALUES ('".$ref."',".$this->db->idate(mktime()).")"; - dolibarr_syslog("Bon-Prelevement::Create sql=".$sql, LOG_DEBUG); + dol_syslog("Bon-Prelevement::Create sql=".$sql, LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) @@ -840,7 +840,7 @@ class BonPrelevement extends CommonObject else { $error++; - dolibarr_syslog("Erreur creation du bon de prelevement"); + dol_syslog("Erreur creation du bon de prelevement"); } } @@ -850,7 +850,7 @@ class BonPrelevement extends CommonObject */ if (!$error) { - dolibarr_syslog("Start generation payments for the ".sizeof($factures_prev)." invoices"); + dol_syslog("Start generation payments for the ".sizeof($factures_prev)." invoices"); if (sizeof($factures_prev) > 0) { @@ -872,7 +872,7 @@ class BonPrelevement extends CommonObject if ($pai->create($user, 1) < 0) // on appelle en no_commit { $error++; - dolibarr_syslog("Erreur creation paiement facture ".$fac[0]); + dol_syslog("Erreur creation paiement facture ".$fac[0]); } else { @@ -911,7 +911,7 @@ class BonPrelevement extends CommonObject $sql .= ", fk_prelevement_bons = ".$prev_id; $sql .= " WHERE rowid=".$fac[1]; - dolibarr_syslog("Bon-Prelevement::Create sql=".$sql, LOG_DEBUG); + dol_syslog("Bon-Prelevement::Create sql=".$sql, LOG_DEBUG); if ($this->db->query($sql)) { @@ -919,15 +919,15 @@ class BonPrelevement extends CommonObject else { $error++; - dolibarr_syslog("Erreur mise a jour des demandes"); - dolibarr_syslog($this->db->error()); + dol_syslog("Erreur mise a jour des demandes"); + dol_syslog($this->db->error()); } } } } - dolibarr_syslog("Fin des paiements"); + dol_syslog("Fin des paiements"); } if (!$error) @@ -938,8 +938,8 @@ class BonPrelevement extends CommonObject * */ - dolibarr_syslog("Debut prelevement"); - dolibarr_syslog("Nombre de factures ".sizeof($factures_prev)); + dol_syslog("Debut prelevement"); + dol_syslog("Nombre de factures ".sizeof($factures_prev)); if (sizeof($factures_prev) > 0) { @@ -958,8 +958,8 @@ class BonPrelevement extends CommonObject $bonprev->generate(); } - dolibarr_syslog( $filebonprev ) ; - dolibarr_syslog("Fin prelevement"); + dol_syslog( $filebonprev ) ; + dol_syslog("Fin prelevement"); } /* @@ -971,12 +971,12 @@ class BonPrelevement extends CommonObject $sql .= " SET amount = ".price2num($bonprev->total); $sql .= " WHERE rowid = ".$prev_id; - dolibarr_syslog("Bon-Prelevement::Create sql=".$sql, LOG_DEBUG); + dol_syslog("Bon-Prelevement::Create sql=".$sql, LOG_DEBUG); $resql=$this->db->query($sql); if (! $resql) { $error++; - dolibarr_syslog("Erreur mise a jour du total - $sql"); + dol_syslog("Erreur mise a jour du total - $sql"); } /* @@ -1092,7 +1092,7 @@ class BonPrelevement extends CommonObject else { $result = -1; - dolibarr_syslog("BonPrelevement::AddNotification Erreur $result"); + dol_syslog("BonPrelevement::AddNotification Erreur $result"); } } diff --git a/htdocs/compta/prelevement/bon.php b/htdocs/compta/prelevement/bon.php index 116eb352a2ebcb776f933c40edfea55c635cdd98..f824d64edcd389470be7ec4d5f10d5954f6e8e47 100644 --- a/htdocs/compta/prelevement/bon.php +++ b/htdocs/compta/prelevement/bon.php @@ -75,7 +75,7 @@ if ($_GET["id"]) if ($bon->fetch($_GET["id"]) == 0) { - dolibarr_fiche_head($head, $hselected, 'Pr�l�vement : '. $bon->ref); + dol_fiche_head($head, $hselected, 'Pr�l�vement : '. $bon->ref); print '<table class="border" width="100%">'; @@ -136,7 +136,7 @@ if ($_GET["id"]) } else { - dolibarr_print_error($db); + dol_print_error($db); } } diff --git a/htdocs/compta/prelevement/bons.php b/htdocs/compta/prelevement/bons.php index ccbb017af173596e91d818643dfef77e87216234..13d2adaaed8f472f536bdf6a87fb1ff334d0f5d2 100644 --- a/htdocs/compta/prelevement/bons.php +++ b/htdocs/compta/prelevement/bons.php @@ -103,7 +103,7 @@ if ($result) print '<a href="fiche.php?id='.$obj->rowid.'">'.$obj->ref."</a></td>\n"; - print '<td align="center">'.dolibarr_print_date($obj->datec,'day')."</td>\n"; + print '<td align="center">'.dol_print_date($obj->datec,'day')."</td>\n"; print '<td align="right">'.price($obj->amount)."</td>\n"; @@ -115,7 +115,7 @@ if ($result) } else { - dolibarr_print_error($db); + dol_print_error($db); } $db->close(); diff --git a/htdocs/compta/prelevement/create.php b/htdocs/compta/prelevement/create.php index 78ad053da0e499447fa4af21a924e53eac07b65f..db9a15dec0dd05c33e1db794b3927c30f912e16f 100644 --- a/htdocs/compta/prelevement/create.php +++ b/htdocs/compta/prelevement/create.php @@ -71,7 +71,7 @@ $head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/create.php'; $head[$h][1] = $langs->trans("NewStandingOrder"); $h++; -dolibarr_fiche_head($head, $hselected, $langs->trans("StandingOrders")); +dol_fiche_head($head, $hselected, $langs->trans("StandingOrders")); $nb=$bprev->NbFactureAPrelever(); @@ -79,7 +79,7 @@ $nb1=$bprev->NbFactureAPrelever(1); $nb11=$bprev->NbFactureAPrelever(1,1); if ($nb < 0 || $nb1 < 0 || $nb11 < 0) { - dolibarr_print_error($bprev->error); + dol_print_error($bprev->error); } print '<table class="border" width="100%">'; @@ -159,7 +159,7 @@ if ($result) $bprev->ref=$obj->ref; print $bprev->getNomUrl(1); print "</td>\n"; - print '<td align="center">'.dolibarr_print_date($obj->datec,'day')."</td>\n"; + print '<td align="center">'.dol_print_date($obj->datec,'day')."</td>\n"; print '<td align="right">'.price($obj->amount).' '.$langs->trans("Currency".$conf->monnaie)."</td>\n"; @@ -171,7 +171,7 @@ if ($result) } else { - dolibarr_print_error($db); + dol_print_error($db); } @@ -226,7 +226,7 @@ if ( $db->query($sql) ) } else { - dolibarr_print_error($db); + dol_print_error($db); } diff --git a/htdocs/compta/prelevement/demandes.php b/htdocs/compta/prelevement/demandes.php index 8c367ae7a5a2ace7cf83235ed4e89d71e19e1f7b..f6b24c5903b14a8feaf2ca0cb212654fee44e3a4 100644 --- a/htdocs/compta/prelevement/demandes.php +++ b/htdocs/compta/prelevement/demandes.php @@ -137,7 +137,7 @@ if ( $db->query($sql) ) print $thirdpartystatic->getNomUrl(1,'customer'); print '</td>'; - print '<td align="center">'.dolibarr_print_date($obj->date_demande,'day').'</td>'; + print '<td align="center">'.dol_print_date($obj->date_demande,'day').'</td>'; if (!array_key_exists($obj->fk_user_demande,$users)) { @@ -159,7 +159,7 @@ if ( $db->query($sql) ) } else { - dolibarr_print_error($db); + dol_print_error($db); } diff --git a/htdocs/compta/prelevement/factures.php b/htdocs/compta/prelevement/factures.php index eb2eee31ddf4d49f54ebdfc8cdc73377908a7c31..51e6ffde117ba5960015e365b5bd268164eb92fd 100644 --- a/htdocs/compta/prelevement/factures.php +++ b/htdocs/compta/prelevement/factures.php @@ -73,7 +73,7 @@ if ($_GET["id"]) if ($bon->fetch($_GET["id"]) == 0) { - dolibarr_fiche_head($head, $hselected, $langs->trans("WithdrawalReceipt")); + dol_fiche_head($head, $hselected, $langs->trans("WithdrawalReceipt")); print '<table class="border" width="100%">'; print '<tr><td width="20%">'.$langs->trans("Ref").'</td><td>'.$bon->getNomUrl(1).'</td></tr>'; @@ -200,7 +200,7 @@ if ($result) } else { - dolibarr_print_error($db); + dol_print_error($db); } $db->close(); diff --git a/htdocs/compta/prelevement/facturesrejets.php b/htdocs/compta/prelevement/facturesrejets.php index bed1df54fd9d6a72faed8393878c186549fc475b..681d651fac0244d56c18ee822b19a13a043a52af 100644 --- a/htdocs/compta/prelevement/facturesrejets.php +++ b/htdocs/compta/prelevement/facturesrejets.php @@ -151,7 +151,7 @@ if ($result) } else { - dolibarr_print_error($db); + dol_print_error($db); } $db->close(); diff --git a/htdocs/compta/prelevement/fiche-rejet.php b/htdocs/compta/prelevement/fiche-rejet.php index 4b05e8c28c4132a837bdafb4a48cb75fecc6d2a5..db5839c65e4dc118e930291f3bc86d23a2eeddc9 100644 --- a/htdocs/compta/prelevement/fiche-rejet.php +++ b/htdocs/compta/prelevement/fiche-rejet.php @@ -67,7 +67,7 @@ if ($_GET["id"]) if ($bon->fetch($_GET["id"]) == 0) { - dolibarr_fiche_head($head, $hselected, $langs->trans("WithdrawalReceipt")); + dol_fiche_head($head, $hselected, $langs->trans("WithdrawalReceipt")); print '<table class="border" width="100%">'; print '<tr><td width="20%">'.$langs->trans("Ref").'</td><td>'.$bon->getNomUrl(1).'</td></tr>'; @@ -156,7 +156,7 @@ if ($resql) } else { - dolibarr_print_error($db); + dol_print_error($db); } $db->close(); diff --git a/htdocs/compta/prelevement/fiche-stat.php b/htdocs/compta/prelevement/fiche-stat.php index df2eee839cde9a3373bb6b063cb5fca7cd99f5b2..1d15ba1fc2209ffe274667d27d670911df30eb5d 100644 --- a/htdocs/compta/prelevement/fiche-stat.php +++ b/htdocs/compta/prelevement/fiche-stat.php @@ -70,7 +70,7 @@ if ($prev_id) if ($bon->fetch($_GET["id"]) == 0) { - dolibarr_fiche_head($head, $hselected, $langs->trans("WithdrawalReceipt")); + dol_fiche_head($head, $hselected, $langs->trans("WithdrawalReceipt")); print '<table class="border" width="100%">'; diff --git a/htdocs/compta/prelevement/fiche.php b/htdocs/compta/prelevement/fiche.php index 2b71a1c865a1b76dc74c087d8761d702b691c887..169b05cd8a041583daceace05408d3841743f1d0 100644 --- a/htdocs/compta/prelevement/fiche.php +++ b/htdocs/compta/prelevement/fiche.php @@ -63,14 +63,14 @@ if ($_POST["action"] == 'infotrans') if (dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $dir . "/" . $_FILES['userfile']['name'],1) > 0) { - $dt = dolibarr_mktime(12,0,0,$_POST["remonth"],$_POST["reday"],$_POST["reyear"]); + $dt = dol_mktime(12,0,0,$_POST["remonth"],$_POST["reday"],$_POST["reyear"]); $bon->set_infotrans($user, $dt, $_POST["methode"]); } } else { - dolibarr_syslog("Fichier invalide",LOG_WARNING); + dol_syslog("Fichier invalide",LOG_WARNING); } Header("Location: fiche.php?id=".$_GET["id"]); @@ -136,7 +136,7 @@ if ($_GET["id"]) if ($bon->fetch($_GET["id"]) == 0) { - dolibarr_fiche_head($head, $hselected, $langs->trans("WithdrawalReceipt")); + dol_fiche_head($head, $hselected, $langs->trans("WithdrawalReceipt")); if (isset($_GET["error"])) { @@ -154,7 +154,7 @@ if ($_GET["id"]) print '<table class="border" width="100%">'; print '<tr><td width="20%">'.$langs->trans("Ref").'</td><td>'.$bon->getNomUrl(1).'</td></tr>'; - print '<tr><td width="20%">'.$langs->trans("Date").'</td><td>'.dolibarr_print_date($bon->datec,'dayhour').'</td></tr>'; + print '<tr><td width="20%">'.$langs->trans("Date").'</td><td>'.dol_print_date($bon->datec,'dayhour').'</td></tr>'; print '<tr><td width="20%">'.$langs->trans("Amount").'</td><td>'.price($bon->amount).'</td></tr>'; print '<tr><td width="20%">'.$langs->trans("File").'</td><td>'; @@ -174,7 +174,7 @@ if ($_GET["id"]) $muser->fetch(); print '<tr><td width="20%">Date Transmission / Par</td><td>'; - print dolibarr_print_date($bon->date_trans,'dayhour'); + print dol_print_date($bon->date_trans,'dayhour'); print ' par '.$muser->fullname.'</td></tr>'; print '<tr><td width="20%">Methode Transmission</td><td>'; print $bon->methodes_trans[$bon->method_trans]; @@ -183,7 +183,7 @@ if ($_GET["id"]) if($bon->date_credit <> 0) { print '<tr><td width="20%">Credit on</td><td>'; - print dolibarr_print_date($bon->date_credit,'dayhour'); + print dol_print_date($bon->date_credit,'dayhour'); print '</td></tr>'; } @@ -227,7 +227,7 @@ if ($_GET["id"]) } else { - dolibarr_print_error($db); + dol_print_error($db); } } diff --git a/htdocs/compta/prelevement/index.php b/htdocs/compta/prelevement/index.php index c93d936753838a66023f73e73e2ca3f8369b2e8f..5374f7e0d4d1bc1468cd51169a5876671454ae5e 100644 --- a/htdocs/compta/prelevement/index.php +++ b/htdocs/compta/prelevement/index.php @@ -122,7 +122,7 @@ if ($resql) } else { - dolibarr_print_error($db); + dol_print_error($db); } @@ -162,7 +162,7 @@ if ($result) print '<a href="fiche.php?id='.$obj->rowid.'">'.$obj->ref."</a></td>\n"; - print '<td>'.dolibarr_print_date($obj->datec,"dayhour")."</td>\n"; + print '<td>'.dol_print_date($obj->datec,"dayhour")."</td>\n"; print '<td align="right">'.price($obj->amount)."</td>\n"; @@ -174,7 +174,7 @@ if ($result) } else { - dolibarr_print_error($db); + dol_print_error($db); } print '</td></tr></table>'; diff --git a/htdocs/compta/prelevement/ligne-prelevement.class.php b/htdocs/compta/prelevement/ligne-prelevement.class.php index 01799a7a9e52fe816fc8ffbfc5836d924a261927..83f22e06718b9c375eecd7b2ac1741d634b691e7 100644 --- a/htdocs/compta/prelevement/ligne-prelevement.class.php +++ b/htdocs/compta/prelevement/ligne-prelevement.class.php @@ -86,7 +86,7 @@ class LignePrelevement else { $result++; - dolibarr_syslog("LignePrelevement::Fetch rowid=$rowid numrows=0"); + dol_syslog("LignePrelevement::Fetch rowid=$rowid numrows=0"); } $this->db->free(); @@ -94,8 +94,8 @@ class LignePrelevement else { $result++; - dolibarr_syslog("LignePrelevement::Fetch rowid=$rowid"); - dolibarr_syslog($this->db->error()); + dol_syslog("LignePrelevement::Fetch rowid=$rowid"); + dol_syslog($this->db->error()); } return $result; diff --git a/htdocs/compta/prelevement/ligne.php b/htdocs/compta/prelevement/ligne.php index 81825580de950fea095689f4803abaf9fa2a08bc..874014b5de903c33d6e80d297299465e77fa5652 100644 --- a/htdocs/compta/prelevement/ligne.php +++ b/htdocs/compta/prelevement/ligne.php @@ -50,8 +50,8 @@ if ($_POST["action"] == 'confirm_rejet') } else { - dolibarr_syslog("Motif : ".$_POST["motif"]); - dolibarr_syslog("$daterej $time "); + dol_syslog("Motif : ".$_POST["motif"]); + dol_syslog("$daterej $time "); Header("Location: ligne.php?id=".$_GET["id"]."&action=rejet"); } } @@ -80,7 +80,7 @@ if ($_GET["id"]) $bon = new BonPrelevement($db); $bon->fetch($lipre->bon_rowid); - dolibarr_fiche_head($head, $hselected, 'Pr�l�vement : '. $lipre->bon_ref); + dol_fiche_head($head, $hselected, 'Pr�l�vement : '. $lipre->bon_ref); print '<table class="border" width="100%">'; @@ -106,7 +106,7 @@ if ($_GET["id"]) } else { - print dolibarr_print_date($rej->date_rejet,'day'); + print dol_print_date($rej->date_rejet,'day'); } print '</td></tr>'; } @@ -263,7 +263,7 @@ if ($_GET["id"]) } else { - dolibarr_print_error($db); + dol_print_error($db); } $db->close(); diff --git a/htdocs/compta/prelevement/lignes.php b/htdocs/compta/prelevement/lignes.php index 090f8668a507fecc8fce326c6dac9f1211683a95..6831b83b6b2fe6aebcefba56ef1688e39ed66645 100644 --- a/htdocs/compta/prelevement/lignes.php +++ b/htdocs/compta/prelevement/lignes.php @@ -72,7 +72,7 @@ if ($_GET["id"]) if ($bon->fetch($_GET["id"]) == 0) { - dolibarr_fiche_head($head, $hselected, $langs->trans("WithdrawalReceipt")); + dol_fiche_head($head, $hselected, $langs->trans("WithdrawalReceipt")); print '<table class="border" width="100%">'; @@ -198,7 +198,7 @@ if ($result) } else { - dolibarr_print_error($db); + dol_print_error($db); } $db->close(); diff --git a/htdocs/compta/prelevement/liste.php b/htdocs/compta/prelevement/liste.php index ddc4c17980e9e85d4ee17ad316067bb2f3b55105..d76db5b050fb5be7d51ff28504639f87af3b5282 100644 --- a/htdocs/compta/prelevement/liste.php +++ b/htdocs/compta/prelevement/liste.php @@ -141,7 +141,7 @@ if ($result) print '<a href="fiche.php?id='.$obj->rowid.'">'.$obj->ref."</a></td>\n"; print '<td><a href="fiche.php?id='.$obj->rowid.'">'.$obj->nom."</a></td>\n"; - print '<td align="center">'.dolibarr_print_date($obj->datec,'day')."</td>\n"; + print '<td align="center">'.dol_print_date($obj->datec,'day')."</td>\n"; print '<td align="right">'.price($obj->amount)."</td>\n"; print '<td align="center"><a href="fiche.php?id='.$obj->rowid.'">'.$obj->code_client."</a></td>\n"; print '<td> </td>'; @@ -154,7 +154,7 @@ if ($result) } else { - dolibarr_print_error($db); + dol_print_error($db); } $db->close(); diff --git a/htdocs/compta/prelevement/liste_factures.php b/htdocs/compta/prelevement/liste_factures.php index 4fe5e3f02567f87f887c0e9a8127716f86db9a38..291032f20c7bfea0a0229335efbe09ea90aeb2d3 100644 --- a/htdocs/compta/prelevement/liste_factures.php +++ b/htdocs/compta/prelevement/liste_factures.php @@ -156,7 +156,7 @@ if ($result) } else { - dolibarr_print_error($db); + dol_print_error($db); } $db->close(); diff --git a/htdocs/compta/prelevement/rejet-prelevement.class.php b/htdocs/compta/prelevement/rejet-prelevement.class.php index b6f727c6caa2efdafe599b39b0aa8b8ebcc8b4e3..6e8c1dc8ce22517ba6b5014eaf85d60e8c610348 100644 --- a/htdocs/compta/prelevement/rejet-prelevement.class.php +++ b/htdocs/compta/prelevement/rejet-prelevement.class.php @@ -66,7 +66,7 @@ class RejetPrelevement $this->id = $id; $this->bon_id = $bonid; - dolibarr_syslog("RejetPrelevement::Create id $id"); + dol_syslog("RejetPrelevement::Create id $id"); $facs = $this->_get_list_factures(); @@ -86,8 +86,8 @@ class RejetPrelevement if (!$result) { - dolibarr_syslog("RejetPrelevement::create Erreur 4"); - dolibarr_syslog("RejetPrelevement::create Erreur 4 $sql"); + dol_syslog("RejetPrelevement::create Erreur 4"); + dol_syslog("RejetPrelevement::create Erreur 4 $sql"); $error++; } @@ -99,7 +99,7 @@ class RejetPrelevement if (! $this->db->query($sql)) { - dolibarr_syslog("RejetPrelevement::create Erreur 5"); + dol_syslog("RejetPrelevement::create Erreur 5"); $error++; } @@ -126,7 +126,7 @@ class RejetPrelevement if ($pai->create($this->user, 1) == -1) // on appelle en no_commit { $error++; - dolibarr_syslog("RejetPrelevement::Create Erreur creation paiement facture ".$facs[$i]); + dol_syslog("RejetPrelevement::Create Erreur creation paiement facture ".$facs[$i]); } /* Valide le paiement */ @@ -134,11 +134,11 @@ class RejetPrelevement if ($pai->valide() < 0) { $error++; - dolibarr_syslog("RejetPrelevement::Create Erreur validation du paiement"); + dol_syslog("RejetPrelevement::Create Erreur validation du paiement"); } /* Tag la facture comme impay�e */ - dolibarr_syslog("RejetPrelevement::Create set_unpayed fac ".$fac->ref); + dol_syslog("RejetPrelevement::Create set_unpayed fac ".$fac->ref); $fac->set_unpayed($fac->id, $user); /* Envoi un email � l'emetteur de la demande de prev */ @@ -147,12 +147,12 @@ class RejetPrelevement if ($error == 0) { - dolibarr_syslog("RejetPrelevement::Create Commit"); + dol_syslog("RejetPrelevement::Create Commit"); $this->db->commit(); } else { - dolibarr_syslog("RejetPrelevement::Create Rollback"); + dol_syslog("RejetPrelevement::Create Rollback"); $this->db->rollback(); } @@ -183,7 +183,7 @@ class RejetPrelevement } else { - dolibarr_syslog("RejetPrelevement::_send_email Erreur lecture user"); + dol_syslog("RejetPrelevement::_send_email Erreur lecture user"); } if ($userid > 0) @@ -216,16 +216,16 @@ class RejetPrelevement $result=$mailfile->sendfile(); if ($result) { - dolibarr_syslog("RejetPrelevement::_send_email email envoy�"); + dol_syslog("RejetPrelevement::_send_email email envoy�"); } else { - dolibarr_syslog("RejetPrelevement::_send_email Erreur envoi email"); + dol_syslog("RejetPrelevement::_send_email Erreur envoi email"); } } else { - dolibarr_syslog("RejetPrelevement::_send_email Userid invalide"); + dol_syslog("RejetPrelevement::_send_email Userid invalide"); } } @@ -269,7 +269,7 @@ class RejetPrelevement } else { - dolibarr_syslog("RejetPrelevement Erreur"); + dol_syslog("RejetPrelevement Erreur"); } return $arr; @@ -307,13 +307,13 @@ class RejetPrelevement } else { - dolibarr_syslog("RejetPrelevement::Fetch Erreur rowid=$rowid numrows=0"); + dol_syslog("RejetPrelevement::Fetch Erreur rowid=$rowid numrows=0"); return -1; } } else { - dolibarr_syslog("RejetPrelevement::Fetch Erreur rowid=$rowid"); + dol_syslog("RejetPrelevement::Fetch Erreur rowid=$rowid"); return -2; } } diff --git a/htdocs/compta/prelevement/rejets.php b/htdocs/compta/prelevement/rejets.php index ef08f971dcdeca0c1f205134853a0402aa5a9f47..0194313ed6ac43c8bdd27b25cf75ae0b6698b72d 100644 --- a/htdocs/compta/prelevement/rejets.php +++ b/htdocs/compta/prelevement/rejets.php @@ -135,7 +135,7 @@ if ($result) } else { - dolibarr_print_error($db); + dol_print_error($db); } $db->close(); diff --git a/htdocs/compta/prelevement/stats.php b/htdocs/compta/prelevement/stats.php index 4e41ff42644374e6f31024eaa52432267556cee3..83ded0a16ec24714676b61930ce70ca46726810a 100644 --- a/htdocs/compta/prelevement/stats.php +++ b/htdocs/compta/prelevement/stats.php @@ -119,7 +119,7 @@ if ($db->query($sql)) } else { - dolibarr_print_error($db); + dol_print_error($db); } @@ -210,7 +210,7 @@ if ($db->query($sql)) } else { - dolibarr_print_error($db); + dol_print_error($db); } diff --git a/htdocs/compta/propal.php b/htdocs/compta/propal.php index c1559f80118d2f8253997031a7cbcb0fbddebf3d..d0021d9c326552184bf06282bdcd2a1c1d8b7f58 100644 --- a/htdocs/compta/propal.php +++ b/htdocs/compta/propal.php @@ -96,12 +96,12 @@ if ( $action == 'delete' ) } else { - dolibarr_print_error($db); + dol_print_error($db); } } else { - dolibarr_print_error($db); + dol_print_error($db); } $propalid = 0; $brouillon = 1; @@ -146,7 +146,7 @@ if ($_GET["propalid"] > 0) $societe->fetch($propal->socid); $head = propal_prepare_head($propal); - dolibarr_fiche_head($head, 'compta', $langs->trans('Proposal')); + dol_fiche_head($head, 'compta', $langs->trans('Proposal')); /* @@ -192,7 +192,7 @@ if ($_GET["propalid"] > 0) // Dates print '<tr><td>'.$langs->trans('Date').'</td><td colspan="3">'; - print dolibarr_print_date($propal->date,'daytext'); + print dol_print_date($propal->date,'daytext'); print '</td>'; if ($conf->projet->enabled) $rowspan++; @@ -206,7 +206,7 @@ if ($_GET["propalid"] > 0) print '<td>'.$langs->trans('DateEndPropal').'</td><td colspan="3">'; if ($propal->fin_validite) { - print dolibarr_print_date($propal->fin_validite,'daytext'); + print dol_print_date($propal->fin_validite,'daytext'); if ($propal->statut == 1 && $propal->fin_validite < ($now - $conf->propal->cloture->warning_delay)) print img_warning($langs->trans("Late")); } else @@ -364,15 +364,15 @@ if ($_GET["propalid"] > 0) print ' '.$objp->ref.'</a> - '.stripslashes(nl2br($objp->product)); if ($objp->date_start && $objp->date_end) { - print ' (Du '.dolibarr_print_date($objp->date_start).' au '.dolibarr_print_date($objp->date_end).')'; + print ' (Du '.dol_print_date($objp->date_start).' au '.dol_print_date($objp->date_end).')'; } if ($objp->date_start && ! $objp->date_end) { - print ' (A partir du '.dolibarr_print_date($objp->date_start).')'; + print ' (A partir du '.dol_print_date($objp->date_start).')'; } if (! $objp->date_start && $objp->date_end) { - print " (Jusqu'au ".dolibarr_print_date($objp->date_end).')'; + print " (Jusqu'au ".dol_print_date($objp->date_end).')'; } print ($objp->description && $objp->description!=$objp->product)?'<br>'.stripslashes(nl2br($objp->description)):''; print '</td>'; @@ -405,15 +405,15 @@ if ($_GET["propalid"] > 0) print nl2br($objp->description); if ($objp->date_start && $objp->date_end) { - print ' (Du '.dolibarr_print_date($objp->date_start).' au '.dolibarr_print_date($objp->date_end).')'; + print ' (Du '.dol_print_date($objp->date_start).' au '.dol_print_date($objp->date_end).')'; } if ($objp->date_start && ! $objp->date_end) { - print ' (A partir du '.dolibarr_print_date($objp->date_start).')'; + print ' (A partir du '.dol_print_date($objp->date_start).')'; } if (! $objp->date_start && $objp->date_end) { - print " (Jusqu'au ".dolibarr_print_date($objp->date_end).')'; + print " (Jusqu'au ".dol_print_date($objp->date_end).')'; } } print "</td>\n"; @@ -451,7 +451,7 @@ if ($_GET["propalid"] > 0) } else { - dolibarr_print_error($db); + dol_print_error($db); } print '</table>'; @@ -524,7 +524,7 @@ if ($_GET["propalid"] > 0) $var=!$var; print '<tr '.$bc[$var].'><td>'; print '<a href="'.DOL_URL_ROOT.'/commande/fiche.php?id='.$coms[$i]->id.'">'.img_object($langs->trans("ShowOrder"),"order").' '.$coms[$i]->ref."</a></td>\n"; - print '<td align="center">'.dolibarr_print_date($coms[$i]->date,'day').'</td>'; + print '<td align="center">'.dol_print_date($coms[$i]->date,'day').'</td>'; print '<td align="right">'.price($coms[$i]->total_ttc).'</td>'; print '<td align="right">'.$coms[$i]->getLibStatut(3).'</td>'; print "</tr>\n"; @@ -550,12 +550,12 @@ if ($_GET["propalid"] > 0) $sql2.= ", ".MAIN_DB_PREFIX."co_pr as cp, ".MAIN_DB_PREFIX."co_fa as cf"; $sql2.= " WHERE cp.fk_propale = ".$propal->id." AND cf.fk_commande = cp.fk_commande AND cf.fk_facture = f.rowid"; - dolibarr_syslog("propal.php::liste factures sql=".$sql); + dol_syslog("propal.php::liste factures sql=".$sql); $resql=$db->query($sql); $resql2=null; if ($resql) { - dolibarr_syslog("propal.php::liste factures sql2=".$sql2); + dol_syslog("propal.php::liste factures sql2=".$sql2); $resql2=$db->query($sql2); } if ($resql2) @@ -607,7 +607,7 @@ if ($_GET["propalid"] > 0) $var=!$var; print "<tr $bc[$var]>"; print '<td><a href="../compta/facture.php?facid='.$objp->facid.'">'.img_object($langs->trans("ShowBill"),"bill").' '.$objp->facnumber.'</a></td>'; - print '<td align="center">'.dolibarr_print_date($objp->df,'day').'</td>'; + print '<td align="center">'.dol_print_date($objp->df,'day').'</td>'; print '<td align="right">'.price($objp->total).'</td>'; print '<td align="right">'.$staticfacture->LibStatut($objp->paye,$objp->fk_statut,3).'</td>'; print "</tr>"; @@ -778,10 +778,10 @@ else // Date print "<td align=\"right\">"; - $y = dolibarr_print_date($objp->dp,"%Y"); - $m = dolibarr_print_date($objp->dp,"%m"); - $mt = dolibarr_print_date($objp->dp,"%b"); - $d = dolibarr_print_date($objp->dp,"%d"); + $y = dol_print_date($objp->dp,"%Y"); + $m = dol_print_date($objp->dp,"%m"); + $mt = dol_print_date($objp->dp,"%b"); + $d = dol_print_date($objp->dp,"%d"); print $d."\n"; print " <a href=\"propal.php?year=$y&month=$m\">"; print $b."</a>\n"; @@ -802,7 +802,7 @@ else } else { - dolibarr_print_error($db); + dol_print_error($db); } } $db->close(); diff --git a/htdocs/compta/recap-compta.php b/htdocs/compta/recap-compta.php index 37b9714a56c0d48ee0e3d62c4f921d6ceb02f91a..165fb25056b9a9a75529f8b5263aedbed7b3d3b0 100644 --- a/htdocs/compta/recap-compta.php +++ b/htdocs/compta/recap-compta.php @@ -57,7 +57,7 @@ if ($socid > 0) */ $head = societe_prepare_head($societe); - dolibarr_fiche_head($head, 'compta', $langs->trans("ThirdParty")); + dol_fiche_head($head, 'compta', $langs->trans("ThirdParty")); print "<table width=\"100%\">\n"; print '<tr><td valign="top" width="50%">'; @@ -134,7 +134,7 @@ if ($socid > 0) $var=!$var; print "<tr $bc[$var]>"; - print "<td align=\"center\">".dolibarr_print_date($fac->date)."</td>\n"; + print "<td align=\"center\">".dol_print_date($fac->date)."</td>\n"; print "<td><a href=\"../compta/facture.php?facid=$fac->id\">".img_object($langs->trans("ShowBill"),"bill")." ".$fac->ref."</a></td>\n"; print '<td aling="left">'.$fac->getLibStatut(2,$totalpaye).'</td>'; @@ -169,7 +169,7 @@ if ($socid > 0) $objp = $db->fetch_object($resqlp); //$var=!$var; print "<tr $bc[$var]>"; - print '<td align="center">'.dolibarr_print_date($objp->dp)."</td>\n"; + print '<td align="center">'.dol_print_date($objp->dp)."</td>\n"; print '<td>'; print ' '; // D�calage print '<a href="paiement/fiche.php?id='.$objp->rowid.'">'.img_object($langs->trans("ShowPayment"),"payment").' '.$langs->trans("Payment").' '.$objp->rowid.'</td>'; @@ -191,13 +191,13 @@ if ($socid > 0) } else { - dolibarr_print_error($db); + dol_print_error($db); } } } else { - dolibarr_print_error($db); + dol_print_error($db); } print "</table>"; print "<br>"; @@ -205,7 +205,7 @@ if ($socid > 0) } else { - dolibarr_print_error($db); + dol_print_error($db); } diff --git a/htdocs/compta/resultat/clientfourn.php b/htdocs/compta/resultat/clientfourn.php index 15947c88d87983aa21b236000b9a72ccc372cc77..c37784597a12845b3dd280126552931c0fa32fca 100644 --- a/htdocs/compta/resultat/clientfourn.php +++ b/htdocs/compta/resultat/clientfourn.php @@ -124,7 +124,7 @@ if ($result) { } $db->free($result); } else { - dolibarr_print_error($db); + dol_print_error($db); } // On ajoute les paiements clients anciennes version, non lie par paiement_facture @@ -162,7 +162,7 @@ if ($modecompta != 'CREANCES-DETTES') } $db->free($result); } else { - dolibarr_print_error($db); + dol_print_error($db); } } @@ -246,7 +246,7 @@ if ($result) { $db->free($result); } else { - dolibarr_print_error($db); + dol_print_error($db); } print '<tr class="liste_total">'; if ($modecompta == 'CREANCES-DETTES') print '<td colspan="3" align="right">'.price(-$subtotal_ht).'</td>'; @@ -311,7 +311,7 @@ if ($result) { print '</tr>'; } } else { - dolibarr_print_error($db); + dol_print_error($db); } print '<tr class="liste_total">'; if ($modecompta == 'CREANCES-DETTES') print '<td colspan="3" align="right">'.price(-$subtotal_ht).'</td>'; @@ -375,7 +375,7 @@ if ($result) { print '</tr>'; } } else { - dolibarr_print_error($db); + dol_print_error($db); } print '<tr class="liste_total">'; if ($modecompta == 'CREANCES-DETTES') print '<td colspan="3" align="right">'.price(-$subtotal_ht).'</td>'; @@ -437,7 +437,7 @@ if ($modecompta == 'CREANCES-DETTES') } } } else { - dolibarr_print_error($db); + dol_print_error($db); } print "<tr $bc[$var]><td> </td>"; print "<td>".$langs->trans("VATToPay")."</td>\n"; @@ -475,7 +475,7 @@ if ($modecompta == 'CREANCES-DETTES') } } } else { - dolibarr_print_error($db); + dol_print_error($db); } print "<tr $bc[$var]><td> </td>"; print "<td>".$langs->trans("VATToCollect")."</td>\n"; @@ -515,7 +515,7 @@ else } $db->free($result); } else { - dolibarr_print_error($db); + dol_print_error($db); } print "<tr $bc[$var]><td> </td>"; print "<td>".$langs->trans("VATPayed")."</td>\n"; @@ -553,7 +553,7 @@ else } $db->free($result); } else { - dolibarr_print_error($db); + dol_print_error($db); } print "<tr $bc[$var]><td> </td>"; print "<td>".$langs->trans("VATCollected")."</td>\n"; diff --git a/htdocs/compta/resultat/index.php b/htdocs/compta/resultat/index.php index b2bca3bc75681d8a64fe6ce58e53190fc9891469..363e497a72f15a9974f453dafb713023c78b395d 100644 --- a/htdocs/compta/resultat/index.php +++ b/htdocs/compta/resultat/index.php @@ -115,7 +115,7 @@ if ($result) $db->free($result); } else { - dolibarr_print_error($db); + dol_print_error($db); } // On ajoute les paiements clients anciennes version, non li�s par paiement_facture @@ -149,7 +149,7 @@ if ($modecompta != 'CREANCES-DETTES') { } } else { - dolibarr_print_error($db); + dol_print_error($db); } } /* @@ -157,7 +157,7 @@ print "<br>Facture clients: subtotal_ht=".$subtotal_ht.' - subtotal_ttc='.$subto for ($mois = 1 ; $mois <= 12 ; $mois++) { $annee = 2007; - $case = strftime("%Y-%m",dolibarr_mktime(12,0,0,$mois,1,$annee)); + $case = strftime("%Y-%m",dol_mktime(12,0,0,$mois,1,$annee)); print 'Mois '.$mois.': '.$decaiss_ttc[$case].' '; print 'Mois '.$mois.': '.$encaiss_ttc[$case].' '; } @@ -209,14 +209,14 @@ if ($result) $db->free($result); } else { - dolibarr_print_error($db); + dol_print_error($db); } /* print "<br>Facture fournisseurs: subtotal_ht=".$subtotal_ht.' - subtotal_ttc='.$subtotal_ttc."<br>\n"; for ($mois = 1 ; $mois <= 12 ; $mois++) { $annee = 2007; - $case = strftime("%Y-%m",dolibarr_mktime(12,0,0,$mois,1,$annee)); + $case = strftime("%Y-%m",dol_mktime(12,0,0,$mois,1,$annee)); print 'Mois '.$mois.': '.$decaiss_ttc[$case].' '; print 'Mois '.$mois.': '.$encaiss_ttc[$case].' '; } @@ -249,7 +249,7 @@ if ($modecompta == 'CREANCES-DETTES') { } } } else { - dolibarr_print_error($db); + dol_print_error($db); } // TVA � r�cup�rer $sql = "SELECT sum(f.total_tva) as amount, date_format(f.datef,'%Y-%m') as dm"; @@ -272,7 +272,7 @@ if ($modecompta == 'CREANCES-DETTES') { } } } else { - dolibarr_print_error($db); + dol_print_error($db); } } else { @@ -303,7 +303,7 @@ else { } } } else { - dolibarr_print_error($db); + dol_print_error($db); } // TVA r�cup�r�e $sql = "SELECT sum(t.amount) as amount, date_format(t.datev,'%Y-%m') as dm"; @@ -332,7 +332,7 @@ else { } } } else { - dolibarr_print_error($db); + dol_print_error($db); } } /* @@ -340,7 +340,7 @@ print "<br>TVA: subtotal_ht=".$subtotal_ht.' - subtotal_ttc='.$subtotal_ttc."<br for ($mois = 1 ; $mois <= 12 ; $mois++) { $annee = 2007; - $case = strftime("%Y-%m",dolibarr_mktime(12,0,0,$mois,1,$annee)); + $case = strftime("%Y-%m",dol_mktime(12,0,0,$mois,1,$annee)); print 'Mois '.$mois.': '.$decaiss_ttc[$case].' '; print 'Mois '.$mois.': '.$encaiss_ttc[$case].' '; } @@ -393,14 +393,14 @@ if ($result) { } } } else { - dolibarr_print_error($db); + dol_print_error($db); } /* print "<br>Charges sociales non deduc: subtotal_ht=".$subtotal_ht.' - subtotal_ttc='.$subtotal_ttc."<br>\n"; for ($mois = 1 ; $mois <= 12 ; $mois++) { $annee = 2007; - $case = strftime("%Y-%m",dolibarr_mktime(12,0,0,$mois,1,$annee)); + $case = strftime("%Y-%m",dol_mktime(12,0,0,$mois,1,$annee)); print 'Mois '.$mois.': '.$decaiss_ttc[$case].' '; print 'Mois '.$mois.': '.$encaiss_ttc[$case].' '; } @@ -454,14 +454,14 @@ if ($result) { } } } else { - dolibarr_print_error($db); + dol_print_error($db); } /* print "<br>Charges sociales deduc: subtotal_ht=".$subtotal_ht.' - subtotal_ttc='.$subtotal_ttc."<br>\n"; for ($mois = 1 ; $mois <= 12 ; $mois++) { $annee = 2007; - $case = strftime("%Y-%m",dolibarr_mktime(12,0,0,$mois,1,$annee)); + $case = strftime("%Y-%m",dol_mktime(12,0,0,$mois,1,$annee)); print 'Mois '.$mois.': '.$decaiss_ttc[$case].' '; print 'Mois '.$mois.': '.$encaiss_ttc[$case].' '; } @@ -495,10 +495,10 @@ for ($mois = 1 ; $mois <= 12 ; $mois++) { $var=!$var; print '<tr '.$bc[$var].'>'; - print "<td>".dolibarr_print_date(dolibarr_mktime(12,0,0,$mois,1,$annee),"%b")."</td>"; + print "<td>".dol_print_date(dol_mktime(12,0,0,$mois,1,$annee),"%b")."</td>"; for ($annee = $year_start ; $annee <= $year_end ; $annee++) { - $case = strftime("%Y-%m",dolibarr_mktime(12,0,0,$mois,1,$annee)); + $case = strftime("%Y-%m",dol_mktime(12,0,0,$mois,1,$annee)); print '<td align="right"> '; if ($decaiss_ttc[$case] != 0) diff --git a/htdocs/compta/sociales/charges.php b/htdocs/compta/sociales/charges.php index 8e19643ab0ba9febfc791abe29a2b7e603b5dfda..1d8a0ce1590dfbd42ca5540b1ef39a9b31c71936 100644 --- a/htdocs/compta/sociales/charges.php +++ b/htdocs/compta/sociales/charges.php @@ -95,7 +95,7 @@ if ($_POST["action"] == 'confirm_delete') if ($_POST["action"] == 'add' && $user->rights->tax->charges->creer) { - $dateech=@dolibarr_mktime($_POST["echhour"],$_POST["echmin"],$_POST["echsec"],$_POST["echmonth"],$_POST["echday"],$_POST["echyear"]); + $dateech=@dol_mktime($_POST["echhour"],$_POST["echmin"],$_POST["echsec"],$_POST["echmonth"],$_POST["echday"],$_POST["echyear"]); if (! $dateech) { $mesg='<div class="error">'.$langs->trans("ErrorFieldRequired",$langs->transnoentities("DateDue")).'</div>'; @@ -136,7 +136,7 @@ if ($_POST["action"] == 'add' && $user->rights->tax->charges->creer) if ($_GET["action"] == 'update' && ! $_POST["cancel"] && $user->rights->tax->charges->creer) { - $dateech=@dolibarr_mktime($_POST["echhour"],$_POST["echmin"],$_POST["echsec"],$_POST["echmonth"],$_POST["echday"],$_POST["echyear"]); + $dateech=@dol_mktime($_POST["echhour"],$_POST["echmin"],$_POST["echsec"],$_POST["echmonth"],$_POST["echday"],$_POST["echyear"]); if (! $dateech) { $mesg='<div class="error">'.$langs->trans("ErrorFieldRequired",$langs->transnoentities("DateDue")).'</div>'; @@ -252,7 +252,7 @@ if ($chid > 0) $head[$h][2] = 'card'; $h++; - dolibarr_fiche_head($head, 'card', $langs->trans("SocialContribution")); + dol_fiche_head($head, 'card', $langs->trans("SocialContribution")); /* * Confirmation de la suppression de la charge @@ -284,11 +284,11 @@ if ($chid > 0) print "<td>"; if ($cha->paye==0 && $_GET['action'] == 'edit') { - print "<input type=\"text\" name=\"period\" value=\"".dolibarr_print_date($cha->periode,"%Y%m%d")."\"> (YYYYMMDD)"; + print "<input type=\"text\" name=\"period\" value=\"".dol_print_date($cha->periode,"%Y%m%d")."\"> (YYYYMMDD)"; } else { - print dolibarr_print_date($cha->periode,"%Y"); + print dol_print_date($cha->periode,"%Y"); } print "</td>"; @@ -320,7 +320,7 @@ if ($chid > 0) $var=!$var; print "<tr $bc[$var]><td>"; print img_object($langs->trans("Payment"),"payment").' '; - print dolibarr_print_date($objp->dp)."</td>\n"; + print dol_print_date($objp->dp)."</td>\n"; print "<td>$objp->paiement_type $objp->num_paiement</td>\n"; print '<td align="right">'.price($objp->amount)."</td><td>".$langs->trans("Currency".$conf->monnaie)."</td>\n"; print "</tr>"; @@ -343,7 +343,7 @@ if ($chid > 0) } else { - dolibarr_print_error($db); + dol_print_error($db); } print "</td>"; @@ -360,7 +360,7 @@ if ($chid > 0) } else { print '<tr><td>'.$langs->trans("Label").'</td><td>'.$cha->lib.'</td></tr>'; - print "<tr><td>".$langs->trans("DateDue")."</td><td>".dolibarr_print_date($cha->date_ech,'day')."</td></tr>"; + print "<tr><td>".$langs->trans("DateDue")."</td><td>".dol_print_date($cha->date_ech,'day')."</td></tr>"; } print '<tr><td>'.$langs->trans("AmountTTC").'</td><td>'.price($cha->amount).'</td></tr>'; @@ -419,7 +419,7 @@ if ($chid > 0) else { /* Charge non trouv� */ - dolibarr_print_error('',$cha->error); + dol_print_error('',$cha->error); } } diff --git a/htdocs/compta/sociales/index.php b/htdocs/compta/sociales/index.php index 9470489c9d59da5261de0493e129969957b91ce6..af074c5ebed87a27349801abb00f2fa2bcf09883 100644 --- a/htdocs/compta/sociales/index.php +++ b/htdocs/compta/sociales/index.php @@ -144,7 +144,7 @@ if ($resql) print '<a href="charges.php?id='.$obj->id.'">'.img_file().' '.$obj->id.'</a>'; print '</td>'; - print '<td width="110">'.dolibarr_print_date($obj->de, 'day').'</td>'; + print '<td width="110">'.dol_print_date($obj->de, 'day').'</td>'; print '<td align="center">'; if ($obj->periode) @@ -157,9 +157,9 @@ if ($resql) } print '</td>'; - print '<td>'.dolibarr_trunc($obj->type_lib,16).'</td>'; + print '<td>'.dol_trunc($obj->type_lib,16).'</td>'; - print '<td>'.dolibarr_trunc($obj->libelle,42).'</td>'; + print '<td>'.dol_trunc($obj->libelle,42).'</td>'; print '<td align="right" width="100">'.price($obj->amount).'</td>'; @@ -171,7 +171,7 @@ if ($resql) } else { - dolibarr_print_error($db); + dol_print_error($db); } print '</table>'; diff --git a/htdocs/compta/stats/cabyuser.php b/htdocs/compta/stats/cabyuser.php index f95d7f6b9b789f1c8285a89884ace95f29f477e1..e7f3a83dc08ccaee96bc10b786b1854698962c4f 100644 --- a/htdocs/compta/stats/cabyuser.php +++ b/htdocs/compta/stats/cabyuser.php @@ -118,7 +118,7 @@ if ($result) } } else { - dolibarr_print_error($db); + dol_print_error($db); } // On ajoute les paiements anciennes version, non lies par paiement_facture @@ -147,7 +147,7 @@ if ($modecompta != 'CREANCES-DETTES') } } else { - dolibarr_print_error($db); + dol_print_error($db); } } diff --git a/htdocs/compta/stats/casoc.php b/htdocs/compta/stats/casoc.php index fa61b4360b9a1efcf46c74607f38a8f118272380..38081354c8ae5adc15571e31b9b1be3fd969bd17 100644 --- a/htdocs/compta/stats/casoc.php +++ b/htdocs/compta/stats/casoc.php @@ -110,7 +110,7 @@ if ($result) } } else { - dolibarr_print_error($db); + dol_print_error($db); } // On ajoute les paiements anciennes version, non li�s par paiement_facture @@ -139,7 +139,7 @@ if ($modecompta != 'CREANCES-DETTES') } } else { - dolibarr_print_error($db); + dol_print_error($db); } } diff --git a/htdocs/compta/stats/comm.php b/htdocs/compta/stats/comm.php index a8cc611c0059da7a60aea59892b7fe7bed7808d7..f37dfd342e8842b1fedda49204d76ef90eb40680 100644 --- a/htdocs/compta/stats/comm.php +++ b/htdocs/compta/stats/comm.php @@ -59,14 +59,14 @@ if($_GET['id']!="") // Date de d�but du graphe $date_debut = time() ; $annees = "" ; - if ($conf->global->SOCIETE_FISCAL_MONTH_START < dolibarr_date("m",time()) ){ + if ($conf->global->SOCIETE_FISCAL_MONTH_START < dol_date("m",time()) ){ // Si le mois actuel est plus grand, l'ann�e de d�part est l� m�me que l'ann�e actuelle - $date_debut = mktime(0,0,0,$conf->global->SOCIETE_FISCAL_MONTH_START,1,dolibarr_date("Y",time())) ; - $annees = dolibarr_date("Y",time()) ; + $date_debut = mktime(0,0,0,$conf->global->SOCIETE_FISCAL_MONTH_START,1,dol_date("Y",time())) ; + $annees = dol_date("Y",time()) ; } else { // Sinon le d�but de l'ann�e comptable �tait l'ann�e d'avant - $date_debut = mktime(0,0,0,$conf->global->SOCIETE_FISCAL_MONTH_START,1,dolibarr_date("Y",time())-1) ; - $annees = (dolibarr_date("Y",time())-1).' - '.(dolibarr_date("Y",time())) ; + $date_debut = mktime(0,0,0,$conf->global->SOCIETE_FISCAL_MONTH_START,1,dol_date("Y",time())-1) ; + $annees = (dol_date("Y",time())-1).' - '.(dol_date("Y",time())) ; } /********************************************** @@ -89,7 +89,7 @@ if($_GET['id']!="") if($result){ if($db->num_rows($result)>0){ while($obj = $db->fetch_object($result)){ - if($obj->date != dolibarr_date("Ym",time())){ + if($obj->date != dol_date("Ym",time())){ $recapAnneeCA[] = array( $obj->month, $obj->CAMois ) ; $recapAnneeMR[] = array( $obj->month, $obj->MRMois ) ; }else{ @@ -117,12 +117,12 @@ if($_GET['id']!="") ), 'recapMoisCA' =>array( 'file' => 'recapMoisCA.png', - 'label' => $langs->trans('CAOrder').' '.$langs->trans('FromTo',dolibarr_date("01/m/Y",time()),dolibarr_date("d/m/Y",time())), + 'label' => $langs->trans('CAOrder').' '.$langs->trans('FromTo',dol_date("01/m/Y",time()),dol_date("d/m/Y",time())), 'data' => $recapMoisCA ), 'recapMoisMR'=>array( 'file' => 'recapMoisMR.png', - 'label' => $langs->trans('MargeOrder').' '.$langs->trans('FromTo',dolibarr_date("01/m/Y",time()),dolibarr_date("d/m/Y",time())), + 'label' => $langs->trans('MargeOrder').' '.$langs->trans('FromTo',dol_date("01/m/Y",time()),dol_date("d/m/Y",time())), 'data' => $recapMoisMR ) ) ; @@ -155,7 +155,7 @@ if($_GET['id']!="") } else { - dolibarr_print_error($db,'Error for calculating graph on key='.$key.' - '.$product->error); + dol_print_error($db,'Error for calculating graph on key='.$key.' - '.$product->error); } } @@ -168,7 +168,7 @@ if($_GET['id']!="") ************/ // en-t�te if($mesg) print '<div class="error">'.$mesg.'</div>' ; - dolibarr_fiche_head(array(array('stats.php',$langs->trans("Commercial"))), 0, $langs->trans("Stats")); + dol_fiche_head(array(array('stats.php',$langs->trans("Commercial"))), 0, $langs->trans("Stats")); /***************************** * Rappel Infos du Commercial *****************************/ @@ -184,7 +184,7 @@ if($_GET['id']!="") </tr> </table>' ; - print "</div>" ; // Fin de dolibarr_fiche_head + print "</div>" ; // Fin de dol_fiche_head /*************************** * Affichage des Graphiques @@ -193,7 +193,7 @@ if($_GET['id']!="") foreach($graphfiles as $graph){ // donn�es $url=DOL_URL_ROOT.'/viewimage.php?modulepart=graph_comm&file='.urlencode($userstats->id .'/'.$graph['file']); - $generateOn = (file_exists($dir."/".$graph['file']))? $langs->trans("GeneratedOn",dolibarr_print_date(filemtime($dir."/".$graph['file']),"dayhour")) : "" ; + $generateOn = (file_exists($dir."/".$graph['file']))? $langs->trans("GeneratedOn",dol_print_date(filemtime($dir."/".$graph['file']),"dayhour")) : "" ; // html print '<table class="border" style="float:left;margin:5px;width:48%;min-width:470px;"> diff --git a/htdocs/compta/stats/comp.php b/htdocs/compta/stats/comp.php index 3a95688c510d6b23d6a605ecf8a0636aeee0d887..ca1f16364a9812656168ec2e1a1caa6941368b8f 100644 --- a/htdocs/compta/stats/comp.php +++ b/htdocs/compta/stats/comp.php @@ -83,7 +83,7 @@ function propals ($db, $year, $month) print "<td><a href=\"".DOL_URL_ROOT."/comm/propal.php?propalid=".$objp->propalid."\">".$objp->ref."</a></td>\n"; - print "<td align=\"right\">".dolibarr_print_date($objp->dp)."</td>\n"; + print "<td align=\"right\">".dol_print_date($objp->dp)."</td>\n"; print "<td align=\"right\">".price($objp->price)."</td>\n"; print "<td align=\"center\">".$objp->statut."</td>\n"; @@ -145,7 +145,7 @@ function factures ($db, $year, $month, $paye) { print "<td><a href=\"../facture.php?facid=".$objp->facid."\">".$objp->facnumber."</a></td>\n"; if ($objp->df > 0 ) { - print "<td align=\"right\">".dolibarr_print_date($objp->df)."</td>\n"; + print "<td align=\"right\">".dol_print_date($objp->df)."</td>\n"; } else { @@ -199,7 +199,7 @@ function pt ($db, $sql, $year) if ($obj->dm > $month ) { for ($b = $month ; $b < $obj->dm ; $b++) { print "<tr $bc[$var]>"; - print "<td>".dolibarr_print_date(dolibarr_mktime(12,0,0,$b, 1, $year),"%b")."</td>\n"; + print "<td>".dol_print_date(dol_mktime(12,0,0,$b, 1, $year),"%b")."</td>\n"; print "<td align=\"right\">0</td>\n"; print "</tr>\n"; $var=!$var; @@ -210,7 +210,7 @@ function pt ($db, $sql, $year) if ($obj->sum > 0) { print "<tr $bc[$var]>"; print "<td><a href=\"comp.php?details=1&year=$year&month=$obj->dm\">"; - print dolibarr_print_date(dolibarr_mktime(12,0,0,$obj->dm, 1, $year),"%b")."</td>\n"; + print dol_print_date(dol_mktime(12,0,0,$obj->dm, 1, $year),"%b")."</td>\n"; print "<td align=\"right\">".price($obj->sum)."</td>\n"; print "</TR>\n"; @@ -231,7 +231,7 @@ function pt ($db, $sql, $year) for ($b = $beg + 1 ; $b < 13 ; $b++) { $var=!$var; print "<tr $bc[$var]>"; - print "<td>".dolibarr_print_date(dolibarr_mktime(12,0,0,$b, 1, $year),"%b")."</td>\n"; + print "<td>".dol_print_date(dol_mktime(12,0,0,$b, 1, $year),"%b")."</td>\n"; print "<td align=\"right\">0</td>\n"; print "</tr>\n"; $ca[$b] = 0; @@ -306,7 +306,7 @@ function ppt ($db, $year, $socid) $delta = $ca[$b] - $prev[$b]; $deltat = $deltat + $delta ; print "<tr $bc[$var]>"; - print "<td>".dolibarr_print_date(dolibarr_mktime(12,0,0,$b, 1, $year),"%b")."</td>\n"; + print "<td>".dol_print_date(dol_mktime(12,0,0,$b, 1, $year),"%b")."</td>\n"; print "<td align=\"right\">".price($delta)."</td>\n"; print "</tr>\n"; } diff --git a/htdocs/compta/stats/exercices.php b/htdocs/compta/stats/exercices.php index fb8ff3d1cc89df2db17deb315cfe09ef58336339..e10bcf08dea4d4c51b07be06c55628d8caedaacf 100644 --- a/htdocs/compta/stats/exercices.php +++ b/htdocs/compta/stats/exercices.php @@ -76,7 +76,7 @@ function factures ($db, $year, $month, $paye) print "<TD><a href=\"comp.php?socid=".$objp->socid."\">".$objp->nom."</a></TD>\n"; print "<TD><a href=\"facture.php?facid=".$objp->facid."\">".$objp->facnumber."</a></TD>\n"; if ($objp->df > 0 ) { - print "<TD align=\"right\">".dolibarr_print_date($objp->df)."</TD>\n"; + print "<TD align=\"right\">".dol_print_date($objp->df)."</TD>\n"; } else { print "<TD align=\"right\"><b>!!!</b></TD>\n"; } @@ -123,7 +123,7 @@ function pt ($db, $sql, $year) { if ($obj->dm > $month ) { for ($b = $month ; $b < $obj->dm ; $b++) { print "<tr $bc[$var]>"; - print "<td>".dolibarr_print_date(dolibarr_mktime(12,0,0,$b, 1, $year),"%b")."</td>\n"; + print "<td>".dol_print_date(dol_mktime(12,0,0,$b, 1, $year),"%b")."</td>\n"; print "<td align=\"right\">0</td>\n"; print "</tr>\n"; $var=!$var; @@ -134,7 +134,7 @@ function pt ($db, $sql, $year) { if ($obj->sum > 0) { print "<tr $bc[$var]>"; print "<td>"; - print dolibarr_print_date(dolibarr_mktime(12,0,0,$obj->dm, 1, $year),"%b")."</td>\n"; + print dol_print_date(dol_mktime(12,0,0,$obj->dm, 1, $year),"%b")."</td>\n"; print "<td align=\"right\">".price($obj->sum)."</td>\n"; print "</tr>\n"; @@ -155,7 +155,7 @@ function pt ($db, $sql, $year) { for ($b = $beg + 1 ; $b < 13 ; $b++) { $var=!$var; print "<tr $bc[$var]>"; - print "<td>".dolibarr_print_date(dolibarr_mktime(12,0,0,$b, 1, $year),"%b")."</td>\n"; + print "<td>".dol_print_date(dol_mktime(12,0,0,$b, 1, $year),"%b")."</td>\n"; print "<td align=\"right\">0</td>\n"; print "</tr>\n"; $ca[$b] = 0; @@ -234,7 +234,7 @@ function ppt ($db, $year, $socid) $delta = $ca[$b] - $prev[$b]; $deltat = $deltat + $delta ; print "<TR $bc[$var]>"; - print "<TD>".dolibarr_print_date(dolibarr_mktime(12,0,0,$b, 1, $year),"%b")."</TD>\n"; + print "<TD>".dol_print_date(dol_mktime(12,0,0,$b, 1, $year),"%b")."</TD>\n"; print "<TD align=\"right\">".price($delta)."</TD>\n"; print "<TD align=\"right\">".price($deltat)."</TD>\n"; print "</TR>\n"; diff --git a/htdocs/compta/stats/index.php b/htdocs/compta/stats/index.php index bfe2292caf5ed859b5014d3e41732fb7feb139b2..4e014752119512b72b5c6c676f45245079cd45d7 100644 --- a/htdocs/compta/stats/index.php +++ b/htdocs/compta/stats/index.php @@ -111,7 +111,7 @@ if ($result) $db->free($result); } else { - dolibarr_print_error($db); + dol_print_error($db); } // On ajoute les paiements anciennes version, non li�s par paiement_facture @@ -140,7 +140,7 @@ if ($modecompta != 'CREANCES-DETTES') { } } else { - dolibarr_print_error($db); + dol_print_error($db); } } @@ -177,12 +177,12 @@ for ($mois = 1 ; $mois < 13 ; $mois++) $var=!$var; print "<tr $bc[$var]>"; - print "<td>".dolibarr_print_date(dolibarr_mktime(12,0,0,$mois,1,2000),"%b")."</td>"; + print "<td>".dol_print_date(dol_mktime(12,0,0,$mois,1,2000),"%b")."</td>"; for ($annee = $year_start ; $annee <= $year_end ; $annee++) { - $casenow = dolibarr_print_date(mktime(),"%Y-%m"); - $case = dolibarr_print_date(dolibarr_mktime(1,1,1,$mois,1,$annee),"%Y-%m"); - $caseprev = dolibarr_print_date(dolibarr_mktime(1,1,1,$mois,1,$annee-1),"%Y-%m"); + $casenow = dol_print_date(mktime(),"%Y-%m"); + $case = dol_print_date(dol_mktime(1,1,1,$mois,1,$annee),"%Y-%m"); + $caseprev = dol_print_date(dol_mktime(1,1,1,$mois,1,$annee-1),"%Y-%m"); if ($annee == $year_current) { $total_CA += $cum[$case]; @@ -338,7 +338,7 @@ if ($modecompta != 'CREANCES-DETTES') } else { - dolibarr_print_error($db); + dol_print_error($db); } */ @@ -388,7 +388,7 @@ En attendant correction. } else { - dolibarr_print_error($db); + dol_print_error($db); } print "<tr $bc[$var]><td align=\"right\" colspan=\"5\"><i>Total CA pr�visionnel : </i></td><td align=\"right\"><i>".price($total_CA)."</i></td><td colspan=\"3\"><-- bug ici car bug sur les 2 pr�c�dents</td></tr>"; } diff --git a/htdocs/compta/stats/prev.php b/htdocs/compta/stats/prev.php index 03b26d83f2cd54b45d12fbe8eac1aae549f0cc32..c257b76eece0300171686cd1bf7a52c5dbdea8f6 100644 --- a/htdocs/compta/stats/prev.php +++ b/htdocs/compta/stats/prev.php @@ -66,7 +66,7 @@ function pt ($db, $sql, $title) { } else { - dolibarr_print_error($db); + dol_print_error($db); } print "</table>"; diff --git a/htdocs/compta/tva/fiche.php b/htdocs/compta/tva/fiche.php index e60c8859d2a006537a2e9f59e5148ce2394b3997..4e9c245d2f25010bf470f5a8a2d7e5c91bf43b99 100644 --- a/htdocs/compta/tva/fiche.php +++ b/htdocs/compta/tva/fiche.php @@ -50,8 +50,8 @@ if ($_POST["action"] == 'add' && $_POST["cancel"] <> $langs->trans("Cancel")) $db->begin(); - $datev=dolibarr_mktime(12,0,0, $_POST["datevmonth"], $_POST["datevday"], $_POST["datevyear"]); - $datep=dolibarr_mktime(12,0,0, $_POST["datepmonth"], $_POST["datepday"], $_POST["datepyear"]); + $datev=dol_mktime(12,0,0, $_POST["datevmonth"], $_POST["datevday"], $_POST["datevyear"]); + $datep=dol_mktime(12,0,0, $_POST["datepmonth"], $_POST["datepday"], $_POST["datepyear"]); $tva->accountid=$_POST["accountid"]; $tva->paymenttype=$_POST["paiementtype"]; @@ -134,7 +134,7 @@ if ($id) $result = $vatpayment->fetch($id); if ($result <= 0) { - dolibarr_print_error($db); + dol_print_error($db); exit; } } @@ -200,7 +200,7 @@ if ($id) $head[$h][2] = 'card'; $h++; - dolibarr_fiche_head($head, 'card', $langs->trans("VATPayment")); + dol_fiche_head($head, 'card', $langs->trans("VATPayment")); print '<table class="border" width="100%">'; @@ -212,11 +212,11 @@ if ($id) print "<tr>"; print '<td>'.$langs->trans("DatePayment").'</td><td colspan="3">'; - print dolibarr_print_date($vatpayment->datep,'day'); + print dol_print_date($vatpayment->datep,'day'); print '</td></tr>'; print '<tr><td>'.$langs->trans("DateValue").'</td><td colspan="3">'; - print dolibarr_print_date($vatpayment->datev,'day'); + print dol_print_date($vatpayment->datev,'day'); print '</td></tr>'; print '<tr><td>'.$langs->trans("Amount").'</td><td colspan="3">'.price($vatpayment->amount).'</td></tr>'; diff --git a/htdocs/compta/tva/index.php b/htdocs/compta/tva/index.php index 8dd6f2a7416f181624f093ccd872b73db1832b67..402e1b988debfd37a43ae931b92512e82b147804 100644 --- a/htdocs/compta/tva/index.php +++ b/htdocs/compta/tva/index.php @@ -96,7 +96,7 @@ function tva_coll($db,$y,$m) } else { - dolibarr_print_error($db); + dol_print_error($db); } } @@ -158,7 +158,7 @@ function tva_paye($db, $y,$m) } else { - dolibarr_print_error($db); + dol_print_error($db); } } @@ -249,7 +249,7 @@ if ($conf->compta->mode == "CREANCES-DETTES") { $var=!$var; print "<tr $bc[$var]>"; - print '<td nowrap>'.dolibarr_print_date(dolibarr_mktime(0,0,0,$m,1,$y),"%b %Y").'</td>'; + print '<td nowrap>'.dol_print_date(dol_mktime(0,0,0,$m,1,$y),"%b %Y").'</td>'; $x_coll = tva_coll($db, $y, $m); print "<td nowrap align=\"right\">".price($x_coll)."</td>"; diff --git a/htdocs/compta/tva/quadri.php b/htdocs/compta/tva/quadri.php index 81404305ad051c44e5435ac5bea0b2f3c5df8dd3..44ad296875b29ba8b29611e1b71dc5d981774c35 100644 --- a/htdocs/compta/tva/quadri.php +++ b/htdocs/compta/tva/quadri.php @@ -105,7 +105,7 @@ function tva_coll($db,$y,$q) } else { - dolibarr_print_error($db); + dol_print_error($db); } } @@ -168,7 +168,7 @@ function tva_paye($db, $y,$q) } else { - dolibarr_print_error($db); + dol_print_error($db); } } @@ -217,7 +217,7 @@ if ($conf->compta->mode == "CREANCES-DETTES") $subtot_paye_vat = 0; for ($q = 1 ; $q <= 4 ; $q++ ) { - print "<tr class=\"liste_titre\"><td colspan=\"8\">".$langs->trans("Quadri")." $q (".dolibarr_print_date(dolibarr_mktime(0,0,0,(($q-1)*3)+1,1,$y),"%b %Y").' - '.dolibarr_print_date(dolibarr_mktime(0,0,0,($q*3),1,$y),"%b %Y").")</td></tr>"; + print "<tr class=\"liste_titre\"><td colspan=\"8\">".$langs->trans("Quadri")." $q (".dol_print_date(dol_mktime(0,0,0,(($q-1)*3)+1,1,$y),"%b %Y").' - '.dol_print_date(dol_mktime(0,0,0,($q*3),1,$y),"%b %Y").")</td></tr>"; $var=true; $x_coll = tva_coll($db, $y, $q); diff --git a/htdocs/compta/tva/quadri_detail.php b/htdocs/compta/tva/quadri_detail.php index 8df1928c2a45ad25ff2946824c118728f0a030d0..dc6c12e29dcf4450a8f540939fea8f0f691cc301 100644 --- a/htdocs/compta/tva/quadri_detail.php +++ b/htdocs/compta/tva/quadri_detail.php @@ -85,7 +85,7 @@ if ($modetax==1) // Caluclate on invoice for goods and services { $nom=$langs->trans("VATReportByQuartersInDueDebtMode"); $nom.='<br>('.$langs->trans("SeeVATReportInInputOutputMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year_start.'&q='.$q.'&modetax=0">','</a>').')'; - $period=$year_start.' - '.$langs->trans("Quadri")." $q (".dolibarr_print_date(dolibarr_mktime(12,0,0,(($q-1)*3)+1,1,$year_start),"%b %Y").' - '.dolibarr_print_date(dolibarr_mktime(12,0,0,($q*3),1,$year_start),"%b %Y").")"; + $period=$year_start.' - '.$langs->trans("Quadri")." $q (".dol_print_date(dol_mktime(12,0,0,(($q-1)*3)+1,1,$year_start),"%b %Y").' - '.dol_print_date(dol_mktime(12,0,0,($q*3),1,$year_start),"%b %Y").")"; $prevyear=$year_start; $prevquarter=$q; if ($prevquarter > 1) $prevquarter--; else { $prevquarter=4; $prevyear--; } @@ -114,7 +114,7 @@ if ($modetax==0) // Invoice for goods, payment for services { $nom=$langs->trans("VATReportByQuartersInInputOutputMode"); $nom.='<br>('.$langs->trans("SeeVATReportInDueDebtMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year_start.'&q='.$q.'&modetax=1">','</a>').')'; - $period=$year_start.' - '.$langs->trans("Quadri")." $q (".dolibarr_print_date(dolibarr_mktime(12,0,0,(($q-1)*3)+1,1,$year_start),"%b %Y").' - '.dolibarr_print_date(dolibarr_mktime(12,0,0,($q*3),1,$year_start),"%b %Y").")"; + $period=$year_start.' - '.$langs->trans("Quadri")." $q (".dol_print_date(dol_mktime(12,0,0,(($q-1)*3)+1,1,$year_start),"%b %Y").' - '.dol_print_date(dol_mktime(12,0,0,($q*3),1,$year_start),"%b %Y").")"; $prevyear=$year_start; $prevquarter=$q; if ($prevquarter > 1) $prevquarter--; else { $prevquarter=4; $prevyear--; } @@ -289,7 +289,7 @@ else else $text = img_object($langs->trans('Product'),'product'); print $text.' '; } - print dolibarr_trunc($fields['descr'],16).'</td>'; + print dol_trunc($fields['descr'],16).'</td>'; // Amount line if ($modetax == 0) { @@ -396,7 +396,7 @@ else else $text = img_object($langs->trans('Product'),'product'); print $text.' '; } - print dolibarr_trunc($fields['descr'],24).'</td>'; + print dol_trunc($fields['descr'],24).'</td>'; // Amount line if ($modetax == 0) { diff --git a/htdocs/compta/tva/reglement.php b/htdocs/compta/tva/reglement.php index bc3e55d9c688fdf0ae496430c5ac10176eb222db..108e88334382b9fd470b38f7cc5c61e4fad42ea6 100644 --- a/htdocs/compta/tva/reglement.php +++ b/htdocs/compta/tva/reglement.php @@ -75,7 +75,7 @@ if ($result) $tva_static->id=$obj->rowid; $tva_static->ref=$obj->rowid; print "<td>".$tva_static->getNomUrl(1)."</td>\n"; - print '<td align="left">'.dolibarr_print_date($obj->dm,'day')."</td>\n"; + print '<td align="left">'.dol_print_date($obj->dm,'day')."</td>\n"; print "<td>".$obj->label."</td>\n"; $total = $total + $obj->amount; @@ -92,7 +92,7 @@ if ($result) } else { - dolibarr_print_error($db); + dol_print_error($db); } diff --git a/htdocs/compta/tva/tva.class.php b/htdocs/compta/tva/tva.class.php index f491de56efdcf3050fcff4aac6fd77fe0c88279f..2189fca1a36200d4caec24d17645bb79326f9e1f 100644 --- a/htdocs/compta/tva/tva.class.php +++ b/htdocs/compta/tva/tva.class.php @@ -118,7 +118,7 @@ class Tva extends CommonObject $sql.= ")"; - dolibarr_syslog("Tva::create sql=".$sql, LOG_DEBUG); + dol_syslog("Tva::create sql=".$sql, LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -136,7 +136,7 @@ class Tva extends CommonObject else { $this->error="Error ".$this->db->lasterror(); - dolibarr_syslog("Tva::create ".$this->error, LOG_ERR); + dol_syslog("Tva::create ".$this->error, LOG_ERR); return -1; } } @@ -181,12 +181,12 @@ class Tva extends CommonObject $sql.= " WHERE rowid=".$this->id; - dolibarr_syslog("Tva::update sql=".$sql, LOG_DEBUG); + dol_syslog("Tva::update sql=".$sql, LOG_DEBUG); $resql = $this->db->query($sql); if (! $resql) { $this->error="Error ".$this->db->lasterror(); - dolibarr_syslog("Tva::update ".$this->error, LOG_ERR); + dol_syslog("Tva::update ".$this->error, LOG_ERR); return -1; } @@ -233,7 +233,7 @@ class Tva extends CommonObject $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."bank as b ON t.fk_bank = b.rowid"; $sql.= " WHERE t.rowid = ".$id; - dolibarr_syslog("Tva::fetch sql=".$sql, LOG_DEBUG); + dol_syslog("Tva::fetch sql=".$sql, LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -263,7 +263,7 @@ class Tva extends CommonObject else { $this->error="Error ".$this->db->lasterror(); - dolibarr_syslog("Tva::fetch ".$this->error, LOG_ERR); + dol_syslog("Tva::fetch ".$this->error, LOG_ERR); return -1; } } @@ -281,12 +281,12 @@ class Tva extends CommonObject $sql = "DELETE FROM ".MAIN_DB_PREFIX."tva"; $sql.= " WHERE rowid=".$this->id; - dolibarr_syslog("Tva::delete sql=".$sql); + dol_syslog("Tva::delete sql=".$sql); $resql = $this->db->query($sql); if (! $resql) { $this->error="Error ".$this->db->lasterror(); - dolibarr_syslog("Tva::delete ".$this->error, LOG_ERR); + dol_syslog("Tva::delete ".$this->error, LOG_ERR); return -1; } @@ -509,7 +509,7 @@ class Tva extends CommonObject $sql.=", '".$user->id."', NULL"; $sql.= ")"; - dolibarr_syslog("Tva::addPayment sql=".$sql); + dol_syslog("Tva::addPayment sql=".$sql); $result = $this->db->query($sql); if ($result) { @@ -524,7 +524,7 @@ class Tva extends CommonObject $acc = new Account($this->db); $result=$acc->fetch($this->accountid); - if ($result <= 0) dolibarr_print_error($db); + if ($result <= 0) dol_print_error($db); $bank_line_id = $acc->addline($this->datep, $this->paymenttype, $this->label, -abs($this->amount), '', '', $user); @@ -590,7 +590,7 @@ class Tva extends CommonObject } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); return -1; } } diff --git a/htdocs/compta/ventilation/lignes.php b/htdocs/compta/ventilation/lignes.php index 13228950b3c26df36539049640808fe9ec314b18..756756e36b3cb0332a37631f4bd06cc89c66f359 100644 --- a/htdocs/compta/ventilation/lignes.php +++ b/htdocs/compta/ventilation/lignes.php @@ -123,8 +123,8 @@ if ($result) else print ' '; print '</td>'; - print '<td>'.dolibarr_trunc($objp->product_label,24).'</td>'; - print '<td>'.nl2br(dolibarr_trunc($objp->description,32)).'</td>'; + print '<td>'.dol_trunc($objp->product_label,24).'</td>'; + print '<td>'.nl2br(dol_trunc($objp->description,32)).'</td>'; print '<td align="left">'.price($objp->price).'</td>'; print '<td align="left">'.$codeCompta.'</td>'; diff --git a/htdocs/compta/ventilation/liste.php b/htdocs/compta/ventilation/liste.php index 53b4c418929305e59e28b78eac5b6096008a761a..713670812824599afa5610c535bd4a72ed628ba8 100644 --- a/htdocs/compta/ventilation/liste.php +++ b/htdocs/compta/ventilation/liste.php @@ -103,8 +103,8 @@ if ($result) else print ' '; print '</td>'; - print '<td>'.dolibarr_trunc($objp->product_label,24).'</td>'; - print '<td>'.nl2br(dolibarr_trunc($objp->description,32)).'</td>'; + print '<td>'.dol_trunc($objp->product_label,24).'</td>'; + print '<td>'.nl2br(dol_trunc($objp->description,32)).'</td>'; print '<td align="right">'; print price($objp->price); diff --git a/htdocs/contact.class.php b/htdocs/contact.class.php index 05ee475dd5cedb2cfe9b90f13adfd15f18a2d92f..2c9770ea7455cd0ccddf5cc37a4acdb8c6f732a0 100644 --- a/htdocs/contact.class.php +++ b/htdocs/contact.class.php @@ -102,7 +102,7 @@ class Contact extends CommonObject $sql.= $this->priv; $sql.= ")"; - dolibarr_syslog("Contact::create sql=".$sql); + dol_syslog("Contact::create sql=".$sql); $resql=$this->db->query($sql); if ($resql) { @@ -127,7 +127,7 @@ class Contact extends CommonObject else { $this->error=$this->db->error(); - dolibarr_syslog("Contact::create ".$this->error); + dol_syslog("Contact::create ".$this->error); return -1; } } @@ -177,12 +177,12 @@ class Contact extends CommonObject $sql .= ", fk_user_modif=".($user->id > 0 ? "'".$user->id."'":"null"); $sql .= " WHERE rowid=".$id; - dolibarr_syslog("Contact::update sql=".$sql,LOG_DEBUG); + dol_syslog("Contact::update sql=".$sql,LOG_DEBUG); $result = $this->db->query($sql); if (! $result) { $this->error=$this->db->lasterror().' sql='.$sql; - dolibarr_syslog("Contact::update Error ".$this->error,LOG_ERR); + dol_syslog("Contact::update Error ".$this->error,LOG_ERR); return -1; } @@ -312,7 +312,7 @@ class Contact extends CommonObject if ($user) $sql .= ", fk_user_modif=".$user->id; $sql .= " WHERE rowid=".$id; //print "update_perso: ".$this->birthday.'-'.$this->db->idate($this->birthday); - dolibarr_syslog("Contact::update_perso this->birthday=".$this->birthday." - sql=".$sql); + dol_syslog("Contact::update_perso this->birthday=".$this->birthday." - sql=".$sql); $resql = $this->db->query($sql); if (! $resql) { @@ -379,7 +379,7 @@ class Contact extends CommonObject $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON c.fk_soc = s.rowid"; $sql.= " WHERE c.rowid = ". $id; - dolibarr_syslog("Contact::fetch sql=".$sql); + dol_syslog("Contact::fetch sql=".$sql); $resql=$this->db->query($sql); if ($resql) { @@ -444,7 +444,7 @@ class Contact extends CommonObject else { $this->error=$this->db->error(); - dolibarr_syslog("Contact::fetch ".$this->error, LOG_ERR); + dol_syslog("Contact::fetch ".$this->error, LOG_ERR); return -1; } @@ -469,7 +469,7 @@ class Contact extends CommonObject else { $this->error=$this->db->error(); - dolibarr_syslog("Contact::fetch ".$this->error, LOG_ERR); + dol_syslog("Contact::fetch ".$this->error, LOG_ERR); return -1; } } @@ -485,7 +485,7 @@ class Contact extends CommonObject else { $this->error=$this->db->error(); - dolibarr_syslog("Contact::fetch ".$this->error, LOG_ERR); + dol_syslog("Contact::fetch ".$this->error, LOG_ERR); return -1; } } @@ -508,7 +508,7 @@ class Contact extends CommonObject $sql.=" AND fk_socpeople = ". $this->id; $sql.=" GROUP BY tc.element"; - dolibarr_syslog("Contact::load_ref_elements sql=".$sql); + dol_syslog("Contact::load_ref_elements sql=".$sql); $resql=$this->db->query($sql); if ($resql) @@ -529,7 +529,7 @@ class Contact extends CommonObject else { $this->error=$this->db->error()." - ".$sql; - dolibarr_syslog("Contact::load_ref_elements Error ".$this->error); + dol_syslog("Contact::load_ref_elements Error ".$this->error); return -1; } } @@ -558,7 +558,7 @@ class Contact extends CommonObject $sql.= " WHERE ec.fk_socpeople=".$this->id; $sql.= " AND ec.fk_c_type_contact=tc.rowid"; $sql.= " AND tc.source='external'"; - dolibarr_syslog("Contact::delete sql=".$sql); + dol_syslog("Contact::delete sql=".$sql); $resql = $this->db->query($sql); if ($resql) { @@ -571,7 +571,7 @@ class Contact extends CommonObject $sqldel = "DELETE FROM ".MAIN_DB_PREFIX."element_contact"; $sqldel.=" WHERE rowid = ".$obj->rowid; - dolibarr_syslog("Contact::delete sql=".$sqldel); + dol_syslog("Contact::delete sql=".$sqldel); $result = $this->db->query($sqldel); if (! $result) { @@ -593,7 +593,7 @@ class Contact extends CommonObject { $sql = "DELETE FROM ".MAIN_DB_PREFIX."socpeople"; $sql .= " WHERE rowid=".$this->id; - dolibarr_syslog("Contact::delete sql=".$sql); + dol_syslog("Contact::delete sql=".$sql); $result = $this->db->query($sql); if (! $result) { @@ -721,7 +721,7 @@ class Contact extends CommonObject } if ($withpicto) $result.=($lien.img_object($langs->trans("ShowContact").': '.$this->getFullName($langs),'contact').$lienfin.' '); - $result.=$lien.($maxlen?dolibarr_trunc($this->getFullName($langs),$maxlen):$this->getFullName($langs)).$lienfin; + $result.=$lien.($maxlen?dol_trunc($this->getFullName($langs),$maxlen):$this->getFullName($langs)).$lienfin; return $result; } diff --git a/htdocs/contact/exportimport.php b/htdocs/contact/exportimport.php index 38f5a5cba0a469c7923f082317024bdd5cb80aff..9277434a9f352179c33d810d2cb967a0cc1b8a2f 100644 --- a/htdocs/contact/exportimport.php +++ b/htdocs/contact/exportimport.php @@ -53,7 +53,7 @@ $contact->fetch($_GET["id"], $user); */ $head = contact_prepare_head($contact); -dolibarr_fiche_head($head, 'exportimport', $langs->trans("Contact")); +dol_fiche_head($head, 'exportimport', $langs->trans("Contact")); /* diff --git a/htdocs/contact/fiche.php b/htdocs/contact/fiche.php index 7ca12a447dfe14e0c1a0e6f249011cb0dd0c31f9..ed969396ef23224053409d9f67690d6242e087fd 100644 --- a/htdocs/contact/fiche.php +++ b/htdocs/contact/fiche.php @@ -203,7 +203,7 @@ if ($_GET["id"] > 0) $return=$contact->fetch($_GET["id"], $user); if ($return <= 0) { - dolibarr_print_error('',$contact->error); + dol_print_error('',$contact->error); $_GET["id"]=0; } @@ -212,7 +212,7 @@ if ($_GET["id"] > 0) */ $head = contact_prepare_head($contact); - dolibarr_fiche_head($head, 'general', $langs->trans("Contact")); + dol_fiche_head($head, 'general', $langs->trans("Contact")); } diff --git a/htdocs/contact/index.php b/htdocs/contact/index.php index 0148e91feeb8c2969e7439f53541a663c5abf78e..48beb2623e71d76d97037d0c94bc853bf9769bd8 100644 --- a/htdocs/contact/index.php +++ b/htdocs/contact/index.php @@ -192,7 +192,7 @@ else $sql.= " ".$db->plimit($conf->liste_limit+1, $offset); } -dolibarr_syslog("contact/index.php sql=".$sql); +dol_syslog("contact/index.php sql=".$sql); $result = $db->query($sql); if ($result) { @@ -296,14 +296,14 @@ if ($result) print '</td>'; // Firstname - print '<td>'.dolibarr_trunc($obj->firstname,20).'</td>'; + print '<td>'.dol_trunc($obj->firstname,20).'</td>'; // Company print '<td>'; if ($obj->socid) { print '<a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$obj->socid.'">'; - print img_object($langs->trans("ShowCompany"),"company").' '.dolibarr_trunc($obj->nom,20).'</a>'; + print img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($obj->nom,20).'</a>'; } else { @@ -328,7 +328,7 @@ if ($result) } // Date - print '<td align="center">'.dolibarr_print_date($obj->tms,"day").'</td>'; + print '<td align="center">'.dol_print_date($obj->tms,"day").'</td>'; // Private/Public print '<td align="center">'.$contactstatic->LibPubPriv($obj->priv).'</td>'; @@ -353,7 +353,7 @@ if ($result) } else { - dolibarr_print_error($db); + dol_print_error($db); } print '<br>'; diff --git a/htdocs/contact/info.php b/htdocs/contact/info.php index b6c22c5109bbc9e97030ce577cba045b15e19878..458beaa487d062d99ea70b0c68628b2838b177af 100644 --- a/htdocs/contact/info.php +++ b/htdocs/contact/info.php @@ -54,7 +54,7 @@ $contact->fetch($_GET["id"], $user); */ $head = contact_prepare_head($contact); -dolibarr_fiche_head($head, 'info', $langs->trans("Contact")); +dol_fiche_head($head, 'info', $langs->trans("Contact")); /* diff --git a/htdocs/contact/ldap.php b/htdocs/contact/ldap.php index f17452b28cba828458fdb9961b96b67a769b86d3..74cd0cf5adf7ef47330ae87d89a1a2b11304b3f5 100644 --- a/htdocs/contact/ldap.php +++ b/htdocs/contact/ldap.php @@ -57,7 +57,7 @@ $contact->fetch($_GET["id"], $user); */ $head = contact_prepare_head($contact); -dolibarr_fiche_head($head, 'ldap', $langs->trans("Contact")); +dol_fiche_head($head, 'ldap', $langs->trans("Contact")); /* @@ -156,7 +156,7 @@ if ($result > 0) } else { - dolibarr_print_error('',$ldap->error); + dol_print_error('',$ldap->error); } diff --git a/htdocs/contact/perso.php b/htdocs/contact/perso.php index 4df9e55ef542561bcc19828f5e06bd30c44774a4..c63b26604eb3bac68059db1c04da646b2ad13ac0 100644 --- a/htdocs/contact/perso.php +++ b/htdocs/contact/perso.php @@ -48,7 +48,7 @@ if ($user->rights->societe->contact->creer) $contact->fetch($_POST["contactid"]); // Note: Correct date should be completed with location to have exact GM time of birth. - $contact->birthday = dolibarr_mktime(0,0,0,$_POST["birthdaymonth"],$_POST["birthdayday"],$_POST["birthdayyear"]); + $contact->birthday = dol_mktime(0,0,0,$_POST["birthdaymonth"],$_POST["birthdayday"],$_POST["birthdayyear"]); $contact->birthday_alert = $_POST["birthday_alert"]; $result = $contact->update_perso($_POST["contactid"], $user); @@ -82,7 +82,7 @@ $contact->fetch($_GET["id"], $user); */ $head = contact_prepare_head($contact); -dolibarr_fiche_head($head, 'perso', $langs->trans("Contact")); +dol_fiche_head($head, 'perso', $langs->trans("Contact")); @@ -196,7 +196,7 @@ else // Date To Birth if ($contact->birthday != '') { - print '<tr><td>'.$langs->trans("DateToBirth").'</td><td colspan="3">'.dolibarr_print_date($contact->birthday,"day"); + print '<tr><td>'.$langs->trans("DateToBirth").'</td><td colspan="3">'.dol_print_date($contact->birthday,"day"); print ' ('; if ($contact->birthday_alert) print 'alerte anniversaire active'; else print 'alerte anniversaire inactive'; diff --git a/htdocs/contrat/contact.php b/htdocs/contrat/contact.php index 32bf04c32b84c3a28f545db3dabf5d3ce541fb5d..0ba546d22f81927f9cdf357b69049b8047355e87 100644 --- a/htdocs/contrat/contact.php +++ b/htdocs/contrat/contact.php @@ -90,12 +90,12 @@ if ($_POST["action"] == 'updateligne' && $user->rights->contrat->creer) $db->commit(); } else { - dolibarr_print_error($db, "result=$result"); + dol_print_error($db, "result=$result"); $db->rollback(); } } else { - dolibarr_print_error($db); + dol_print_error($db); } } @@ -119,13 +119,13 @@ if ($_GET["action"] == 'swapstatut' && $user->rights->contrat->creer) } else { - dolibarr_print_error($db, "result=$result"); + dol_print_error($db, "result=$result"); $db->rollback(); } } else { - dolibarr_print_error($db,$contrat->error); + dol_print_error($db,$contrat->error); } } @@ -175,7 +175,7 @@ if ($id > 0) $hselected=1; - dolibarr_fiche_head($head, $hselected, $langs->trans("Contract")); + dol_fiche_head($head, $hselected, $langs->trans("Contract")); /* * Contrat diff --git a/htdocs/contrat/contrat.class.php b/htdocs/contrat/contrat.class.php index 3dd021117e6a3977f6b9dee8ff54a1a2148dcc2d..18903747abc492139012005385a2f13eb5a343ee 100644 --- a/htdocs/contrat/contrat.class.php +++ b/htdocs/contrat/contrat.class.php @@ -106,7 +106,7 @@ class Contrat extends CommonObject $sql.= " date_cloture = null"; $sql.= " WHERE rowid = ".$line_id . " AND (statut = 0 OR statut = 3 OR statut = 5)"; - dolibarr_syslog("Contrat::active_line sql=".$sql); + dol_syslog("Contrat::active_line sql=".$sql); $resql = $this->db->query($sql); if ($resql) { @@ -123,7 +123,7 @@ class Contrat extends CommonObject else { $this->error=$this->db->lasterror(); - dolibarr_syslog("Contrat::active_line error ".$this->error); + dol_syslog("Contrat::active_line error ".$this->error); $this->db->rollback(); return -1; } @@ -206,7 +206,7 @@ class Contrat extends CommonObject } else { - dolibarr_print_error($db,'Failed to update contrat_det'); + dol_print_error($db,'Failed to update contrat_det'); $this->db->rollback(); } } @@ -1098,7 +1098,7 @@ class Contrat extends CommonObject if ($withpicto) $result.=($lien.img_object($label,$picto).$lienfin); if ($withpicto && $withpicto != 2) $result.=' '; - if ($withpicto != 2) $result.=$lien.($maxlength?dolibarr_trunc($this->ref,$maxlength):$this->ref).$lienfin; + if ($withpicto != 2) $result.=$lien.($maxlength?dol_trunc($this->ref,$maxlength):$this->ref).$lienfin; return $result; } @@ -1145,7 +1145,7 @@ class Contrat extends CommonObject } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); } } @@ -1271,7 +1271,7 @@ class Contrat extends CommonObject } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); $this->error=$this->db->error(); return -1; } @@ -1306,7 +1306,7 @@ class Contrat extends CommonObject } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); $this->error=$this->db->error(); return -1; } diff --git a/htdocs/contrat/document.php b/htdocs/contrat/document.php index fc9613c7377e40e6405aade97164bb2817410b19..3a05d0913ef0ab43c256571ff5960b39432e0750 100644 --- a/htdocs/contrat/document.php +++ b/htdocs/contrat/document.php @@ -122,7 +122,7 @@ if ($contrat->id) $head=contract_prepare_head($contrat, $user); - dolibarr_fiche_head($head, 'documents', $langs->trans("Contract")); + dol_fiche_head($head, 'documents', $langs->trans("Contract")); // Construit liste des fichiers diff --git a/htdocs/contrat/fiche.php b/htdocs/contrat/fiche.php index 775f83b9cd83db943ba8be2f8993898d09b75ab7..871c4beb9a850c56304d41ec56e531752017e54e 100644 --- a/htdocs/contrat/fiche.php +++ b/htdocs/contrat/fiche.php @@ -89,11 +89,11 @@ if ($_POST["mode"]=='predefined') $date_end=''; if ($_POST["date_startmonth"] && $_POST["date_startday"] && $_POST["date_startyear"]) { - $date_start=dolibarr_mktime($_POST["date_starthour"], $_POST["date_startmin"], 0, $_POST["date_startmonth"], $_POST["date_startday"], $_POST["date_startyear"]); + $date_start=dol_mktime($_POST["date_starthour"], $_POST["date_startmin"], 0, $_POST["date_startmonth"], $_POST["date_startday"], $_POST["date_startyear"]); } if ($_POST["date_endmonth"] && $_POST["date_endday"] && $_POST["date_endyear"]) { - $date_end=dolibarr_mktime($_POST["date_endhour"], $_POST["date_endmin"], 0, $_POST["date_endmonth"], $_POST["date_endday"], $_POST["date_endyear"]); + $date_end=dol_mktime($_POST["date_endhour"], $_POST["date_endmin"], 0, $_POST["date_endmonth"], $_POST["date_endday"], $_POST["date_endyear"]); } } @@ -104,11 +104,11 @@ if ($_POST["mode"]=='libre') $date_end_sl=''; if ($_POST["date_start_slmonth"] && $_POST["date_start_slday"] && $_POST["date_start_slyear"]) { - $date_start_sl=dolibarr_mktime($_POST["date_start_slhour"], $_POST["date_start_slmin"], 0, $_POST["date_start_slmonth"], $_POST["date_start_slday"], $_POST["date_start_slyear"]); + $date_start_sl=dol_mktime($_POST["date_start_slhour"], $_POST["date_start_slmin"], 0, $_POST["date_start_slmonth"], $_POST["date_start_slday"], $_POST["date_start_slyear"]); } if ($_POST["date_end_slmonth"] && $_POST["date_end_slday"] && $_POST["date_end_slyear"]) { - $date_end_sl=dolibarr_mktime($_POST["date_end_slhour"], $_POST["date_end_slmin"], 0, $_POST["date_end_slmonth"], $_POST["date_end_slday"], $_POST["date_end_slyear"]); + $date_end_sl=dol_mktime($_POST["date_end_slhour"], $_POST["date_end_slmin"], 0, $_POST["date_end_slmonth"], $_POST["date_end_slday"], $_POST["date_end_slyear"]); } } @@ -119,24 +119,24 @@ $date_start_real_update=''; $date_end_real_update=''; if ($_POST["date_start_updatemonth"] && $_POST["date_start_updateday"] && $_POST["date_start_updateyear"]) { - $date_start_update=dolibarr_mktime($_POST["date_start_updatehour"], $_POST["date_start_updatemin"], 0, $_POST["date_start_updatemonth"], $_POST["date_start_updateday"], $_POST["date_start_updateyear"]); + $date_start_update=dol_mktime($_POST["date_start_updatehour"], $_POST["date_start_updatemin"], 0, $_POST["date_start_updatemonth"], $_POST["date_start_updateday"], $_POST["date_start_updateyear"]); } if ($_POST["date_end_updatemonth"] && $_POST["date_end_updateday"] && $_POST["date_end_updateyear"]) { - $date_end_update=dolibarr_mktime($_POST["date_end_updatehour"], $_POST["date_end_updatemin"], 0, $_POST["date_end_updatemonth"], $_POST["date_end_updateday"], $_POST["date_end_updateyear"]); + $date_end_update=dol_mktime($_POST["date_end_updatehour"], $_POST["date_end_updatemin"], 0, $_POST["date_end_updatemonth"], $_POST["date_end_updateday"], $_POST["date_end_updateyear"]); } if ($_POST["date_start_real_updatemonth"] && $_POST["date_start_real_updateday"] && $_POST["date_start_real_updateyear"]) { - $date_start_real_update=dolibarr_mktime($_POST["date_start_real_updatehour"], $_POST["date_start_real_updatemin"], 0, $_POST["date_start_real_updatemonth"], $_POST["date_start_real_updateday"], $_POST["date_start_real_updateyear"]); + $date_start_real_update=dol_mktime($_POST["date_start_real_updatehour"], $_POST["date_start_real_updatemin"], 0, $_POST["date_start_real_updatemonth"], $_POST["date_start_real_updateday"], $_POST["date_start_real_updateyear"]); } if ($_POST["date_end_real_updatemonth"] && $_POST["date_end_real_updateday"] && $_POST["date_end_real_updateyear"]) { - $date_end_real_update=dolibarr_mktime($_POST["date_end_real_updatehour"], $_POST["date_end_real_updatemin"], 0, $_POST["date_end_real_updatemonth"], $_POST["date_end_real_updateday"], $_POST["date_end_real_updateyear"]); + $date_end_real_update=dol_mktime($_POST["date_end_real_updatehour"], $_POST["date_end_real_updatemin"], 0, $_POST["date_end_real_updatemonth"], $_POST["date_end_real_updateday"], $_POST["date_end_real_updateyear"]); } if ($_POST["action"] == 'add') { - $datecontrat = dolibarr_mktime($_POST["rehour"], $_POST["remin"], 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]); + $datecontrat = dol_mktime($_POST["rehour"], $_POST["remin"], 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]); $contrat = new Contrat($db); @@ -180,7 +180,7 @@ if ($_POST["action"] == 'addligne' && $user->rights->contrat->creer) $ret=$contrat->fetch($_GET["id"]); if ($ret < 0) { - dolibarr_print_error($db,$commande->error); + dol_print_error($db,$commande->error); exit; } $ret=$contrat->fetch_client(); @@ -192,11 +192,11 @@ if ($_POST["action"] == 'addligne' && $user->rights->contrat->creer) { if ($_POST["date_start_slmonth"] && $_POST["date_start_slday"] && $_POST["date_start_slyear"]) { - $date_start=dolibarr_mktime($_POST["date_start_slhour"], $_POST["date_start_slmin"], 0, $_POST["date_start_slmonth"], $_POST["date_start_slday"], $_POST["date_start_slyear"]); + $date_start=dol_mktime($_POST["date_start_slhour"], $_POST["date_start_slmin"], 0, $_POST["date_start_slmonth"], $_POST["date_start_slday"], $_POST["date_start_slyear"]); } if ($_POST["date_end_slmonth"] && $_POST["date_end_slday"] && $_POST["date_end_slyear"]) { - $date_end=dolibarr_mktime($_POST["date_end_slhour"], $_POST["date_end_slmin"], 0, $_POST["date_end_slmonth"], $_POST["date_end_slday"], $_POST["date_end_slyear"]); + $date_end=dol_mktime($_POST["date_end_slhour"], $_POST["date_end_slmin"], 0, $_POST["date_end_slmonth"], $_POST["date_end_slday"], $_POST["date_end_slyear"]); } } // Si ajout champ produit predefini @@ -204,11 +204,11 @@ if ($_POST["action"] == 'addligne' && $user->rights->contrat->creer) { if ($_POST["date_startmonth"] && $_POST["date_startday"] && $_POST["date_startyear"]) { - $date_start=dolibarr_mktime($_POST["date_starthour"], $_POST["date_startmin"], 0, $_POST["date_startmonth"], $_POST["date_startday"], $_POST["date_startyear"]); + $date_start=dol_mktime($_POST["date_starthour"], $_POST["date_startmin"], 0, $_POST["date_startmonth"], $_POST["date_startday"], $_POST["date_startyear"]); } if ($_POST["date_endmonth"] && $_POST["date_endday"] && $_POST["date_endyear"]) { - $date_end=dolibarr_mktime($_POST["date_endhour"], $_POST["date_endmin"], 0, $_POST["date_endmonth"], $_POST["date_endday"], $_POST["date_endyear"]); + $date_end=dol_mktime($_POST["date_endhour"], $_POST["date_endmin"], 0, $_POST["date_endmonth"], $_POST["date_endday"], $_POST["date_endyear"]); } } @@ -332,13 +332,13 @@ if ($_POST["action"] == 'updateligne' && $user->rights->contrat->creer && ! $_PO } else { - dolibarr_print_error($db,'Failed to update contrat_det'); + dol_print_error($db,'Failed to update contrat_det'); $db->rollback(); } } else { - dolibarr_print_error($db); + dol_print_error($db); } } @@ -439,7 +439,7 @@ $contratlignestatic=new ContratLigne($db); *********************************************************************/ if ($_GET["action"] == 'create') { - dolibarr_fiche_head($head, $a, $langs->trans("AddContract")); + dol_fiche_head($head, $a, $langs->trans("AddContract")); if ($mesg) print $mesg; @@ -584,7 +584,7 @@ if ($_GET["action"] == 'create') } else { - dolibarr_print_error($db); + dol_print_error($db); } print '</table>'; @@ -593,7 +593,7 @@ if ($_GET["action"] == 'create') } else { - dolibarr_print_error($db); + dol_print_error($db); } print '</div>'; @@ -616,7 +616,7 @@ else if ($result > 0) $result=$contrat->fetch_lignes(); if ($result < 0) { - dolibarr_print_error($db,$contrat->error); + dol_print_error($db,$contrat->error); exit; } @@ -640,7 +640,7 @@ else $hselected = 0; - dolibarr_fiche_head($head, $hselected, $langs->trans("Contract")); + dol_fiche_head($head, $hselected, $langs->trans("Contract")); /* @@ -710,7 +710,7 @@ else // Date print '<tr><td>'.$langs->trans("Date").'</td>'; - print '<td colspan="3">'.dolibarr_print_date($contrat->date_contrat,"dayhour")."</td></tr>\n"; + print '<td colspan="3">'.dol_print_date($contrat->date_contrat,"dayhour")."</td></tr>\n"; // Projet if ($conf->projet->enabled) @@ -868,7 +868,7 @@ else // Date planned print $langs->trans("DateStartPlanned").': '; if ($objp->date_debut) { - print dolibarr_print_date($objp->date_debut); + print dol_print_date($objp->date_debut); // Warning si date prevu passee et pas en service if ($objp->statut == 0 && $objp->date_debut < ($now - $conf->contrat->services->inactifs->warning_delay)) { print " ".img_warning($langs->trans("Late")); } } @@ -876,7 +876,7 @@ else print ' - '; print $langs->trans("DateEndPlanned").': '; if ($objp->date_fin) { - print dolibarr_print_date($objp->date_fin); + print dol_print_date($objp->date_fin); if ($objp->statut == 4 && $objp->date_fin < ($now - $conf->contrat->services->expires->warning_delay)) { print " ".img_warning($langs->trans("Late")); } } else print $langs->trans("Unknown"); @@ -932,7 +932,7 @@ else } else { - dolibarr_print_error($db); + dol_print_error($db); } if ($contrat->statut > 0) @@ -972,9 +972,9 @@ else if ($_REQUEST["action"] == 'active' && ! $_REQUEST["cancel"] && $user->rights->contrat->activer && $contrat->lignes[$cursorline-1]->id == $_GET["ligne"]) { //print '<br />'; - $dateactstart = dolibarr_mktime(12, 0 , 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]); - $dateactend = dolibarr_mktime(12, 0 , 0, $_POST["endmonth"], $_POST["endday"], $_POST["endyear"]); - $html->form_confirm($_SERVER["PHP_SELF"]."?id=".$contrat->id."&ligne=".$_GET["ligne"]."&date=".$dateactstart."&dateend=".$dateactend,$langs->trans("ActivateService"),$langs->trans("ConfirmActivateService",dolibarr_print_date($dateactstart,"%A %d %B %Y")),"confirm_active"); + $dateactstart = dol_mktime(12, 0 , 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]); + $dateactend = dol_mktime(12, 0 , 0, $_POST["endmonth"], $_POST["endday"], $_POST["endyear"]); + $html->form_confirm($_SERVER["PHP_SELF"]."?id=".$contrat->id."&ligne=".$_GET["ligne"]."&date=".$dateactstart."&dateend=".$dateactend,$langs->trans("ActivateService"),$langs->trans("ConfirmActivateService",dol_print_date($dateactstart,"%A %d %B %Y")),"confirm_active"); print '<table class="noborder" width="100%"><tr '.$bc[false].' height="6"><td></td></tr></table>'; } @@ -984,9 +984,9 @@ else if ($_REQUEST["action"] == 'closeline' && ! $_REQUEST["cancel"] && $user->rights->contrat->activer && $contrat->lignes[$cursorline-1]->id == $_GET["ligne"]) { //print '<br />'; - $dateactstart = dolibarr_mktime(12, 0 , 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]); - $dateactend = dolibarr_mktime(12, 0 , 0, $_POST["endmonth"], $_POST["endday"], $_POST["endyear"]); - $html->form_confirm($_SERVER["PHP_SELF"]."?id=".$contrat->id."&ligne=".$_GET["ligne"]."&date=".$dateactstart."&dateend=".$dateactend,$langs->trans("CloseService"),$langs->trans("ConfirmCloseService",dolibarr_print_date($dateactend,"%A %d %B %Y")),"confirm_closeline"); + $dateactstart = dol_mktime(12, 0 , 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]); + $dateactend = dol_mktime(12, 0 , 0, $_POST["endmonth"], $_POST["endday"], $_POST["endyear"]); + $html->form_confirm($_SERVER["PHP_SELF"]."?id=".$contrat->id."&ligne=".$_GET["ligne"]."&date=".$dateactstart."&dateend=".$dateactend,$langs->trans("CloseService"),$langs->trans("ConfirmCloseService",dol_print_date($dateactend,"%A %d %B %Y")),"confirm_closeline"); print '<table class="noborder" width="100%"><tr '.$bc[false].' height="6"><td></td></tr></table>'; } @@ -1018,21 +1018,21 @@ else // Si pas encore active if (! $objp->date_debut_reelle) { print $langs->trans("DateStartReal").': '; - if ($objp->date_debut_reelle) print dolibarr_print_date($objp->date_debut_reelle); + if ($objp->date_debut_reelle) print dol_print_date($objp->date_debut_reelle); else print $langs->trans("ContractStatusNotRunning"); } // Si active et en cours if ($objp->date_debut_reelle && ! $objp->date_fin_reelle) { print $langs->trans("DateStartReal").': '; - print dolibarr_print_date($objp->date_debut_reelle); + print dol_print_date($objp->date_debut_reelle); } // Si desactive if ($objp->date_debut_reelle && $objp->date_fin_reelle) { print $langs->trans("DateStartReal").': '; - print dolibarr_print_date($objp->date_debut_reelle); + print dol_print_date($objp->date_debut_reelle); print ' - '; print $langs->trans("DateEndReal").': '; - print dolibarr_print_date($objp->date_fin_reelle); + print dol_print_date($objp->date_fin_reelle); } print '</td>'; @@ -1056,11 +1056,11 @@ else // Definie date debut et fin par defaut $dateactstart = $objp->date_debut; - if ($_POST["remonth"]) $dateactstart = dolibarr_mktime(12, 0 , 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]); + if ($_POST["remonth"]) $dateactstart = dol_mktime(12, 0 , 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]); elseif (! $dateactstart) $dateactstart = time(); $dateactend = $objp->date_fin; - if ($_POST["endmonth"]) $dateactend = dolibarr_mktime(12, 0 , 0, $_POST["endmonth"], $_POST["endday"], $_POST["endyear"]); + if ($_POST["endmonth"]) $dateactend = dol_mktime(12, 0 , 0, $_POST["endmonth"], $_POST["endday"], $_POST["endyear"]); elseif (! $dateactend) { if ($objp->fk_product > 0) @@ -1104,11 +1104,11 @@ else // Definie date debut et fin par defaut $dateactstart = $objp->date_debut_reelle; - if ($_POST["remonth"]) $dateactstart = dolibarr_mktime(12, 0 , 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]); + if ($_POST["remonth"]) $dateactstart = dol_mktime(12, 0 , 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]); elseif (! $dateactstart) $dateactstart = time(); $dateactend = $objp->date_fin_reelle; - if ($_POST["endmonth"]) $dateactend = dolibarr_mktime(12, 0 , 0, $_POST["endmonth"], $_POST["endday"], $_POST["endyear"]); + if ($_POST["endmonth"]) $dateactend = dol_mktime(12, 0 , 0, $_POST["endmonth"], $_POST["endday"], $_POST["endyear"]); elseif (! $dateactend) { if ($objp->fk_product > 0) diff --git a/htdocs/contrat/index.php b/htdocs/contrat/index.php index 0b72330c678c801900eb61dbf98961791c1a874b..32acbad1341b8a59df754aaa7edf83c210802b7c 100644 --- a/htdocs/contrat/index.php +++ b/htdocs/contrat/index.php @@ -156,7 +156,7 @@ if ($conf->contrat->enabled && $user->rights->contrat->lire) } else { - dolibarr_print_error($db); + dol_print_error($db); } } @@ -184,7 +184,7 @@ $sql.= " GROUP BY c.rowid, c.datec, c.statut, s.nom, s.rowid"; $sql.= " ORDER BY c.tms DESC"; $sql.= " LIMIT ".$max; -dolibarr_syslog("contrat/index.php sql=".$sql, LOG_DEBUG); +dol_syslog("contrat/index.php sql=".$sql, LOG_DEBUG); $result=$db->query($sql); if ($result) { @@ -217,7 +217,7 @@ if ($result) $staticcompany->nom=$obj->nom; print $staticcompany->getNomUrl(1,'',20); print '</td>'; - print '<td align="center">'.dolibarr_print_date($obj->tms,'dayhour').'</td>'; + print '<td align="center">'.dol_print_date($obj->tms,'dayhour').'</td>'; //print '<td align="left">'.$staticcontrat->LibStatut($obj->statut,2).'</td>'; print '<td align="right" width="32">'.($obj->nb_initial>0 ? $obj->nb_initial.$staticcontratligne->LibStatut(0,3):'').'</td>'; print '<td align="right" width="32">'.($obj->nb_running>0 ? $obj->nb_running.$staticcontratligne->LibStatut(4,3,false):'').'</td>'; @@ -233,7 +233,7 @@ if ($result) } else { - dolibarr_print_error($db); + dol_print_error($db); } print '<br>'; @@ -274,8 +274,8 @@ if ( $db->query($sql) ) print '</td>'; print '<td nowrap="1">'; print '<a href="'.DOL_URL_ROOT.'/contrat/fiche.php?id='.$obj->fk_contrat.'">'.img_object($langs->trans("ShowService"),"service"); - if ($obj->label) print ' '.dolibarr_trunc($obj->label,20).'</a></td>'; - else print '</a> '.dolibarr_trunc($obj->note,20).'</td>'; + if ($obj->label) print ' '.dol_trunc($obj->label,20).'</a></td>'; + else print '</a> '.dol_trunc($obj->note,20).'</td>'; print '<td>'; $staticcompany->id=$obj->fk_soc; $staticcompany->nom=$obj->nom; @@ -294,7 +294,7 @@ if ( $db->query($sql) ) } else { - dolibarr_print_error($db); + dol_print_error($db); } print '<br>'; @@ -337,8 +337,8 @@ if ($resql) //if (1 == 1) print img_warning($langs->trans("Late")); print '</td>'; print '<td><a href="'.DOL_URL_ROOT.'/contrat/fiche.php?id='.$obj->fk_contrat.'">'.img_object($langs->trans("ShowService"),"service"); - if ($obj->label) print ' '.dolibarr_trunc($obj->label,20).'</a></td>'; - else print '</a> '.dolibarr_trunc($obj->note,20).'</td>'; + if ($obj->label) print ' '.dol_trunc($obj->label,20).'</a></td>'; + else print '</a> '.dol_trunc($obj->note,20).'</td>'; print '<td>'; $staticcompany->id=$obj->fk_soc; $staticcompany->nom=$obj->nom; @@ -358,7 +358,7 @@ if ($resql) } else { - dolibarr_print_error($db); + dol_print_error($db); } print '</td></tr></table>'; diff --git a/htdocs/contrat/info.php b/htdocs/contrat/info.php index 9930c4d72deb30588c9bed71e64c8cd7fdaada8d..aed0afba7b969daafcccd98edfe288086a71cc7d 100644 --- a/htdocs/contrat/info.php +++ b/htdocs/contrat/info.php @@ -48,7 +48,7 @@ $contrat->info($_GET["id"]); $head = contract_prepare_head($contrat); -dolibarr_fiche_head($head, 'info', $langs->trans("Contract")); +dol_fiche_head($head, 'info', $langs->trans("Contract")); print '<table width="100%"><tr><td>'; diff --git a/htdocs/contrat/liste.php b/htdocs/contrat/liste.php index ea7882bd2834c2b5c19ce46922dce8c7ff7653fb..6878bd6a68695752da9ec781641bdcb22775acc5 100644 --- a/htdocs/contrat/liste.php +++ b/htdocs/contrat/liste.php @@ -137,8 +137,8 @@ if ($resql) if ($obj->nb_late) print img_warning($langs->trans("Late")); print '</td>'; print '<td><a href="../comm/fiche.php?socid='.$obj->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.$obj->nom.'</a></td>'; - //print '<td align="center">'.dolibarr_print_date($obj->datec).'</td>'; - print '<td align="center">'.dolibarr_print_date($obj->date_contrat).'</td>'; + //print '<td align="center">'.dol_print_date($obj->datec).'</td>'; + print '<td align="center">'.dol_print_date($obj->date_contrat).'</td>'; //print '<td align="center">'.$staticcontrat->LibStatut($obj->statut,3).'</td>'; print '<td align="center">'.($obj->nb_initial>0?$obj->nb_initial:'').'</td>'; print '<td align="center">'.($obj->nb_running>0?$obj->nb_running:'').'</td>'; @@ -154,7 +154,7 @@ if ($resql) } else { - dolibarr_print_error($db); + dol_print_error($db); } diff --git a/htdocs/contrat/note.php b/htdocs/contrat/note.php index f95acf7a6ea2a32dfda1338f3f9fd3eacd0e9d3a..6284f00b992fb5419917053e2c49a73d40e16b2a 100644 --- a/htdocs/contrat/note.php +++ b/htdocs/contrat/note.php @@ -103,7 +103,7 @@ if ($_GET["id"]) $hselected = 2; - dolibarr_fiche_head($head, 'note', $langs->trans("Contract")); + dol_fiche_head($head, 'note', $langs->trans("Contract")); print '<table class="border" width="100%">'; diff --git a/htdocs/contrat/services.php b/htdocs/contrat/services.php index 7a04ca66f9ffdfe11094765a6b5b206f36763fb2..d1443c6526b4ddfbdb2a4360a1879dd0f046f6ee 100644 --- a/htdocs/contrat/services.php +++ b/htdocs/contrat/services.php @@ -94,15 +94,15 @@ if ($search_nom) $sql.= " AND s.nom like '%".addslashes($search_nom)."%'"; if ($search_contract) $sql.= " AND c.rowid = '".addslashes($search_contract)."'"; if ($search_service) $sql.= " AND (p.ref like '%".addslashes($search_service)."%' OR p.description like '%".addslashes($search_service)."%')"; if ($socid > 0) $sql.= " AND s.rowid = ".$socid; -$filter_date1=dolibarr_mktime(0,0,0,$_REQUEST['op1month'],$_REQUEST['op1day'],$_REQUEST['op1year']); -$filter_date2=dolibarr_mktime(0,0,0,$_REQUEST['op2month'],$_REQUEST['op2day'],$_REQUEST['op2year']); +$filter_date1=dol_mktime(0,0,0,$_REQUEST['op1month'],$_REQUEST['op1day'],$_REQUEST['op1year']); +$filter_date2=dol_mktime(0,0,0,$_REQUEST['op2month'],$_REQUEST['op2day'],$_REQUEST['op2year']); if (! empty($_REQUEST['filter_op1']) && $_REQUEST['filter_op1'] != -1 && $filter_date1 != '') $sql.= " AND date_ouverture_prevue ".$_REQUEST['filter_op1']." ".$db->idate($filter_date1); if (! empty($_REQUEST['filter_op2']) && $_REQUEST['filter_op2'] != -1 && $filter_date2 != '') $sql.= " AND date_fin_validite ".$_REQUEST['filter_op2']." ".$db->idate($filter_date2); $sql .= $db->order($sortfield,$sortorder); $sql .= $db->plimit($limit + 1 ,$offset); //print $sql; -dolibarr_syslog("contrat/services.php sql=".$sql); +dol_syslog("contrat/services.php sql=".$sql); $resql=$db->query($sql); if ($resql) { @@ -154,14 +154,14 @@ if ($resql) $arrayofoperators=array('<'=>'<','>'=>'>'); print $form->select_array('filter_op1',$arrayofoperators,$_REQUEST['filter_op1'],1); print ' '; - $filter_date1=dolibarr_mktime(0,0,0,$_REQUEST['op1month'],$_REQUEST['op1day'],$_REQUEST['"op1year']); + $filter_date1=dol_mktime(0,0,0,$_REQUEST['op1month'],$_REQUEST['op1day'],$_REQUEST['"op1year']); print $form->select_date($filter_date1,'op1',0,0,1); print '</td>'; print '<td class="liste_titre" align="center">'; $arrayofoperators=array('<'=>'<','>'=>'>'); print $form->select_array('filter_op2',$arrayofoperators,$_REQUEST['filter_op2'],1); print ' '; - $filter_date2=dolibarr_mktime(0,0,0,$_REQUEST['op2month'],$_REQUEST['op2day'],$_REQUEST['op2year']); + $filter_date2=dol_mktime(0,0,0,$_REQUEST['op2month'],$_REQUEST['op2day'],$_REQUEST['op2year']); print $form->select_date($filter_date2,'op2',0,0,1); print '</td>'; print '<td class="liste_titre" align="right"><input class="liste_titre" type="image" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/search.png" alt="'.$langs->trans("Search").'">'; @@ -186,11 +186,11 @@ if ($resql) print '<td>'; if ($obj->pid) { - print '<a href="../product/fiche.php?id='.$obj->pid.'">'.img_object($langs->trans("ShowService"),"service").' '.dolibarr_trunc($obj->label,20).'</a>'; + print '<a href="../product/fiche.php?id='.$obj->pid.'">'.img_object($langs->trans("ShowService"),"service").' '.dol_trunc($obj->label,20).'</a>'; } else { - print dolibarr_trunc($obj->description,20); + print dol_trunc($obj->description,20); } print '</td>'; @@ -205,16 +205,16 @@ if ($resql) // Start date if ($mode == "0") { print '<td align="center">'; - print ($obj->date_ouverture_prevue?dolibarr_print_date($obj->date_ouverture_prevue):' '); + print ($obj->date_ouverture_prevue?dol_print_date($obj->date_ouverture_prevue):' '); if ($obj->date_ouverture_prevue && ($obj->date_ouverture_prevue < ($now - $conf->contrat->services->inactifs->warning_delay))) print img_picto($langs->trans("Late"),"warning"); else print ' '; print '</td>'; } - if ($mode == "" || $mode > 0) print '<td align="center">'.($obj->date_ouverture?dolibarr_print_date($obj->date_ouverture):' ').'</td>'; + if ($mode == "" || $mode > 0) print '<td align="center">'.($obj->date_ouverture?dol_print_date($obj->date_ouverture):' ').'</td>'; // Date fin - if ($mode == "" || $mode < 5) print '<td align="center">'.($obj->date_fin_validite?dolibarr_print_date($obj->date_fin_validite):' '); - else print '<td align="center">'.dolibarr_print_date($obj->date_cloture); + if ($mode == "" || $mode < 5) print '<td align="center">'.($obj->date_fin_validite?dol_print_date($obj->date_fin_validite):' '); + else print '<td align="center">'.dol_print_date($obj->date_cloture); // Icone warning if ($obj->date_fin_validite && $obj->date_fin_validite < ($now - $conf->contrat->services->expires->warning_delay) && $obj->statut < 5) print img_warning($langs->trans("Late")); else print ' '; @@ -241,7 +241,7 @@ if ($resql) } else { - dolibarr_print_error($db); + dol_print_error($db); } diff --git a/htdocs/core/dolgraph.class.php b/htdocs/core/dolgraph.class.php index e2af253fdb8838cee6dd2cab3ac18e8973c1ef7b..d16c8def323024a67e4bc06e0122a291f8a1f597 100644 --- a/htdocs/core/dolgraph.class.php +++ b/htdocs/core/dolgraph.class.php @@ -400,7 +400,7 @@ class DolGraph if (! is_array($this->data) || sizeof($this->data) < 1) { $this->error="Call to draw method was made but SetData was not called or called with an empty dataset for parameters"; - dolibarr_syslog("DolGraph::draw ".$this->error, LOG_ERR); + dol_syslog("DolGraph::draw ".$this->error, LOG_ERR); return -1; } $call = "draw_".$this->library; @@ -414,7 +414,7 @@ class DolGraph */ function draw_artichow($file) { - dolibarr_syslog("DolGraph.class::draw_artichow this->type=".$this->type); + dol_syslog("DolGraph.class::draw_artichow this->type=".$this->type); if (! defined('SHADOW_RIGHT_TOP')) define('SHADOW_RIGHT_TOP',3); if (! defined('LEGEND_BACKGROUND')) define('LEGEND_BACKGROUND',2); diff --git a/htdocs/core/events.class.php b/htdocs/core/events.class.php index 34524e308772f722d7368dbc08100d57546cb925..ebd1e8123efd3a67419d6e4fe68ce2419adb6cec 100644 --- a/htdocs/core/events.class.php +++ b/htdocs/core/events.class.php @@ -99,7 +99,7 @@ class Events // extends CommonObject $sql.= ")"; - dolibarr_syslog("Events::create sql=".$sql, LOG_DEBUG); + dol_syslog("Events::create sql=".$sql, LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -110,7 +110,7 @@ class Events // extends CommonObject else { $this->error="Error ".$this->db->lasterror(); - dolibarr_syslog("Events::create ".$this->error, LOG_ERR); + dol_syslog("Events::create ".$this->error, LOG_ERR); return -1; } } @@ -145,12 +145,12 @@ class Events // extends CommonObject $sql.= " WHERE rowid=".$this->id; - dolibarr_syslog("Events::update sql=".$sql, LOG_DEBUG); + dol_syslog("Events::update sql=".$sql, LOG_DEBUG); $resql = $this->db->query($sql); if (! $resql) { $this->error="Error ".$this->db->lasterror(); - dolibarr_syslog("Events::update ".$this->error, LOG_ERR); + dol_syslog("Events::update ".$this->error, LOG_ERR); return -1; } @@ -179,7 +179,7 @@ class Events // extends CommonObject $sql.= " FROM ".MAIN_DB_PREFIX."events as t"; $sql.= " WHERE t.rowid = ".$id; - dolibarr_syslog("Events::fetch sql=".$sql, LOG_DEBUG); + dol_syslog("Events::fetch sql=".$sql, LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -203,7 +203,7 @@ class Events // extends CommonObject else { $this->error="Error ".$this->db->lasterror(); - dolibarr_syslog("Events::fetch ".$this->error, LOG_ERR); + dol_syslog("Events::fetch ".$this->error, LOG_ERR); return -1; } } @@ -221,12 +221,12 @@ class Events // extends CommonObject $sql = "DELETE FROM ".MAIN_DB_PREFIX."events"; $sql.= " WHERE rowid=".$this->id; - dolibarr_syslog("Events::delete sql=".$sql); + dol_syslog("Events::delete sql=".$sql); $resql = $this->db->query($sql); if (! $resql) { $this->error="Error ".$this->db->lasterror(); - dolibarr_syslog("Events::delete ".$this->error, LOG_ERR); + dol_syslog("Events::delete ".$this->error, LOG_ERR); return -1; } diff --git a/htdocs/core/menubase.class.php b/htdocs/core/menubase.class.php index 5c3dccd17b2bae3c13810521e6669ed137700a12..e0aa5e9541f413f854297276be5761667ca81983 100644 --- a/htdocs/core/menubase.class.php +++ b/htdocs/core/menubase.class.php @@ -129,7 +129,7 @@ class Menubase $sql.= " '".$this->user."'"; $sql.= ")"; - dolibarr_syslog("Menubase::create sql=".$sql, LOG_DEBUG); + dol_syslog("Menubase::create sql=".$sql, LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -140,7 +140,7 @@ class Menubase else { $this->error="Error ".$this->db->lasterror(); - dolibarr_syslog("Menubase::create ".$this->error, LOG_ERR); + dol_syslog("Menubase::create ".$this->error, LOG_ERR); return -1; } } @@ -193,12 +193,12 @@ class Menubase $sql.= " user='".$this->user."'"; $sql.= " WHERE rowid=".$this->id; - dolibarr_syslog("Menubase::update sql=".$sql, LOG_DEBUG); + dol_syslog("Menubase::update sql=".$sql, LOG_DEBUG); $resql = $this->db->query($sql); if (! $resql) { $this->error="Error ".$this->db->lasterror(); - dolibarr_syslog("Menubase::update ".$this->error, LOG_ERR); + dol_syslog("Menubase::update ".$this->error, LOG_ERR); return -1; } @@ -236,7 +236,7 @@ class Menubase $sql.= " FROM ".MAIN_DB_PREFIX."menu as t"; $sql.= " WHERE t.rowid = ".$id; - dolibarr_syslog("Menubase::fetch sql=".$sql, LOG_DEBUG); + dol_syslog("Menubase::fetch sql=".$sql, LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -269,7 +269,7 @@ class Menubase else { $this->error="Error ".$this->db->lasterror(); - dolibarr_syslog("Menubase::fetch ".$this->error, LOG_ERR); + dol_syslog("Menubase::fetch ".$this->error, LOG_ERR); return -1; } } @@ -287,12 +287,12 @@ class Menubase $sql = "DELETE FROM ".MAIN_DB_PREFIX."menu"; $sql.= " WHERE rowid=".$this->id; - dolibarr_syslog("Menubase::delete sql=".$sql); + dol_syslog("Menubase::delete sql=".$sql); $resql = $this->db->query($sql); if (! $resql) { $this->error="Error ".$this->db->lasterror(); - dolibarr_syslog("Menubase::delete ".$this->error, LOG_ERR); + dol_syslog("Menubase::delete ".$this->error, LOG_ERR); return -1; } @@ -358,7 +358,7 @@ class Menubase // If type_user == 2, no test requires $sql.= " ORDER BY m.position, m.rowid"; - dolibarr_syslog("Menubase::menuLeftCharger sql=".$sql); + dol_syslog("Menubase::menuLeftCharger sql=".$sql); $resql = $this->db->query($sql); if ($resql) { @@ -428,7 +428,7 @@ class Menubase } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); } // Get menutopid @@ -547,7 +547,7 @@ class Menubase } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); } return $overwritemenufor; @@ -579,7 +579,7 @@ class Menubase // If type_user == 2, no test requires $sql.= " ORDER BY m.position"; - dolibarr_syslog("Menubase::menuTopCharger sql=".$sql); + dol_syslog("Menubase::menuTopCharger sql=".$sql); $resql = $this->db->query($sql); if ($resql) { @@ -652,7 +652,7 @@ class Menubase } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); } return $tabMenu; diff --git a/htdocs/discount.class.php b/htdocs/discount.class.php index a1dc978bc86d0d5af27a41fa7e62ca3936c127b3..16f0fba6ad2c3cef28a22ec4cb371c448627d1b1 100644 --- a/htdocs/discount.class.php +++ b/htdocs/discount.class.php @@ -84,7 +84,7 @@ class DiscountAbsolute if ($rowid) $sql.= " sr.rowid=".$rowid; if ($fk_facture_source) $sql.= " sr.fk_facture_source=".$fk_facture_source; - dolibarr_syslog("DiscountAbsolute::fetch sql=".$sql); + dol_syslog("DiscountAbsolute::fetch sql=".$sql); $resql = $this->db->query($sql); if ($resql) { @@ -149,7 +149,7 @@ class DiscountAbsolute $sql.= " ".($this->fk_facture_source?"'".$this->fk_facture_source."'":"null"); $sql.= ")"; - dolibarr_syslog("DiscountAbsolute::create sql=".$sql); + dol_syslog("DiscountAbsolute::create sql=".$sql); $resql=$this->db->query($sql); if ($resql) { @@ -159,7 +159,7 @@ class DiscountAbsolute else { $this->error=$this->db->lasterror().' - sql='.$sql; - dolibarr_syslog("DiscountAbsolute::create ".$this->error); + dol_syslog("DiscountAbsolute::create ".$this->error); return -1; } } @@ -178,7 +178,7 @@ class DiscountAbsolute $sql = "DELETE FROM ".MAIN_DB_PREFIX."societe_remise_except "; $sql.= " WHERE rowid = ".$this->id." AND (fk_facture_line IS NULL or fk_facture IS NULL)"; - dolibarr_syslog("DiscountAbsolute::delete Delete discount sql=".$sql); + dol_syslog("DiscountAbsolute::delete Delete discount sql=".$sql); $result=$this->db->query($sql); if ($result) { @@ -189,7 +189,7 @@ class DiscountAbsolute $sql.=" set paye=0, fk_statut=1"; $sql.=" WHERE type = 2 AND rowid=".$this->fk_facture_source; - dolibarr_syslog("DiscountAbsolute::delete Update credit note statut sql=".$sql); + dol_syslog("DiscountAbsolute::delete Update credit note statut sql=".$sql); $result=$this->db->query($sql); if ($result) { @@ -244,7 +244,7 @@ class DiscountAbsolute if ($rowidinvoice) $sql.=" SET fk_facture = ".$rowidinvoice; $sql.=" WHERE rowid = ".$this->id; - dolibarr_syslog("DiscountAbsolute::link_to_invoice sql=".$sql,LOG_DEBUG); + dol_syslog("DiscountAbsolute::link_to_invoice sql=".$sql,LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -253,7 +253,7 @@ class DiscountAbsolute else { $this->error=$this->db->error(); - dolibarr_syslog("DiscountAbsolute::link_to_invoice ".$this->error,LOG_ERR); + dol_syslog("DiscountAbsolute::link_to_invoice ".$this->error,LOG_ERR); return -3; } } @@ -272,7 +272,7 @@ class DiscountAbsolute $sql.=" SET fk_facture_line = NULL, fk_facture = NULL"; $sql.=" WHERE rowid = ".$this->id; - dolibarr_syslog("DiscountAbsolute::unlink_invoice sql=".$sql,LOG_DEBUG); + dol_syslog("DiscountAbsolute::unlink_invoice sql=".$sql,LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -281,7 +281,7 @@ class DiscountAbsolute else { $this->error=$this->db->error(); - dolibarr_syslog("DiscountAbsolute::link_to_invoice ".$this->error,LOG_ERR); + dol_syslog("DiscountAbsolute::link_to_invoice ".$this->error,LOG_ERR); return -3; } } @@ -306,7 +306,7 @@ class DiscountAbsolute if ($filter) $sql.=' AND '.$filter; if ($maxvalue) $sql.=' AND rc.amount_ttc <= '.price2num($maxvalue); - dolibarr_syslog("DiscountAbsolute::getAvailableDiscounts sql=".$sql,LOG_DEBUG); + dol_syslog("DiscountAbsolute::getAvailableDiscounts sql=".$sql,LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -332,7 +332,7 @@ class DiscountAbsolute $sql.= ' FROM '.MAIN_DB_PREFIX.'societe_remise_except as rc'; $sql.= ' WHERE rc.fk_facture = '.$invoice->id; - dolibarr_syslog("DiscountAbsolute::getSommeCreditNote sql=".$sql,LOG_DEBUG); + dol_syslog("DiscountAbsolute::getSommeCreditNote sql=".$sql,LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { diff --git a/htdocs/docs/class/pdf_courrier_droit_editeur.class.php b/htdocs/docs/class/pdf_courrier_droit_editeur.class.php index 9971ce2341531c3c44f27dfcaa8392bf00a89f06..6258ac4757a5e757c51d0a32819fe7b1ca33ac95 100644 --- a/htdocs/docs/class/pdf_courrier_droit_editeur.class.php +++ b/htdocs/docs/class/pdf_courrier_droit_editeur.class.php @@ -48,7 +48,7 @@ class pdf_courrier_droit_editeur $this->marge_haute=10; $this->marge_basse=10; - $this->name = "Courrier des droits ".dolibarr_print_date(time(),"%Y"); + $this->name = "Courrier des droits ".dol_print_date(time(),"%Y"); $this->file = '1'.strftime("%Y", time()).'.pdf'; } @@ -63,7 +63,7 @@ class pdf_courrier_droit_editeur $this->file = $numero.strftime("%Y", time()); $this->extension = "pdf"; - dolibarr_syslog("pdf_courrier_droit_editeur::Generate ", LOG_DEBUG ); + dol_syslog("pdf_courrier_droit_editeur::Generate ", LOG_DEBUG ); require_once(FPDF_PATH.'fpdf.php'); require_once(DOL_DOCUMENT_ROOT."/product.class.php"); @@ -106,7 +106,7 @@ class pdf_courrier_droit_editeur { $id = $obj->rowid; - dolibarr_syslog("droits-editeurs.php id:$id", LOG_DEBUG ); + dol_syslog("droits-editeurs.php id:$id", LOG_DEBUG ); $coupdf = new pdf_courrier_droit_editeur($this->db, $langs); @@ -136,17 +136,17 @@ class pdf_courrier_droit_editeur if (! empty($conf->global->MAIN_UMASK)) @chmod($file, octdec($conf->global->MAIN_UMASK)); - dolibarr_syslog("droits-editeurs.php write $file", LOG_DEBUG ); + dol_syslog("droits-editeurs.php write $file", LOG_DEBUG ); } $pdf_all->Close(); $pdf_all->Output($file_all); - dolibarr_syslog("droits-editeurs.php write $fileall", LOG_DEBUG ); + dol_syslog("droits-editeurs.php write $fileall", LOG_DEBUG ); } else { - dolibarr_syslog("pdf_courrier_droit_editeur::Generate ".$db->error(), LOG_ERR ); + dol_syslog("pdf_courrier_droit_editeur::Generate ".$db->error(), LOG_ERR ); } return 0; @@ -159,7 +159,7 @@ class pdf_courrier_droit_editeur */ function Write($id, $dir, $year, &$pdf) { - dolibarr_syslog("pdf_courrier_droit_editeur::Write $id,$year ", LOG_DEBUG ); + dol_syslog("pdf_courrier_droit_editeur::Write $id,$year ", LOG_DEBUG ); $soc = new Societe($this->db); $soc->fetch($id); diff --git a/htdocs/docs/document.class.php b/htdocs/docs/document.class.php index 245eae29f8503ca771e198544cf1d358f3079293..e620495460bb28f02dd794bafcaba19b2758497a 100644 --- a/htdocs/docs/document.class.php +++ b/htdocs/docs/document.class.php @@ -48,7 +48,7 @@ class Document { $errno = 0; - dolibarr_syslog("Document::Generate id=$id", LOG_DEBUG ); + dol_syslog("Document::Generate id=$id", LOG_DEBUG ); $this->id = $id; $class = $id; $classfile = 'docs/class/'.$class.'.class.php'; @@ -76,12 +76,12 @@ class Document if ($err === 0) { $this->db->commit(); - dolibarr_syslog("Document::Generate COMMIT", LOG_DEBUG ); + dol_syslog("Document::Generate COMMIT", LOG_DEBUG ); } else { $this->db->rollback(); - dolibarr_syslog("Document::Generate ROLLBACK", LOG_ERR ); + dol_syslog("Document::Generate ROLLBACK", LOG_ERR ); } return $errno; diff --git a/htdocs/docs/index.php b/htdocs/docs/index.php index 9ef4fe14fc39d703f250517bb34d8f22d5216791..943ae36adc948825aab3f116baff61c2760fcee2 100644 --- a/htdocs/docs/index.php +++ b/htdocs/docs/index.php @@ -58,7 +58,7 @@ if ($resql) $loc = get_exdir($obj->rowid).$obj->rowid.".pdf"; $file = stripslashes($obj->name); echo '<a href="'.DOL_URL_ROOT.'/document.php?modulepart=ged&type=application/binary&file='.urlencode($loc).'">'.$file.'</a></td>'; - print '<td>'.dolibarr_print_date($obj->date_generation,'dayhour').'</td>'; + print '<td>'.dol_print_date($obj->date_generation,'dayhour').'</td>'; print "</tr>\n"; } @@ -67,7 +67,7 @@ if ($resql) } else { - dolibarr_print_error($db); + dol_print_error($db); } diff --git a/htdocs/document.php b/htdocs/document.php index ec2d8811ae011a7e451f37fc84c0dbfb1507c300..5fc819902c73073b54bd70d14a5c897aa99411ae 100644 --- a/htdocs/document.php +++ b/htdocs/document.php @@ -421,9 +421,9 @@ if (! $accessallowed) // les noms de fichiers. if (eregi('\.\.',$original_file) || eregi('[<>|]',$original_file)) { - dolibarr_syslog("Refused to deliver file ".$original_file); + dol_syslog("Refused to deliver file ".$original_file); // Do no show plain path in shown error message - dolibarr_print_error(0,$langs->trans("ErrorFileNameInvalid",$_GET["file"])); + dol_print_error(0,$langs->trans("ErrorFileNameInvalid",$_GET["file"])); exit; } @@ -437,16 +437,16 @@ if ($action == 'remove_file') clearstatcache(); $filename = basename($original_file); - dolibarr_syslog("document.php remove $original_file $filename $urlsource", LOG_DEBUG); + dol_syslog("document.php remove $original_file $filename $urlsource", LOG_DEBUG); if (! file_exists($original_file)) { - dolibarr_print_error(0,$langs->trans("ErrorFileDoesNotExists",$_GET["file"])); + dol_print_error(0,$langs->trans("ErrorFileDoesNotExists",$_GET["file"])); exit; } unlink($original_file); - dolibarr_syslog("document.php back to ".urldecode($urlsource), LOG_DEBUG); + dol_syslog("document.php back to ".urldecode($urlsource), LOG_DEBUG); header("Location: ".urldecode($urlsource)); @@ -460,11 +460,11 @@ else clearstatcache(); $filename = basename($original_file); - dolibarr_syslog("document.php download $original_file $filename content-type=$type"); + dol_syslog("document.php download $original_file $filename content-type=$type"); if (! file_exists($original_file)) { - dolibarr_print_error(0,$langs->trans("ErrorFileDoesNotExists",$original_file)); + dol_print_error(0,$langs->trans("ErrorFileDoesNotExists",$original_file)); exit; } diff --git a/htdocs/domain/index.php b/htdocs/domain/index.php index 830e8638463e3d7acc5cd93ae07c4217adb421ab..e1c5c97940bd67bf22714d5c47e08a4ec8c9a942 100644 --- a/htdocs/domain/index.php +++ b/htdocs/domain/index.php @@ -79,7 +79,7 @@ if ($result) print "</table></form>"; } else { - dolibarr_print_error($db); + dol_print_error($db); } diff --git a/htdocs/don.class.php b/htdocs/don.class.php index 5d17a237dbbf50cb625b42cfc8be76ef8d1ea740..5a8bd4a76e5178890e8260c2f8fbd2387c1b76ee 100644 --- a/htdocs/don.class.php +++ b/htdocs/don.class.php @@ -294,7 +294,7 @@ class Don extends CommonObject $sql .= " ".($this->projetid > 0?$this->projetid:"null").","; $sql .= " '".addslashes($this->note)."', ".$user->id.", null, '$this->date','$this->email')"; - dolibarr_syslog("Don::create sql=".$sql, LOG_DEBUG); + dol_syslog("Don::create sql=".$sql, LOG_DEBUG); $result = $this->db->query($sql); if ($result) { @@ -302,7 +302,7 @@ class Don extends CommonObject } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); return -1; } } @@ -343,7 +343,7 @@ class Don extends CommonObject } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); return -1; } } @@ -370,7 +370,7 @@ class Don extends CommonObject } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); return -1; } } @@ -422,7 +422,7 @@ class Don extends CommonObject } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); return -1; } @@ -452,7 +452,7 @@ class Don extends CommonObject } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); return 0; } } @@ -485,7 +485,7 @@ class Don extends CommonObject } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); return 0; } } @@ -514,7 +514,7 @@ class Don extends CommonObject } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); return 0; } } diff --git a/htdocs/ecm/docdir.php b/htdocs/ecm/docdir.php index e9206194cfea761c287fb3a4a7ab6ea5dfed1ade..3593d98f4f0d856a2eadbbe5384479895377f950 100644 --- a/htdocs/ecm/docdir.php +++ b/htdocs/ecm/docdir.php @@ -68,7 +68,7 @@ if (! empty($_GET["section"])) $result=$ecmdir->fetch($_GET["section"]); if (! $result > 0) { - dolibarr_print_error($db,$ecmdir->error); + dol_print_error($db,$ecmdir->error); exit; } } diff --git a/htdocs/ecm/docfile.php b/htdocs/ecm/docfile.php index f8a15008e01edcbc59fa3c140b0682334ec9cf08..3ee773750a1e0412c6a2101a75aa89a22ab2dd75 100644 --- a/htdocs/ecm/docfile.php +++ b/htdocs/ecm/docfile.php @@ -64,13 +64,13 @@ if (! $sortfield) $sortfield="label"; $fileid=$_REQUEST["fileid"]; if (! $fileid) { - dolibarr_print_error('',"ErrorParamNotDefined"); + dol_print_error('',"ErrorParamNotDefined"); exit; } $section=$_REQUEST["section"]; if (! $section) { - dolibarr_print_error('',"ErrorSectionParamNotDefined"); + dol_print_error('',"ErrorSectionParamNotDefined"); exit; } @@ -83,7 +83,7 @@ if (! empty($_GET["fileid"])) $result=$ecmfile->fetch($_GET["fileid"]); if (! $result > 0) { - dolibarr_print_error($db,$ecmfile->error); + dol_print_error($db,$ecmfile->error); exit; } } @@ -114,7 +114,7 @@ $formecm=new FormEcm($db); $head = ecm_prepare_head($ecmdir); -dolibarr_fiche_head($head, 'card', $langs->trans("ECMSectionManual")); +dol_fiche_head($head, 'card', $langs->trans("ECMSectionManual")); if ($_GET["action"] == 'edit') { @@ -168,7 +168,7 @@ $userecm->fetch(); print $userecm->getNomUrl(1); print '</td></tr>'; print '<tr><td>'.$langs->trans("ECMCreationDate").'</td><td>'; -print dolibarr_print_date($ecmdir->date_c,'dayhour'); +print dol_print_date($ecmdir->date_c,'dayhour'); print '</td></tr>'; print '<tr><td>'.$langs->trans("ECMDirectoryForFiles").'</td><td>'; //print $conf->ecm->dir_output; diff --git a/htdocs/ecm/docmine.php b/htdocs/ecm/docmine.php index 72a9d0e0dab70ed853c6f3b8ab8fa439d181508a..c535904003a57784684e72d33ac2d947422bfb9e 100644 --- a/htdocs/ecm/docmine.php +++ b/htdocs/ecm/docmine.php @@ -59,7 +59,7 @@ $pagenext = $page + 1; $section=$_REQUEST["section"]; if (! $section) { - dolibarr_print_error('',"ErrorSectionParamNotDefined"); + dol_print_error('',"ErrorSectionParamNotDefined"); exit; } @@ -68,13 +68,13 @@ if (! $section) $ecmdir = new ECMDirectory($db); if (empty($_REQUEST["section"])) { - dolibarr_print_error('','Error, section parameter missing'); + dol_print_error('','Error, section parameter missing'); exit; } $result=$ecmdir->fetch($_REQUEST["section"]); if (! $result > 0) { - dolibarr_print_error($db,$ecmdir->error); + dol_print_error($db,$ecmdir->error); exit; } $relativepath=$ecmdir->getRelativePath(); @@ -223,7 +223,7 @@ foreach($filearray as $key => $file) $head = ecm_prepare_head($ecmdir); -dolibarr_fiche_head($head, 'card', $langs->trans("ECMSectionManual")); +dol_fiche_head($head, 'card', $langs->trans("ECMSectionManual")); if ($_GET["action"] == 'edit') { @@ -277,7 +277,7 @@ $userecm->fetch(); print $userecm->getNomUrl(1); print '</td></tr>'; print '<tr><td>'.$langs->trans("ECMCreationDate").'</td><td>'; -print dolibarr_print_date($ecmdir->date_c,'dayhour'); +print dol_print_date($ecmdir->date_c,'dayhour'); print '</td></tr>'; print '<tr><td>'.$langs->trans("ECMDirectoryForFiles").'</td><td>'; //print $conf->ecm->dir_output; diff --git a/htdocs/ecm/docother.php b/htdocs/ecm/docother.php index 83d8bb30e1edfc5d9dec9182e51cec0f276f7511..37ca1ed953d8601ccb85e0638caf0168089bd63b 100644 --- a/htdocs/ecm/docother.php +++ b/htdocs/ecm/docother.php @@ -97,7 +97,7 @@ print_fiche_titre($langs->trans("ECMAutoOrg")); //$head = societe_prepare_head($societe); -//dolibarr_fiche_head($head, 'document', $societe->nom); +//dol_fiche_head($head, 'document', $societe->nom); /* diff --git a/htdocs/ecm/ecmdirectory.class.php b/htdocs/ecm/ecmdirectory.class.php index ffa249dc617a4943299a79fe95c330c3267e2f98..8199b89861955d4e035f111530a6a1322a1731da 100644 --- a/htdocs/ecm/ecmdirectory.class.php +++ b/htdocs/ecm/ecmdirectory.class.php @@ -111,7 +111,7 @@ class EcmDirectory // extends CommonObject if ($pathfound) { $this->error="ErrorDirAlreadyExists"; - dolibarr_syslog("EcmDirectories::create ".$this->error, LOG_WARNING); + dol_syslog("EcmDirectories::create ".$this->error, LOG_WARNING); return -1; } else @@ -135,7 +135,7 @@ class EcmDirectory // extends CommonObject $sql.= " '".$this->fk_user_c."'"; $sql.= ")"; - dolibarr_syslog("EcmDirectories::create sql=".$sql, LOG_DEBUG); + dol_syslog("EcmDirectories::create sql=".$sql, LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -165,7 +165,7 @@ class EcmDirectory // extends CommonObject else { $this->error="Error ".$this->db->lasterror(); - dolibarr_syslog("EcmDirectories::create ".$this->error, LOG_ERR); + dol_syslog("EcmDirectories::create ".$this->error, LOG_ERR); $this->db->rollback(); return -1; } @@ -202,13 +202,13 @@ class EcmDirectory // extends CommonObject $sql.= " description='".addslashes($this->description)."'"; $sql.= " WHERE rowid=".$this->id; - dolibarr_syslog("EcmDirectories::update sql=".$sql, LOG_DEBUG); + dol_syslog("EcmDirectories::update sql=".$sql, LOG_DEBUG); $resql = $this->db->query($sql); if (! $resql) { $error++; $this->error="Error ".$this->db->lasterror(); - dolibarr_syslog("EcmDirectories::update ".$this->error, LOG_ERR); + dol_syslog("EcmDirectories::update ".$this->error, LOG_ERR); } if (! $error && ! $notrigger) @@ -249,12 +249,12 @@ class EcmDirectory // extends CommonObject $sql.= " cachenbofdoc = cachenbofdoc ".$sign." 1"; $sql.= " WHERE rowid = ".$this->id; - dolibarr_syslog("EcmDirectories::changeNbOfFiles sql=".$sql, LOG_DEBUG); + dol_syslog("EcmDirectories::changeNbOfFiles sql=".$sql, LOG_DEBUG); $resql = $this->db->query($sql); if (! $resql) { $this->error="Error ".$this->db->lasterror(); - dolibarr_syslog("EcmDirectories::changeNbOfFiles ".$this->error, LOG_ERR); + dol_syslog("EcmDirectories::changeNbOfFiles ".$this->error, LOG_ERR); return -1; } @@ -282,7 +282,7 @@ class EcmDirectory // extends CommonObject $sql.= " FROM ".MAIN_DB_PREFIX."ecm_directories as t"; $sql.= " WHERE t.rowid = ".$id; - dolibarr_syslog("EcmDirectories::fetch sql=".$sql, LOG_DEBUG); + dol_syslog("EcmDirectories::fetch sql=".$sql, LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -309,7 +309,7 @@ class EcmDirectory // extends CommonObject else { $this->error="Error ".$this->db->lasterror(); - dolibarr_syslog("EcmDirectories::fetch ".$this->error, LOG_ERR); + dol_syslog("EcmDirectories::fetch ".$this->error, LOG_ERR); return -1; } } @@ -327,12 +327,12 @@ class EcmDirectory // extends CommonObject $sql = "DELETE FROM ".MAIN_DB_PREFIX."ecm_directories"; $sql.= " WHERE rowid=".$this->id; - dolibarr_syslog("EcmDirectories::delete sql=".$sql); + dol_syslog("EcmDirectories::delete sql=".$sql); $resql = $this->db->query($sql); if (! $resql) { $this->error="Error ".$this->db->lasterror(); - dolibarr_syslog("EcmDirectories::delete ".$this->error, LOG_ERR); + dol_syslog("EcmDirectories::delete ".$this->error, LOG_ERR); return -1; } @@ -446,7 +446,7 @@ class EcmDirectory // extends CommonObject $sql.= " FROM ".MAIN_DB_PREFIX."ecm_directories"; $sql.= " WHERE fk_parent != 0"; - dolibarr_syslog("EcmDirectory::get_full_arbo sql=".$sql); + dol_syslog("EcmDirectory::get_full_arbo sql=".$sql); $resql = $this->db->query($sql); if ($resql) { @@ -458,7 +458,7 @@ class EcmDirectory // extends CommonObject } else { - dolibarr_print_error ($this->db); + dol_print_error ($this->db); return -1; } } @@ -505,7 +505,7 @@ class EcmDirectory // extends CommonObject $sql.= " WHERE c.fk_user_c = u.rowid"; $sql.= " ORDER BY c.label, c.rowid"; - dolibarr_syslog("EcmDirectory::get_full_arbo sql=".$sql); + dol_syslog("EcmDirectory::get_full_arbo sql=".$sql); $resql = $this->db->query ($sql); if ($resql) { @@ -542,7 +542,7 @@ class EcmDirectory // extends CommonObject } else { - dolibarr_print_error ($this->db); + dol_print_error ($this->db); return -1; } @@ -617,7 +617,7 @@ class EcmDirectory // extends CommonObject $sql = "UPDATE ".MAIN_DB_PREFIX."ecm_directories SET"; $sql.= " cachenbofdoc='".sizeof($filelist)."'"; $sql.= " WHERE rowid=".$this->id; - dolibarr_syslog("EcmDirectories::refreshcachenboffile sql=".$sql, LOG_DEBUG); + dol_syslog("EcmDirectories::refreshcachenboffile sql=".$sql, LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -627,7 +627,7 @@ class EcmDirectory // extends CommonObject else { $this->error="Error ".$this->db->lasterror(); - dolibarr_syslog("EcmDirectories::refreshcachenboffile ".$this->error, LOG_ERR); + dol_syslog("EcmDirectories::refreshcachenboffile ".$this->error, LOG_ERR); return -1; } } diff --git a/htdocs/ecm/index.php b/htdocs/ecm/index.php index 5ac8949346abdf386e4e46aca28a40fac6645249..8d68630228c0572989fb1a8b7b0a09f72823082a 100644 --- a/htdocs/ecm/index.php +++ b/htdocs/ecm/index.php @@ -67,7 +67,7 @@ if (! empty($_REQUEST["section"])) $result=$ecmdir->fetch($_REQUEST["section"]); if (! $result > 0) { - dolibarr_print_error($db,$ecmdir->error); + dol_print_error($db,$ecmdir->error); exit; } } @@ -85,7 +85,7 @@ if ( $_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC)) $result=$ecmdir->fetch($_REQUEST["section"]); if (! $result > 0) { - dolibarr_print_error($db,$ecmdir->error); + dol_print_error($db,$ecmdir->error); exit; } $relativepath=$ecmdir->getRelativePath(); @@ -133,7 +133,7 @@ if ($_POST['action'] == 'confirm_deletefile' && $_POST['confirm'] == 'yes') $result=$ecmdir->fetch($_REQUEST["section"]); if (! $result > 0) { - dolibarr_print_error($db,$ecmdir->error); + dol_print_error($db,$ecmdir->error); exit; } $relativepath=$ecmdir->getRelativePath(); @@ -226,7 +226,7 @@ if ($mesg) { print $mesg."<br>"; } $selected='file_manager'; if (eregi('search',$action)) $selected='search_form'; $head = ecm_prepare_head_fm($fac); -dolibarr_fiche_head($head, $selected, '', 1); +dol_fiche_head($head, $selected, '', 1); print '<table class="border" width="100%"><tr><td width="40%" valign="top">'; @@ -563,7 +563,7 @@ if (empty($action) || $action == 'file_manager' || eregi('refresh',$action) || $ $htmltooltip='<b>'.$langs->trans("ECMSection").'</b>: '.$val['label'].'<br>'; $htmltooltip='<b>'.$langs->trans("Type").'</b>: '.$langs->trans("ECMSectionManual").'<br>'; $htmltooltip.='<b>'.$langs->trans("ECMCreationUser").'</b>: '.$userstatic->getNomUrl(1).'<br>'; - $htmltooltip.='<b>'.$langs->trans("ECMCreationDate").'</b>: '.dolibarr_print_date($val['date_c'],"dayhour").'<br>'; + $htmltooltip.='<b>'.$langs->trans("ECMCreationDate").'</b>: '.dol_print_date($val['date_c'],"dayhour").'<br>'; $htmltooltip.='<b>'.$langs->trans("Description").'</b>: '.$val['description'].'<br>'; $htmltooltip.='<b>'.$langs->trans("ECMNbOfFilesInDir").'</b>: '.$val['cachenbofdoc'].'<br>'; if ($nbofsubdir) $htmltooltip.='<b>'.$langs->trans("ECMNbOfFilesInSubDir").'</b>: '.$nboffilesinsubdir; diff --git a/htdocs/ecm/search.php b/htdocs/ecm/search.php index c40d5370af7c383ffa0ec7ff62f498817b30dd30..536e8308e67c3029e6892461d383977551b5170c 100644 --- a/htdocs/ecm/search.php +++ b/htdocs/ecm/search.php @@ -62,7 +62,7 @@ print_fiche_titre($langs->trans("Search")); //$head = societe_prepare_head($societe); -//dolibarr_fiche_head($head, 'document', $societe->nom); +//dol_fiche_head($head, 'document', $societe->nom); diff --git a/htdocs/energie/EnergieCompteur.class.php b/htdocs/energie/EnergieCompteur.class.php index c81523b69c3436bc8ed9b07cbe05213d47fea55b..bcb94c6d6c0c293e5628766cb554332e8206e018 100644 --- a/htdocs/energie/EnergieCompteur.class.php +++ b/htdocs/energie/EnergieCompteur.class.php @@ -81,7 +81,7 @@ class EnergieCompteur } else { - dolibarr_syslog(""); + dol_syslog(""); return -1; } } @@ -111,8 +111,8 @@ class EnergieCompteur } else { - dolibarr_syslog("EnergieCompteur::Create Erreur 1"); - dolibarr_syslog($this->db->error()); + dol_syslog("EnergieCompteur::Create Erreur 1"); + dol_syslog($this->db->error()); return -1; } } @@ -140,8 +140,8 @@ class EnergieCompteur } else { - dolibarr_syslog("EnergieCompteur::AjoutReleve Erreur 1"); - dolibarr_syslog($this->db->error()); + dol_syslog("EnergieCompteur::AjoutReleve Erreur 1"); + dol_syslog($this->db->error()); return -1; } } @@ -162,8 +162,8 @@ class EnergieCompteur } else { - dolibarr_syslog("EnergieCompteur::AjoutReleve Erreur 1"); - dolibarr_syslog($this->db->error()); + dol_syslog("EnergieCompteur::AjoutReleve Erreur 1"); + dol_syslog($this->db->error()); return -1; } } @@ -185,8 +185,8 @@ class EnergieCompteur } else { - dolibarr_syslog("EnergieCompteur::AddGroup Erreur 1"); - dolibarr_syslog($this->db->error()); + dol_syslog("EnergieCompteur::AddGroup Erreur 1"); + dol_syslog($this->db->error()); return -1; } } @@ -221,7 +221,7 @@ class EnergieCompteur } else { - dolibarr_syslog(""); + dol_syslog(""); return -1; } } diff --git a/htdocs/energie/EnergieGroupe.class.php b/htdocs/energie/EnergieGroupe.class.php index b90c038924d8f6d8f4ec0fa1d2153c8eef6a608d..777c793c448ea227ed050dd6ec19f3669f8572a4 100644 --- a/htdocs/energie/EnergieGroupe.class.php +++ b/htdocs/energie/EnergieGroupe.class.php @@ -57,7 +57,7 @@ class EnergieGroupe } else { - dolibarr_syslog("EnergieGroupe::fetch Erreur"); + dol_syslog("EnergieGroupe::fetch Erreur"); return -1; } } @@ -86,8 +86,8 @@ class EnergieGroupe } else { - dolibarr_syslog("EnergieGroupe::Create Erreur 1"); - dolibarr_syslog($this->db->error()); + dol_syslog("EnergieGroupe::Create Erreur 1"); + dol_syslog($this->db->error()); return -1; } } diff --git a/htdocs/energie/compteur.php b/htdocs/energie/compteur.php index c69d2d1b2e039491408d7a905856bc48b5f502bc..0b01764a9226bbb494e818923fd4dafd2b90bc54 100644 --- a/htdocs/energie/compteur.php +++ b/htdocs/energie/compteur.php @@ -86,7 +86,7 @@ if ($_GET["action"] == 'create') $h++; $a = 0; - dolibarr_fiche_head($head, $a, $soc->nom); + dol_fiche_head($head, $a, $soc->nom); $html = new Form($db); $compteur = new EnergieCompteur($db, $user); @@ -143,7 +143,7 @@ else $head[$h][1] = "Groupe"; $h++; - dolibarr_fiche_head($head, $a, $soc->nom); + dol_fiche_head($head, $a, $soc->nom); print '<table class="border" width="100%">'; @@ -197,7 +197,7 @@ else $obj = $db->fetch_object($resql); $var=!$var; print "<tr $bc[$var]><td>"; - print dolibarr_print_date($obj->date_releve,'%a %d %B %Y'); + print dol_print_date($obj->date_releve,'%a %d %B %Y'); print '</td><td>'.$obj->valeur.'</td>'; $i++; diff --git a/htdocs/energie/compteur_graph.php b/htdocs/energie/compteur_graph.php index a137c1f531f19852ab8b3a78c80f2b874d16d6da..46f6fabc15d6b62f0c64715cbe0e0fcf5e7e0bd4 100644 --- a/htdocs/energie/compteur_graph.php +++ b/htdocs/energie/compteur_graph.php @@ -51,7 +51,7 @@ if ($_GET["id"] > 0) $head[$h][1] = "Groupe"; $h++; - dolibarr_fiche_head($head, $a, $soc->nom); + dol_fiche_head($head, $a, $soc->nom); print '<table class="border" width="100%">'; print "<tr><td>".$langs->trans("Compteur")."</td>"; diff --git a/htdocs/energie/compteur_groupe.php b/htdocs/energie/compteur_groupe.php index 0ee20bd664b720789b13a0a8fbbea687f2c75d05..78b708fdcbcc9bda195f8dc8f9ca9bb6ba0422ce 100644 --- a/htdocs/energie/compteur_groupe.php +++ b/htdocs/energie/compteur_groupe.php @@ -70,7 +70,7 @@ if ($_GET["id"] > 0) $a = $h; $h++; - dolibarr_fiche_head($head, $a, $soc->nom); + dol_fiche_head($head, $a, $soc->nom); print '<table class="border" width="100%">'; diff --git a/htdocs/energie/graph.php b/htdocs/energie/graph.php index 36e4c805bc90455a2a4396cdae15ab7e2ca8c574..750d333a11093b8ef5167e7fcc21160c871ff490 100644 --- a/htdocs/energie/graph.php +++ b/htdocs/energie/graph.php @@ -87,7 +87,7 @@ $as["week"] = 1; $as["month"] = 2; $as["year"] = 3; -dolibarr_fiche_head($head, $as[$period], $soc->nom); +dol_fiche_head($head, $as[$period], $soc->nom); print '<table class="noborder" width="100%">'; diff --git a/htdocs/energie/groupe.php b/htdocs/energie/groupe.php index 3d1bf861baac78e35f29b47086623bb58bec3a97..620f570332f421f8f319e2d7619a20afeffe0cb7 100644 --- a/htdocs/energie/groupe.php +++ b/htdocs/energie/groupe.php @@ -66,7 +66,7 @@ if ($_GET["action"] == 'create') $h++; $a = 0; - dolibarr_fiche_head($head, $a, $soc->nom); + dol_fiche_head($head, $a, $soc->nom); $html = new Form($db); @@ -104,7 +104,7 @@ else $h++; $a = 0; - dolibarr_fiche_head($head, $a, $soc->nom); + dol_fiche_head($head, $a, $soc->nom); print '<table class="border" width="100%">'; print "<tr><td>".$langs->trans("Groupe")."</td>"; diff --git a/htdocs/energie/releve.php b/htdocs/energie/releve.php index 4e0b1404af4be59211e1dfa0e76d87800ecb58e7..c2f17fdc9e872af74cf511187e35a9c3da63243b 100644 --- a/htdocs/energie/releve.php +++ b/htdocs/energie/releve.php @@ -74,7 +74,7 @@ if ($_GET["id"] > 0) $head[$h][1] = "Groupe"; $h++; - dolibarr_fiche_head($head, $a, $soc->nom); + dol_fiche_head($head, $a, $soc->nom); print '<table class="border" width="100%">'; print "<tr><td>".$langs->trans("Compteur")."</td>"; @@ -113,7 +113,7 @@ if ($_GET["id"] > 0) $obj = $db->fetch_object($resql); $var=!$var; print "<tr $bc[$var]><td>"; - print dolibarr_print_date($obj->date_releve,'%a %d %B %Y'); + print dol_print_date($obj->date_releve,'%a %d %B %Y'); print '</td><td>'.$obj->valeur.'</td>'; print '<td><a href="releve.php?id='.$compteur->id.'&action=delete&rowid='.$obj->rowid.'&page='.$page.'">'; print img_delete().'</a></td></tr>'; diff --git a/htdocs/expedition/commande.php b/htdocs/expedition/commande.php index f9aa6871123ce4b68a2fef38f567f643265d7c75..84bbfae873597158a14175c1e2f3eda224fc8c13 100644 --- a/htdocs/expedition/commande.php +++ b/htdocs/expedition/commande.php @@ -76,7 +76,7 @@ if ($_POST['action'] == 'set_ref_client' && $user->rights->commande->creer) if ($_POST['action'] == 'setdate_livraison' && $user->rights->commande->creer) { //print "x ".$_POST['liv_month'].", ".$_POST['liv_day'].", ".$_POST['liv_year']; - $datelivraison=dolibarr_mktime(0, 0, 0, $_POST['liv_month'], $_POST['liv_day'], $_POST['liv_year']); + $datelivraison=dol_mktime(0, 0, 0, $_POST['liv_month'], $_POST['liv_day'], $_POST['liv_year']); $commande = new Commande($db); $commande->fetch($_GET['id']); @@ -99,7 +99,7 @@ if ($_POST['action'] == 'setmode' && $user->rights->commande->creer) $commande = new Commande($db); $commande->fetch($_GET['id']); $result=$commande->mode_reglement($_POST['mode_reglement_id']); - if ($result < 0) dolibarr_print_error($db,$commande->error); + if ($result < 0) dol_print_error($db,$commande->error); } if ($_POST['action'] == 'setconditions' && $user->rights->commande->creer) @@ -107,7 +107,7 @@ if ($_POST['action'] == 'setconditions' && $user->rights->commande->creer) $commande = new Commande($db); $commande->fetch($_GET['id']); $result=$commande->cond_reglement($_POST['cond_reglement_id']); - if ($result < 0) dolibarr_print_error($db,$commande->error); + if ($result < 0) dol_print_error($db,$commande->error); } @@ -140,7 +140,7 @@ if ($id > 0 || ! empty($ref)) $author->fetch(); $head = commande_prepare_head($commande); - dolibarr_fiche_head($head, 'shipping', $langs->trans("CustomerOrder")); + dol_fiche_head($head, 'shipping', $langs->trans("CustomerOrder")); /* * Confirmation de la validation @@ -223,7 +223,7 @@ if ($id > 0 || ! empty($ref)) // Date print '<tr><td>'.$langs->trans('Date').'</td>'; - print '<td colspan="2">'.dolibarr_print_date($commande->date,'daytext').'</td>'; + print '<td colspan="2">'.dol_print_date($commande->date,'daytext').'</td>'; print '<td width="50%">'.$langs->trans('Source').' : '.$commande->getLabelSource(); if ($commande->source == 0) { @@ -254,7 +254,7 @@ if ($id > 0 || ! empty($ref)) } else { - print dolibarr_print_date($commande->date_livraison,'daytext'); + print dol_print_date($commande->date_livraison,'daytext'); } print '</td>'; print '<td rowspan="'.$nbrow.'" valign="top">'.$langs->trans('NotePublic').' :<br>'; @@ -381,7 +381,7 @@ if ($id > 0 || ! empty($ref)) $sql.= " ORDER BY cd.rowid"; //print $sql; - dolibarr_syslog("commande.php sql=".$sql, LOG_DEBUG); + dol_syslog("commande.php sql=".$sql, LOG_DEBUG); $resql = $db->query($sql); if ($resql) { @@ -499,7 +499,7 @@ if ($id > 0 || ! empty($ref)) } else { - dolibarr_print_error($db); + dol_print_error($db); } print '</div>'; diff --git a/htdocs/expedition/expedition.class.php b/htdocs/expedition/expedition.class.php index 48e19878fbe3c69d7e59874003fd15ef302ffd30..64f47b4333c198651d08d2078cdb50292a586a57 100644 --- a/htdocs/expedition/expedition.class.php +++ b/htdocs/expedition/expedition.class.php @@ -234,7 +234,7 @@ class Expedition extends CommonObject if ($conf->livraison_bon->enabled) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."livraison as l ON e.rowid = l.fk_expedition"; $sql.= " WHERE e.rowid = ".$id; - dolibarr_syslog("Expedition::fetch sql=".$sql); + dol_syslog("Expedition::fetch sql=".$sql); $result = $this->db->query($sql) ; if ($result) { @@ -300,14 +300,14 @@ class Expedition extends CommonObject } else { - dolibarr_syslog('Expedition::Fetch Error rowid='.$rowid.' numrows=0 sql='.$sql); + dol_syslog('Expedition::Fetch Error rowid='.$rowid.' numrows=0 sql='.$sql); $this->error='Delivery with id '.$rowid.' not found sql='.$sql; return -2; } } else { - dolibarr_syslog('Expedition::Fetch Error rowid='.$rowid.' Erreur dans fetch de l\'expedition'); + dol_syslog('Expedition::Fetch Error rowid='.$rowid.' Erreur dans fetch de l\'expedition'); $this->error=$this->db->error(); return -1; } @@ -324,7 +324,7 @@ class Expedition extends CommonObject require_once DOL_DOCUMENT_ROOT ."/product/stock/mouvementstock.class.php"; - dolibarr_syslog("Expedition::valid"); + dol_syslog("Expedition::valid"); $this->db->begin(); @@ -344,7 +344,7 @@ class Expedition extends CommonObject $num = $this->db->num_rows($resql); if ($num > 0) { - dolibarr_syslog("Expedition::valid already validated", LOG_WARNING); + dol_syslog("Expedition::valid already validated", LOG_WARNING); $this->db->rollback(); return 0; } @@ -354,7 +354,7 @@ class Expedition extends CommonObject $sql.= " SET ref='".$this->ref."', fk_statut = 1, date_valid = ".$this->db->idate(mktime()).", fk_user_valid = ".$user->id; $sql.= " WHERE rowid = ".$this->id." AND fk_statut = 0"; - dolibarr_syslog("Expedition::valid update expedition sql=".$sql); + dol_syslog("Expedition::valid update expedition sql=".$sql); $resql=$this->db->query($sql); if ($resql) { @@ -368,7 +368,7 @@ class Expedition extends CommonObject $sql.= " FROM ".MAIN_DB_PREFIX."commandedet as cd, ".MAIN_DB_PREFIX."expeditiondet as ed"; $sql.= " WHERE ed.fk_expedition = $this->id AND cd.rowid = ed.fk_origin_line"; - dolibarr_syslog("Expedition::valid select details sql=".$sql); + dol_syslog("Expedition::valid select details sql=".$sql); $resql=$this->db->query($sql); if ($resql) { @@ -376,7 +376,7 @@ class Expedition extends CommonObject $i=0; while($i < $num) { - dolibarr_syslog("Expedition::valid movment nb ".$i); + dol_syslog("Expedition::valid movment nb ".$i); $obj = $this->db->fetch_object($resql); @@ -386,7 +386,7 @@ class Expedition extends CommonObject { $this->db->rollback(); $this->error=$this->db->error()." - sql=$sql"; - dolibarr_syslog("Expedition::valid ".$this->error); + dol_syslog("Expedition::valid ".$this->error); return -3; } @@ -398,7 +398,7 @@ class Expedition extends CommonObject { $this->db->rollback(); $this->error=$this->db->error()." - sql=$sql"; - dolibarr_syslog("Expedition::valid ".$this->error); + dol_syslog("Expedition::valid ".$this->error); return -2; } } @@ -430,7 +430,7 @@ class Expedition extends CommonObject { $this->db->rollback(); $this->error=$this->db->error(); - dolibarr_syslog("Expedition::valid ".$this->error); + dol_syslog("Expedition::valid ".$this->error); return -1; } } @@ -438,12 +438,12 @@ class Expedition extends CommonObject { $this->db->rollback(); $this->error="Non autorise"; - dolibarr_syslog("Expedition::valid ".$this->error); + dol_syslog("Expedition::valid ".$this->error); return -1; } $this->db->commit(); - //dolibarr_syslog("Expedition::valid commit"); + //dol_syslog("Expedition::valid commit"); return 1; } @@ -633,7 +633,7 @@ class Expedition extends CommonObject else { $this->error=$this->db->error(); - dolibarr_syslog('Expedition::fetch_lines: Error '.$this->error); + dol_syslog('Expedition::fetch_lines: Error '.$this->error); return -3; } } @@ -687,7 +687,7 @@ class Expedition extends CommonObject { global $user,$langs; - dolibarr_syslog("Expedition::initAsSpecimen"); + dol_syslog("Expedition::initAsSpecimen"); // Charge tableau des id de soci�t� socids $socids = array(); diff --git a/htdocs/expedition/fiche.php b/htdocs/expedition/fiche.php index e4c4a3bfdb8d9eaf790aa6f547966f5e043d2427..099b380ab99e5bfe6a3fe2e18db264c3342e3b06 100644 --- a/htdocs/expedition/fiche.php +++ b/htdocs/expedition/fiche.php @@ -184,7 +184,7 @@ if ($_REQUEST['action'] == 'builddoc') // En get ou en post $result=expedition_pdf_create($db,$expedition->id,$expedition->modelpdf,$outputlangs); if ($result <= 0) { - dolibarr_print_error($db,$result); + dol_print_error($db,$result); exit; } } @@ -279,7 +279,7 @@ if ($_GET["action"] == 'create') // Date print "<tr><td>".$langs->trans("Date")."</td>"; - print '<td colspan="3">'.dolibarr_print_date($object->date,"day")."</td></tr>\n"; + print '<td colspan="3">'.dol_print_date($object->date,"day")."</td></tr>\n"; // Warehouse (id forced) if ($conf->stock->enabled && $_GET["entrepot_id"]) @@ -495,7 +495,7 @@ if ($_GET["action"] == 'create') } else { - dolibarr_print_error($db); + dol_print_error($db); } } } @@ -512,7 +512,7 @@ else $result = $expedition->fetch($_GET["id"]); if ($result < 0) { - dolibarr_print_error($db,$expedition->error); + dol_print_error($db,$expedition->error); exit -1; } $lignes = $expedition->lignes; @@ -544,7 +544,7 @@ else $h++; } - dolibarr_fiche_head($head, $hselected, $langs->trans("Sending")); + dol_fiche_head($head, $hselected, $langs->trans("Sending")); if ($mesg) print $mesg; @@ -633,7 +633,7 @@ else // Date print '<tr><td>'.$langs->trans("Date").'</td>'; - print '<td colspan="3">'.dolibarr_print_date($expedition->date,"daytext")."</td>\n"; + print '<td colspan="3">'.dol_print_date($expedition->date,"daytext")."</td>\n"; print '</tr>'; // Weight diff --git a/htdocs/expedition/index.php b/htdocs/expedition/index.php index 1e876b92a79c4c0f1b1ac5542c10a8d4836a220a..328ed3b1a71b7860f68bd7edc575e617f331fd53 100644 --- a/htdocs/expedition/index.php +++ b/htdocs/expedition/index.php @@ -128,7 +128,7 @@ if ( $db->query($sql) ) print "<tr $bc[$var]>"; print '<td nowrap="nowrap">'; print "<a href=\"commande.php?id=".$obj->rowid."\">".img_object($langs->trans("ShowOrder"),"order").' '.$obj->ref.'</a></td>'; - print '<td><a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$obj->socid.'">'.dolibarr_trunc($obj->nom,20).'</a></td></tr>'; + print '<td><a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$obj->socid.'">'.dol_trunc($obj->nom,20).'</a></td></tr>'; $i++; } print "</table><br>"; diff --git a/htdocs/expedition/liste.php b/htdocs/expedition/liste.php index 6ad9137177933bb9d6fb133ad4180f3faf7cc6c1..ae151ae28f8e060df6072ff5c6f18f9303e20347 100644 --- a/htdocs/expedition/liste.php +++ b/htdocs/expedition/liste.php @@ -149,10 +149,10 @@ if ($resql) } print "<td align=\"right\">"; - $y = dolibarr_print_date($objp->date_expedition,"%Y"); - $m = dolibarr_print_date($objp->date_expedition,"%m"); - $mt = dolibarr_print_date($objp->date_expedition,"%b"); - $d = dolibarr_print_date($objp->date_expedition,"%d"); + $y = dol_print_date($objp->date_expedition,"%Y"); + $m = dol_print_date($objp->date_expedition,"%m"); + $mt = dol_print_date($objp->date_expedition,"%b"); + $d = dol_print_date($objp->date_expedition,"%d"); print $d."\n"; print " <a href=\"propal.php?year=$y&month=$m\">"; print $b."</a>\n"; @@ -170,7 +170,7 @@ if ($resql) } else { - dolibarr_print_error($db); + dol_print_error($db); } $db->close(); diff --git a/htdocs/expedition/stats/expeditionstats.class.php b/htdocs/expedition/stats/expeditionstats.class.php index 47a0fbbe138c1f16cc5583ec3fede7181eb0e76e..d9f10a7b76af1fe4f8163a488b4405dac2863c20 100644 --- a/htdocs/expedition/stats/expeditionstats.class.php +++ b/htdocs/expedition/stats/expeditionstats.class.php @@ -85,7 +85,7 @@ class ExpeditionStats for ($i = 1 ; $i < 13 ; $i++) { - $data[$i-1] = array(dolibarr_print_date(dolibarr_mktime(12,0,0,$i,1,$year),"%b"), $res[$i]); + $data[$i-1] = array(dol_print_date(dol_mktime(12,0,0,$i,1,$year),"%b"), $res[$i]); } return $data; @@ -101,7 +101,7 @@ class ExpeditionStats for ($i = 1 ; $i < 13 ; $i++) { - $data[$i-1] = array(dolibarr_print_date(dolibarr_mktime(12,0,0,$i,1,$year),"%b"), + $data[$i-1] = array(dol_print_date(dol_mktime(12,0,0,$i,1,$year),"%b"), $data1[$i][1], $data2[$i][1]); } diff --git a/htdocs/exports/export.class.php b/htdocs/exports/export.class.php index 3bd0d087680789fd38ee299cb6b37ed250526b75..ad8e98d40f0a7bf70406decef84fac7573d93a51 100644 --- a/htdocs/exports/export.class.php +++ b/htdocs/exports/export.class.php @@ -67,7 +67,7 @@ class Export { global $langs,$conf; - dolibarr_syslog("Export::load_arrays user=".$user->id." filter=".$filter); + dol_syslog("Export::load_arrays user=".$user->id." filter=".$filter); $dir=DOL_DOCUMENT_ROOT."/includes/modules"; $handle=opendir($dir); @@ -151,7 +151,7 @@ class Export $this->array_export_sql_end[$i]=$module->export_sql_end[$r]; //$this->array_export_sql[$i]=$module->export_sql[$r]; - dolibarr_syslog("Export loaded for module ".$modulename." with index ".$i.", dataset=".$module->export_code[$r].", nb of fields=".sizeof($module->export_fields_code[$r])); + dol_syslog("Export loaded for module ".$modulename." with index ".$i.", dataset=".$module->export_code[$r].", nb of fields=".sizeof($module->export_fields_code[$r])); $i++; // } } @@ -178,7 +178,7 @@ class Export $indice=0; asort($array_selected); - dolibarr_syslog("Export::build_file $model, $datatoexport, $array_selected"); + dol_syslog("Export::build_file $model, $datatoexport, $array_selected"); // Creation de la classe d'export du model ExportXXX $dir = DOL_DOCUMENT_ROOT . "/includes/modules/export/"; @@ -204,7 +204,7 @@ class Export $sql.=$this->array_export_sql_end[$indice]; // Run the sql - dolibarr_syslog("Export::build_file sql=".$sql); + dol_syslog("Export::build_file sql=".$sql); $resql = $this->db->query($sql); if ($resql) { @@ -265,14 +265,14 @@ class Export else { $this->error=$objmodel->error; - dolibarr_syslog("Error: ".$this->error); + dol_syslog("Error: ".$this->error); return -1; } } else { $this->error=$this->db->error()." - sql=".$sql; - dolibarr_syslog("Error: ".$this->error); + dol_syslog("Error: ".$this->error); return -1; } } @@ -285,7 +285,7 @@ class Export { global $conf; - dolibarr_syslog("Export.class.php::create"); + dol_syslog("Export.class.php::create"); $this->db->begin(); @@ -293,7 +293,7 @@ class Export $sql.= 'label, type, field)'; $sql.= " VALUES ('".$this->model_name."', '".$this->datatoexport."', '".$this->hexa."')"; - dolibarr_syslog("Export::create sql=".$sql, LOG_DEBUG); + dol_syslog("Export::create sql=".$sql, LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -304,7 +304,7 @@ class Export { $this->error=$this->db->lasterror(); $this->errno=$this->db->lasterrno(); - dolibarr_syslog("Export::create error ".$this->error, LOG_ERR); + dol_syslog("Export::create error ".$this->error, LOG_ERR); $this->db->rollback(); return -1; } @@ -320,7 +320,7 @@ class Export $sql.= ' FROM '.MAIN_DB_PREFIX.'export_model as em'; $sql.= ' WHERE em.rowid = '.$id; - dolibarr_syslog("Export::fetch sql=".$sql, LOG_DEBUG); + dol_syslog("Export::fetch sql=".$sql, LOG_DEBUG); $result = $this->db->query($sql) ; if ($result) { @@ -342,7 +342,7 @@ class Export } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); return -3; } } @@ -364,7 +364,7 @@ class Export $this->db->begin(); - dolibarr_syslog(get_class($this)."::delete sql=".$sql); + dol_syslog(get_class($this)."::delete sql=".$sql); $resql = $this->db->query($sql); if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); } @@ -389,7 +389,7 @@ class Export { foreach($this->errors as $errmsg) { - dolibarr_syslog(get_class($this)."::delete ".$errmsg, LOG_ERR); + dol_syslog(get_class($this)."::delete ".$errmsg, LOG_ERR); $this->error.=($this->error?', '.$errmsg:$errmsg); } $this->db->rollback(); diff --git a/htdocs/exports/export.php b/htdocs/exports/export.php index cca355119a8c11c72830347ff92d0d928e28d7f6..e01253312e6800ab2f570c351e541f754e671310 100644 --- a/htdocs/exports/export.php +++ b/htdocs/exports/export.php @@ -264,7 +264,7 @@ if ($step == 1 || ! $datatoexport) $h++; */ - dolibarr_fiche_head($head, $hselected, $langs->trans("NewExport")); + dol_fiche_head($head, $hselected, $langs->trans("NewExport")); print '<table class="notopnoleftnoright" width="100%">'; @@ -336,7 +336,7 @@ if ($step == 2 && $datatoexport) $hselected=$h; $h++; - dolibarr_fiche_head($head, $hselected, $langs->trans("NewExport")); + dol_fiche_head($head, $hselected, $langs->trans("NewExport")); print '<table width="100%" class="border">'; @@ -479,7 +479,7 @@ if ($step == 3 && $datatoexport) $hselected=$h; $h++; - dolibarr_fiche_head($head, $hselected, $langs->trans("NewExport")); + dol_fiche_head($head, $hselected, $langs->trans("NewExport")); print '<table width="100%" class="border">'; @@ -619,7 +619,7 @@ if ($step == 3 && $datatoexport) } } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); } print '</table>'; @@ -656,7 +656,7 @@ if ($step == 4 && $datatoexport) $hselected=$h; $h++; - dolibarr_fiche_head($head, $hselected, $langs->trans("NewExport")); + dol_fiche_head($head, $hselected, $langs->trans("NewExport")); print '<table width="100%" class="border">'; diff --git a/htdocs/facture.class.php b/htdocs/facture.class.php index ce8871479d4a2086e0852934e598dcbe6b64ee60..a1e8a91356116fdb320f26a23b38da870ee661dc 100644 --- a/htdocs/facture.class.php +++ b/htdocs/facture.class.php @@ -894,7 +894,7 @@ class Facture extends CommonObject } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); return -1; } } @@ -1048,7 +1048,7 @@ class Facture extends CommonObject $mois += 1; } // On se d�place au d�but du mois suivant, et on retire un jour - $datelim=dolibarr_mktime(12,0,0,$mois,1,$annee); + $datelim=dol_mktime(12,0,0,$mois,1,$annee); $datelim -= (3600 * 24); } @@ -1294,7 +1294,7 @@ class Facture extends CommonObject else { dol_syslog("Facture::set_valid() Echec update - 10 - sql=".$sql, LOG_DEBUG); - dolibarr_print_error($this->db); + dol_print_error($this->db); $error++; } @@ -1910,7 +1910,7 @@ class Facture extends CommonObject } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); } return $idarray; } @@ -2129,7 +2129,7 @@ class Facture extends CommonObject } else { - dolibarr_print_error($db,"Facture::getNextNumRef ".$obj->error); + dol_print_error($db,"Facture::getNextNumRef ".$obj->error); return ""; } } @@ -2178,7 +2178,7 @@ class Facture extends CommonObject } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); } } @@ -2559,7 +2559,7 @@ class Facture extends CommonObject } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); $this->error=$this->db->error(); return -1; } @@ -2694,7 +2694,7 @@ class Facture extends CommonObject } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); $this->error=$this->db->error(); return -1; } @@ -2817,7 +2817,7 @@ class FactureLigne } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); } } @@ -2855,7 +2855,7 @@ class FactureLigne } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); $this->db->rollback(); return -1; } diff --git a/htdocs/fichinter/apercu.php b/htdocs/fichinter/apercu.php index a39e8daddfec0525a9e4ebc247640496d56f0d7d..d6743452a291fe0f2529e462b3d9f5193842a098 100644 --- a/htdocs/fichinter/apercu.php +++ b/htdocs/fichinter/apercu.php @@ -73,7 +73,7 @@ if ($_GET["id"] > 0) { $head = fichinter_prepare_head($fichinter); - dolibarr_fiche_head($head, 'preview', $langs->trans("InterventionCard")); + dol_fiche_head($head, 'preview', $langs->trans("InterventionCard")); /* @@ -135,7 +135,7 @@ if ($_GET["id"] > 0) { print '<td><a href="'.DOL_URL_ROOT . '/document.php?modulepart=ficheinter&file='.urlencode($relativepath).'">'.$fichinter->ref.'.pdf</a></td>'; print '<td align="right">'.filesize($file). ' bytes</td>'; - print '<td align="right">'.dolibarr_print_date(filemtime($file),'dayhour').'</td>'; + print '<td align="right">'.dol_print_date(filemtime($file),'dayhour').'</td>'; print '</tr>'; // Si fichier detail PDF existe @@ -144,7 +144,7 @@ if ($_GET["id"] > 0) { print '<td><a href="'.DOL_URL_ROOT . '/document.php?modulepart=ficheinter&file='.urlencode($relativepathdetail).'">'.$fichinter->ref.'-detail.pdf</a></td>'; print '<td align="right">'.filesize($filedetail). ' bytes</td>'; - print '<td align="right">'.dolibarr_print_date(filemtime($filedetail),'dayhour').'</td>'; + print '<td align="right">'.dol_print_date(filemtime($filedetail),'dayhour').'</td>'; print '</tr>'; } print "</table>\n"; @@ -194,13 +194,13 @@ if ($_GET["id"] > 0) { // Date print '<tr><td>'.$langs->trans("Date").'</td>'; - print "<td colspan=\"2\">".dolibarr_print_date($fichinter->date,"daytext")."</td>\n"; + print "<td colspan=\"2\">".dol_print_date($fichinter->date,"daytext")."</td>\n"; print '</tr>'; print '</table>'; } } else { - dolibarr_print_error($db); + dol_print_error($db); } } else { // Intervention non trouv�e diff --git a/htdocs/fichinter/contact.php b/htdocs/fichinter/contact.php index 0974b118e40179d309ce580b87d8cc28725452c0..f147a1fad112d2c23b08951057fdf9fc667870ae 100644 --- a/htdocs/fichinter/contact.php +++ b/htdocs/fichinter/contact.php @@ -91,12 +91,12 @@ if ($_POST["action"] == 'updateligne' && $user->rights->ficheinter->creer) $db->commit(); } else { - dolibarr_print_error($db, "result=$result"); + dol_print_error($db, "result=$result"); $db->rollback(); } } else { - dolibarr_print_error($db); + dol_print_error($db); } } @@ -116,12 +116,12 @@ if ($_GET["action"] == 'swapstatut' && $user->rights->ficheinter->creer) $db->commit(); } else { - dolibarr_print_error($db, "result=$result"); + dol_print_error($db, "result=$result"); $db->rollback(); } } else { - dolibarr_print_error($db); + dol_print_error($db); } } @@ -138,7 +138,7 @@ if ($_GET["action"] == 'deleteline' && $user->rights->ficheinter->creer) exit; } else { - dolibarr_print_error($db); + dol_print_error($db); } } @@ -172,7 +172,7 @@ if ($id > 0) $head = fichinter_prepare_head($fichinter); - dolibarr_fiche_head($head, 'contact', $langs->trans("InterventionCard")); + dol_fiche_head($head, 'contact', $langs->trans("InterventionCard")); /* diff --git a/htdocs/fichinter/document.php b/htdocs/fichinter/document.php index abd8f44c6fb2f6a5a189d16c23726a84ac3cfd2c..61ddac78a593d4c294b144e157516e13e31c3f25 100644 --- a/htdocs/fichinter/document.php +++ b/htdocs/fichinter/document.php @@ -125,7 +125,7 @@ if ($object->id) $head=fichinter_prepare_head($object, $user); - dolibarr_fiche_head($head, 'documents', $langs->trans("InterventionCard")); + dol_fiche_head($head, 'documents', $langs->trans("InterventionCard")); // Construit liste des fichiers diff --git a/htdocs/fichinter/fiche.php b/htdocs/fichinter/fiche.php index 07b0d72f72dc123272c83d10efd49b25777318d8..11ffc58d4486fedea495985848d1663a3044ca90 100644 --- a/htdocs/fichinter/fiche.php +++ b/htdocs/fichinter/fiche.php @@ -185,7 +185,7 @@ if ($_REQUEST['action'] == 'builddoc') // En get ou en post $result=fichinter_create($db, $fichinter, $_REQUEST['model'], $outputlangs); if ($result <= 0) { - dolibarr_print_error($db,$result); + dol_print_error($db,$result); exit; } } @@ -196,7 +196,7 @@ if ($_POST['action'] == 'classin') $fichinter = new Fichinter($db); $fichinter->fetch($_GET['id']); $result=$fichinter->set_project($user, $_POST['projetidp']); - if ($result < 0) dolibarr_print_error($db,$fichinter->error); + if ($result < 0) dol_print_error($db,$fichinter->error); } if ($_REQUEST['action'] == 'confirm_delete' && $_REQUEST['confirm'] == 'yes') @@ -216,7 +216,7 @@ if ($_POST['action'] == 'setdescription') $fichinter = new Fichinter($db); $fichinter->fetch($_GET['id']); $result=$fichinter->set_description($user,$_POST['description']); - if ($result < 0) dolibarr_print_error($db,$fichinter->error); + if ($result < 0) dol_print_error($db,$fichinter->error); } @@ -232,7 +232,7 @@ if ($_POST['action'] == "addligne" && $user->rights->ficheinter->creer) $ret=$fichinter->fetch($_POST['fichinterid']); $desc=$_POST['np_desc']; - $date_intervention = dolibarr_mktime($_POST["dihour"], $_POST["dimin"], 0, $_POST["dimonth"], $_POST["diday"], $_POST["diyear"]); + $date_intervention = dol_mktime($_POST["dihour"], $_POST["dimin"], 0, $_POST["dimonth"], $_POST["diday"], $_POST["diyear"]); $duration = ConvertTime2Seconds($_POST['durationhour'],$_POST['durationmin']); $fichinter->addline( @@ -260,17 +260,17 @@ if ($_POST['action'] == 'updateligne' && $user->rights->ficheinter->creer && $_P $fichinterline = new FichinterLigne($db); if ($fichinterline->fetch($_POST['ligne']) <= 0) { - dolibarr_print_error($db); + dol_print_error($db); exit; } $fichinter = new Fichinter($db); if ($fichinter->fetch($fichinterline->fk_fichinter) <= 0) { - dolibarr_print_error($db); + dol_print_error($db); exit; } $desc=$_POST['desc']; - $date_intervention = dolibarr_mktime($_POST["dihour"], $_POST["dimin"], 0, $_POST["dimonth"], $_POST["diday"], $_POST["diyear"]); + $date_intervention = dol_mktime($_POST["dihour"], $_POST["dimin"], 0, $_POST["dimonth"], $_POST["diday"], $_POST["diyear"]); $duration = ConvertTime2Seconds($_POST['durationhour'],$_POST['durationmin']); $fichinterline->datei=$date_intervention; @@ -296,14 +296,14 @@ if ($_GET['action'] == 'deleteline' && $user->rights->ficheinter->creer && !$con $fichinterline = new FichinterLigne($db); if ($fichinterline->fetch($_GET['ligne']) <= 0) { - dolibarr_print_error($db); + dol_print_error($db); exit; } $result=$fichinterline->delete_line(); $fichinter = new Fichinter($db); if ($fichinter->fetch($fichinterline->fk_fichinter) <= 0) { - dolibarr_print_error($db); + dol_print_error($db); exit; } @@ -326,14 +326,14 @@ if ($_REQUEST['action'] == 'confirm_deleteline' && $_REQUEST['confirm'] == 'yes' $fichinterline = new FichinterLigne($db); if ($fichinterline->fetch($_GET['ligne']) <= 0) { - dolibarr_print_error($db); + dol_print_error($db); exit; } $result=$fichinterline->delete_line(); $fichinter = new Fichinter($db); if ($fichinter->fetch($fichinterline->fk_fichinter) <= 0) { - dolibarr_print_error($db); + dol_print_error($db); exit; } @@ -416,7 +416,7 @@ if ($_GET["action"] == 'create') if (! $conf->global->FICHEINTER_ADDON) { - dolibarr_print_error($db,$langs->trans("Error")." ".$langs->trans("Error_FICHEINTER_ADDON_NotDefined")); + dol_print_error($db,$langs->trans("Error")." ".$langs->trans("Error_FICHEINTER_ADDON_NotDefined")); exit; } @@ -518,7 +518,7 @@ elseif ($_GET["id"] > 0) $result=$fichinter->fetch($_GET["id"]); if (! $result > 0) { - dolibarr_print_error($db); + dol_print_error($db); exit; } $fichinter->fetch_client(); @@ -527,7 +527,7 @@ elseif ($_GET["id"] > 0) $head = fichinter_prepare_head($fichinter); - dolibarr_fiche_head($head, 'card', $langs->trans("InterventionCard")); + dol_fiche_head($head, 'card', $langs->trans("InterventionCard")); // Confirmation de la suppression de la fiche d'intervention if ($_GET['action'] == 'delete') @@ -694,7 +694,7 @@ elseif ($_GET["id"] > 0) print nl2br($objp->description); // Date - print '<td align="center" width="150">'.dolibarr_print_date($objp->date_intervention,'dayhour').'</td>'; + print '<td align="center" width="150">'.dol_print_date($objp->date_intervention,'dayhour').'</td>'; // Duration print '<td align="right" width="150">'.ConvertSecondToTime($objp->duree).'</td>'; @@ -845,7 +845,7 @@ elseif ($_GET["id"] > 0) // Date intervention print '<td align="center" nowrap="nowrap">'; $timearray=dol_getdate(mktime()); - $timewithnohour=dolibarr_mktime(0,0,0,$timearray['mon'],$timearray['mday'],$timearray['year']); + $timewithnohour=dol_mktime(0,0,0,$timearray['mon'],$timearray['mday'],$timearray['year']); $html->select_date($timewithnohour,'di',1,1,0,"addinter"); print '</td>'; @@ -866,7 +866,7 @@ elseif ($_GET["id"] > 0) } else { - dolibarr_print_error($db); + dol_print_error($db); } print '</div>'; diff --git a/htdocs/fichinter/fichinter.class.php b/htdocs/fichinter/fichinter.class.php index 3e0c53460e2d644b052a577b9377c587c523b9ab..5822aaa8f7c9db126cab2ce0a1a0d8d72d050c22 100644 --- a/htdocs/fichinter/fichinter.class.php +++ b/htdocs/fichinter/fichinter.class.php @@ -87,13 +87,13 @@ class Fichinter extends CommonObject */ function create() { - dolibarr_syslog("Fichinter.class::create ref=".$this->ref); + dol_syslog("Fichinter.class::create ref=".$this->ref); if (! is_numeric($this->duree)) { $this->duree = 0; } if ($this->socid <= 0) { $this->error='ErrorBadParameterForFunc'; - dolibarr_syslog("Fichinter::create ".$this->error,LOG_ERR); + dol_syslog("Fichinter::create ".$this->error,LOG_ERR); return -1; } @@ -114,7 +114,7 @@ class Fichinter extends CommonObject $sql.= ")"; $sqlok = 0; - dolibarr_syslog("Fichinter::create sql=".$sql); + dol_syslog("Fichinter::create sql=".$sql); $result=$this->db->query($sql); if ($result) { @@ -125,7 +125,7 @@ class Fichinter extends CommonObject else { $this->error=$this->db->error(); - dolibarr_syslog("Fichinter::create ".$this->error,LOG_ERR); + dol_syslog("Fichinter::create ".$this->error,LOG_ERR); $this->db->rollback(); return -1; } @@ -153,11 +153,11 @@ class Fichinter extends CommonObject $sql .= ", fk_projet = ".$this->projet_id; $sql .= " WHERE rowid = ".$id; - dolibarr_syslog("Fichinter::update sql=".$sql); + dol_syslog("Fichinter::update sql=".$sql); if (! $this->db->query($sql)) { $this->error=$this->db->error(); - dolibarr_syslog("Fichinter::update error ".$this->error,LOG_ERR); + dol_syslog("Fichinter::update error ".$this->error,LOG_ERR); return -1; } @@ -179,7 +179,7 @@ class Fichinter extends CommonObject $sql.= " FROM ".MAIN_DB_PREFIX."fichinter"; $sql.= " WHERE rowid=".$rowid; - dolibarr_syslog("Fichinter::fetch sql=".$sql); + dol_syslog("Fichinter::fetch sql=".$sql); $resql=$this->db->query($sql); if ($resql) { @@ -210,7 +210,7 @@ class Fichinter extends CommonObject else { $this->error=$this->db->error(); - dolibarr_syslog("Fichinter::update error ".$this->error,LOG_ERR); + dol_syslog("Fichinter::update error ".$this->error,LOG_ERR); return -1; } } @@ -231,7 +231,7 @@ class Fichinter extends CommonObject $sql.= " SET fk_statut = 0"; $sql.= " WHERE rowid = ".$this->id; - dolibarr_syslog("Fichinter::setDraft sql=".$sql); + dol_syslog("Fichinter::setDraft sql=".$sql); $resql=$this->db->query($sql); if ($resql) { @@ -242,7 +242,7 @@ class Fichinter extends CommonObject { $this->db->rollback(); $this->error=$this->db->lasterror(); - dolibarr_syslog("Fichinter::setDraft ".$this->error,LOG_ERR); + dol_syslog("Fichinter::setDraft ".$this->error,LOG_ERR); return -1; } } @@ -265,7 +265,7 @@ class Fichinter extends CommonObject $sql.= " SET fk_statut = 1, date_valid=".$this->db->idate(mktime()).", fk_user_valid=".$user->id; $sql.= " WHERE rowid = ".$this->id." AND fk_statut = 0"; - dolibarr_syslog("Fichinter::setValid sql=".$sql); + dol_syslog("Fichinter::setValid sql=".$sql); $resql=$this->db->query($sql); if ($resql) { @@ -285,7 +285,7 @@ class Fichinter extends CommonObject { $this->db->rollback(); $this->error=join(',',$this->errors); - dolibarr_syslog("Fichinter::setValid ".$this->error,LOG_ERR); + dol_syslog("Fichinter::setValid ".$this->error,LOG_ERR); return -1; } } @@ -293,7 +293,7 @@ class Fichinter extends CommonObject { $this->db->rollback(); $this->error=$this->db->lasterror(); - dolibarr_syslog("Fichinter::setValid ".$this->error,LOG_ERR); + dol_syslog("Fichinter::setValid ".$this->error,LOG_ERR); return -1; } } @@ -398,7 +398,7 @@ class Fichinter extends CommonObject } else { - dolibarr_print_error($db,"Fichinter::getNextNumRef ".$obj->error); + dol_print_error($db,"Fichinter::getNextNumRef ".$obj->error); return ""; } } @@ -449,7 +449,7 @@ class Fichinter extends CommonObject } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); } } @@ -465,7 +465,7 @@ class Fichinter extends CommonObject $sql.= ' SET fk_projet = '.($project_id <= 0?'NULL':$project_id); $sql.= ' WHERE rowid = '.$this->id; - dolibarr_syslog("Fichinter::set_project sql=".$sql); + dol_syslog("Fichinter::set_project sql=".$sql); $resql=$this->db->query($sql); if ($resql) { @@ -474,12 +474,12 @@ class Fichinter extends CommonObject else { $this->error=$this->db->error(); - dolibarr_syslog("Fichinter::set_project Error ".$this->error); + dol_syslog("Fichinter::set_project Error ".$this->error); } } else { - dolibarr_syslog("Fichinter::set_project Error Permission refused"); + dol_syslog("Fichinter::set_project Error Permission refused"); } } @@ -494,11 +494,11 @@ class Fichinter extends CommonObject $this->db->begin(); $sql = "DELETE FROM ".MAIN_DB_PREFIX."fichinterdet WHERE fk_fichinter = ".$this->id; - dolibarr_syslog("Fichinter::delete sql=".$sql); + dol_syslog("Fichinter::delete sql=".$sql); if ( $this->db->query($sql) ) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."fichinter WHERE rowid = ".$this->id; - dolibarr_syslog("Fichinter::delete sql=".$sql); + dol_syslog("Fichinter::delete sql=".$sql); if ( $this->db->query($sql) ) { @@ -568,7 +568,7 @@ class Fichinter extends CommonObject else { $this->error=$this->db->error(); - dolibarr_syslog("Fichinter::set_date_delivery Erreur SQL"); + dol_syslog("Fichinter::set_date_delivery Erreur SQL"); return -1; } } @@ -596,7 +596,7 @@ class Fichinter extends CommonObject else { $this->error=$this->db->error(); - dolibarr_syslog("Fichinter::set_description Erreur SQL"); + dol_syslog("Fichinter::set_description Erreur SQL"); return -1; } } @@ -612,7 +612,7 @@ class Fichinter extends CommonObject */ function addline($fichinterid, $desc, $date_intervention, $duration) { - dolibarr_syslog("Fichinter::Addline $fichinterid, $desc, $date_intervention, $duration"); + dol_syslog("Fichinter::Addline $fichinterid, $desc, $date_intervention, $duration"); if ($this->statut == 0) { @@ -635,7 +635,7 @@ class Fichinter extends CommonObject else { $this->error=$this->db->error(); - dolibarr_syslog("Error sql=$sql, error=".$this->error); + dol_syslog("Error sql=$sql, error=".$this->error); $this->db->rollback(); return -1; } @@ -728,7 +728,7 @@ class Fichinter extends CommonObject $sql.= ' FROM '.MAIN_DB_PREFIX.'fichinterdet'; $sql.= ' where fk_fichinter = '.$this->id; - dolibarr_syslog("Fichinter::fetch_lines sql=".$sql); + dol_syslog("Fichinter::fetch_lines sql=".$sql); $resql=$this->db->query($sql); if ($resql) { @@ -795,7 +795,7 @@ class FichinterLigne $sql.= ' FROM '.MAIN_DB_PREFIX.'fichinterdet as ft'; $sql.= ' WHERE ft.rowid = '.$rowid; - dolibarr_syslog("FichinterLigne::fetch sql=".$sql); + dol_syslog("FichinterLigne::fetch sql=".$sql); $result = $this->db->query($sql); if ($result) { @@ -813,7 +813,7 @@ class FichinterLigne else { $this->error=$this->db->error().' sql='.$sql; - dolibarr_print_error($this->db,$this->error); + dol_print_error($this->db,$this->error); return -1; } } @@ -824,7 +824,7 @@ class FichinterLigne */ function insert() { - dolibarr_syslog("FichinterLigne::insert rang=".$this->rang); + dol_syslog("FichinterLigne::insert rang=".$this->rang); $this->db->begin(); $rangToUse=$this->rang; @@ -841,7 +841,7 @@ class FichinterLigne } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); $this->db->rollback(); return -1; } @@ -857,7 +857,7 @@ class FichinterLigne $sql.= ' '.$rangToUse; $sql.= ')'; - dolibarr_syslog("FichinterLigne::insert sql=".$sql); + dol_syslog("FichinterLigne::insert sql=".$sql); $resql=$this->db->query($sql); if ($resql) { @@ -877,7 +877,7 @@ class FichinterLigne else { $this->error=$this->db->error()." sql=".$sql; - dolibarr_syslog("FichinterLigne::insert Error ".$this->error); + dol_syslog("FichinterLigne::insert Error ".$this->error); $this->db->rollback(); return -1; } @@ -900,7 +900,7 @@ class FichinterLigne $sql.= ",rang='".$this->rang."'"; $sql.= " WHERE rowid = ".$this->rowid; - dolibarr_syslog("FichinterLigne::update sql=".$sql); + dol_syslog("FichinterLigne::update sql=".$sql); $resql=$this->db->query($sql); if ($resql) { @@ -913,7 +913,7 @@ class FichinterLigne else { $this->error=$this->db->lasterror(); - dolibarr_syslog("FichinterLigne::update Error ".$this->error); + dol_syslog("FichinterLigne::update Error ".$this->error); $this->db->rollback(); return -1; } @@ -921,7 +921,7 @@ class FichinterLigne else { $this->error=$this->db->lasterror(); - dolibarr_syslog("FichinterLigne::update Error ".$this->error); + dol_syslog("FichinterLigne::update Error ".$this->error); $this->db->rollback(); return -1; } @@ -937,7 +937,7 @@ class FichinterLigne $sql.= " FROM ".MAIN_DB_PREFIX."fichinterdet"; $sql.= " WHERE fk_fichinter=".$this->fk_fichinter; - dolibarr_syslog("FichinterLigne::update_total sql=".$sql); + dol_syslog("FichinterLigne::update_total sql=".$sql); $resql=$this->db->query($sql); if ($resql) { @@ -949,7 +949,7 @@ class FichinterLigne $sql.= " SET duree = ".$total_duration; $sql.= " WHERE rowid = ".$this->fk_fichinter; - dolibarr_syslog("FichinterLigne::update_total sql=".$sql); + dol_syslog("FichinterLigne::update_total sql=".$sql); $resql=$this->db->query($sql); if ($resql) { @@ -959,7 +959,7 @@ class FichinterLigne else { $this->error=$this->db->error(); - dolibarr_syslog("FichinterLigne::update_total Error ".$this->error); + dol_syslog("FichinterLigne::update_total Error ".$this->error); $this->db->rollback(); return -2; } @@ -967,7 +967,7 @@ class FichinterLigne else { $this->error=$this->db->error(); - dolibarr_syslog("FichinterLigne::update Error ".$this->error); + dol_syslog("FichinterLigne::update Error ".$this->error); $this->db->rollback(); return -1; } @@ -981,12 +981,12 @@ class FichinterLigne { if ($this->statut == 0) { - dolibarr_syslog("FichinterLigne::delete_line lineid=".$this->rowid); + dol_syslog("FichinterLigne::delete_line lineid=".$this->rowid); $this->db->begin(); $sql = "DELETE FROM ".MAIN_DB_PREFIX."fichinterdet WHERE rowid = ".$this->rowid; $resql = $this->db->query($sql); - dolibarr_syslog("FichinterLigne::delete_line sql=".$sql); + dol_syslog("FichinterLigne::delete_line sql=".$sql); if ($resql) { @@ -1005,7 +1005,7 @@ class FichinterLigne else { $this->error=$this->db->error()." sql=".$sql; - dolibarr_syslog("FichinterLigne::delete_line Error ".$this->error); + dol_syslog("FichinterLigne::delete_line Error ".$this->error); $this->db->rollback(); return -1; } diff --git a/htdocs/fichinter/index.php b/htdocs/fichinter/index.php index 6ea1b7fd6b6ec84abca516fd506a3bb70022ae12..5c6254ec1c9426b3422d7d7d2c05fa877f8d6ad0 100644 --- a/htdocs/fichinter/index.php +++ b/htdocs/fichinter/index.php @@ -131,10 +131,10 @@ if ($result) $var=!$var; print "<tr $bc[$var]>"; print "<td><a href=\"fiche.php?id=".$objp->fichid."\">".img_object($langs->trans("Show"),"task").' '.$objp->ref."</a></td>\n"; - print '<td><a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$objp->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.dolibarr_trunc($objp->nom,44)."</a></td>\n"; - print '<td>'.dol_htmlentitiesbr(dolibarr_trunc($objp->description,20)).'</td>'; - print '<td>'.dol_htmlentitiesbr(dolibarr_trunc($objp->descriptiondetail,20)).'</td>'; - print '<td align="center">'.dolibarr_print_date($objp->dp,'dayhour')."</td>\n"; + print '<td><a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$objp->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($objp->nom,44)."</a></td>\n"; + print '<td>'.dol_htmlentitiesbr(dol_trunc($objp->description,20)).'</td>'; + print '<td>'.dol_htmlentitiesbr(dol_trunc($objp->descriptiondetail,20)).'</td>'; + print '<td align="center">'.dol_print_date($objp->dp,'dayhour')."</td>\n"; print '<td align="right">'.ConvertSecondToTime($objp->duree).'</td>'; print '<td align="right">'.$fichinter_static->LibStatut($objp->fk_statut,5).'</td>'; @@ -153,7 +153,7 @@ if ($result) } else { - dolibarr_print_error($db); + dol_print_error($db); } $db->close(); diff --git a/htdocs/fichinter/info.php b/htdocs/fichinter/info.php index b454dfab7afad3a4da3e79e74bec3e23dfede2bb..4cf3c6d214eae378b1ba13eefc6ee1c0000d29ad 100644 --- a/htdocs/fichinter/info.php +++ b/htdocs/fichinter/info.php @@ -51,7 +51,7 @@ $societe = new Societe($db); $societe->fetch($fichinter->socid); $head = fichinter_prepare_head($fichinter); -dolibarr_fiche_head($head, 'info', $langs->trans('InterventionCard')); +dol_fiche_head($head, 'info', $langs->trans('InterventionCard')); $fichinter->info($fichinter->id); diff --git a/htdocs/fichinter/note.php b/htdocs/fichinter/note.php index 2e4299a206fbe0bc689f8c32d37900457da6b315..4b43e1a14c8dc63f9b5e80f1dd2b5b20621aa9ea 100644 --- a/htdocs/fichinter/note.php +++ b/htdocs/fichinter/note.php @@ -99,7 +99,7 @@ if ($_GET['id']) if ( $societe->fetch($fichinter->socid) ) { $head = fichinter_prepare_head($fichinter); - dolibarr_fiche_head($head, 'note', $langs->trans('InterventionCard')); + dol_fiche_head($head, 'note', $langs->trans('InterventionCard')); print '<table class="border" width="100%">'; diff --git a/htdocs/fichinter/rapport.php b/htdocs/fichinter/rapport.php index 8fde011fb7caedac4c953c0ce68f603ee19990be..a72c9c187b07f77c459d9127b0afcd12d131484c 100644 --- a/htdocs/fichinter/rapport.php +++ b/htdocs/fichinter/rapport.php @@ -93,7 +93,7 @@ $sql .= " ORDER BY $sortfield $sortorder "; if ( $db->query($sql) ) { $num = $db->num_rows(); - $title = $langs->trans("Report")." ".dolibarr_print_date(strtotime($start),"%B %Y"); + $title = $langs->trans("Report")." ".dol_print_date(strtotime($start),"%B %Y"); print_barre_liste($title, $page, "rapport.php","&socid=$socid",$sortfield,$sortorder,'',$num); $i = 0; @@ -124,7 +124,7 @@ if ( $db->query($sql) ) print "<a href=\"".DOL_URL_ROOT."/comm/fiche.php?socid=".$objp->rowid.$filter."\">".$objp->nom."</a></TD>\n"; } print '<td>'.nl2br($objp->description).'</td>'; - print "<td>".dolibarr_print_date($objp->dp,"%d %B %Y")."</td>\n"; + print "<td>".dol_print_date($objp->dp,"%d %B %Y")."</td>\n"; print '<td align="center">'.sprintf("%.1f",$objp->duree).'</td>'; $DureeTotal += $objp->duree; print "</tr>\n"; @@ -137,7 +137,7 @@ if ( $db->query($sql) ) } else { - dolibarr_print_error($db); + dol_print_error($db); } $db->close(); diff --git a/htdocs/fourn/commande/contact.php b/htdocs/fourn/commande/contact.php index 9c815a96b89175e163745c8af5d169e15472e6aa..e67768acad7bf067b073db5accfc128c80c2cefe 100644 --- a/htdocs/fourn/commande/contact.php +++ b/htdocs/fourn/commande/contact.php @@ -92,12 +92,12 @@ if ($_POST["action"] == 'updateligne' && $user->rights->commande->creer) $db->commit(); } else { - dolibarr_print_error($db, "result=$result"); + dol_print_error($db, "result=$result"); $db->rollback(); } } else { - dolibarr_print_error($db); + dol_print_error($db); } } @@ -117,12 +117,12 @@ if ($_GET["action"] == 'swapstatut' && $user->rights->commande->creer) $db->commit(); } else { - dolibarr_print_error($db, "result=$result"); + dol_print_error($db, "result=$result"); $db->rollback(); } } else { - dolibarr_print_error($db); + dol_print_error($db); } } @@ -139,7 +139,7 @@ if ($_GET["action"] == 'deleteline' && $user->rights->commande->creer) exit; } else { - dolibarr_print_error($db); + dol_print_error($db); } } @@ -176,7 +176,7 @@ if ($id > 0 || ! empty($ref)) $head = ordersupplier_prepare_head($commande); - dolibarr_fiche_head($head, 'contact', $langs->trans("SupplierOrder")); + dol_fiche_head($head, 'contact', $langs->trans("SupplierOrder")); /* diff --git a/htdocs/fourn/commande/dispatch.php b/htdocs/fourn/commande/dispatch.php index b7f4a49599caea57f5772f9192933c1d5338fdfa..495676a8d4d79f828b151808cb8e8e3f8e9735b3 100644 --- a/htdocs/fourn/commande/dispatch.php +++ b/htdocs/fourn/commande/dispatch.php @@ -116,7 +116,7 @@ if ($id > 0 || ! empty($ref)) $head = ordersupplier_prepare_head($commande); $title=$langs->trans("SupplierOrder"); - dolibarr_fiche_head($head, 'dispatch', $title); + dol_fiche_head($head, 'dispatch', $title); /* * Commande @@ -148,7 +148,7 @@ if ($id > 0 || ! empty($ref)) print '<tr><td>'.$langs->trans("Date").'</td><td colspan="2">'; if ($commande->date_commande) { - print dolibarr_print_date($commande->date_commande,"dayhourtext")."\n"; + print dol_print_date($commande->date_commande,"dayhourtext")."\n"; } print "</td></tr>"; @@ -263,7 +263,7 @@ if ($id > 0 || ! empty($ref)) } else { - dolibarr_print_error($db); + dol_print_error($db); } print "</table>\n"; @@ -322,7 +322,7 @@ if ($id > 0 || ! empty($ref)) } else { - dolibarr_print_error($db); + dol_print_error($db); } print "</table>\n"; @@ -384,7 +384,7 @@ if ($id > 0 || ! empty($ref)) else { // Commande non trouv�e - dolibarr_print_error($db); + dol_print_error($db); } } diff --git a/htdocs/fourn/commande/document.php b/htdocs/fourn/commande/document.php index 2ac31a4a1e49aa0affb5c4d4f4c21ad0779ffa39..01a846959a7e0aa63094d1590a7748a411d0a128 100644 --- a/htdocs/fourn/commande/document.php +++ b/htdocs/fourn/commande/document.php @@ -73,7 +73,7 @@ $pagenext = $page + 1; $commande = new CommandeFournisseur($db); if ($commande->fetch($_GET['id'],$_GET['ref']) < 0) { - dolibarr_print_error($db); + dol_print_error($db); exit; } @@ -138,7 +138,7 @@ if ($id > 0 || ! empty($ref)) $head = ordersupplier_prepare_head($commande); - dolibarr_fiche_head($head, 'documents', $langs->trans('SupplierOrder')); + dol_fiche_head($head, 'documents', $langs->trans('SupplierOrder')); // Construit liste des fichiers @@ -177,7 +177,7 @@ if ($id > 0 || ! empty($ref)) print '<tr><td>'.$langs->trans("Date").'</td><td colspan="2">'; if ($commande->date_commande) { - print dolibarr_print_date($commande->date_commande,"dayhourtext")."\n"; + print dol_print_date($commande->date_commande,"dayhourtext")."\n"; } print "</td></tr>"; diff --git a/htdocs/fourn/commande/fiche.php b/htdocs/fourn/commande/fiche.php index 9c510564598c38dad91eef33c3ef5bf8c7a1cf50..07599c9919c9625876abe2db78e57c958fb2987f 100644 --- a/htdocs/fourn/commande/fiche.php +++ b/htdocs/fourn/commande/fiche.php @@ -99,7 +99,7 @@ if ($_POST['action'] == 'addligne' && $user->rights->fournisseur->commande->cree $ret=$commande->fetch($id); if ($ret < 0) { - dolibarr_print_error($db,$commande->error); + dol_print_error($db,$commande->error); exit; } @@ -197,7 +197,7 @@ if ($_POST['action'] == 'addligne' && $user->rights->fournisseur->commande->cree if ($_POST['action'] == 'updateligne' && $user->rights->fournisseur->commande->creer && $_POST['save'] == $langs->trans('Save')) { $commande = new CommandeFournisseur($db,"",$id); - if ($commande->fetch($id) < 0) dolibarr_print_error($db); + if ($commande->fetch($id) < 0) dol_print_error($db); $result = $commande->updateline($_POST['elrowid'], $_POST['eldesc'], @@ -219,7 +219,7 @@ if ($_POST['action'] == 'updateligne' && $user->rights->fournisseur->commande->c } else { - dolibarr_print_error($db,$commande->error); + dol_print_error($db,$commande->error); exit; } } @@ -308,7 +308,7 @@ if ($_POST["action"] == 'livraison' && $user->rights->fournisseur->commande->rec if ($_POST["type"]) { - $date_liv = dolibarr_mktime(0,0,0,$_POST["remonth"],$_POST["reday"],$_POST["reyear"]); + $date_liv = dol_mktime(0,0,0,$_POST["remonth"],$_POST["reday"],$_POST["reyear"]); $result = $commande->Livraison($user, $date_liv, $_POST["type"], $_POST["comment"]); if ($result > 0) @@ -318,7 +318,7 @@ if ($_POST["action"] == 'livraison' && $user->rights->fournisseur->commande->rec } else { - dolibarr_print_error($db,$commande->error); + dol_print_error($db,$commande->error); exit; } } @@ -400,7 +400,7 @@ if ($_REQUEST['action'] == 'builddoc') // En get ou en post $result=supplier_order_pdf_create($db, $commande->id,$commande->modelpdf,$outputlangs); if ($result <= 0) { - dolibarr_print_error($db,$result); + dol_print_error($db,$result); exit; } else @@ -500,7 +500,7 @@ if ($id > 0 || ! empty($ref)) $head = ordersupplier_prepare_head($commande); $title=$langs->trans("SupplierOrder"); - dolibarr_fiche_head($head, 'card', $title); + dol_fiche_head($head, 'card', $title); /* * Confirmation de la suppression de la commande @@ -566,9 +566,9 @@ if ($id > 0 || ! empty($ref)) */ if ($_GET["action"] == 'commande') { - $date_com = dolibarr_mktime(0,0,0,$_POST["remonth"],$_POST["reday"],$_POST["reyear"]); + $date_com = dol_mktime(0,0,0,$_POST["remonth"],$_POST["reday"],$_POST["reyear"]); $html->form_confirm("fiche.php?id=".$commande->id."&datecommande=".$date_com."&methode=".$_POST["methodecommande"]."&comment=".urlencode($_POST["comment"]), - $langs->trans("MakeOrder"),$langs->trans("ConfirmMakeOrder",dolibarr_print_date($date_com,'day')),"confirm_commande"); + $langs->trans("MakeOrder"),$langs->trans("ConfirmMakeOrder",dol_print_date($date_com,'day')),"confirm_commande"); print '<br />'; } @@ -613,7 +613,7 @@ if ($id > 0 || ! empty($ref)) print '<tr><td>'.$langs->trans("Date").'</td><td colspan="2">'; if ($commande->date_commande) { - print dolibarr_print_date($commande->date_commande,"dayhourtext")."\n"; + print dol_print_date($commande->date_commande,"dayhourtext")."\n"; } print "</td></tr>"; @@ -998,7 +998,7 @@ if ($id > 0 || ! empty($ref)) print '<table class="border" width="100%">'; print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("ToOrder").'</td></tr>'; print '<tr><td>'.$langs->trans("OrderDate").'</td><td>'; - $date_com = dolibarr_mktime(0,0,0,$_POST["remonth"],$_POST["reday"],$_POST["reyear"]); + $date_com = dol_mktime(0,0,0,$_POST["remonth"],$_POST["reday"],$_POST["reyear"]); print $html->select_date($date_com,'','','','',"commande"); print '</td></tr>'; @@ -1047,7 +1047,7 @@ if ($id > 0 || ! empty($ref)) else { // Commande non trouvee - dolibarr_print_error($db); + dol_print_error($db); } } diff --git a/htdocs/fourn/commande/history.php b/htdocs/fourn/commande/history.php index ef5a2ec5290470687b71895b1eba4474ded9dd06..50ee9c442a6bae4909b61c48cfc10507444533af 100644 --- a/htdocs/fourn/commande/history.php +++ b/htdocs/fourn/commande/history.php @@ -65,7 +65,7 @@ if ($id > 0 || ! empty($ref)) $head = ordersupplier_prepare_head($commande); $title=$langs->trans("SupplierOrder"); - dolibarr_fiche_head($head, 'info', $title); + dol_fiche_head($head, 'info', $title); /* @@ -99,7 +99,7 @@ if ($id > 0 || ! empty($ref)) print '<tr><td>'.$langs->trans("Date").'</td><td colspan="2">'; if ($commande->date_commande) { - print dolibarr_print_date($commande->date_commande,"dayhourtext")."\n"; + print dol_print_date($commande->date_commande,"dayhourtext")."\n"; } print "</td></tr>"; @@ -149,7 +149,7 @@ if ($id > 0 || ! empty($ref)) $obj = $db->fetch_object($resql); print "<tr $bc[$var]>"; - print '<td width="20%">'.dolibarr_print_date($db->jdate($obj->dl),"dayhour")."</td>\n"; + print '<td width="20%">'.dol_print_date($db->jdate($obj->dl),"dayhour")."</td>\n"; // Statut print '<td width="100px" nowrap="1">'.$commande->LibStatut($obj->fk_statut,4)."</td>\n"; @@ -159,7 +159,7 @@ if ($id > 0 || ! empty($ref)) print img_object($langs->trans("ShowUser"),'user').' '.$obj->login.'</a></td>'; // Comment - print '<td width="100px" nowrap="1" title="'.dol_escape_htmltag($obj->comment).'">'.dolibarr_trunc($obj->comment,48)."</td>\n"; + print '<td width="100px" nowrap="1" title="'.dol_escape_htmltag($obj->comment).'">'.dol_trunc($obj->comment,48)."</td>\n"; print '</tr>'; @@ -169,7 +169,7 @@ if ($id > 0 || ! empty($ref)) } else { - dolibarr_print_error($db); + dol_print_error($db); } print "</table>"; diff --git a/htdocs/fourn/commande/index.php b/htdocs/fourn/commande/index.php index 7512f10055058bbad8afe05370f5a6692b0c600b..1fbd934d8b3435cac8282fc57f942bb28c420a3f 100644 --- a/htdocs/fourn/commande/index.php +++ b/htdocs/fourn/commande/index.php @@ -88,7 +88,7 @@ if ($resql) } else { - dolibarr_print_error($db); + dol_print_error($db); } @@ -132,7 +132,7 @@ if ($resql) } else { - dolibarr_print_error($db); + dol_print_error($db); } print '</td></tr></table>'; diff --git a/htdocs/fourn/commande/liste.php b/htdocs/fourn/commande/liste.php index 5a8069f07fdece9a288de11a5c915180263e377b..dc5e0739fd50960043019f3d74e9d42f60812967 100644 --- a/htdocs/fourn/commande/liste.php +++ b/htdocs/fourn/commande/liste.php @@ -144,7 +144,7 @@ if ($resql) print "<td align=\"center\" width=\"100\">"; if ($obj->dc) { - print dolibarr_print_date($obj->dc,"day"); + print dol_print_date($obj->dc,"day"); } else { @@ -165,7 +165,7 @@ if ($resql) } else { - dolibarr_print_error($db); + dol_print_error($db); } $db->close(); diff --git a/htdocs/fourn/commande/note.php b/htdocs/fourn/commande/note.php index 809e5e230309f6618ec3a5c94f1317d0eb183178..ef1aceca63b6ef3fa7713769025e54d2e88c2650 100644 --- a/htdocs/fourn/commande/note.php +++ b/htdocs/fourn/commande/note.php @@ -87,7 +87,7 @@ if ($id > 0 || ! empty($ref)) $head = ordersupplier_prepare_head($commande); $title=$langs->trans("SupplierOrder"); - dolibarr_fiche_head($head, 'note', $title); + dol_fiche_head($head, 'note', $title); /* @@ -123,7 +123,7 @@ if ($id > 0 || ! empty($ref)) print '<tr><td>'.$langs->trans("Date").'</td><td colspan="2">'; if ($commande->date_commande) { - print dolibarr_print_date($commande->date_commande,"dayhourtext")."\n"; + print dol_print_date($commande->date_commande,"dayhourtext")."\n"; } print "</td></tr>"; diff --git a/htdocs/fourn/contact.php b/htdocs/fourn/contact.php index 91ffa252143ef3355bdb427ee8ee59d2e983aa69..7a592d8661d5b07305e7710766a3e9c8eb8e6b51 100644 --- a/htdocs/fourn/contact.php +++ b/htdocs/fourn/contact.php @@ -122,7 +122,7 @@ if ($result) { } else { - dolibarr_print_error($db); + dol_print_error($db); } $db->close(); diff --git a/htdocs/fourn/facture/contact.php b/htdocs/fourn/facture/contact.php index 8defab0ad4d7bbb3fcb518fc607c2cb53733bb07..9ca5d05c2f401be813fbfe0958e7b14af1a4ed41 100644 --- a/htdocs/fourn/facture/contact.php +++ b/htdocs/fourn/facture/contact.php @@ -90,12 +90,12 @@ if ($_POST["action"] == 'updateligne' && $user->rights->fournisseur->facture->cr $db->commit(); } else { - dolibarr_print_error($db, "result=$result"); + dol_print_error($db, "result=$result"); $db->rollback(); } } else { - dolibarr_print_error($db); + dol_print_error($db); } } @@ -115,12 +115,12 @@ if ($_GET["action"] == 'swapstatut' && $user->rights->fournisseur->facture->cree $db->commit(); } else { - dolibarr_print_error($db, "result=$result"); + dol_print_error($db, "result=$result"); $db->rollback(); } } else { - dolibarr_print_error($db); + dol_print_error($db); } } @@ -137,7 +137,7 @@ if ($_GET["action"] == 'deleteline' && $user->rights->fournisseur->facture->cree exit; } else { - dolibarr_print_error($db); + dol_print_error($db); } } @@ -169,7 +169,7 @@ if ($id > 0) $head = facturefourn_prepare_head($facture); - dolibarr_fiche_head($head, 'contact', $langs->trans('SupplierInvoice')); + dol_fiche_head($head, 'contact', $langs->trans('SupplierInvoice')); /* * Facture synthese pour rappel diff --git a/htdocs/fourn/facture/document.php b/htdocs/fourn/facture/document.php index 1cbae9a3277e32489928002344ad0b2221593e80..ed73039d757f6d892e56a4f1e17b9eba1d5fc171 100644 --- a/htdocs/fourn/facture/document.php +++ b/htdocs/fourn/facture/document.php @@ -129,7 +129,7 @@ if ($facid > 0) $upload_dir = $conf->fournisseur->facture->dir_output.'/'.get_exdir($facture->id,2).$facture->id; $head = facturefourn_prepare_head($facture); - dolibarr_fiche_head($head, 'documents', $langs->trans('SupplierInvoice')); + dol_fiche_head($head, 'documents', $langs->trans('SupplierInvoice')); // Construit liste des fichiers @@ -177,7 +177,7 @@ if ($facid > 0) else { print 'facid='.$facid.'<br>'; - dolibarr_print_error($db); + dol_print_error($db); } } else diff --git a/htdocs/fourn/facture/fiche.php b/htdocs/fourn/facture/fiche.php index 86f9cfb8820faad391172055b3c7fac2d035a31f..245f4b373f5303ae332b8409693b4e9bbb818deb 100644 --- a/htdocs/fourn/facture/fiche.php +++ b/htdocs/fourn/facture/fiche.php @@ -158,8 +158,8 @@ if ($_POST['action'] == 'update' && ! $_POST['cancel']) */ if ($_POST['action'] == 'add' && $user->rights->fournisseur->facture->creer) { - $datefacture=dolibarr_mktime(12,0,0,$_POST['remonth'],$_POST['reday'],$_POST['reyear']); - $datedue=dolibarr_mktime(12,0,0,$_POST['echmonth'],$_POST['echday'],$_POST['echyear']); + $datefacture=dol_mktime(12,0,0,$_POST['remonth'],$_POST['reday'],$_POST['reyear']); + $datedue=dol_mktime(12,0,0,$_POST['echmonth'],$_POST['echday'],$_POST['echyear']); if ($datefacture == '') { @@ -289,7 +289,7 @@ if ($_GET['action'] == 'add_ligne') $ret=$facfou->fetch($_GET['facid']); if ($ret < 0) { - dolibarr_print_error($db,$facfou->error); + dol_print_error($db,$facfou->error); exit; } @@ -376,8 +376,8 @@ if ($_GET['action'] == 'create') $societe->fetch($_GET['socid']); } - $datefacture=dolibarr_mktime(12,0,0,$_POST['remonth'],$_POST['reday'],$_POST['reyear']); - $datedue=dolibarr_mktime(12,0,0,$_POST['echmonth'],$_POST['echday'],$_POST['echyear']); + $datefacture=dol_mktime(12,0,0,$_POST['remonth'],$_POST['reday'],$_POST['reyear']); + $datedue=dol_mktime(12,0,0,$_POST['echmonth'],$_POST['echday'],$_POST['echyear']); $dateinvoice=($datefacture==''?(empty($conf->global->MAIN_AUTOFILL_DATE)?-1:0):$datefacture); @@ -566,7 +566,7 @@ else */ $head = facturefourn_prepare_head($fac); $titre=$langs->trans('SupplierInvoice'); - dolibarr_fiche_head($head, 'card', $titre); + dol_fiche_head($head, 'card', $titre); if ($mesg) { print $mesg.'<br>'; } @@ -642,11 +642,11 @@ else print '</tr>'; print '<tr><td>'.$langs->trans('Date').'</td><td colspan="3" nowrap="nowrap">'; - print dolibarr_print_date($fac->datep,'daytext').'</td></tr>'; + print dol_print_date($fac->datep,'daytext').'</td></tr>'; print '<tr>'; print '<td>'.$langs->trans('DateEcheance').'</td><td colspan="3">'; - print dolibarr_print_date($fac->date_echeance,'daytext'); + print dol_print_date($fac->date_echeance,'daytext'); if (($fac->paye == 0) && ($fac->statut > 0) && $fac->date_echeance < ($now - $conf->facture->fournisseur->warning_delay)) print img_picto($langs->trans("Late"),"warning"); print '</td></tr>'; @@ -730,7 +730,7 @@ else $objp = $db->fetch_object($result); $var=!$var; print '<tr '.$bc[$var].'>'; - print '<td nowrap><a href="'.DOL_URL_ROOT.'/fourn/paiement/fiche.php?id='.$objp->rowid.'">'.img_object($langs->trans('Payment'),'payment').'</a> '.dolibarr_print_date($objp->dp,'day')."</td>\n"; + print '<td nowrap><a href="'.DOL_URL_ROOT.'/fourn/paiement/fiche.php?id='.$objp->rowid.'">'.img_object($langs->trans('Payment'),'payment').'</a> '.dol_print_date($objp->dp,'day')."</td>\n"; print '<td>'.$objp->paiement_type.' '.$objp->num_paiement.'</td>'; print '<td align="right">'.price($objp->amount).'</td><td>'.$langs->trans('Currency'.$conf->monnaie).'</td>'; @@ -762,7 +762,7 @@ else } else { - dolibarr_print_error($db); + dol_print_error($db); } print '</td></tr>'; print '</table>'; diff --git a/htdocs/fourn/facture/impayees.php b/htdocs/fourn/facture/impayees.php index 346124791bd0b9eef551c31c1c4768fae48345ee..3cfa2b8c3807e952a6cb1aad72d6a649e498d775 100644 --- a/htdocs/fourn/facture/impayees.php +++ b/htdocs/fourn/facture/impayees.php @@ -209,12 +209,12 @@ if ($user->rights->fournisseur->facture->lire) if ($objp->datelimite < ($now - $conf->facture->fournisseur->warning_delay) && ! $objp->paye && $objp->fk_statut == 1) print img_warning($langs->trans("Late")); print "</td>\n"; - print "<td nowrap>".dolibarr_trunc($objp->facnumber,12)."</td>\n"; + print "<td nowrap>".dol_trunc($objp->facnumber,12)."</td>\n"; - print "<td nowrap align=\"center\">".dolibarr_print_date($objp->df)."</td>\n"; - print "<td nowrap align=\"center\">".dolibarr_print_date($objp->datelimite)."</td>\n"; + print "<td nowrap align=\"center\">".dol_print_date($objp->df)."</td>\n"; + print "<td nowrap align=\"center\">".dol_print_date($objp->datelimite)."</td>\n"; - print '<td><a href="'.DOL_URL_ROOT.'/fourn/facture/fiche.php?socid='.$objp->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.dolibarr_trunc($objp->nom,32).'</a></td>'; + print '<td><a href="'.DOL_URL_ROOT.'/fourn/facture/fiche.php?socid='.$objp->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($objp->nom,32).'</a></td>'; print "<td align=\"right\">".price($objp->total_ht)."</td>"; print "<td align=\"right\">".price($objp->total_ttc)."</td>"; @@ -247,7 +247,7 @@ if ($user->rights->fournisseur->facture->lire) } else { - dolibarr_print_error($db); + dol_print_error($db); } } diff --git a/htdocs/fourn/facture/index.php b/htdocs/fourn/facture/index.php index 86bbfceb3860b8448ca2c501b6bf021a6f5c7e03..af950ae2f5aa08ddb9c3aff343343cd710ce6a38 100644 --- a/htdocs/fourn/facture/index.php +++ b/htdocs/fourn/facture/index.php @@ -210,10 +210,10 @@ if ($resql) print $facturestatic->getNomUrl(1); if (($obj->paye == 0) && ($obj->fk_statut > 0) && $obj->date_echeance < ($now - $conf->facture->fournisseur->warning_delay)) print img_picto($langs->trans("Late"),"warning"); print "</td>\n"; - print '<td nowrap>'.dolibarr_trunc($obj->facnumber,10)."</td>"; - print '<td align="center" nowrap="1">'.dolibarr_print_date($obj->datef,'day').'</td>'; - print '<td align="center" nowrap="1">'.dolibarr_print_date($obj->date_echeance,'day').'</td>'; - print '<td>'.dolibarr_trunc($obj->libelle,36).'</td>'; + print '<td nowrap>'.dol_trunc($obj->facnumber,10)."</td>"; + print '<td align="center" nowrap="1">'.dol_print_date($obj->datef,'day').'</td>'; + print '<td align="center" nowrap="1">'.dol_print_date($obj->date_echeance,'day').'</td>'; + print '<td>'.dol_trunc($obj->libelle,36).'</td>'; print '<td>'; $supplierstatic->id=$obj->socid; $supplierstatic->nom=$obj->nom; @@ -251,7 +251,7 @@ if ($resql) } else { - dolibarr_print_error($db); + dol_print_error($db); } $db->close(); diff --git a/htdocs/fourn/facture/info.php b/htdocs/fourn/facture/info.php index 56e6da4bfd0084854ca12f6f32401a00fd1579cf..1c696e80c37c16f063c97213500aa52272b3abda 100644 --- a/htdocs/fourn/facture/info.php +++ b/htdocs/fourn/facture/info.php @@ -46,7 +46,7 @@ $soc->fetch($fac->socid); $head = facturefourn_prepare_head($fac); $titre=$langs->trans('SupplierInvoice'); -dolibarr_fiche_head($head, 'info', $langs->trans('SupplierInvoice')); +dol_fiche_head($head, 'info', $langs->trans('SupplierInvoice')); print '<table width="100%"><tr><td>'; dol_print_object_info($fac); diff --git a/htdocs/fourn/facture/note.php b/htdocs/fourn/facture/note.php index fc1e19bf7f4cae28c4ab695fd3b52ba7299bbc0a..fe968d1e22e71216a2308b4bbb472d274dd2c1d5 100644 --- a/htdocs/fourn/facture/note.php +++ b/htdocs/fourn/facture/note.php @@ -99,7 +99,7 @@ if ($_GET["facid"]) $head = facturefourn_prepare_head($fac); $titre=$langs->trans('SupplierInvoice'); - dolibarr_fiche_head($head, 'note', $titre); + dol_fiche_head($head, 'note', $titre); print '<table class="border" width="100%">'; diff --git a/htdocs/fourn/facture/paiement.php b/htdocs/fourn/facture/paiement.php index 7afb3f9c3d709a13f5b0f9ae3b6fec95f14f3adc..0d9759ad7e3f3dcc673c993e1ceb20a41339dbae 100644 --- a/htdocs/fourn/facture/paiement.php +++ b/htdocs/fourn/facture/paiement.php @@ -57,7 +57,7 @@ if ($action == 'add_paiement') { $error = 0; - $datepaye = dolibarr_mktime(12, 0 , 0, + $datepaye = dol_mktime(12, 0 , 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); @@ -199,7 +199,7 @@ if ($action == 'create' || $action == 'add_paiement') $facture = new FactureFournisseur($db); $facture->fetch($facid); - $datefacture=dolibarr_mktime(12, 0 , 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); + $datefacture=dol_mktime(12, 0 , 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); $dateinvoice=($datefacture==''?(empty($conf->global->MAIN_AUTOFILL_DATE)?-1:0):$datefacture); $sql = 'SELECT s.nom, s.rowid as socid,'; @@ -296,7 +296,7 @@ if ($action == 'create' || $action == 'add_paiement') if ($objp->df > 0 ) { print '<td align="center">'; - print dolibarr_print_date($objp->df).'</td>'; + print dol_print_date($objp->df).'</td>'; } else { @@ -331,7 +331,7 @@ if ($action == 'create' || $action == 'add_paiement') } else { - dolibarr_print_error($db); + dol_print_error($db); } /* @@ -408,18 +408,18 @@ if (! $_GET['action'] && ! $_POST['action']) print '<td nowrap="nowrap"><a href="'.DOL_URL_ROOT.'/fourn/paiement/fiche.php?id='.$objp->pid.'">'.img_object($langs->trans('ShowPayment'),'payment').' '.$objp->pid.'</a></td>'; // Ref invoice - print '<td nowrap="nowrap">'.dolibarr_trunc($objp->facnumber,12).'</td>'; + print '<td nowrap="nowrap">'.dol_trunc($objp->facnumber,12).'</td>'; // Date - print '<td nowrap="nowrap" align="center">'.dolibarr_print_date($objp->dp,'day')."</td>\n"; + print '<td nowrap="nowrap" align="center">'.dol_print_date($objp->dp,'day')."</td>\n"; print '<td>'; - if ($objp->socid) print '<a href="'.DOL_URL_ROOT.'/soc.php?socid='.$objp->socid.'">'.img_object($langs->trans('ShowCompany'),'company').' '.dolibarr_trunc($objp->nom,32).'</a>'; + if ($objp->socid) print '<a href="'.DOL_URL_ROOT.'/soc.php?socid='.$objp->socid.'">'.img_object($langs->trans('ShowCompany'),'company').' '.dol_trunc($objp->nom,32).'</a>'; else print ' '; print '</td>'; - print '<td>'.dolibarr_trunc($objp->paiement_type.' '.$objp->num_paiement,32)."</td>\n"; + print '<td>'.dol_trunc($objp->paiement_type.' '.$objp->num_paiement,32)."</td>\n"; print '<td>'; - if ($objp->bid) print '<a href="'.DOL_URL_ROOT.'/compta/bank/account.php?account='.$objp->bid.'">'.img_object($langs->trans("ShowAccount"),'account').' '.dolibarr_trunc($objp->label,24).'</a>'; + if ($objp->bid) print '<a href="'.DOL_URL_ROOT.'/compta/bank/account.php?account='.$objp->bid.'">'.img_object($langs->trans("ShowAccount"),'account').' '.dol_trunc($objp->label,24).'</a>'; else print ' '; print '</td>'; print '<td align="right">'.price($objp->pamount).'</td><td> </td>'; @@ -430,7 +430,7 @@ if (! $_GET['action'] && ! $_POST['action']) } else { - dolibarr_print_error($db); + dol_print_error($db); } } diff --git a/htdocs/fourn/facture/paiementfourn.class.php b/htdocs/fourn/facture/paiementfourn.class.php index d88e87ca0f0fee072e1e223760167b6c1ba425e1..95b48d9bc1d8a06ffb26ae0ddbc83abc6d77689b 100644 --- a/htdocs/fourn/facture/paiementfourn.class.php +++ b/htdocs/fourn/facture/paiementfourn.class.php @@ -106,7 +106,7 @@ class PaiementFourn } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); $error = -1; } return $error; @@ -144,7 +144,7 @@ class PaiementFourn $sql.= ' VALUES ('.$this->db->idate(mktime()).','; $sql.= " ".$this->db->idate($this->datepaye).", '".$this->total."', ".$this->paiementid.", '".$this->num_paiement."', '".addslashes($this->note)."', ".$user->id.", 0)"; - dolibarr_syslog("PaiementFourn::create sql=".$sql); + dol_syslog("PaiementFourn::create sql=".$sql); $resql = $this->db->query($sql); if ($resql) { @@ -161,13 +161,13 @@ class PaiementFourn $sql .= ' VALUES ('.$facid.','. $this->id.',\''.$amount.'\')'; if (! $this->db->query($sql) ) { - dolibarr_syslog('Paiement::Create Erreur INSERT dans paiement_facture '.$facid); + dol_syslog('Paiement::Create Erreur INSERT dans paiement_facture '.$facid); $error++; } } else { - dolibarr_syslog('PaiementFourn::Create Montant non numerique',LOG_ERR); + dol_syslog('PaiementFourn::Create Montant non numerique',LOG_ERR); } } @@ -184,21 +184,21 @@ class PaiementFourn else { $this->error=$this->db->lasterror(); - dolibarr_syslog('PaiementFourn::Create Error '.$this->error, LOG_ERR); + dol_syslog('PaiementFourn::Create Error '.$this->error, LOG_ERR); $error++; } } else { $this->error="ErrorTotalIsNull"; - dolibarr_syslog('PaiementFourn::Create Error '.$this->error, LOG_ERR); + dol_syslog('PaiementFourn::Create Error '.$this->error, LOG_ERR); $error++; } if ($this->total <> 0 && $error == 0) // On accepte les montants negatifs { $this->db->commit(); - dolibarr_syslog('PaiementFourn::Create Ok Total = '.$this->total); + dol_syslog('PaiementFourn::Create Ok Total = '.$this->total); return $this->id; } else @@ -308,7 +308,7 @@ class PaiementFourn } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); return 0; } } @@ -321,7 +321,7 @@ class PaiementFourn { $sql = 'UPDATE '.MAIN_DB_PREFIX.'paiementfourn SET statut = 1 WHERE rowid = '.$this->id; - dolibarr_syslog("PaiementFourn::valide sql=".$sql); + dol_syslog("PaiementFourn::valide sql=".$sql); $result = $this->db->query($sql); if ($result) { @@ -330,7 +330,7 @@ class PaiementFourn else { $this->error='Paiement::Valide Error -1 '.$this->db->error(); - dolibarr_syslog('PaiementFourn::valide error '.$this->error); + dol_syslog('PaiementFourn::valide error '.$this->error); return -1; } } @@ -373,7 +373,7 @@ class PaiementFourn } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); } } @@ -407,7 +407,7 @@ class PaiementFourn else { $this->error=$this->db->error(); - dolibarr_syslog('PaiementFourn::getBillsArray Error '.$this->error.' - sql='.$sql); + dol_syslog('PaiementFourn::getBillsArray Error '.$this->error.' - sql='.$sql); return -1; } } @@ -498,7 +498,7 @@ class PaiementFourn { $sql = 'UPDATE '.MAIN_DB_PREFIX.'paiementfourn SET num_paiement = \''.$this->db->escape($num).'\' WHERE rowid = '.$this->id; - dolibarr_syslog("PaiementFourn::update_num sql=".$sql); + dol_syslog("PaiementFourn::update_num sql=".$sql); $result = $this->db->query($sql); if ($result) { @@ -508,7 +508,7 @@ class PaiementFourn else { $this->error='PaiementFourn::update_num Error -1 '.$this->db->error(); - dolibarr_syslog('PaiementFourn::update_num error '.$this->error); + dol_syslog('PaiementFourn::update_num error '.$this->error); return -1; } } @@ -524,7 +524,7 @@ class PaiementFourn if(!empty($date) && $this->statut!=1) { $sql = 'UPDATE '.MAIN_DB_PREFIX.'paiementfourn SET datep = '.$this->db->idate($date).' WHERE rowid = '.$this->id; - dolibarr_syslog("PaiementFourn::update_date sql=".$sql); + dol_syslog("PaiementFourn::update_date sql=".$sql); $result = $this->db->query($sql); if ($result) { @@ -535,7 +535,7 @@ class PaiementFourn else { $this->error='PaiementFourn::update_date Error -1 '.$this->db->error(); - dolibarr_syslog('PaiementFourn::update_date error '.$this->error); + dol_syslog('PaiementFourn::update_date error '.$this->error); return -1; } } diff --git a/htdocs/fourn/fiche-stats.php b/htdocs/fourn/fiche-stats.php index 13dc72b34e4436b4e2fff98738405441daf829dc..ed84b85a2da0bce0cbf79c5ca71f3f7b5b183788 100644 --- a/htdocs/fourn/fiche-stats.php +++ b/htdocs/fourn/fiche-stats.php @@ -65,7 +65,7 @@ if ( $societe->fetch($socid) ) */ $head = societe_prepare_head($societe); - dolibarr_fiche_head($head, 'supplierstat', $langs->trans("ThirdParty")); + dol_fiche_head($head, 'supplierstat', $langs->trans("ThirdParty")); print '<table class="border" width="100%">'; @@ -102,7 +102,7 @@ if ( $societe->fetch($socid) ) } else { - dolibarr_print_error($db); + dol_print_error($db); } $db->close(); diff --git a/htdocs/fourn/fiche.php b/htdocs/fourn/fiche.php index 8986b8ce8b230f40ba88df1cdc2012001a790296..97710d79c5e192244b62cd7c5199414cac77fac6 100644 --- a/htdocs/fourn/fiche.php +++ b/htdocs/fourn/fiche.php @@ -64,7 +64,7 @@ if ( $societe->fetch($socid) ) */ $head = societe_prepare_head($societe); - dolibarr_fiche_head($head, 'supplier', $langs->trans("ThirdParty")); + dol_fiche_head($head, 'supplier', $langs->trans("ThirdParty")); print '<table width="100%" class="notopnoleftnoright">'; @@ -165,7 +165,7 @@ if ( $societe->fetch($socid) ) print '<td align="center" width="80">'; if ($obj->dc) { - print dolibarr_print_date($obj->dc,'day'); + print dol_print_date($obj->dc,'day'); } else { @@ -184,7 +184,7 @@ if ( $societe->fetch($socid) ) } else { - dolibarr_print_error($db); + dol_print_error($db); } @@ -220,8 +220,8 @@ if ( $societe->fetch($socid) ) print '<tr '.$bc[$var].'>'; print '<td>'; print '<a href="facture/fiche.php?facid='.$obj->rowid.'">'; - print img_object($langs->trans('ShowBill'),'bill').' '.$obj->facnumber.'</a> '.dolibarr_trunc($obj->libelle,14).'</td>'; - print '<td align="center" nowrap="nowrap">'.dolibarr_print_date($obj->df,'day').'</td>'; + print img_object($langs->trans('ShowBill'),'bill').' '.$obj->facnumber.'</a> '.dol_trunc($obj->libelle,14).'</td>'; + print '<td align="center" nowrap="nowrap">'.dol_print_date($obj->df,'day').'</td>'; print '<td align="right" nowrap="nowrap">'.price($obj->amount).'</td>'; print '<td align="right" nowrap="nowrap">'.$facturestatic->LibStatut($obj->paye,$obj->fk_statut,5).'</td>'; print '</tr>'; @@ -235,7 +235,7 @@ if ( $societe->fetch($socid) ) } else { - dolibarr_print_error($db); + dol_print_error($db); } /* @@ -306,7 +306,7 @@ if ( $societe->fetch($socid) ) } else { - dolibarr_print_error($db); + dol_print_error($db); } $db->close(); diff --git a/htdocs/fourn/fournisseur.class.php b/htdocs/fourn/fournisseur.class.php index ce3e30f63dce9d3bb3607248d4566207869bda3f..06d541d335e86569ea76f9baf854dced17e20ab0 100644 --- a/htdocs/fourn/fournisseur.class.php +++ b/htdocs/fourn/fournisseur.class.php @@ -121,20 +121,20 @@ class Fournisseur extends Societe */ function create_commande($user) { - dolibarr_syslog("Fournisseur::Create_Commande"); + dol_syslog("Fournisseur::Create_Commande"); $comm = new CommandeFournisseur($this->db); $comm->socid = $this->id; if ($comm->create($user) > 0) { - dolibarr_syslog("Fournisseur::Create_Commande : Success"); + dol_syslog("Fournisseur::Create_Commande : Success"); $this->single_open_commande = $comm->id; return $comm->id; } else { - dolibarr_syslog("Fournisseur::Create_Commande : Failed"); + dol_syslog("Fournisseur::Create_Commande : Failed"); return -1; } } @@ -149,7 +149,7 @@ class Fournisseur extends Societe $nbc = $this->nb_open_commande(); - dolibarr_syslog("Fournisseur::ProductCommande : nbc = ".$nbc); + dol_syslog("Fournisseur::ProductCommande : nbc = ".$nbc); if ($nbc == 0) { @@ -206,7 +206,7 @@ class Fournisseur extends Societe } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); $this->error=$this->db->error(); return -1; } @@ -221,7 +221,7 @@ class Fournisseur extends Societe */ function CreateCategory($user, $name) { - dolibarr_syslog("Fournisseur::CreateCategory"); + dol_syslog("Fournisseur::CreateCategory"); $sql = "INSERT INTO ".MAIN_DB_PREFIX."categorie (label,visible,type)"; $sql.= " VALUES "; @@ -231,12 +231,12 @@ class Fournisseur extends Societe if ($result == 1) { - dolibarr_syslog("Fournisseur::CreateCategory : Success"); + dol_syslog("Fournisseur::CreateCategory : Success"); return 0; } else { - dolibarr_syslog("Fournisseur::CreateCategory : Failed (".$this->db->error().")"); + dol_syslog("Fournisseur::CreateCategory : Failed (".$this->db->error().")"); return -1; } } @@ -269,7 +269,7 @@ class Fournisseur extends Societe } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); $this->error=$this->db->error(); } diff --git a/htdocs/fourn/fournisseur.commande.class.php b/htdocs/fourn/fournisseur.commande.class.php index 6ffd04dbb9924a4e6f06db3eb8dd0167e8a885bb..c8114479b1f198b76fead82084e4b6ac7d592429 100644 --- a/htdocs/fourn/fournisseur.commande.class.php +++ b/htdocs/fourn/fournisseur.commande.class.php @@ -87,7 +87,7 @@ class CommandeFournisseur extends Commande if ($ref) $sql.= " WHERE c.ref='".$ref."'"; else $sql.= " WHERE c.rowid=".$id; - dolibarr_syslog("CommandeFournisseur::fetch sql=".$sql,LOG_DEBUG); + dol_syslog("CommandeFournisseur::fetch sql=".$sql,LOG_DEBUG); $resql = $this->db->query($sql) ; if ($resql) { @@ -133,7 +133,7 @@ class CommandeFournisseur extends Commande $sql.= " ORDER BY l.rowid"; //print $sql; - dolibarr_syslog("CommandeFournisseur::fetch sql=".$sql,LOG_DEBUG); + dol_syslog("CommandeFournisseur::fetch sql=".$sql,LOG_DEBUG); $result = $this->db->query($sql); if ($result) { @@ -164,8 +164,8 @@ class CommandeFournisseur extends Commande $ligne->ref_fourn = $objp->ref_fourn; // Reference supplier $this->lignes[$i] = $ligne; - //dolibarr_syslog("1 ".$ligne->desc); - //dolibarr_syslog("2 ".$ligne->product_desc); + //dol_syslog("1 ".$ligne->desc); + //dol_syslog("2 ".$ligne->product_desc); $i++; } $this->db->free($result); @@ -175,14 +175,14 @@ class CommandeFournisseur extends Commande else { $this->error=$this->db->error()." sql=".$sql; - dolibarr_syslog("CommandeFournisseur::Fetch ".$this->error, LOG_ERR); + dol_syslog("CommandeFournisseur::Fetch ".$this->error, LOG_ERR); return -1; } } else { $this->error=$this->db->error()." sql=".$sql; - dolibarr_syslog("CommandeFournisseur::Fetch ".$this->error, LOG_ERR); + dol_syslog("CommandeFournisseur::Fetch ".$this->error, LOG_ERR); return -1; } } @@ -203,7 +203,7 @@ class CommandeFournisseur extends Commande $sql.= ($comment?"'".addslashes($comment)."'":'null'); $sql.= ")"; - dolibarr_syslog("FournisseurCommande::log sql=".$sql, LOG_DEBUG); + dol_syslog("FournisseurCommande::log sql=".$sql, LOG_DEBUG); if ( $this->db->query($sql) ) { return 1; @@ -211,7 +211,7 @@ class CommandeFournisseur extends Commande else { $this->error=$this->db->lasterror(); - dolibarr_syslog("FournisseurCommande::log ".$this->error, LOG_ERR); + dol_syslog("FournisseurCommande::log ".$this->error, LOG_ERR); return -1; } } @@ -226,7 +226,7 @@ class CommandeFournisseur extends Commande $error=0; - dolibarr_syslog("CommandeFournisseur::Valid"); + dol_syslog("CommandeFournisseur::Valid"); $result = 0; if ($user->rights->fournisseur->commande->valider) { @@ -282,7 +282,7 @@ class CommandeFournisseur extends Commande else { $this->error=$this->db->lasterror(); - dolibarr_syslog("CommandeFournisseur::valid ".$this->error); + dol_syslog("CommandeFournisseur::valid ".$this->error); $this->db->rollback(); return -1; } @@ -290,7 +290,7 @@ class CommandeFournisseur extends Commande else { $this->error='Not Authorized'; - dolibarr_syslog("CommandeFournisseur::valid ".$this->error); + dol_syslog("CommandeFournisseur::valid ".$this->error); return -1; } } @@ -304,7 +304,7 @@ class CommandeFournisseur extends Commande { global $langs,$conf; - //dolibarr_syslog("CommandeFournisseur::Cancel"); + //dol_syslog("CommandeFournisseur::Cancel"); $result = 0; if ($user->rights->fournisseur->commande->annuler) { @@ -341,7 +341,7 @@ class CommandeFournisseur extends Commande } else { - dolibarr_syslog("CommandeFournisseur::Cancel Error -1"); + dol_syslog("CommandeFournisseur::Cancel Error -1"); $this->db->rollback(); $this->error=$this->db->lasterror(); return -1; @@ -349,7 +349,7 @@ class CommandeFournisseur extends Commande } else { - dolibarr_syslog("CommandeFournisseur::Cancel Not Authorized"); + dol_syslog("CommandeFournisseur::Cancel Not Authorized"); return -1; } } @@ -486,7 +486,7 @@ class CommandeFournisseur extends Commande } else { - dolibarr_print_error($db,"CommandeFournisseur::getNextNumRef ".$obj->error); + dol_print_error($db,"CommandeFournisseur::getNextNumRef ".$obj->error); return -1; } } @@ -513,7 +513,7 @@ class CommandeFournisseur extends Commande $error=0; - dolibarr_syslog("CommandeFournisseur::Approve"); + dol_syslog("CommandeFournisseur::Approve"); if ($user->rights->fournisseur->commande->approuver) { @@ -580,13 +580,13 @@ class CommandeFournisseur extends Commande { $this->db->rollback(); $this->error=$this->db->lasterror(); - dolibarr_syslog("CommandeFournisseur::Approve Error ",$this->error, LOG_ERR); + dol_syslog("CommandeFournisseur::Approve Error ",$this->error, LOG_ERR); return -1; } } else { - dolibarr_syslog("CommandeFournisseur::Approve Not Authorized", LOG_ERR); + dol_syslog("CommandeFournisseur::Approve Not Authorized", LOG_ERR); } return -1; } @@ -598,7 +598,7 @@ class CommandeFournisseur extends Commande */ function refuse($user) { - dolibarr_syslog("CommandeFournisseur::Refuse"); + dol_syslog("CommandeFournisseur::Refuse"); $result = 0; if ($user->rights->fournisseur->commande->approuver) { @@ -618,13 +618,13 @@ class CommandeFournisseur extends Commande } else { - dolibarr_syslog("CommandeFournisseur::Refuse Error -1"); + dol_syslog("CommandeFournisseur::Refuse Error -1"); $result = -1; } } else { - dolibarr_syslog("CommandeFournisseur::Refuse Not Authorized"); + dol_syslog("CommandeFournisseur::Refuse Not Authorized"); } return $result ; } @@ -657,7 +657,7 @@ class CommandeFournisseur extends Commande */ function commande($user, $date, $methode, $comment='') { - dolibarr_syslog("CommandeFournisseur::Commande"); + dol_syslog("CommandeFournisseur::Commande"); $result = 0; if ($user->rights->fournisseur->commande->commander) { @@ -672,13 +672,13 @@ class CommandeFournisseur extends Commande } else { - dolibarr_syslog("CommandeFournisseur::Commande Error -1", LOG_ERR); + dol_syslog("CommandeFournisseur::Commande Error -1", LOG_ERR); $result = -1; } } else { - dolibarr_syslog("CommandeFournisseur::Commande User not Authorized", LOG_ERR); + dol_syslog("CommandeFournisseur::Commande User not Authorized", LOG_ERR); } return $result ; } @@ -692,7 +692,7 @@ class CommandeFournisseur extends Commande { global $langs,$conf; - dolibarr_syslog("CommandeFournisseur::Create soc id=".$this->socid); + dol_syslog("CommandeFournisseur::Create soc id=".$this->socid); $this->db->begin(); @@ -721,14 +721,14 @@ class CommandeFournisseur extends Commande if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers - dolibarr_syslog("CommandeFournisseur::Create : Success"); + dol_syslog("CommandeFournisseur::Create : Success"); $this->db->commit(); return 1; } else { $this->error=$this->db->error()." - ".$sql; - dolibarr_syslog("CommandeFournisseur::Create: Failed -2 - ".$this->error); + dol_syslog("CommandeFournisseur::Create: Failed -2 - ".$this->error); $this->db->rollback(); return -2; } @@ -736,7 +736,7 @@ class CommandeFournisseur extends Commande else { $this->error=$this->db->error()." - ".$sql; - dolibarr_syslog("CommandeFournisseur::Create: Failed -1 - ".$this->error); + dol_syslog("CommandeFournisseur::Create: Failed -1 - ".$this->error); $this->db->rollback(); return -1; } @@ -757,7 +757,7 @@ class CommandeFournisseur extends Commande { global $langs,$mysoc; - dolibarr_syslog("FournisseurCommande::addline $desc, $pu_ht, $qty, $txtva, $fk_product, $fk_prod_fourn_price, $fourn_ref, $remise_percent, $price_base_type, $pu_ttc"); + dol_syslog("FournisseurCommande::addline $desc, $pu_ht, $qty, $txtva, $fk_product, $fk_prod_fourn_price, $fourn_ref, $remise_percent, $price_base_type, $pu_ttc"); include_once(DOL_DOCUMENT_ROOT.'/lib/price.lib.php'); // Clean parameters @@ -804,14 +804,14 @@ class CommandeFournisseur extends Commande { $this->error="No price found for this quantity. Quantity may be too low ?"; $this->db->rollback(); - dolibarr_syslog("FournisseurCommande::addline result=".$result." - ".$this->error, LOG_DEBUG); + dol_syslog("FournisseurCommande::addline result=".$result." - ".$this->error, LOG_DEBUG); return -1; } if ($result < -1) { $this->error=$prod->error; $this->db->rollback(); - dolibarr_syslog("Fournisseur.commande::addline result=".$result." - ".$this->error, LOG_ERR); + dol_syslog("Fournisseur.commande::addline result=".$result." - ".$this->error, LOG_ERR); return -1; } } @@ -856,7 +856,7 @@ class CommandeFournisseur extends Commande $sql.= "'".price2num($total_ttc)."'"; $sql.= ")"; - dolibarr_syslog('FournisseurCommande::addline sql='.$sql); + dol_syslog('FournisseurCommande::addline sql='.$sql); $resql=$this->db->query($sql); //print $sql; if ($resql) @@ -870,7 +870,7 @@ class CommandeFournisseur extends Commande { $this->error=$this->db->error(); $this->db->rollback(); - dolibarr_syslog('FournisseurCommande::addline '.$this->error, LOG_ERR); + dol_syslog('FournisseurCommande::addline '.$this->error, LOG_ERR); return -1; } } @@ -907,7 +907,7 @@ class CommandeFournisseur extends Commande $error = 0; require_once DOL_DOCUMENT_ROOT ."/product/stock/mouvementstock.class.php"; - dolibarr_syslog("CommandeFournisseur::DispatchProduct"); + dol_syslog("CommandeFournisseur::DispatchProduct"); if ( ($this->statut == 3 || $this->statut == 4 || $this->statut == 5) && $qty > 0) { @@ -931,7 +931,7 @@ class CommandeFournisseur extends Commande if ($result < 0) { $this->error=$this->db->error()." - sql=$sql"; - dolibarr_syslog("CommandeFournisseur::DispatchProduct".$this->error); + dol_syslog("CommandeFournisseur::DispatchProduct".$this->error); $error = -2; } $i++; @@ -964,7 +964,7 @@ class CommandeFournisseur extends Commande $sql = "DELETE FROM ".MAIN_DB_PREFIX."commande_fournisseurdet WHERE rowid = ".$idligne; $resql=$this->db->query($sql); - dolibarr_syslog("Fournisseur.commande.class::delete_line sql=".$sql); + dol_syslog("Fournisseur.commande.class::delete_line sql=".$sql); if ($resql) { $result=$this->update_price(); @@ -1024,7 +1024,7 @@ class CommandeFournisseur extends Commande if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers - dolibarr_syslog("CommandeFournisseur::delete : Success"); + dol_syslog("CommandeFournisseur::delete : Success"); $this->db->commit(); return 1; } @@ -1075,7 +1075,7 @@ class CommandeFournisseur extends Commande { $result = 0; - dolibarr_syslog("CommandeFournisseur::Livraison"); + dol_syslog("CommandeFournisseur::Livraison"); if ($user->rights->fournisseur->commande->receptionner && $date < gmmktime()) { @@ -1093,7 +1093,7 @@ class CommandeFournisseur extends Commande $sql.= " WHERE rowid = ".$this->id; $sql.= " AND (fk_statut = 3 OR fk_statut = 4)"; - dolibarr_syslog("CommandeFournisseur::Livraison sql=".$sql); + dol_syslog("CommandeFournisseur::Livraison sql=".$sql); $resql=$this->db->query($sql); if ($resql) { @@ -1106,19 +1106,19 @@ class CommandeFournisseur extends Commande { $this->db->rollback(); $this->error=$this->db->lasterror(); - dolibarr_syslog("CommandeFournisseur::Livraison Error ".$this->error, LOG_ERR); + dol_syslog("CommandeFournisseur::Livraison Error ".$this->error, LOG_ERR); $result = -1; } } else { - dolibarr_syslog("CommandeFournisseur::Livraison Error -2", LOG_ERR); + dol_syslog("CommandeFournisseur::Livraison Error -2", LOG_ERR); $result = -2; } } else { - dolibarr_syslog("CommandeFournisseur::Livraison Not Authorized"); + dol_syslog("CommandeFournisseur::Livraison Not Authorized"); } return $result ; } @@ -1167,7 +1167,7 @@ class CommandeFournisseur extends Commande */ function UpdateNote($user, $note, $note_public) { - dolibarr_syslog("CommandeFournisseur::UpdateNote"); + dol_syslog("CommandeFournisseur::UpdateNote"); $result = 0; @@ -1184,7 +1184,7 @@ class CommandeFournisseur extends Commande else { $this->error=$this->db->error(); - dolibarr_syslog("CommandeFournisseur::UpdateNote "+$this->error); + dol_syslog("CommandeFournisseur::UpdateNote "+$this->error); $result = -1; } @@ -1224,7 +1224,7 @@ class CommandeFournisseur extends Commande } else { - dolibarr_syslog("ReadApprobators Erreur"); + dol_syslog("ReadApprobators Erreur"); } } @@ -1242,7 +1242,7 @@ class CommandeFournisseur extends Commande */ function updateline($rowid, $desc, $pu, $qty, $remise_percent=0, $txtva, $price_base_type='HT', $info_bits=0) { - dolibarr_syslog("CommandeFournisseur::UpdateLine $rowid, $desc, $pu, $qty, $remise_percent, $txtva"); + dol_syslog("CommandeFournisseur::UpdateLine $rowid, $desc, $pu, $qty, $remise_percent, $txtva"); include_once(DOL_DOCUMENT_ROOT.'/lib/price.lib.php'); if ($this->brouillon) @@ -1292,7 +1292,7 @@ class CommandeFournisseur extends Commande $sql.= ",total_ttc='".price2num($total_ttc)."'"; $sql.= " WHERE rowid = ".$rowid; - dolibarr_syslog("CommandeFournisseur::updateline sql=".$sql); + dol_syslog("CommandeFournisseur::updateline sql=".$sql); $result = $this->db->query( $sql); if ($result > 0) { @@ -1305,7 +1305,7 @@ class CommandeFournisseur extends Commande else { $this->error=$this->db->error(); - dolibarr_syslog("CommandeFournisseur::updateline ".$this->error); + dol_syslog("CommandeFournisseur::updateline ".$this->error); $this->db->rollback(); return -1; } @@ -1313,7 +1313,7 @@ class CommandeFournisseur extends Commande else { $this->error="Order status makes operation forbidden"; - dolibarr_syslog("CommandeFournisseur::updateline ".$this->error); + dol_syslog("CommandeFournisseur::updateline ".$this->error); return -2; } } @@ -1327,7 +1327,7 @@ class CommandeFournisseur extends Commande { global $user,$langs; - dolibarr_syslog("CommandeFournisseur::initAsSpecimen"); + dol_syslog("CommandeFournisseur::initAsSpecimen"); // Charge tableau des id de soci�t� socids $socids = array(); @@ -1464,7 +1464,7 @@ class CommandeFournisseurLigne extends CommandeLigne } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); } } @@ -1483,7 +1483,7 @@ class CommandeFournisseurLigne extends CommandeLigne $sql.= ",total_ttc='".price2num($this->total_ttc)."'"; $sql.= " WHERE rowid = ".$this->rowid; - dolibarr_syslog("CommandeFournisseurLigne.class.php::update_total sql=$sql"); + dol_syslog("CommandeFournisseurLigne.class.php::update_total sql=$sql"); $resql=$this->db->query($sql); if ($resql) @@ -1494,7 +1494,7 @@ class CommandeFournisseurLigne extends CommandeLigne else { $this->error=$this->db->error(); - dolibarr_syslog("CommandeFournisseurLigne.class.php::update_total Error ".$this->error); + dol_syslog("CommandeFournisseurLigne.class.php::update_total Error ".$this->error); $this->db->rollback(); return -2; } diff --git a/htdocs/fourn/fournisseur.facture.class.php b/htdocs/fourn/fournisseur.facture.class.php index 636031ef816a8b94069968472495a2215be3217a..d66361e682a39e63e1a905eeab38c416067c65ee 100644 --- a/htdocs/fourn/fournisseur.facture.class.php +++ b/htdocs/fourn/fournisseur.facture.class.php @@ -129,7 +129,7 @@ class FactureFournisseur extends Facture $sql.= " '".addslashes($this->note_public)."',"; $sql.= " ".$user->id.",'".$this->db->idate($this->date_echeance)."');"; - dolibarr_syslog("FactureFournisseur::create sql=".$sql, LOG_DEBUG); + dol_syslog("FactureFournisseur::create sql=".$sql, LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -139,7 +139,7 @@ class FactureFournisseur extends Facture $sql = 'INSERT INTO '.MAIN_DB_PREFIX.'facture_fourn_det (fk_facture_fourn)'; $sql .= ' VALUES ('.$this->id.');'; - dolibarr_syslog("FactureFournisseur::create sql=".$sql, LOG_DEBUG); + dol_syslog("FactureFournisseur::create sql=".$sql, LOG_DEBUG); $resql_insert=$this->db->query($sql); if ($resql_insert) { @@ -201,7 +201,7 @@ class FactureFournisseur extends Facture $sql.= ' FROM '.MAIN_DB_PREFIX.'facture_fourn as f,'.MAIN_DB_PREFIX.'societe as s'; $sql.= ' WHERE f.rowid='.$rowid.' AND f.fk_soc = s.rowid'; - dolibarr_syslog("FactureFournisseur::Fetch sql=".$sql, LOG_DEBUG); + dol_syslog("FactureFournisseur::Fetch sql=".$sql, LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -246,24 +246,24 @@ class FactureFournisseur extends Facture if ($result < 0) { $this->error=$this->db->error(); - dolibarr_syslog('FactureFournisseur::Fetch Error '.$this->error, LOG_ERR); + dol_syslog('FactureFournisseur::Fetch Error '.$this->error, LOG_ERR); return -3; } return 1; } else { - dolibarr_syslog('FactureFournisseur::Fetch rowid='.$rowid.' numrows=0 sql='.$sql); + dol_syslog('FactureFournisseur::Fetch rowid='.$rowid.' numrows=0 sql='.$sql); $this->error='Bill with id '.$rowid.' not found sql='.$sql; - dolibarr_print_error($this->db); + dol_print_error($this->db); return -2; } } else { - dolibarr_syslog('FactureFournisseur::Fetch rowid='.$rowid.' Erreur dans fetch de la facture fournisseur'); + dol_syslog('FactureFournisseur::Fetch rowid='.$rowid.' Erreur dans fetch de la facture fournisseur'); $this->error=$this->db->error(); - dolibarr_print_error($this->db); + dol_print_error($this->db); return -1; } } @@ -284,7 +284,7 @@ class FactureFournisseur extends Facture //$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_fournisseur as pf ON f.fk_product = pf.fk_product'; $sql.= ' WHERE fk_facture_fourn='.$this->id; - dolibarr_syslog("FactureFournisseur::fetch_lines sql=".$sql, LOG_DEBUG); + dol_syslog("FactureFournisseur::fetch_lines sql=".$sql, LOG_DEBUG); $resql_rows = $this->db->query($sql); if ($resql_rows) { @@ -320,7 +320,7 @@ class FactureFournisseur extends Facture else { $this->error=$this->db->error(); - dolibarr_syslog('FactureFournisseur::fetch_lines: Error '.$this->error,LOG_ERR); + dol_syslog('FactureFournisseur::fetch_lines: Error '.$this->error,LOG_ERR); return -3; } } @@ -347,12 +347,12 @@ class FactureFournisseur extends Facture $this->db->begin(); $sql = 'DELETE FROM '.MAIN_DB_PREFIX.'facture_fourn_det WHERE fk_facture_fourn = '.$rowid.';'; - dolibarr_syslog("FactureFournisseur sql=".$sql, LOG_DEBUG); + dol_syslog("FactureFournisseur sql=".$sql, LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { $sql = 'DELETE FROM '.MAIN_DB_PREFIX.'facture_fourn WHERE rowid = '.$rowid; - dolibarr_syslog("FactureFournisseur sql=".$sql, LOG_DEBUG); + dol_syslog("FactureFournisseur sql=".$sql, LOG_DEBUG); $resql2 = $this->db->query($sql); if ($resql2) { @@ -363,7 +363,7 @@ class FactureFournisseur extends Facture { $this->db->rollback(); $this->error=$this->db->lasterror(); - dolibarr_syslog("FactureFournisseur::delete ".$this->error, LOG_ERR); + dol_syslog("FactureFournisseur::delete ".$this->error, LOG_ERR); return -1; } } @@ -371,7 +371,7 @@ class FactureFournisseur extends Facture { $this->db->rollback(); $this->error=$this->db->lasterror(); - dolibarr_syslog("FactureFournisseur::delete ".$this->error, LOG_ERR); + dol_syslog("FactureFournisseur::delete ".$this->error, LOG_ERR); return -1; } } @@ -391,7 +391,7 @@ class FactureFournisseur extends Facture if (! $resql) { $this->error=$this->db->error(); - dolibarr_print_error($this->db); + dol_print_error($this->db); return -1; } return 1; @@ -413,7 +413,7 @@ class FactureFournisseur extends Facture $sql.= " SET fk_statut = 1, fk_user_valid = ".$user->id; $sql.= " WHERE rowid = ".$this->id; - dolibarr_syslog("FactureFournisseur::set_valid sql=".$sql, LOG_DEBUG); + dol_syslog("FactureFournisseur::set_valid sql=".$sql, LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -488,7 +488,7 @@ class FactureFournisseur extends Facture */ function addline($desc, $pu, $txtva, $qty, $fk_product=0, $remise_percent=0, $date_start='', $date_end='', $ventil=0, $info_bits='', $price_base_type='HT') { - dolibarr_syslog("FactureFourn::Addline $desc,$pu,$qty,$txtva,$fk_product,$remise_percent,$date_start,$date_end,$ventil,$info_bits", LOG_DEBUG); + dol_syslog("FactureFourn::Addline $desc,$pu,$qty,$txtva,$fk_product,$remise_percent,$date_start,$date_end,$ventil,$info_bits", LOG_DEBUG); include_once(DOL_DOCUMENT_ROOT.'/lib/price.lib.php'); $this->db->begin(); @@ -500,7 +500,7 @@ class FactureFournisseur extends Facture $sql = 'INSERT INTO '.MAIN_DB_PREFIX.'facture_fourn_det (fk_facture_fourn)'; $sql .= ' VALUES ('.$this->id.');'; - dolibarr_syslog("Fournisseur.facture::addline sql=".$sql); + dol_syslog("Fournisseur.facture::addline sql=".$sql); $resql = $this->db->query($sql); if ($resql) @@ -516,7 +516,7 @@ class FactureFournisseur extends Facture else { $this->error=$this->db->error(); - dolibarr_syslog("Error sql=$sql, error=".$this->error); + dol_syslog("Error sql=$sql, error=".$this->error); $this->db->rollback(); return -1; } @@ -585,7 +585,7 @@ class FactureFournisseur extends Facture $sql.= ', product_type='.$product_type; $sql.= ' WHERE rowid = '.$id; - dolibarr_syslog("Fournisseur.facture::updateline sql=".$sql); + dol_syslog("Fournisseur.facture::updateline sql=".$sql); $resql=$this->db->query($sql); if ($resql) { @@ -595,7 +595,7 @@ class FactureFournisseur extends Facture else { $this->error=$this->db->error(); - dolibarr_syslog("Fournisseur.facture::updateline error=".$this->error); + dol_syslog("Fournisseur.facture::updateline error=".$this->error); return -1; } } @@ -612,7 +612,7 @@ class FactureFournisseur extends Facture $resql = $this->db->query($sql); if (! $resql) { - dolibarr_print_error($this->db); + dol_print_error($this->db); } // Mise a jour prix facture $this->update_price(); @@ -657,7 +657,7 @@ class FactureFournisseur extends Facture } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); } } @@ -694,7 +694,7 @@ class FactureFournisseur extends Facture } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); $this->error=$this->db->error(); return -1; } diff --git a/htdocs/fourn/fournisseur.product.class.php b/htdocs/fourn/fournisseur.product.class.php index ab6fc81673a239876fc5057a3c9fc557af61078f..8c35ab41767875c22602ee2c224dcb813205defc 100644 --- a/htdocs/fourn/fournisseur.product.class.php +++ b/htdocs/fourn/fournisseur.product.class.php @@ -67,7 +67,7 @@ class ProductFournisseur extends Product $sql.= " FROM ".MAIN_DB_PREFIX."product_fournisseur"; $sql.= " WHERE fk_product = ".$this->id." AND fk_soc = ".$id_fourn; - dolibarr_syslog("ProductFournisseur::remove_fournisseur sql=".$sql); + dol_syslog("ProductFournisseur::remove_fournisseur sql=".$sql); $resql=$this->db->query($sql); if ($resql) { @@ -77,12 +77,12 @@ class ProductFournisseur extends Product $sql = "DELETE FROM ".MAIN_DB_PREFIX."product_fournisseur_price"; $sql.= " WHERE fk_product_fournisseur = ".$obj->rowid; - dolibarr_syslog("ProductFournisseur::remove_fournisseur sql=".$sql); + dol_syslog("ProductFournisseur::remove_fournisseur sql=".$sql); $resql2=$this->db->query($sql); if (! $resql2) { $this->error=$this->db->lasterror(); - dolibarr_syslog("ProductFournisseur::remove_fournisseur ".$this->error, LOG_ERR); + dol_syslog("ProductFournisseur::remove_fournisseur ".$this->error, LOG_ERR); $ok=0; } } @@ -91,12 +91,12 @@ class ProductFournisseur extends Product $sql = "DELETE FROM ".MAIN_DB_PREFIX."product_fournisseur"; $sql.= " WHERE fk_product = ".$this->id." AND fk_soc = ".$id_fourn; - dolibarr_syslog("ProductFournisseur::remove_fournisseur sql=".$sql); + dol_syslog("ProductFournisseur::remove_fournisseur sql=".$sql); $resql=$this->db->query($sql); if (! $resql) { $this->error=$this->db->lasterror(); - dolibarr_syslog("ProductFournisseur::remove_fournisseur ".$this->error, LOG_ERR); + dol_syslog("ProductFournisseur::remove_fournisseur ".$this->error, LOG_ERR); $ok=0; } @@ -114,7 +114,7 @@ class ProductFournisseur extends Product else { $this->db->rollback(); - dolibarr_print_error($this->db); + dol_print_error($this->db); return -2; } } @@ -125,7 +125,7 @@ class ProductFournisseur extends Product $sql = "DELETE FROM ".MAIN_DB_PREFIX."product_fournisseur"; $sql.= " WHERE rowid = ".$rowid; - dolibarr_syslog("ProductFournisseur::remove_product_fournisseur sql=".$sql); + dol_syslog("ProductFournisseur::remove_product_fournisseur sql=".$sql); $resql = $this->db->query($sql); if ($resql) { @@ -148,7 +148,7 @@ class ProductFournisseur extends Product $sql = "DELETE FROM ".MAIN_DB_PREFIX."product_fournisseur_price"; $sql.= " WHERE rowid = ".$rowid; - dolibarr_syslog("ProductFournisseur::remove_product_fournisseur_price sql=".$sql); + dol_syslog("ProductFournisseur::remove_product_fournisseur_price sql=".$sql); $resql = $this->db->query($sql); if ($resql) { @@ -157,7 +157,7 @@ class ProductFournisseur extends Product $sql.= " FROM ".MAIN_DB_PREFIX."product_fournisseur as pf"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product_fournisseur_price as pfp ON pfp.fk_product_fournisseur = pf.rowid"; $sql.= " WHERE pfp.rowid IS NULL"; - dolibarr_syslog("ProductFournisseur::remove_product_fournisseur_price sql=".$sql); + dol_syslog("ProductFournisseur::remove_product_fournisseur_price sql=".$sql); $resql = $this->db->query($sql); if ($resql) { @@ -169,12 +169,12 @@ class ProductFournisseur extends Product $sql = "DELETE FROM ".MAIN_DB_PREFIX."product_fournisseur"; $sql.= " WHERE rowid = ".$rowidpf; - dolibarr_syslog("ProductFournisseur::remove_product_fournisseur_price sql=".$sql); + dol_syslog("ProductFournisseur::remove_product_fournisseur_price sql=".$sql); $resql2 = $this->db->query($sql); if (! $resql2) { $this->error=$this->db->lasterror(); - dolibarr_syslog("ProductFournisseur::remove_product_fournisseur_price ".$this->error,LOG_ERR); + dol_syslog("ProductFournisseur::remove_product_fournisseur_price ".$this->error,LOG_ERR); $ok=0; } } @@ -193,7 +193,7 @@ class ProductFournisseur extends Product else { $this->error=$this->db->lasterror(); - dolibarr_syslog("ProductFournisseur::remove_product_fournisseur_price ".$this->error,LOG_ERR); + dol_syslog("ProductFournisseur::remove_product_fournisseur_price ".$this->error,LOG_ERR); $this->db->rollback(); return -2; } @@ -201,7 +201,7 @@ class ProductFournisseur extends Product else { $this->error=$this->db->lasterror(); - dolibarr_syslog("ProductFournisseur::remove_product_fournisseur_price ".$this->error,LOG_ERR); + dol_syslog("ProductFournisseur::remove_product_fournisseur_price ".$this->error,LOG_ERR); $this->db->rollback(); return -1; } @@ -277,7 +277,7 @@ class ProductFournisseur extends Product $sql.= " ,quantity = ".$qty; $sql.= " ,unitprice = ".$unitBuyPrice; - dolibarr_syslog("ProductFournisseur::update_buyprice sql=".$sql); + dol_syslog("ProductFournisseur::update_buyprice sql=".$sql); if (! $this->db->query($sql)) { $error++; @@ -365,7 +365,7 @@ class ProductFournisseur extends Product $sql.= " WHERE fk_product = ".$this->id; $sql.= " AND fk_soc = ".$fournid; - dolibarr_syslog("Product::fetch_fourn_data sql=".$sql); + dol_syslog("Product::fetch_fourn_data sql=".$sql); $result = $this->db->query($sql) ; if ($result) { @@ -377,7 +377,7 @@ class ProductFournisseur extends Product else { $this->error=$this->db->error(); - dolibarr_syslog("Product::fetch_fourn_data error=".$this->error); + dol_syslog("Product::fetch_fourn_data error=".$this->error); return -1; } } @@ -394,7 +394,7 @@ class ProductFournisseur extends Product $sql.= " FROM ".MAIN_DB_PREFIX."product_fournisseur_price as pfp, ".MAIN_DB_PREFIX."product_fournisseur as pf"; $sql.= " WHERE pfp.rowid = ".$rowid." AND pf.rowid = pfp.fk_product_fournisseur"; - dolibarr_syslog("Product::fetch_product_fournisseur_price sql=".$sql, LOG_DEBUG); + dol_syslog("Product::fetch_product_fournisseur_price sql=".$sql, LOG_DEBUG); $resql = $this->db->query($sql) ; if ($resql) { @@ -419,7 +419,7 @@ class ProductFournisseur extends Product else { $this->error=$this->db->error(); - dolibarr_syslog("Product::fetch_product_fournisseur_price error=".$this->error, LOG_ERR); + dol_syslog("Product::fetch_product_fournisseur_price error=".$this->error, LOG_ERR); return -1; } } diff --git a/htdocs/fourn/index.php b/htdocs/fourn/index.php index 9fe58c6480aa38e2ea5253294af5edb41959380c..c960bdb38d97b5a9c1ffbc5f98fcb812b0298a85 100644 --- a/htdocs/fourn/index.php +++ b/htdocs/fourn/index.php @@ -95,7 +95,7 @@ if ($resql) } else { - dolibarr_print_error($db); + dol_print_error($db); } @@ -216,7 +216,7 @@ if ($conf->fournisseur->enabled && $user->rights->fournisseur->facture->lire) } else { - dolibarr_print_error($db); + dol_print_error($db); } } @@ -262,7 +262,7 @@ if ($resql) print '<td><a href="fiche.php?socid='.$obj->socid.'">'.img_object($langs->trans("ShowSupplier"),"company").'</a>'; print " <a href=\"fiche.php?socid=".$obj->socid."\">".$obj->nom."</a></td>\n"; print '<td align="left">'.$obj->code_fournisseur.' </td>'; - print '<td align="right">'.dolibarr_print_date($obj->tms,'day').'</td>'; + print '<td align="right">'.dol_print_date($obj->tms,'day').'</td>'; print "</tr>\n"; } print "</table>\n"; @@ -271,7 +271,7 @@ if ($resql) } else { - dolibarr_print_error($db); + dol_print_error($db); } diff --git a/htdocs/fourn/liste.php b/htdocs/fourn/liste.php index 58eebf4ad01b920f2ad046c96b00d75a4bfb175f..bf2be885f8376dfc2a1d76a4be4ec25e55c2ffe7 100644 --- a/htdocs/fourn/liste.php +++ b/htdocs/fourn/liste.php @@ -152,7 +152,7 @@ if ($resql) print "<td>".$obj->ville."</td>\n"; print '<td align="left">'.$obj->code_fournisseur.' </td>'; print '<td align="left">'.$obj->code_compta_fournisseur.' </td>'; - print '<td align="center">'.dolibarr_print_date($obj->datec).'</td>'; + print '<td align="center">'.dol_print_date($obj->datec).'</td>'; print "<td> </td>\n"; print "</tr>\n"; $i++; @@ -163,7 +163,7 @@ if ($resql) } else { - dolibarr_print_error($db); + dol_print_error($db); } $db->close(); diff --git a/htdocs/fourn/paiement/fiche.php b/htdocs/fourn/paiement/fiche.php index 411633c74a93691e650f8203efec45691948d565..eb9ab54315c180b9a66c5b907de1fcbee235d6e8 100644 --- a/htdocs/fourn/paiement/fiche.php +++ b/htdocs/fourn/paiement/fiche.php @@ -107,7 +107,7 @@ $head[$h][1] = $langs->trans('Info'); $h++; -dolibarr_fiche_head($head, $hselected, $langs->trans('SupplierPayment')); +dol_fiche_head($head, $hselected, $langs->trans('SupplierPayment')); /* * Confirmation de la suppression du paiement @@ -139,7 +139,7 @@ if (!empty($_POST['action']) && $_POST['action'] == 'update_num' && !empty($_POS if (!empty($_POST['action']) && $_POST['action'] == 'update_date' && !empty($_POST['reday'])) { - $datepaye = dolibarr_mktime(12, 0 , 0, + $datepaye = dol_mktime(12, 0 , 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); @@ -185,7 +185,7 @@ if (empty($_GET['action']) || $_GET['action']!='edit_date') if ($paiement->statut == 0 && $_GET['action'] != 'edit_date') print '<td align="right"><a href="'.DOL_URL_ROOT.'/fourn/paiement/fiche.php?id='.$paiement->id.'&action=edit_date">'.img_edit($langs->trans('Modify')).'</a></td>'; print '</tr></table>'; print '</td>'; - print '<td colspan="3">'.dolibarr_print_date($paiement->date,'day').'</td></tr>'; + print '<td colspan="3">'.dol_print_date($paiement->date,'day').'</td></tr>'; } else { @@ -194,7 +194,7 @@ else print '<td colspan="3">'; print '<form name="formsoc" method="post" action="'.DOL_URL_ROOT.'/fourn/paiement/fiche.php?id='.$paiement->id.'"><input type="hidden" name="action" value="update_date" />'; if (!empty($_POST['remonth']) && !empty($_POST['reday']) && !empty($_POST['reyear'])) - $sel_date=dolibarr_mktime(12, 0 , 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); + $sel_date=dol_mktime(12, 0 , 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); else $sel_date=$paiement->date; $html->select_date($sel_date,'','','','',"addpaiement"); @@ -307,7 +307,7 @@ if ($resql) } else { - dolibarr_print_error($db); + dol_print_error($db); } print '</div>'; diff --git a/htdocs/fourn/paiement/info.php b/htdocs/fourn/paiement/info.php index c387a673df0222f06c6167c4cbb7279a8f86bd16..1bd2d98f2db2d47434a9ccdcedaa6dc5b699047d 100644 --- a/htdocs/fourn/paiement/info.php +++ b/htdocs/fourn/paiement/info.php @@ -44,7 +44,7 @@ $head[$h][1] = $langs->trans("Info"); $hselected = $h; $h++; -dolibarr_fiche_head($head, $hselected, $langs->trans("SupplierPayment")); +dol_fiche_head($head, $hselected, $langs->trans("SupplierPayment")); /* diff --git a/htdocs/fourn/product/categorie.php b/htdocs/fourn/product/categorie.php index f337ac1e5312a8cbfd28d7899894192f76a4abaa..445737a1b801185355c60a06543ef925c1da32f0 100644 --- a/htdocs/fourn/product/categorie.php +++ b/htdocs/fourn/product/categorie.php @@ -103,7 +103,7 @@ if ($_GET["id"]) } - dolibarr_fiche_head($head, $hselected, $langs->trans("CardProduct".$product->type).' : '.$product->ref); + dol_fiche_head($head, $hselected, $langs->trans("CardProduct".$product->type).' : '.$product->ref); print($mesg); print '<table class="border" width="100%">'; diff --git a/htdocs/fourn/product/fourn.php b/htdocs/fourn/product/fourn.php index b0c573272682677bcf3aceba1ddc4bf28ca93d67..728bd5167c32c9ebf75b8b9f396ad35b3e9f0903 100644 --- a/htdocs/fourn/product/fourn.php +++ b/htdocs/fourn/product/fourn.php @@ -82,7 +82,7 @@ if ($_GET["id"]) $hselected = $h; $h++; - dolibarr_fiche_head($head, $hselected, $langs->trans("CardProduct".$product->type).' : '.$product->ref); + dol_fiche_head($head, $hselected, $langs->trans("CardProduct".$product->type).' : '.$product->ref); print '<table class="border" width="100%">'; @@ -152,7 +152,7 @@ if ($_GET["id"]) $objp = $db->fetch_object($resql); $var=!$var; print "<tr $bc[$var]>"; - print '<td>'.dolibarr_print_date($objp->date_releve).'</td>'; + print '<td>'.dol_print_date($objp->date_releve).'</td>'; print '<td align="right">'.price($objp->price).'</td>'; print '<td align="center">'.$objp->quantity.'</td></tr>'; diff --git a/htdocs/fourn/product/index.php b/htdocs/fourn/product/index.php index 397c042cf2923740c3e4ee200f46c2230e7c9c85..a69219e3843f34cbe99b079c5b23c97d5d01e107 100644 --- a/htdocs/fourn/product/index.php +++ b/htdocs/fourn/product/index.php @@ -142,7 +142,7 @@ if ($resql) } else { - dolibarr_print_error(); + dol_print_error(); } print '</td></tr></table>'; diff --git a/htdocs/fourn/product/liste.php b/htdocs/fourn/product/liste.php index 565ec7870618920664fcf2e8776a3d5be7135964..347aacb552345067f038661bd9a5e25657d0f8df 100644 --- a/htdocs/fourn/product/liste.php +++ b/htdocs/fourn/product/liste.php @@ -138,7 +138,7 @@ $sql .= " ORDER BY ".$sortfield." ".$sortorder; $sql .= $db->plimit($limit + 1 ,$offset); -dolibarr_syslog("fourn/product/liste: sql=".$sql); +dol_syslog("fourn/product/liste: sql=".$sql); $resql = $db->query($sql) ; if ($resql) @@ -250,7 +250,7 @@ if ($resql) } else { - dolibarr_print_error($db); + dol_print_error($db); } diff --git a/htdocs/fourn/product/photos.php b/htdocs/fourn/product/photos.php index 17dbe458988a9c2742b4c5ef70fa2e50705e1fbd..408e45e7cbec8d211f04bf5e13523f0b090aa975 100644 --- a/htdocs/fourn/product/photos.php +++ b/htdocs/fourn/product/photos.php @@ -94,7 +94,7 @@ if ($_GET["id"]) $head[$h][1] = $langs->trans("CommercialCard"); $h++; - dolibarr_fiche_head($head, $hselected, $langs->trans("CardProduct".$product->type).' : '.$product->ref); + dol_fiche_head($head, $hselected, $langs->trans("CardProduct".$product->type).' : '.$product->ref); print($mesg); print '<table class="border" width="100%">'; @@ -160,7 +160,7 @@ if ($_GET["id"]) print '<img border="0" height="120" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=product&file='.urlencode($pdir.$filename).'">'; print '</a>'; - print '<br>'.$langs->trans("File").': '.dolibarr_trunc($filename,16); + print '<br>'.$langs->trans("File").': '.dol_trunc($filename,16); if ($user->rights->produit->creer) { print '<br>'.'<a href="'.$_SERVER["PHP_SELF"].'?id='.$_GET["id"].'&action=delete&file='.urlencode($pdir.$filename).'">'.img_delete().'</a>'; diff --git a/htdocs/fourn/recap-fourn.php b/htdocs/fourn/recap-fourn.php index 4ee9981c5a0de1f786cc313ac5b2ebc4b4d801f2..7421bc91e4c4a569f0483d840e0c8ea0bbb895b9 100644 --- a/htdocs/fourn/recap-fourn.php +++ b/htdocs/fourn/recap-fourn.php @@ -59,7 +59,7 @@ if ($socid > 0) */ $head = societe_prepare_head($societe); - dolibarr_fiche_head($head, 'supplier', $langs->trans("ThirdParty")); + dol_fiche_head($head, 'supplier', $langs->trans("ThirdParty")); print "<table width=\"100%\">\n"; @@ -86,7 +86,7 @@ if ($socid > 0) } else { - dolibarr_print_error($db); + dol_print_error($db); } diff --git a/htdocs/fourn/stats.php b/htdocs/fourn/stats.php index 616dd634d26a89f02b1b89daab2836a4dd986ee4..2d1a87673c73e9e186d2111da57106ee9080cb8b 100644 --- a/htdocs/fourn/stats.php +++ b/htdocs/fourn/stats.php @@ -89,7 +89,7 @@ $sql .= " AND ca.year > (date_format(".$db->idate(mktime()).",'%Y') - 5)"; $sql .= " ORDER BY $sortfield $sortorder " . $db->plimit($conf->liste_limit+1, $offset); -dolibarr_syslog("fourn/stats.php sql=".$sql); +dol_syslog("fourn/stats.php sql=".$sql); $resql = $db->query($sql); if ($resql) { @@ -111,7 +111,7 @@ if ($resql) } else { - dolibarr_print_error($db); + dol_print_error($db); } diff --git a/htdocs/html.form.class.php b/htdocs/html.form.class.php index 0ecf606ccb99c2c0fb0af6408530fec2d1cb3506..2ec5083b139500afd6fc22cd20dd54f1ebb643ae 100644 --- a/htdocs/html.form.class.php +++ b/htdocs/html.form.class.php @@ -203,7 +203,7 @@ class Form } $sql.= " ORDER BY code ASC"; - dolibarr_syslog("Form::select_pays sql=".$sql); + dol_syslog("Form::select_pays sql=".$sql); $resql=$this->db->query($sql); if ($resql) { @@ -277,7 +277,7 @@ class Form } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); return 1; } } @@ -331,7 +331,7 @@ class Form $sql.= " WHERE active = 1"; $sql.= " ORDER BY c.libelle ASC"; - dolibarr_syslog("Form::select_type_socialcontrib sql=".$sql, LOG_DEBUG); + dol_syslog("Form::select_type_socialcontrib sql=".$sql, LOG_DEBUG); $resql=$db->query($sql); if ($resql) { @@ -352,7 +352,7 @@ class Form } else { - dolibarr_print_error($db,$db->lasterror()); + dol_print_error($db,$db->lasterror()); } } @@ -425,7 +425,7 @@ class Form } $sql.= " ORDER BY nom ASC"; - dolibarr_syslog("Form::select_societes sql=".$sql); + dol_syslog("Form::select_societes sql=".$sql); $resql=$this->db->query($sql); if ($resql) { @@ -482,7 +482,7 @@ class Form } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); } } @@ -507,7 +507,7 @@ class Form if ($filter) $sql.= " AND ".$filter; $sql.= " ORDER BY re.description ASC"; - dolibarr_syslog("Form::select_remises sql=".$sql); + dol_syslog("Form::select_remises sql=".$sql); $resql=$this->db->query($sql); if ($resql) { @@ -523,7 +523,7 @@ class Form while ($i < $num) { $obj = $this->db->fetch_object($resql); - $desc=dolibarr_trunc($obj->description,40); + $desc=dol_trunc($obj->description,40); if ($desc=='(CREDIT_NOTE)') { $desc=$langs->trans("CreditNote"); @@ -549,7 +549,7 @@ class Form } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); return -1; } } @@ -579,7 +579,7 @@ class Form if (is_array($exclude) && $excludeContacts) $sql.= " AND s.rowid NOT IN ('".$excludeContacts."')"; $sql.= " ORDER BY s.name ASC"; - dolibarr_syslog("Form::select_contacts sql=".$sql); + dol_syslog("Form::select_contacts sql=".$sql); $resql=$this->db->query($sql); if ($resql) { @@ -621,7 +621,7 @@ class Form } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); return -1; } } @@ -649,7 +649,7 @@ class Form if (is_array($exclude) && $excludeUsers) $sql.= " WHERE u.rowid NOT IN ('".$excludeUsers."')"; $sql.= " ORDER BY u.name ASC"; - dolibarr_syslog("Form::select_users sql=".$sql); + dol_syslog("Form::select_users sql=".$sql); if ($this->db->query($sql)) { print '<select class="flat" name="'.$htmlname.'"'.($disabled?' disabled="true"':'').'>'; @@ -677,7 +677,7 @@ class Form } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); } } @@ -768,9 +768,9 @@ class Form $sql.= " ORDER BY p.ref"; if ($limit) $sql.= " LIMIT $limit"; - dolibarr_syslog("Form::select_produits_do sql=".$sql, LOG_DEBUG); + dol_syslog("Form::select_produits_do sql=".$sql, LOG_DEBUG); $result=$this->db->query($sql); - if (! $result) dolibarr_print_error($this->db); + if (! $result) dol_print_error($this->db); // Multilang : on construit une liste des traductions des produits list�s if ($conf->global->MAIN_MULTILANGS) @@ -780,7 +780,7 @@ class Form $sqld.= " WHERE d.fk_product=p.rowid AND p.envente=1 AND d.lang='". $langs->getDefaultLang() ."'"; $sqld.= " ORDER BY p.ref"; - dolibarr_syslog("Form::select_produits_do sql=".$sql, LOG_DEBUG); + dol_syslog("Form::select_produits_do sql=".$sql, LOG_DEBUG); $resultd = $this->db->query($sqld); if ( $resultd ) $objtp = $this->db->fetch_object($resultd); } @@ -825,7 +825,7 @@ class Form } } $opt = '<option value="'.$objp->rowid.'">'.$objp->ref.' - '; - $opt.= dolibarr_trunc($objp->label,32).' - '; + $opt.= dol_trunc($objp->label,32).' - '; // Multiprix if ($price_level > 1) @@ -835,7 +835,7 @@ class Form $sql.= "where fk_product='".$objp->rowid."' and price_level=".$price_level; $sql.= " order by date_price DESC limit 1"; - dolibarr_syslog("Form::select_produits_do sql=".$sql); + dol_syslog("Form::select_produits_do sql=".$sql); $result2 = $this->db->query($sql); $objp2 = $this->db->fetch_object($result2); if ($objp2) @@ -888,7 +888,7 @@ class Form } else { - dolibarr_print_error($db); + dol_print_error($db); } } @@ -944,7 +944,7 @@ class Form if ($ajaxkeysearch && $ajaxkeysearch != '') $sql.=" AND (pf.ref_fourn like '%".$ajaxkeysearch."%' OR p.ref like '%".$ajaxkeysearch."%' OR p.label like '%".$ajaxkeysearch."%')"; $sql.= " ORDER BY pf.ref_fourn DESC"; - dolibarr_syslog("Form::select_produits_fournisseurs_do sql=".$sql,LOG_DEBUG); + dol_syslog("Form::select_produits_fournisseurs_do sql=".$sql,LOG_DEBUG); $result=$this->db->query($sql); if ($result) { @@ -980,7 +980,7 @@ class Form if ($selected == $objp->idprodfournprice) $opt.= ' selected="true"'; if ($objp->fprice == '') $opt.=' disabled="disabled"'; $opt.= '>'.$objp->ref.' ('.$objp->ref_fourn.') - '; - $opt.= dolibarr_trunc($objp->label,18).' - '; + $opt.= dol_trunc($objp->label,18).' - '; if ($objp->fprice != '') // Keep != '' { $opt.= price($objp->fprice); @@ -1000,7 +1000,7 @@ class Form $opt.=")"; } if ($objp->duration) $opt .= " - ".$objp->duration; - if (! $socid) $opt .= " - ".dolibarr_trunc($objp->nom,8); + if (! $socid) $opt .= " - ".dol_trunc($objp->nom,8); } else { @@ -1017,7 +1017,7 @@ class Form } else { - dolibarr_print_error($db); + dol_print_error($db); } } @@ -1044,7 +1044,7 @@ class Form $sql.= " AND p.rowid = ".$productid; $sql.= " ORDER BY s.nom, pf.ref_fourn DESC"; - dolibarr_syslog("Form::select_product_fourn_price sql=".$sql,LOG_DEBUG); + dol_syslog("Form::select_product_fourn_price sql=".$sql,LOG_DEBUG); $result=$this->db->query($sql); if ($result) @@ -1104,7 +1104,7 @@ class Form } else { - dolibarr_print_error($db); + dol_print_error($db); } } @@ -1121,7 +1121,7 @@ class Form $sql .= " WHERE a.fk_societe = ".$socid; $sql .= " ORDER BY a.label ASC"; - dolibarr_syslog("Form::select_adresse_livraison sql=".$sql); + dol_syslog("Form::select_adresse_livraison sql=".$sql); if ($this->db->query($sql)) { print '<select class="flat" name="'.$htmlname.'">'; @@ -1150,7 +1150,7 @@ class Form } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); } } @@ -1169,7 +1169,7 @@ class Form $sql.= " FROM ".MAIN_DB_PREFIX."cond_reglement"; $sql.= " WHERE active=1"; $sql.= " ORDER BY sortorder"; - dolibarr_syslog('Form::load_cache_conditions_paiements sql='.$sql,LOG_DEBUG); + dol_syslog('Form::load_cache_conditions_paiements sql='.$sql,LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -1188,7 +1188,7 @@ class Form return 1; } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); return -1; } } @@ -1207,7 +1207,7 @@ class Form $sql.= " FROM ".MAIN_DB_PREFIX."c_paiement"; $sql.= " WHERE active > 0"; $sql.= " ORDER BY id"; - dolibarr_syslog('Form::load_cache_types_paiements sql='.$sql,LOG_DEBUG); + dol_syslog('Form::load_cache_types_paiements sql='.$sql,LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -1227,7 +1227,7 @@ class Form return $num; } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); return -1; } } @@ -1279,7 +1279,7 @@ class Form { global $langs,$user; - dolibarr_syslog("Form::select_type_paiements $selected, $htmlname, $filtertype, $format",LOG_DEBUG); + dol_syslog("Form::select_type_paiements $selected, $htmlname, $filtertype, $format",LOG_DEBUG); $filterarray=array(); if ($filtertype == 'CRDT') $filterarray=array(0,2); @@ -1350,7 +1350,7 @@ class Form $sql = "SELECT id, code, label, active FROM ".MAIN_DB_PREFIX."c_propalst"; $sql .= " WHERE active = 1"; - dolibarr_syslog("Form::select_propal_statut sql=".$sql); + dol_syslog("Form::select_propal_statut sql=".$sql); if ($this->db->query($sql)) { print '<select class="flat" name="propal_statut">'; @@ -1381,7 +1381,7 @@ class Form } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); } } @@ -1404,7 +1404,7 @@ class Form if ($filtre) $sql.=" AND ".$filtre; $sql.= " ORDER BY rowid"; - dolibarr_syslog("Form::select_comptes sql=".$sql); + dol_syslog("Form::select_comptes sql=".$sql); $result = $this->db->query($sql); if ($result) { @@ -1434,7 +1434,7 @@ class Form print "</select>"; } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); } } @@ -1471,7 +1471,7 @@ class Form { $add = ''; } - $output.= '<option '.$add.'value="'.$cate_arbo[$key]['id'].'">'.dolibarr_trunc($cate_arbo[$key]['fulllabel'],80,'middle').'</option>'; + $output.= '<option '.$add.'value="'.$cate_arbo[$key]['id'].'">'.dol_trunc($cate_arbo[$key]['fulllabel'],80,'middle').'</option>'; } } } @@ -1905,7 +1905,7 @@ class Form return 0; } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); return 1; } } @@ -2100,7 +2100,7 @@ class Form //print "e".$set_time." t ".$conf->format_date_short; if (strval($set_time) != '' && $set_time != -1) { - $formated_date=dolibarr_print_date($set_time,$conf->format_date_short); + $formated_date=dol_print_date($set_time,$conf->format_date_short); } // Calendrier popup version eldy @@ -2189,7 +2189,7 @@ class Form for ($month = 1 ; $month <= 12 ; $month++) { print '<option value="'.$month.'"'.($month == $smonth?' selected="true"':'').'>'; - print dolibarr_print_date(mktime(1,1,1,$month,1,2000),"%b"); + print dol_print_date(mktime(1,1,1,$month,1,2000),"%b"); print "</option>"; } print "</select>"; @@ -2401,13 +2401,13 @@ class Form if ($key_in_label) { $newval=($translate?$langs->trans($value):$value); - $selectOptionValue = $key.' - '.($maxlen?dolibarr_trunc($newval,$maxlen):$newval); + $selectOptionValue = $key.' - '.($maxlen?dol_trunc($newval,$maxlen):$newval); print $selectOptionValue; } else { $newval=($translate?$langs->trans($value):$value); - $selectOptionValue = ($maxlen?dolibarr_trunc($newval,$maxlen):$newval); + $selectOptionValue = ($maxlen?dol_trunc($newval,$maxlen):$newval); if ($value == '' || $value == '-') { $selectOptionValue=' '; } print $selectOptionValue; } @@ -2497,7 +2497,7 @@ class Form print "</select>"; } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); } } diff --git a/htdocs/html.formactions.class.php b/htdocs/html.formactions.class.php index b62e4baf43466ed1ffa77a1b962696c059dfdb4a..3547fa0314f7f344936648741fc2698b10924059 100644 --- a/htdocs/html.formactions.class.php +++ b/htdocs/html.formactions.class.php @@ -107,7 +107,7 @@ class FormActions if ($typeelement == 'propal') $sql.= ' AND a.propalrowid = '.$object->id; if ($typeelement == 'order') $sql.= ' AND a.fk_commande = '.$object->id; - dolibarr_syslog("FormActions::showactions sql=".$sql); + dol_syslog("FormActions::showactions sql=".$sql); $resql = $this->db->query($sql); if ($resql) { @@ -130,8 +130,8 @@ class FormActions $var=!$var; print '<tr '.$bc[$var].'>'; print '<td><a href="'.DOL_URL_ROOT.'/comm/action/fiche.php?id='.$objp->id.'">'.img_object($langs->trans('ShowTask'),'task').' '.$objp->id.'</a></td>'; - print '<td>'.dolibarr_print_date($objp->da,'day').'</td>'; - print '<td title="'.dol_escape_htmltag($objp->label).'">'.dolibarr_trunc($objp->label,32).'</td>'; + print '<td>'.dol_print_date($objp->da,'day').'</td>'; + print '<td title="'.dol_escape_htmltag($objp->label).'">'.dol_trunc($objp->label,32).'</td>'; print '<td>'.$objp->login.'</td>'; print '</tr>'; $i++; @@ -143,7 +143,7 @@ class FormActions } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); return -1; } } diff --git a/htdocs/html.formcompany.class.php b/htdocs/html.formcompany.class.php index 0762ba72148db879ae090b3ffab30b2059472d62..4ccc8b6b6d1700066dc610e9cda996d60be9c174 100644 --- a/htdocs/html.formcompany.class.php +++ b/htdocs/html.formcompany.class.php @@ -62,7 +62,7 @@ class FormCompany $sql.= " FROM ".MAIN_DB_PREFIX."c_typent"; $sql.= " WHERE active = 1"; $sql.= " ORDER by id"; - dolibarr_syslog('Form::typent_array sql='.$sql,LOG_DEBUG); + dol_syslog('Form::typent_array sql='.$sql,LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -100,7 +100,7 @@ class FormCompany $sql .= " FROM ".MAIN_DB_PREFIX."c_effectif"; $sql.= " WHERE active = 1"; $sql .= " ORDER BY id ASC"; - dolibarr_syslog('Form::effectif_array sql='.$sql,LOG_DEBUG); + dol_syslog('Form::effectif_array sql='.$sql,LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -141,7 +141,7 @@ class FormCompany print '<select class="flat" name="'.$htmlname.'">'; if ($empty) print '<option value=""> </option>'; - dolibarr_syslog('Form::form_prospect_level',LOG_DEBUG); + dol_syslog('Form::form_prospect_level',LOG_DEBUG); $sql = "SELECT code, label"; $sql.= " FROM ".MAIN_DB_PREFIX."c_prospectlevel"; $sql.= " WHERE active > 0"; @@ -166,7 +166,7 @@ class FormCompany $i++; } } - else dolibarr_print_error($this->db); + else dol_print_error($this->db); print '</select>'; print '</td>'; @@ -188,7 +188,7 @@ class FormCompany { global $conf,$langs,$user; - dolibarr_syslog("Form::select_departement selected=$selected, pays_code=$pays_code",LOG_DEBUG); + dol_syslog("Form::select_departement selected=$selected, pays_code=$pays_code",LOG_DEBUG); $langs->load("dict"); @@ -202,7 +202,7 @@ class FormCompany if ($pays_code) $sql .= " AND p.code = '".$pays_code."'"; $sql .= " ORDER BY p.code, d.code_departement"; - dolibarr_syslog("Form::select_departement sql=".$sql); + dol_syslog("Form::select_departement sql=".$sql); $result=$this->db->query($sql); if ($result) { @@ -210,7 +210,7 @@ class FormCompany if ($pays_code) print '<option value="0"> </option>'; $num = $this->db->num_rows($result); $i = 0; - dolibarr_syslog("Form::select_departement num=$num",LOG_DEBUG); + dol_syslog("Form::select_departement num=$num",LOG_DEBUG); if ($num) { $pays=''; @@ -252,7 +252,7 @@ class FormCompany } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); } } @@ -272,7 +272,7 @@ class FormCompany $sql = "SELECT r.rowid, r.code_region as code, r.nom as libelle, r.active, p.libelle as libelle_pays FROM ".MAIN_DB_PREFIX."c_regions as r, ".MAIN_DB_PREFIX."c_pays as p"; $sql .= " WHERE r.fk_pays=p.rowid AND r.active = 1 and p.active = 1 ORDER BY libelle_pays, libelle ASC"; - dolibarr_syslog("Form::select_region sql=".$sql); + dol_syslog("Form::select_region sql=".$sql); if ($this->db->query($sql)) { print '<select class="flat" name="'.$htmlname.'">'; @@ -311,7 +311,7 @@ class FormCompany } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); } } @@ -328,7 +328,7 @@ class FormCompany $sql = "SELECT rowid, code, civilite, active FROM ".MAIN_DB_PREFIX."c_civilite"; $sql .= " WHERE active = 1"; - dolibarr_syslog("Form::select_civilite sql=".$sql); + dol_syslog("Form::select_civilite sql=".$sql); if ($this->db->query($sql)) { print '<select class="flat" name="civilite_id">'; @@ -359,7 +359,7 @@ class FormCompany } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); } } @@ -383,7 +383,7 @@ class FormCompany if ($pays_code) $sql .= " AND p.code = '".$pays_code."'"; $sql .= " ORDER BY p.code, f.code"; - dolibarr_syslog("Form::select_forme_juridique sql=".$sql); + dol_syslog("Form::select_forme_juridique sql=".$sql); $result=$this->db->query($sql); if ($result) { @@ -432,7 +432,7 @@ class FormCompany } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); } } @@ -503,12 +503,12 @@ class FormCompany if ($i == 0) $firstCompany = $obj->rowid; if ($selected > 0 && $selected == $obj->rowid) { - print '<option value="'.$obj->rowid.'" selected="true">'.dolibarr_trunc($obj->nom,24).'</option>'; + print '<option value="'.$obj->rowid.'" selected="true">'.dol_trunc($obj->nom,24).'</option>'; $firstCompany = $obj->rowid; } else { - print '<option value="'.$obj->rowid.'">'.dolibarr_trunc($obj->nom,24).'</option>'; + print '<option value="'.$obj->rowid.'">'.dol_trunc($obj->nom,24).'</option>'; } $i ++; } @@ -519,7 +519,7 @@ class FormCompany } else { - dolibarr_print_error($object->db); + dol_print_error($object->db); } } diff --git a/htdocs/html.formfile.class.php b/htdocs/html.formfile.class.php index 1d8946aaf1430f014d847ca7bd09d5d70b93f4a8..c6ce404a6d306dcc9262b2af0f49ee2a4c5ce5b7 100644 --- a/htdocs/html.formfile.class.php +++ b/htdocs/html.formfile.class.php @@ -276,7 +276,7 @@ class FormFile } else { - dolibarr_print_error($this->db,'Bad value for modulepart'); + dol_print_error($this->db,'Bad value for modulepart'); return -1; } @@ -358,7 +358,7 @@ class FormFile print '<a href="'.DOL_URL_ROOT . '/document.php?modulepart='.$modulepart.'&file='.urlencode($relativepath).'">'; if (!$iconPDF) { - print img_mime($file["name"],$langs->trans("File").': '.$file["name"]).' '.dolibarr_trunc($file["name"],$maxfilenamelength); + print img_mime($file["name"],$langs->trans("File").': '.$file["name"]).' '.dol_trunc($file["name"],$maxfilenamelength); } else { @@ -369,7 +369,7 @@ class FormFile // Affiche taille fichier if (!$iconPDF) print '<td align="right">'.filesize($filedir."/".$file["name"]). ' bytes</td>'; // Affiche date fichier - if (!$iconPDF) print '<td align="right">'.dolibarr_print_date(filemtime($filedir."/".$file["name"]),'dayhour').'</td>'; + if (!$iconPDF) print '<td align="right">'.dol_print_date(filemtime($filedir."/".$file["name"]),'dayhour').'</td>'; if ($delallowed) { @@ -456,7 +456,7 @@ class FormFile print '</a>'; print "</td>\n"; print '<td align="right">'.dol_print_size($file['size']).'</td>'; - print '<td align="center">'.dolibarr_print_date($file['date'],"dayhour").'</td>'; + print '<td align="center">'.dol_print_date($file['date'],"dayhour").'</td>'; print '<td align="right">'; //print ' '; if ($permtodelete) diff --git a/htdocs/html.formorder.class.php b/htdocs/html.formorder.class.php index 47a494dec727d25566ed1547fa25421dea9c32ee..e3f4e22c7705c5d61bdcfcbd6315e9101e6d41f2 100644 --- a/htdocs/html.formorder.class.php +++ b/htdocs/html.formorder.class.php @@ -89,7 +89,7 @@ class FormOrder $sql.= " FROM ".MAIN_DB_PREFIX."c_methode_commande_fournisseur"; $sql.= " WHERE active = 1"; - dolibarr_syslog("Form::select_methodes_commande sql=".$sql); + dol_syslog("Form::select_methodes_commande sql=".$sql); $resql=$this->db->query($sql); if ($resql) { @@ -104,7 +104,7 @@ class FormOrder } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); return -1; } diff --git a/htdocs/html.formother.class.php b/htdocs/html.formother.class.php index f78a7cc02981b3caeb405ed6c63db450529e24e3..9524ea0878642a9e8069052e8509172e16b9f8fe 100644 --- a/htdocs/html.formother.class.php +++ b/htdocs/html.formother.class.php @@ -97,7 +97,7 @@ class FormOther print "</select>"; } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); } } @@ -148,7 +148,7 @@ class FormOther } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); return 1; } } diff --git a/htdocs/html.formproduct.class.php b/htdocs/html.formproduct.class.php index 4609421b90aedcce1a0189b7cd7e75b4e4cde38d..dd7d47f51082b98a0753cdd56d84d7655f675a94 100644 --- a/htdocs/html.formproduct.class.php +++ b/htdocs/html.formproduct.class.php @@ -66,7 +66,7 @@ class FormProduct $sql .= " WHERE statut = 1"; $sql .= " ORDER BY e.label"; - dolibarr_syslog('FormProduct::loadWarehouses sql='.$sql,LOG_DEBUG); + dol_syslog('FormProduct::loadWarehouses sql='.$sql,LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -84,7 +84,7 @@ class FormProduct } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); return -1; } } @@ -100,7 +100,7 @@ class FormProduct { global $langs,$user; - dolibarr_syslog("Form::selectWarehouses $selected, $htmlname, $filtertype, $format",LOG_DEBUG); + dol_syslog("Form::selectWarehouses $selected, $htmlname, $filtertype, $format",LOG_DEBUG); $this->loadWarehouses(); diff --git a/htdocs/includes/barcode/html.formbarcode.class.php b/htdocs/includes/barcode/html.formbarcode.class.php index dd39b3c7ba106bc4c61b25249e7454f06b1c36ab..2ca3adbe4a715fe174098338bad4541c1221c427 100644 --- a/htdocs/includes/barcode/html.formbarcode.class.php +++ b/htdocs/includes/barcode/html.formbarcode.class.php @@ -131,7 +131,7 @@ class FormBarCode print "</select>"; } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); } } diff --git a/htdocs/includes/barcode/php-barcode/php-barcode.php b/htdocs/includes/barcode/php-barcode/php-barcode.php index dba19e1159b8ebd1fd73542c29211164fd7c1cf0..dd57eff3ed114bd71c46f0c59eb9d99b7f6070a5 100644 --- a/htdocs/includes/barcode/php-barcode/php-barcode.php +++ b/htdocs/includes/barcode/php-barcode/php-barcode.php @@ -85,7 +85,7 @@ else //$genbarcode_loc = "/usr/local/bin/genbarcode"; $genbarcode_loc = $conf->global->GENBARCODE_LOCATION; } -//dolibarr_syslog("genbarcode_loc=".$genbarcode_loc); +//dol_syslog("genbarcode_loc=".$genbarcode_loc); /* CONFIGURATION ENDS HERE */ @@ -438,7 +438,7 @@ function barcode_encode($code,$encoding){ * array[text] : text-positioning info */ function barcode_print($code, $encoding="ANY", $scale = 2 ,$mode = "png" ){ - dolibarr_syslog("$code $encoding $scale $mode"); + dol_syslog("$code $encoding $scale $mode"); $bars=barcode_encode($code,$encoding); if (!$bars) return; if (!$mode) $mode="png"; diff --git a/htdocs/includes/boxes/box_actions.php b/htdocs/includes/boxes/box_actions.php index d0ceda1b1ac042e3676eb4d5410200c03b9e79a4..c05cbbcba937d695132b10d5e90295a8fbba3290 100644 --- a/htdocs/includes/boxes/box_actions.php +++ b/htdocs/includes/boxes/box_actions.php @@ -89,7 +89,7 @@ class box_actions extends ModeleBoxes { $sql.= " ORDER BY a.datec DESC"; $sql.= $db->plimit($max, 0); - dolibarr_syslog("Box_actions::loadBox sql=".$sql, LOG_DEBUG); + dol_syslog("Box_actions::loadBox sql=".$sql, LOG_DEBUG); $result = $db->query($sql); if ($result) { @@ -113,16 +113,16 @@ class box_actions extends ModeleBoxes { 'url' => DOL_URL_ROOT."/comm/action/fiche.php?id=".$objp->id); $this->info_box_contents[$i][1] = array('td' => 'align="left" nowrap="1"', - 'text' => dolibarr_trunc($label,12), + 'text' => dol_trunc($label,12), 'text2'=> $late, 'url' => DOL_URL_ROOT."/comm/action/fiche.php?id=".$objp->id); $this->info_box_contents[$i][2] = array('td' => 'align="left"', - 'text' => dolibarr_trunc($objp->nom,20), + 'text' => dol_trunc($objp->nom,20), 'url' => DOL_URL_ROOT."/comm/fiche.php?socid=".$objp->socid); $this->info_box_contents[$i][3] = array('td' => 'align="left"', - 'text' => dolibarr_print_date($datelimite, "dayhour")); + 'text' => dol_print_date($datelimite, "dayhour")); $this->info_box_contents[$i][4] = array('td' => 'align="right"', 'text' => $objp->percentage. "%"); @@ -136,7 +136,7 @@ class box_actions extends ModeleBoxes { if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoActionsToDo")); } else { - dolibarr_print_error($db); + dol_print_error($db); } } else { diff --git a/htdocs/includes/boxes/box_bookmarks.php b/htdocs/includes/boxes/box_bookmarks.php index 52093ba5a6cdd4d1e4e0956af0ba978ee7564fde..dbcf883057ad470ba8c6453943a59ac80e0b55d5 100644 --- a/htdocs/includes/boxes/box_bookmarks.php +++ b/htdocs/includes/boxes/box_bookmarks.php @@ -111,7 +111,7 @@ class box_bookmarks extends ModeleBoxes { } else { - dolibarr_print_error($db); + dol_print_error($db); } } else { diff --git a/htdocs/includes/boxes/box_clients.php b/htdocs/includes/boxes/box_clients.php index 91a2582fb4f0711c41c1c938ea3086952cbfffce..cd467a0bc9daf05923ceecdbf1179dacf6d3a210 100644 --- a/htdocs/includes/boxes/box_clients.php +++ b/htdocs/includes/boxes/box_clients.php @@ -102,7 +102,7 @@ class box_clients extends ModeleBoxes { 'url' => DOL_URL_ROOT."/comm/fiche.php?socid=".$objp->socid); $this->info_box_contents[$i][2] = array('td' => 'align="right"', - 'text' => dolibarr_print_date($datem, "day")); + 'text' => dol_print_date($datem, "day")); $i++; } @@ -110,7 +110,7 @@ class box_clients extends ModeleBoxes { if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoRecordedCustomers")); } else { - dolibarr_print_error($db); + dol_print_error($db); } } else { diff --git a/htdocs/includes/boxes/box_commandes.php b/htdocs/includes/boxes/box_commandes.php index 4a41e8526268f94e2c398b907a6bcca3dd40dfd5..7f80b89e4795aa1d9792d4e445213b56d25785d5 100644 --- a/htdocs/includes/boxes/box_commandes.php +++ b/htdocs/includes/boxes/box_commandes.php @@ -111,7 +111,7 @@ class box_commandes extends ModeleBoxes { 'url' => DOL_URL_ROOT."/comm/fiche.php?socid=".$objp->socid); $this->info_box_contents[$i][3] = array('td' => 'align="right"', - 'text' => dolibarr_print_date($datem,'day'), + 'text' => dol_print_date($datem,'day'), ); $this->info_box_contents[$i][4] = array('td' => 'align="right" width="18"', @@ -123,7 +123,7 @@ class box_commandes extends ModeleBoxes { if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoRecordedOrders")); } else { - dolibarr_print_error($db); + dol_print_error($db); } } else { diff --git a/htdocs/includes/boxes/box_comptes.php b/htdocs/includes/boxes/box_comptes.php index 1e190d8310186f5b94d8a97218a1b8ab7c3f9ce1..f16bb8e3d8c06085cc06c0db6cbf8c413319218f 100644 --- a/htdocs/includes/boxes/box_comptes.php +++ b/htdocs/includes/boxes/box_comptes.php @@ -77,7 +77,7 @@ class box_comptes extends ModeleBoxes { $sql.= " ORDER BY label"; $sql.= $db->plimit($max, 0); - dolibarr_syslog("Box_comptes::loadBox sql=".$sql); + dol_syslog("Box_comptes::loadBox sql=".$sql); $result = $db->query($sql); if ($result) { @@ -125,7 +125,7 @@ class box_comptes extends ModeleBoxes { } else { - dolibarr_print_error($db); + dol_print_error($db); } } else { diff --git a/htdocs/includes/boxes/box_external_rss.php b/htdocs/includes/boxes/box_external_rss.php index daeac626045e02ad729d912f6e7704b9d8b8a747..78af3c636d66342548a91e43460a823079ae7da3 100644 --- a/htdocs/includes/boxes/box_external_rss.php +++ b/htdocs/includes/boxes/box_external_rss.php @@ -83,8 +83,8 @@ class box_external_rss extends ModeleBoxes { $rss=fetch_rss($url); if (! is_object($rss)) { - dolibarr_syslog("FETCH_RSS site=".$site); - dolibarr_syslog("FETCH_RSS url=".$url); + dol_syslog("FETCH_RSS site=".$site); + dol_syslog("FETCH_RSS url=".$url); return -1; } @@ -96,13 +96,13 @@ class box_external_rss extends ModeleBoxes { if ($rss->ERROR) { // Affiche warning car il y a eu une erreur - $title.=" ".img_error($langs->trans("FailedToRefreshDataInfoNotUpToDate",(isset($rss->date)?dolibarr_print_date($rss->date,"dayhourtext"):$langs->trans("Unknown")))); + $title.=" ".img_error($langs->trans("FailedToRefreshDataInfoNotUpToDate",(isset($rss->date)?dol_print_date($rss->date,"dayhourtext"):$langs->trans("Unknown")))); $this->info_box_head = array('text' => $title,'limit' => 0); } else { $this->info_box_head = array('text' => $title, - 'sublink' => $link, 'subtext'=>$langs->trans("LastRefreshDate").': '.(isset($rss->date)?dolibarr_print_date($rss->date,"dayhourtext"):$langs->trans("Unknown")), 'subpicto'=>'object_bookmark'); + 'sublink' => $link, 'subtext'=>$langs->trans("LastRefreshDate").': '.(isset($rss->date)?dol_print_date($rss->date,"dayhourtext"):$langs->trans("Unknown")), 'subpicto'=>'object_bookmark'); } // INFO sur le �lements @@ -129,7 +129,7 @@ class box_external_rss extends ModeleBoxes { //$item['modified'] //$item['atom_content'] } - if (is_numeric($date)) $date=dolibarr_print_date($date,"dayhour"); + if (is_numeric($date)) $date=dol_print_date($date,"dayhour"); $isutf8 = utf8_check($title); if (! $isutf8 && $conf->character_set_client == 'UTF-8') $title=utf8_encode($title); diff --git a/htdocs/includes/boxes/box_factures.php b/htdocs/includes/boxes/box_factures.php index f6d9a2706bd7afa871c8489b1974eb49d0080f11..eadc0304712f3d96375d896d91a2b7c7df3e5732 100644 --- a/htdocs/includes/boxes/box_factures.php +++ b/htdocs/includes/boxes/box_factures.php @@ -108,7 +108,7 @@ class box_factures extends ModeleBoxes { if ($objp->type == 1) $picto.='r'; if ($objp->type == 2) $picto.='a'; $late = ''; - if ($objp->paye == 0 && $objp->fk_statut != 3 && $datelimite < ($now - $conf->facture->warning_delay)) { $late = img_warning(sprintf($l_due_date,dolibarr_print_date($datelimite,'day')));} + if ($objp->paye == 0 && $objp->fk_statut != 3 && $datelimite < ($now - $conf->facture->warning_delay)) { $late = img_warning(sprintf($l_due_date,dol_print_date($datelimite,'day')));} $this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"', 'logo' => $picto, @@ -125,7 +125,7 @@ class box_factures extends ModeleBoxes { 'url' => DOL_URL_ROOT."/comm/fiche.php?socid=".$objp->socid); $this->info_box_contents[$i][3] = array('td' => 'align="right"', - 'text' => dolibarr_print_date($datec,'day'), + 'text' => dol_print_date($datec,'day'), ); $this->info_box_contents[$i][4] = array('td' => 'align="right" width="18"', diff --git a/htdocs/includes/boxes/box_factures_fourn.php b/htdocs/includes/boxes/box_factures_fourn.php index 6eb06235adbc55ea6e5b66f7e6d9617cd2c873d4..be4bf036c4c100dde0d113cbc71f520ce482fb75 100644 --- a/htdocs/includes/boxes/box_factures_fourn.php +++ b/htdocs/includes/boxes/box_factures_fourn.php @@ -104,7 +104,7 @@ class box_factures_fourn extends ModeleBoxes { $datec=$db->jdate($objp->datec); $late = ''; - if ($objp->paye == 0 && $datelimite < ($now - $conf->facture->fournisseur->warning_delay)) $late=img_warning(sprintf($l_due_date, dolibarr_print_date($datelimite,'day'))); + if ($objp->paye == 0 && $datelimite < ($now - $conf->facture->fournisseur->warning_delay)) $late=img_warning(sprintf($l_due_date, dol_print_date($datelimite,'day'))); $this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"', 'logo' => $this->boximg, @@ -120,7 +120,7 @@ class box_factures_fourn extends ModeleBoxes { 'url' => DOL_URL_ROOT."/fourn/fiche.php?socid=".$objp->socid); $this->info_box_contents[$i][3] = array('td' => 'align="right"', - 'text' => dolibarr_print_date($datec,'day')); + 'text' => dol_print_date($datec,'day')); $this->info_box_contents[$i][4] = array('td' => 'align="right" width="18"', 'text' => $facturestatic->LibStatut($objp->paye,$objp->fk_statut,3)); @@ -131,7 +131,7 @@ class box_factures_fourn extends ModeleBoxes { if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoUnpayedCustomerBills")); } else { - dolibarr_print_error($db); + dol_print_error($db); } } else { diff --git a/htdocs/includes/boxes/box_factures_fourn_imp.php b/htdocs/includes/boxes/box_factures_fourn_imp.php index 9e2661bf0e4764e9d147ceacf729cad1e85bc4b2..4305821b1817dafd41a7ec0e8a6ef6d8b32034e9 100644 --- a/htdocs/includes/boxes/box_factures_fourn_imp.php +++ b/htdocs/includes/boxes/box_factures_fourn_imp.php @@ -99,7 +99,7 @@ class box_factures_fourn_imp extends ModeleBoxes { $datelimite=$db->jdate($objp->datelimite); $late=''; - if ($datelimite < ($now - $conf->facture->fournisseur->warning_delay)) $late=img_warning(sprintf($l_due_date,dolibarr_print_date($datelimite,'day'))); + if ($datelimite < ($now - $conf->facture->fournisseur->warning_delay)) $late=img_warning(sprintf($l_due_date,dol_print_date($datelimite,'day'))); $this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"', 'logo' => $this->boximg, @@ -115,7 +115,7 @@ class box_factures_fourn_imp extends ModeleBoxes { 'url' => DOL_URL_ROOT."/fourn/fiche.php?socid=".$objp->socid); $this->info_box_contents[$i][3] = array('td' => 'align="right"', - 'text' => dolibarr_print_date($datelimite,'day')); + 'text' => dol_print_date($datelimite,'day')); $this->info_box_contents[$i][4] = array('td' => 'align="right" width="18"', 'text' => $facturestatic->LibStatut($objp->paye,$objp->fk_statut,3)); @@ -126,7 +126,7 @@ class box_factures_fourn_imp extends ModeleBoxes { if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoUnpayedSupplierBills")); } else { - dolibarr_print_error($db); + dol_print_error($db); } } else { diff --git a/htdocs/includes/boxes/box_factures_imp.php b/htdocs/includes/boxes/box_factures_imp.php index ff4c81f753d24287942f9afe44884b54b05db022..b3f3f60762485de5fb4f47e615073fe9d1cdde88 100644 --- a/htdocs/includes/boxes/box_factures_imp.php +++ b/htdocs/includes/boxes/box_factures_imp.php @@ -103,7 +103,7 @@ class box_factures_imp extends ModeleBoxes { $datelimite=$db->jdate($objp->datelimite); $late=''; - if ($datelimite < ($now - $conf->facture->warning_delay)) $late = img_warning(sprintf($l_due_date,dolibarr_print_date($datelimite,'day'))); + if ($datelimite < ($now - $conf->facture->warning_delay)) $late = img_warning(sprintf($l_due_date,dol_print_date($datelimite,'day'))); $this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"', 'logo' => $this->boximg, @@ -120,7 +120,7 @@ class box_factures_imp extends ModeleBoxes { 'url' => DOL_URL_ROOT."/comm/fiche.php?socid=".$objp->socid); $this->info_box_contents[$i][3] = array('td' => 'align="right"', - 'text' => dolibarr_print_date($datelimite,'day'), + 'text' => dol_print_date($datelimite,'day'), ); $this->info_box_contents[$i][4] = array('td' => 'align="right" width="18"', diff --git a/htdocs/includes/boxes/box_fournisseurs.php b/htdocs/includes/boxes/box_fournisseurs.php index 8d89992efae3842afff2f996ae995caa49fa2b82..3e6769cde068b10d8c90d1f797fb2b41070f3c9c 100644 --- a/htdocs/includes/boxes/box_fournisseurs.php +++ b/htdocs/includes/boxes/box_fournisseurs.php @@ -100,7 +100,7 @@ class box_fournisseurs extends ModeleBoxes { 'url' => DOL_URL_ROOT."/fourn/fiche.php?socid=".$objp->socid); $this->info_box_contents[$i][2] = array('td' => 'align="right"', - 'text' => dolibarr_print_date($datem, "day")); + 'text' => dol_print_date($datem, "day")); $i++; } @@ -108,7 +108,7 @@ class box_fournisseurs extends ModeleBoxes { if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoRecordedSuppliers")); } else { - dolibarr_print_error($db); + dol_print_error($db); } } else { diff --git a/htdocs/includes/boxes/box_osc_client.php b/htdocs/includes/boxes/box_osc_client.php index 33b2693ca668ae1fa9e70c2705efc18916383f74..480a66a1a9664796311eab5462f7e9d1e2f7503e 100644 --- a/htdocs/includes/boxes/box_osc_client.php +++ b/htdocs/includes/boxes/box_osc_client.php @@ -89,7 +89,7 @@ class box_osc_clients extends ModeleBoxes { } } else { - dolibarr_print_error($db); + dol_print_error($db); } } else { diff --git a/htdocs/includes/boxes/box_produits.php b/htdocs/includes/boxes/box_produits.php index 5d1573e9c065ef27b7e8ce3000717f2509fa0873..f354669d0de50cea418d06d261b858f7a7eecf9b 100644 --- a/htdocs/includes/boxes/box_produits.php +++ b/htdocs/includes/boxes/box_produits.php @@ -131,7 +131,7 @@ class box_produits extends ModeleBoxes { 'text' => $price_base_type); $this->info_box_contents[$i][4] = array('td' => 'align="right"', - 'text' => dolibarr_print_date($datem,'day')); + 'text' => dol_print_date($datem,'day')); $this->info_box_contents[$i][5] = array('td' => 'align="right" width="18"', 'text' => $productstatic->LibStatut($objp->envente,3)); @@ -140,7 +140,7 @@ class box_produits extends ModeleBoxes { } } else { - dolibarr_print_error($db); + dol_print_error($db); } } else { diff --git a/htdocs/includes/boxes/box_propales.php b/htdocs/includes/boxes/box_propales.php index 61d79d686db69cb91c3f1a79cb4920e4724dfdb9..bbb6c97a3605aea8bfda10facc20d5173ad15e23 100644 --- a/htdocs/includes/boxes/box_propales.php +++ b/htdocs/includes/boxes/box_propales.php @@ -115,11 +115,11 @@ class box_propales extends ModeleBoxes { 'url' => DOL_URL_ROOT."/comm/propal.php?propalid=".$objp->rowid); $this->info_box_contents[$i][2] = array('td' => 'align="left"', - 'text' => dolibarr_trunc($objp->nom,40), + 'text' => dol_trunc($objp->nom,40), 'url' => DOL_URL_ROOT."/comm/fiche.php?socid=".$objp->socid); $this->info_box_contents[$i][3] = array('td' => 'align="right"', - 'text' => dolibarr_print_date($datec,'day')); + 'text' => dol_print_date($datec,'day')); $this->info_box_contents[$i][4] = array('td' => 'align="right" width="18"', 'text' => $propalstatic->LibStatut($objp->fk_statut,3)); @@ -131,7 +131,7 @@ class box_propales extends ModeleBoxes { } else { - dolibarr_print_error($db); + dol_print_error($db); } } else { diff --git a/htdocs/includes/boxes/box_prospect.php b/htdocs/includes/boxes/box_prospect.php index 484fed226dc1182a247f01f1e759b34790d74d8d..067514464d384287ca02fcde9864ae182906f86d 100644 --- a/htdocs/includes/boxes/box_prospect.php +++ b/htdocs/includes/boxes/box_prospect.php @@ -84,7 +84,7 @@ class box_prospect extends ModeleBoxes { $sql .= " ORDER BY s.tms DESC"; $sql .= $db->plimit($max, 0); - dolibarr_syslog("box_prospect::loadBox sql=".$sql,LOG_DEBUG); + dol_syslog("box_prospect::loadBox sql=".$sql,LOG_DEBUG); $resql = $db->query($sql); if ($resql) { @@ -106,7 +106,7 @@ class box_prospect extends ModeleBoxes { 'url' => DOL_URL_ROOT."/comm/prospect/fiche.php?socid=".$objp->socid); $this->info_box_contents[$i][2] = array('td' => 'align="right"', - 'text' => dolibarr_print_date($datem, "day")); + 'text' => dol_print_date($datem, "day")); $this->info_box_contents[$i][3] = array('td' => 'align="right" width="18"', 'text' => eregi_replace('img ','img height="14px" ',$prospectstatic->LibStatut($objp->fk_stcomm,3))); @@ -118,11 +118,11 @@ class box_prospect extends ModeleBoxes { } else { - dolibarr_print_error($db); + dol_print_error($db); } } else { - dolibarr_syslog("box_prospect::loadBox not allowed de read this box content",LOG_ERR); + dol_syslog("box_prospect::loadBox not allowed de read this box content",LOG_ERR); $this->info_box_contents[0][0] = array('td' => 'align="left"', 'text' => $langs->trans("ReadPermissionNotAllowed")); } diff --git a/htdocs/includes/boxes/box_services_vendus.php b/htdocs/includes/boxes/box_services_vendus.php index 7cd1a99d8f58b549db887e554097b41edbf6af06..561c0e8f49c1bd5344e1efaa6d107980b62e540a 100644 --- a/htdocs/includes/boxes/box_services_vendus.php +++ b/htdocs/includes/boxes/box_services_vendus.php @@ -137,7 +137,7 @@ class box_services_vendus extends ModeleBoxes { 'url' => DOL_URL_ROOT."/comm/fiche.php?socid=".$objp->socid); $this->info_box_contents[$i][3] = array('td' => 'align="right"', - 'text' => dolibarr_print_date($datem,'day')); + 'text' => dol_print_date($datem,'day')); $this->info_box_contents[$i][4] = array('td' => 'align="right" width="18"', 'text' => $contratlignestatic->LibStatut($objp->statut,3) @@ -148,7 +148,7 @@ class box_services_vendus extends ModeleBoxes { } else { - dolibarr_print_error($db); + dol_print_error($db); } } else { diff --git a/htdocs/includes/boxes/modules_boxes.php b/htdocs/includes/boxes/modules_boxes.php index 5a3ebe2e99a95eee4f72e6c15e2edaf335a1fb94..8d2d3df55b027744e6bbc435e1d0715abae6aee8 100644 --- a/htdocs/includes/boxes/modules_boxes.php +++ b/htdocs/includes/boxes/modules_boxes.php @@ -62,7 +62,7 @@ class ModeleBoxes $sql = "SELECT b.rowid, b.box_id, b.position, b.box_order, b.fk_user"; $sql.= " FROM ".MAIN_DB_PREFIX."boxes as b"; $sql.= " WHERE b.rowid = ".$rowid; - dolibarr_syslog("ModeleBoxes::fetch rowid=".$rowid); + dol_syslog("ModeleBoxes::fetch rowid=".$rowid); $resql = $this->db->query($sql); if ($resql) @@ -103,7 +103,7 @@ class ModeleBoxes $bcx[1] = 'class="box_impair"'; $var = true; - dolibarr_syslog("modules_box::showBox ".get_Class($this)); + dol_syslog("modules_box::showBox ".get_Class($this)); // Define nbcol and nblines of the box to show $nbcol=0; @@ -128,7 +128,7 @@ class ModeleBoxes } if (! empty($head['text'])) { - $s=dolibarr_trunc($head['text'],isset($head['limit'])?$head['limit']:$MAXLENGTHBOX); + $s=dol_trunc($head['text'],isset($head['limit'])?$head['limit']:$MAXLENGTHBOX); print $s; } if (! empty($head['sublink'])) @@ -198,7 +198,7 @@ class ModeleBoxes $maxlength=$MAXLENGTHBOX; if (! empty($contents[$i][$j]['maxlength'])) $maxlength=$contents[$i][$j]['maxlength']; - if ($maxlength) $textewithnotags=dolibarr_trunc($textewithnotags,$maxlength); + if ($maxlength) $textewithnotags=dol_trunc($textewithnotags,$maxlength); if (eregi('^<img',$texte)) print $texte; // show text with no html cleaning else print $textewithnotags; // show text with html cleaning diff --git a/htdocs/includes/fckeditor/editor/filemanager/connectors/php/config.php b/htdocs/includes/fckeditor/editor/filemanager/connectors/php/config.php index 952326af0d74aec6ff94c002837b3758e9538208..a33cd4ef2ff35810d3d631b3b233b8e6c03a1dfe 100644 --- a/htdocs/includes/fckeditor/editor/filemanager/connectors/php/config.php +++ b/htdocs/includes/fckeditor/editor/filemanager/connectors/php/config.php @@ -38,7 +38,7 @@ define('DOL_URL_ROOT', $pos); $conf->syslog->enabled=1; define('SYSLOG_FILE','c:/log/dolibarr/dolibarr.log'); require_once("../../../../../../lib/functions.lib.php"); -dolibarr_syslog("eee".$conf->fckeditor->dir_output); +dol_syslog("eee".$conf->fckeditor->dir_output); */ // SECURITY: You must explicitly enable this "connector". (Set it to "true"). diff --git a/htdocs/includes/login/functions_dolibarr.php b/htdocs/includes/login/functions_dolibarr.php index daa3292682381d451336b3169bed5718c5a735ba..e6848bf26d509b2cb9f65479d89b73feb5a468ae 100644 --- a/htdocs/includes/login/functions_dolibarr.php +++ b/htdocs/includes/login/functions_dolibarr.php @@ -34,7 +34,7 @@ function check_user_password_dolibarr($usertotest,$passwordtotest) { global $_POST,$db,$conf,$langs; - dolibarr_syslog("functions_dolibarr::check_user_password_dolibarr usertotest=".$usertotest); + dol_syslog("functions_dolibarr::check_user_password_dolibarr usertotest=".$usertotest); $login=''; @@ -48,7 +48,7 @@ function check_user_password_dolibarr($usertotest,$passwordtotest) $sql.=' from '.$table; $sql.=' where '.$usernamecol." = '".addslashes($_POST["username"])."'"; - dolibarr_syslog("functions_dolibarr::check_user_password_dolibarr sql=".$sql); + dol_syslog("functions_dolibarr::check_user_password_dolibarr sql=".$sql); $resql=$db->query($sql); if ($resql) { @@ -72,7 +72,7 @@ function check_user_password_dolibarr($usertotest,$passwordtotest) if (md5($passtyped) == $passcrypted) { $passok=true; - dolibarr_syslog("functions_dolibarr::check_user_password_dolibarr Authentification ok - ".$cryptType." of pass is ok"); + dol_syslog("functions_dolibarr::check_user_password_dolibarr Authentification ok - ".$cryptType." of pass is ok"); } } @@ -83,7 +83,7 @@ function check_user_password_dolibarr($usertotest,$passwordtotest) && ($passtyped == $passclear)) { $passok=true; - dolibarr_syslog("functions_dolibarr::check_user_password_dolibarr Authentification ok - found pass in database"); + dol_syslog("functions_dolibarr::check_user_password_dolibarr Authentification ok - found pass in database"); } } @@ -94,7 +94,7 @@ function check_user_password_dolibarr($usertotest,$passwordtotest) } else { - dolibarr_syslog("functions_dolibarr::check_user_password_dolibarr Authentification ko bad password pour '".$_POST["username"]."'"); + dol_syslog("functions_dolibarr::check_user_password_dolibarr Authentification ko bad password pour '".$_POST["username"]."'"); sleep(1); $langs->load('main'); $langs->load('other'); @@ -103,7 +103,7 @@ function check_user_password_dolibarr($usertotest,$passwordtotest) } else { - dolibarr_syslog("functions_dolibarr::check_user_password_dolibarr Authentification ko user not found pour '".$_POST["username"]."'"); + dol_syslog("functions_dolibarr::check_user_password_dolibarr Authentification ko user not found pour '".$_POST["username"]."'"); sleep(1); $langs->load('main'); $langs->load('other'); @@ -112,7 +112,7 @@ function check_user_password_dolibarr($usertotest,$passwordtotest) } else { - dolibarr_syslog("functions_dolibarr::check_user_password_dolibarr Authentification ko db error pour '".$_POST["username"]."' error=".$db->lasterror()); + dol_syslog("functions_dolibarr::check_user_password_dolibarr Authentification ko db error pour '".$_POST["username"]."' error=".$db->lasterror()); sleep(1); $_SESSION["dol_loginmesg"]=$db->lasterror(); } diff --git a/htdocs/includes/login/functions_forceuser.php b/htdocs/includes/login/functions_forceuser.php index 8dfa652f50e6f81aac35475f180aaa59af9d552e..de4d4fc1a7f6d33a956c6767abdb387d164c2fe9 100644 --- a/htdocs/includes/login/functions_forceuser.php +++ b/htdocs/includes/login/functions_forceuser.php @@ -36,7 +36,7 @@ function check_user_password_forceuser($usertotest,$passwordtotest) // Variable dolibarr_auto_user must be defined in conf.php file global $dolibarr_auto_user; - dolibarr_syslog("functions_forceuser::check_user_password_forceuser"); + dol_syslog("functions_forceuser::check_user_password_forceuser"); $login=$dolibarr_auto_user; if (empty($login)) $login='auto'; diff --git a/htdocs/includes/login/functions_http.php b/htdocs/includes/login/functions_http.php index d6707f954ddf31f10ece8710fb664fc79757415d..b6facb72289ea299013ffb906ed5b8efd4ba517b 100644 --- a/htdocs/includes/login/functions_http.php +++ b/htdocs/includes/login/functions_http.php @@ -32,7 +32,7 @@ */ function check_user_password_http($usertotest,$passwordtotest) { - dolibarr_syslog("functions_http::check_user_password_http _SERVER[REMOTE_USER]=".$_SERVER["REMOTE_USER"]); + dol_syslog("functions_http::check_user_password_http _SERVER[REMOTE_USER]=".$_SERVER["REMOTE_USER"]); $login=''; if (! empty($_SERVER["REMOTE_USER"])) diff --git a/htdocs/includes/login/functions_ldap.php b/htdocs/includes/login/functions_ldap.php index ba54e697d786a501087a7927a5282381db31d412..7f78e5e85415ab598fb5251fd46938ca70342e8c 100644 --- a/htdocs/includes/login/functions_ldap.php +++ b/htdocs/includes/login/functions_ldap.php @@ -43,7 +43,7 @@ function check_user_password_ldap($usertotest,$passwordtotest) if (! function_exists("ldap_connect")) { - dolibarr_syslog("functions_ldap::check_user_password_ldap Authentification ko failed to connect to LDAP. LDAP functions are disabled on this PHP"); + dol_syslog("functions_ldap::check_user_password_ldap Authentification ko failed to connect to LDAP. LDAP functions are disabled on this PHP"); sleep(1); $langs->load('main'); $langs->load('other'); @@ -95,7 +95,7 @@ function check_user_password_ldap($usertotest,$passwordtotest) */ // Fin code pour compatiblite - dolibarr_syslog("functions_ldap::check_user_password_ldap usertotest=".$usertotest." admin_login=".$ldapadminlogin); + dol_syslog("functions_ldap::check_user_password_ldap usertotest=".$usertotest." admin_login=".$ldapadminlogin); require_once(DOL_DOCUMENT_ROOT."/lib/ldap.class.php"); $ldap=new Ldap(); @@ -106,7 +106,7 @@ function check_user_password_ldap($usertotest,$passwordtotest) $ldap->searchUser=$ldapadminlogin; $ldap->searchPassword=$ldapadminpass; - if ($ldapdebug) dolibarr_syslog("functions_ldap::check_user_password_ldap Server:".join(',',$ldap->server).", Port:".$ldap->serverPort.", Protocol:".$ldap->ldapProtocolVersion.", Type:".$ldap->serverType.", Admin:".$ldap->searchUser.", Pass:".$ldap->searchPassword); + if ($ldapdebug) dol_syslog("functions_ldap::check_user_password_ldap Server:".join(',',$ldap->server).", Port:".$ldap->serverPort.", Protocol:".$ldap->ldapProtocolVersion.", Type:".$ldap->serverType.", Admin:".$ldap->searchUser.", Pass:".$ldap->searchPassword); $resultCheckUserDN=false; @@ -121,7 +121,7 @@ function check_user_password_ldap($usertotest,$passwordtotest) // On stop si le mot de passe ldap doit etre modifie sur le domaine if ($resultFetchLdapUser == 1 && $ldap->pwdlastset == 0) { - dolibarr_syslog('functions_ldap::check_user_password_ldap '.$_POST["username"].' must change password next logon'); + dol_syslog('functions_ldap::check_user_password_ldap '.$_POST["username"].' must change password next logon'); if ($ldapdebug) print "DEBUG: User ".$_POST["username"]." must change password<br>\n"; $ldap->close(); sleep(1); @@ -149,7 +149,7 @@ function check_user_password_ldap($usertotest,$passwordtotest) { if ($result == 2) { - dolibarr_syslog("functions_ldap::check_user_password_ldap Authentification ok"); + dol_syslog("functions_ldap::check_user_password_ldap Authentification ok"); $login=$_POST["username"]; // ldap2dolibarr synchronisation @@ -160,8 +160,8 @@ function check_user_password_ldap($usertotest,$passwordtotest) $ldap->fetch($login); if ($ldapdebug) print "DEBUG: UACF = ".join(',',$ldap->uacf)."<br>\n"; - if ($ldapdebug) print "DEBUG: pwdLastSet = ".dolibarr_print_date($ldap->pwdlastset,'day')."<br>\n"; - if ($ldapdebug) print "DEBUG: badPasswordTime = ".dolibarr_print_date($ldap->badpwdtime,'day')."<br>\n"; + if ($ldapdebug) print "DEBUG: pwdLastSet = ".dol_print_date($ldap->pwdlastset,'day')."<br>\n"; + if ($ldapdebug) print "DEBUG: badPasswordTime = ".dol_print_date($ldap->badpwdtime,'day')."<br>\n"; // On recherche le user dolibarr en fonction de son SID ldap $sid = $ldap->getObjectSid($login); @@ -184,7 +184,7 @@ function check_user_password_ldap($usertotest,$passwordtotest) } if ($result == 1) { - dolibarr_syslog("functions_ldap::check_user_password_ldap Authentification ko bad user/password for '".$_POST["username"]."'"); + dol_syslog("functions_ldap::check_user_password_ldap Authentification ko bad user/password for '".$_POST["username"]."'"); sleep(1); $langs->load('main'); $langs->load('other'); @@ -193,7 +193,7 @@ function check_user_password_ldap($usertotest,$passwordtotest) } else { - dolibarr_syslog("functions_ldap::check_user_password_ldap Authentification ko failed to connect to LDAP for '".$_POST["username"]."'"); + dol_syslog("functions_ldap::check_user_password_ldap Authentification ko failed to connect to LDAP for '".$_POST["username"]."'"); sleep(1); $langs->load('main'); $langs->load('other'); diff --git a/htdocs/includes/modules/DolibarrModules.class.php b/htdocs/includes/modules/DolibarrModules.class.php index d9e4aa0218974a4ad36c6949c7ad2beb9200e472..2fb5c3bfb43ae5e548b9e70f992e4b707812afe8 100644 --- a/htdocs/includes/modules/DolibarrModules.class.php +++ b/htdocs/includes/modules/DolibarrModules.class.php @@ -107,12 +107,12 @@ class DolibarrModules { $sql=$array_sql[$i]; - dolibarr_syslog("DolibarrModules::_init sql=".$sql, LOG_DEBUG); + dol_syslog("DolibarrModules::_init sql=".$sql, LOG_DEBUG); $result=$this->db->query($sql); if (! $result) { $this->error=$this->db->error(); - dolibarr_syslog("DolibarrModules::_init Error ".$this->error, LOG_ERR); + dol_syslog("DolibarrModules::_init Error ".$this->error, LOG_ERR); $err++; } } @@ -128,7 +128,7 @@ class DolibarrModules if (create_exdir($dir) < 0) { $this->error = $langs->trans("ErrorCanNotCreateDir",$dir); - dolibarr_syslog("DolibarrModules::_init ".$this->error, LOG_ERR); + dol_syslog("DolibarrModules::_init ".$this->error, LOG_ERR); } } } @@ -334,13 +334,13 @@ class DolibarrModules $err = 0; $sql = "DELETE FROM ".MAIN_DB_PREFIX."dolibarr_modules WHERE numero=".$this->numero.";"; - dolibarr_syslog("DolibarrModules::_dbactive sql=".$sql, LOG_DEBUG); + dol_syslog("DolibarrModules::_dbactive sql=".$sql, LOG_DEBUG); $this->db->query($sql); $sql = "INSERT INTO ".MAIN_DB_PREFIX."dolibarr_modules (numero,active,active_date,active_version)"; $sql.= " VALUES ("; $sql.= $this->numero.",1,".$this->db->idate(mktime()).",'".$this->version."')"; - dolibarr_syslog("DolibarrModules::_dbactive sql=".$sql, LOG_DEBUG); + dol_syslog("DolibarrModules::_dbactive sql=".$sql, LOG_DEBUG); $this->db->query($sql); return $err; @@ -356,7 +356,7 @@ class DolibarrModules $err = 0; $sql = "DELETE FROM ".MAIN_DB_PREFIX."dolibarr_modules WHERE numero=".$this->numero; - dolibarr_syslog("DolibarrModules::_dbactive sql=".$sql, LOG_DEBUG); + dol_syslog("DolibarrModules::_dbactive sql=".$sql, LOG_DEBUG); $this->db->query($sql); return $err; @@ -372,12 +372,12 @@ class DolibarrModules $err = 0; $sql = "DELETE FROM ".MAIN_DB_PREFIX."const WHERE name = '".$this->const_name."'"; - dolibarr_syslog("DolibarrModules::_active sql=".$sql, LOG_DEBUG); + dol_syslog("DolibarrModules::_active sql=".$sql, LOG_DEBUG); $this->db->query($sql); $sql = "INSERT INTO ".MAIN_DB_PREFIX."const (name,value,visible) VALUES ('".$this->const_name."','1',0)"; - dolibarr_syslog("DolibarrModules::_active sql=".$sql, LOG_DEBUG); + dol_syslog("DolibarrModules::_active sql=".$sql, LOG_DEBUG); if (!$this->db->query($sql)) { $err++; @@ -396,7 +396,7 @@ class DolibarrModules $err = 0; $sql = "DELETE FROM ".MAIN_DB_PREFIX."const WHERE name = '".$this->const_name."'"; - dolibarr_syslog("DolibarrModules::_unactive sql=".$sql); + dol_syslog("DolibarrModules::_unactive sql=".$sql); $this->db->query($sql); return $err; @@ -531,12 +531,12 @@ class DolibarrModules $sql.= " FROM ".MAIN_DB_PREFIX."boxes, ".MAIN_DB_PREFIX."boxes_def"; $sql.= " WHERE ".MAIN_DB_PREFIX."boxes.box_id = ".MAIN_DB_PREFIX."boxes_def.rowid"; $sql.= " AND ".MAIN_DB_PREFIX."boxes_def.file = '".addslashes($file)."'"; - dolibarr_syslog("DolibarrModules::delete_boxes sql=".$sql); + dol_syslog("DolibarrModules::delete_boxes sql=".$sql); $this->db->query($sql); $sql = "DELETE FROM ".MAIN_DB_PREFIX."boxes_def"; $sql.= " WHERE file = '".addslashes($file)."'"; - dolibarr_syslog("DolibarrModules::delete_boxes sql=".$sql); + dol_syslog("DolibarrModules::delete_boxes sql=".$sql); if (! $this->db->query($sql)) { $err++; @@ -559,7 +559,7 @@ class DolibarrModules { $sql = "DELETE FROM ".MAIN_DB_PREFIX."const"; $sql.= " WHERE name = '".$this->const_name."_CSS'"; - dolibarr_syslog("DolibarrModules::delete_style_sheet sql=".$sql); + dol_syslog("DolibarrModules::delete_style_sheet sql=".$sql); if (! $this->db->query($sql)) { $err++; @@ -579,7 +579,7 @@ class DolibarrModules $sql = "DELETE FROM ".MAIN_DB_PREFIX."const"; $sql.= " WHERE name like '".$this->const_name."_TABS_%'"; - dolibarr_syslog("DolibarrModules::delete_tabs sql=".$sql); + dol_syslog("DolibarrModules::delete_tabs sql=".$sql); if (! $this->db->query($sql)) { $err++; @@ -600,7 +600,7 @@ class DolibarrModules { $sql = "INSERT INTO ".MAIN_DB_PREFIX."const (name,type,value,note,visible)"; $sql.= " VALUES ('".$this->const_name."_CSS','chaine','".$this->style_sheet."','Style sheet for module ".$this->name."','0')"; - dolibarr_syslog("DolibarrModules::insert_style_sheet sql=".$sql); + dol_syslog("DolibarrModules::insert_style_sheet sql=".$sql); $resql=$this->db->query($sql); /* Allow duplicate key if (! $resql) @@ -630,7 +630,7 @@ class DolibarrModules { $sql = "INSERT INTO ".MAIN_DB_PREFIX."const (name,type,value,note,visible)"; $sql.= " VALUES ('".$this->const_name."_TABS_".$i."','chaine','".$value."',null,'0')"; - dolibarr_syslog("DolibarrModules::insert_tabs sql=".$sql); + dol_syslog("DolibarrModules::insert_tabs sql=".$sql); $resql=$this->db->query($sql); /* Allow duplicate key if (! $resql) @@ -684,10 +684,10 @@ class DolibarrModules $sql = "INSERT INTO ".MAIN_DB_PREFIX."const (name,type,visible) VALUES ('$name','$type','$visible')"; } - dolibarr_syslog("DolibarrModules::insert_const sql=".$sql); + dol_syslog("DolibarrModules::insert_const sql=".$sql); if (! $this->db->query($sql) ) { - dolibarr_syslog("DolibarrModules::insert_const ".$this->db->lasterror(), LOG_ERR); + dol_syslog("DolibarrModules::insert_const ".$this->db->lasterror(), LOG_ERR); $err++; } } @@ -757,12 +757,12 @@ class DolibarrModules $sql .= "(".$r_id.",'".addslashes($r_desc)."','".$r_modul."','".$r_type."',".$r_def.")"; } - dolibarr_syslog("DolibarrModules::insert_permissions sql=".$sql, LOG_DEBUG); + dol_syslog("DolibarrModules::insert_permissions sql=".$sql, LOG_DEBUG); $resql=$this->db->query($sql); if (! $resql) { if ($this->db->errno() != "DB_ERROR_RECORD_ALREADY_EXISTS") { - dolibarr_syslog("DolibarrModules::insert_permissions error ".$this->db->lasterror(), LOG_ERR); + dol_syslog("DolibarrModules::insert_permissions error ".$this->db->lasterror(), LOG_ERR); $err++; } } @@ -783,7 +783,7 @@ class DolibarrModules $err=0; $sql = "DELETE FROM ".MAIN_DB_PREFIX."rights_def WHERE module = '".$this->rights_class."'"; - dolibarr_syslog("DolibarrModules::delete_permissions sql=".$sql); + dol_syslog("DolibarrModules::delete_permissions sql=".$sql); if (!$this->db->query($sql)) { $err++; @@ -830,7 +830,7 @@ class DolibarrModules else { $this->error="BadDefinitionOfMenuArrayInModuleDescriptor"; - dolibarr_syslog("DolibarrModules::insert_menus ".$this->error." ".$this->menu[$key]['fk_menu'], LOG_ERR); + dol_syslog("DolibarrModules::insert_menus ".$this->error." ".$this->menu[$key]['fk_menu'], LOG_ERR); $err++; } } @@ -854,7 +854,7 @@ class DolibarrModules else { $this->error=$menu->error; - dolibarr_syslog('DolibarrModules::insert_menus result='.$result." ".$this->error, LOG_ERR); + dol_syslog('DolibarrModules::insert_menus result='.$result." ".$this->error, LOG_ERR); $err++; break; } @@ -867,7 +867,7 @@ class DolibarrModules } else { - dolibarr_syslog("DolibarrModules::insert_menus ".$this->error, LOG_ERR); + dol_syslog("DolibarrModules::insert_menus ".$this->error, LOG_ERR); $this->db->rollback(); } @@ -886,7 +886,7 @@ class DolibarrModules $sql = "DELETE FROM ".MAIN_DB_PREFIX."menu"; $sql.= " WHERE module = '".addslashes($this->rights_class)."'"; - dolibarr_syslog("DolibarrModules::delete_menus sql=".$sql); + dol_syslog("DolibarrModules::delete_menus sql=".$sql); $resql=$this->db->query($sql); if (! $resql) { diff --git a/htdocs/includes/modules/action/rapport.pdf.php b/htdocs/includes/modules/action/rapport.pdf.php index 7b7e89bca4edd84e18b28f0ac584923ac14066dc..b523f36726e398b392b69a337415bb432ee8c387 100644 --- a/htdocs/includes/modules/action/rapport.pdf.php +++ b/htdocs/includes/modules/action/rapport.pdf.php @@ -166,7 +166,7 @@ class CommActionRapport $sql.= " AND date_format(a.datep, '%Y') = ".$this->year; $sql.= " ORDER BY a.datep DESC"; - dolibarr_syslog("Rapport.pdf::_page sql=".$sql); + dol_syslog("Rapport.pdf::_page sql=".$sql); $resql=$this->db->query($sql); if ($resql) { @@ -181,7 +181,7 @@ class CommActionRapport $y = max($y, $pdf->GetY(), $y0, $y1, $y2, $y3); // Calculate height of text - $text=dolibarr_trunc(dol_htmlentitiesbr_decode($obj->note),150); + $text=dol_trunc(dol_htmlentitiesbr_decode($obj->note),150); //print 'd'.$text; exit; $nboflines=dol_nboflines($text); $heightlinemax=max(2*$height,$nboflines*$height); @@ -197,15 +197,15 @@ class CommActionRapport $y++; $pdf->SetXY($this->marge_gauche, $y); - $pdf->MultiCell(22, $height, dol_print_date($obj->dp,"day")."\n".dolibarr_print_date($obj->dp,"hour"), 0, 'L', 0); + $pdf->MultiCell(22, $height, dol_print_date($obj->dp,"day")."\n".dol_print_date($obj->dp,"hour"), 0, 'L', 0); $y0 = $pdf->GetY(); $pdf->SetXY(26, $y); - $pdf->MultiCell(32, $height, dolibarr_trunc($outputlangs->convToOutputCharset($obj->societe),32), 0, 'L', 0); + $pdf->MultiCell(32, $height, dol_trunc($outputlangs->convToOutputCharset($obj->societe),32), 0, 'L', 0); $y1 = $pdf->GetY(); $pdf->SetXY(60,$y); - $pdf->MultiCell(32, $height, dolibarr_trunc($outputlangs->convToOutputCharset($obj->libelle),32), 0, 'L', 0); + $pdf->MultiCell(32, $height, dol_trunc($outputlangs->convToOutputCharset($obj->libelle),32), 0, 'L', 0); $y2 = $pdf->GetY(); $pdf->SetXY(106,$y); diff --git a/htdocs/includes/modules/cheque/pdf/pdf_blochet.class.php b/htdocs/includes/modules/cheque/pdf/pdf_blochet.class.php index 3173b9c16f571d74d6ab2ea6212e7bd6e2f8d90e..03a06c3dd3f636107591ab165f8dd2c2b770e43c 100644 --- a/htdocs/includes/modules/cheque/pdf/pdf_blochet.class.php +++ b/htdocs/includes/modules/cheque/pdf/pdf_blochet.class.php @@ -282,10 +282,10 @@ class BordereauChequeBlochet extends FPDF $pdf->MultiCell(20, $this->line_height, $this->lines[$j]->num_chq?$this->lines[$j]->num_chq:'', 0, 'J', 0); $pdf->SetXY (30, $this->tab_top + 10 + $yp); - $pdf->MultiCell(70, $this->line_height, dolibarr_trunc($outputlangs->convToOutputCharset($this->lines[$j]->bank_chq),44), 0, 'J', 0); + $pdf->MultiCell(70, $this->line_height, dol_trunc($outputlangs->convToOutputCharset($this->lines[$j]->bank_chq),44), 0, 'J', 0); $pdf->SetXY (100, $this->tab_top + 10 + $yp); - $pdf->MultiCell(80, $this->line_height, dolibarr_trunc($outputlangs->convToOutputCharset($this->lines[$j]->emetteur_chq),50), 0, 'J', 0); + $pdf->MultiCell(80, $this->line_height, dol_trunc($outputlangs->convToOutputCharset($this->lines[$j]->emetteur_chq),50), 0, 'J', 0); $pdf->SetXY (180, $this->tab_top + 10 + $yp); $pdf->MultiCell(20, $this->line_height, price($this->lines[$j]->amount_chq), 0, 'R', 0); diff --git a/htdocs/includes/modules/commande/mod_commande_marbre.php b/htdocs/includes/modules/commande/mod_commande_marbre.php index f6ce656d2170db9767a17582aea782d67592ab6d..a4db481839320b22b80c7207608cb66511cb9281 100644 --- a/htdocs/includes/modules/commande/mod_commande_marbre.php +++ b/htdocs/includes/modules/commande/mod_commande_marbre.php @@ -108,7 +108,7 @@ class mod_commande_marbre extends ModeleNumRefCommandes } else { - dolibarr_syslog("mod_commande_marbre::getNextValue sql=".$sql); + dol_syslog("mod_commande_marbre::getNextValue sql=".$sql); return -1; } @@ -117,7 +117,7 @@ class mod_commande_marbre extends ModeleNumRefCommandes $yymm = strftime("%y%m",$date); $num = sprintf("%04s",$max+1); - dolibarr_syslog("mod_commande_marbre::getNextValue return ".$this->prefix.$yymm."-".$num); + dol_syslog("mod_commande_marbre::getNextValue return ".$this->prefix.$yymm."-".$num); return $this->prefix.$yymm."-".$num; } diff --git a/htdocs/includes/modules/commande/modules_commande.php b/htdocs/includes/modules/commande/modules_commande.php index 33909442d7c26ecaa4e2798b622c4af00c3bd873..1d43f9ca24e2d988d50f51b1c6238f659a5cad97 100644 --- a/htdocs/includes/modules/commande/modules_commande.php +++ b/htdocs/includes/modules/commande/modules_commande.php @@ -216,8 +216,8 @@ function commande_pdf_create($db, $id, $modele, $outputlangs) else { $outputlangs->charset_output=$sav_charset_output; - dolibarr_syslog("Erreur dans commande_pdf_create"); - dolibarr_print_error($db,$obj->pdferror()); + dol_syslog("Erreur dans commande_pdf_create"); + dol_print_error($db,$obj->pdferror()); return 0; } } diff --git a/htdocs/includes/modules/dons/html_cerfafr.modules.php b/htdocs/includes/modules/dons/html_cerfafr.modules.php index 768a8f52022019b3cf19bca7633af77c325f12be..6ed5809e94ad6b36359eb89b0cb8e38adb1ca431 100644 --- a/htdocs/includes/modules/dons/html_cerfafr.modules.php +++ b/htdocs/includes/modules/dons/html_cerfafr.modules.php @@ -144,7 +144,7 @@ class html_cerfafr extends ModeleDon $html = eregi_replace('__NOW__',dol_print_date($now,'',false,$outputlangs),$html); // Sauve fichier sur disque - dolibarr_syslog("html_cerfafr::write_file $file"); + dol_syslog("html_cerfafr::write_file $file"); $handle=fopen($file,"w"); fwrite($handle,$html); fclose($handle); diff --git a/htdocs/includes/modules/dons/modules_don.php b/htdocs/includes/modules/dons/modules_don.php index 743f620338f52c3a9900f0d1894d89854cb8813e..42b9c7291066d503875d330e5a4470d22d4250eb 100644 --- a/htdocs/includes/modules/dons/modules_don.php +++ b/htdocs/includes/modules/dons/modules_don.php @@ -208,8 +208,8 @@ function don_create($db, $id, $message, $modele, $outputlangs) else { $outputlangs->charset_output=$sav_charset_output; - dolibarr_syslog("Erreur dans don_create"); - dolibarr_print_error($db,$obj->pdferror()); + dol_syslog("Erreur dans don_create"); + dol_print_error($db,$obj->pdferror()); return 0; } } diff --git a/htdocs/includes/modules/expedition/methode_expedition.modules.php b/htdocs/includes/modules/expedition/methode_expedition.modules.php index c88434e99ba7684745bebd35265a5b8963c750f2..0e7243ee5bfb46dca01386f163b0140995b0db58 100644 --- a/htdocs/includes/modules/expedition/methode_expedition.modules.php +++ b/htdocs/includes/modules/expedition/methode_expedition.modules.php @@ -71,7 +71,7 @@ class methode_expedition } else { - dolibarr_print_error($db); + dol_print_error($db); return -1; } return $liste; diff --git a/htdocs/includes/modules/expedition/pdf/ModelePdfExpedition.class.php b/htdocs/includes/modules/expedition/pdf/ModelePdfExpedition.class.php index ef1709a40716552c85e112dad7fd547f7be7a782..8958fcb51092a1347e2378c91560f7d143344116 100644 --- a/htdocs/includes/modules/expedition/pdf/ModelePdfExpedition.class.php +++ b/htdocs/includes/modules/expedition/pdf/ModelePdfExpedition.class.php @@ -147,8 +147,8 @@ function expedition_pdf_create($db, $id, $modele, $outputlangs) else { $outputlangs->charset_output=$sav_charset_output; - dolibarr_syslog("Erreur dans expedition_pdf_create"); - dolibarr_print_error($db,$obj->pdferror()); + dol_syslog("Erreur dans expedition_pdf_create"); + dol_print_error($db,$obj->pdferror()); return 0; } } diff --git a/htdocs/includes/modules/export/export_csv.modules.php b/htdocs/includes/modules/export/export_csv.modules.php index 0c241c065eed5dcdbe93fc6e14b7a33a3502fa38..d829c624334d190118e6edb4a9c49d9cd6287dda 100644 --- a/htdocs/includes/modules/export/export_csv.modules.php +++ b/htdocs/includes/modules/export/export_csv.modules.php @@ -110,7 +110,7 @@ class ExportCsv extends ModeleExports { global $langs; - dolibarr_syslog("ExportCsv::open_file file=".$file); + dol_syslog("ExportCsv::open_file file=".$file); $ret=1; @@ -169,7 +169,7 @@ class ExportCsv extends ModeleExports foreach($array_selected_sorted as $code => $value) { $alias=$array_alias[$code]; - if (empty($alias)) dolibarr_print_error('','Bad value for field with code='.$code.'. Try to redefine export.'); + if (empty($alias)) dol_print_error('','Bad value for field with code='.$code.'. Try to redefine export.'); $newvalue=$outputlangs->convToOutputCharset($objp->$alias); // Translation newvalue diff --git a/htdocs/includes/modules/export/export_excel.modules.php b/htdocs/includes/modules/export/export_excel.modules.php index 61de5deb95959cc998e552242dd14ba3e7ecb024..0b4f5c0abe91b50e408667ddb6ec60eb6900dd7e 100644 --- a/htdocs/includes/modules/export/export_excel.modules.php +++ b/htdocs/includes/modules/export/export_excel.modules.php @@ -116,7 +116,7 @@ class ExportExcel extends ModeleExports $outputlangs->charset_output='ISO-8859-1'; // Because Excel 5 format is ISO - dolibarr_syslog("ExportExcel::open_file file=".$file); + dol_syslog("ExportExcel::open_file file=".$file); $ret=1; @@ -164,7 +164,7 @@ class ExportExcel extends ModeleExports { $alias=$array_export_fields_label[$code]; //print "dd".$alias; - if (empty($alias)) dolibarr_print_error('','Bad value for field with code='.$code.'. Try to redefine export.'); + if (empty($alias)) dol_print_error('','Bad value for field with code='.$code.'. Try to redefine export.'); $this->worksheet->write($this->row, $this->col, $outputlangs->transnoentities($alias), $formatheader); $this->col++; } diff --git a/htdocs/includes/modules/export/export_tsv.modules.php b/htdocs/includes/modules/export/export_tsv.modules.php index 5c4ebcc72cfac6cfaf3d916126a748e2d4ff97af..325f7b416cad451735e6c77e8fe186ca6bed24e7 100644 --- a/htdocs/includes/modules/export/export_tsv.modules.php +++ b/htdocs/includes/modules/export/export_tsv.modules.php @@ -107,7 +107,7 @@ class ExportTsv extends ModeleExports { global $langs; - dolibarr_syslog("ExportTsv::open_file file=".$file); + dol_syslog("ExportTsv::open_file file=".$file); $ret=1; @@ -160,7 +160,7 @@ class ExportTsv extends ModeleExports foreach($array_selected_sorted as $code => $value) { $alias=$array_alias[$code]; - if (empty($alias)) dolibarr_print_error('','Bad value for field with code='.$code.'. Try to redefine export.'); + if (empty($alias)) dol_print_error('','Bad value for field with code='.$code.'. Try to redefine export.'); $newvalue=$objp->$alias; // Translation newvalue diff --git a/htdocs/includes/modules/export/modules_export.php b/htdocs/includes/modules/export/modules_export.php index 5ae3ce2dada722d502519ea7e0de9f7298ab5a90..01103914f8e2b878bf1d3fd66a9c4f101f3beec5 100644 --- a/htdocs/includes/modules/export/modules_export.php +++ b/htdocs/includes/modules/export/modules_export.php @@ -57,7 +57,7 @@ class ModeleExports */ function liste_modeles($db) { - dolibarr_syslog("ModeleExport::loadFormat"); + dol_syslog("ModeleExport::loadFormat"); $dir=DOL_DOCUMENT_ROOT."/includes/modules/export/"; $handle=opendir($dir); @@ -136,7 +136,7 @@ class ModeleExports { global $langs; - dolibarr_syslog("Export::build_file $model, $datatoexport, $array_selected"); + dol_syslog("Export::build_file $model, $datatoexport, $array_selected"); // Creation de la classe d'export du model ExportXXX $dir = DOL_DOCUMENT_ROOT . "/includes/modules/export/"; @@ -168,7 +168,7 @@ class ModeleExports else { $this->error=$this->db->error(); - dolibarr_syslog("Error: sql=$sql ".$this->error); + dol_syslog("Error: sql=$sql ".$this->error); return -1; } } diff --git a/htdocs/includes/modules/facture/modules_facture.php b/htdocs/includes/modules/facture/modules_facture.php index d172cfeeca5bbe7075a9ed4c2ad2022dd0231aab..2b54a72d2070a646698b7911d4612413948d680d 100644 --- a/htdocs/includes/modules/facture/modules_facture.php +++ b/htdocs/includes/modules/facture/modules_facture.php @@ -77,7 +77,7 @@ class ModelePDFFactures extends FPDF } else { - dolibarr_print_error($db); + dol_print_error($db); return -1; } return $liste; @@ -213,14 +213,14 @@ function facture_pdf_create($db, $id, $message, $modele, $outputlangs) else { $outputlangs->charset_output=$sav_charset_output; - dolibarr_print_error($db,"facture_pdf_create Error: ".$obj->error); + dol_print_error($db,"facture_pdf_create Error: ".$obj->error); return -1; } } else { - dolibarr_print_error('',$langs->trans("Error")." ".$langs->trans("ErrorFileDoesNotExists",$dir.$file)); + dol_print_error('',$langs->trans("Error")." ".$langs->trans("ErrorFileDoesNotExists",$dir.$file)); return -1; } } diff --git a/htdocs/includes/modules/facture/pdf_crabe.modules.php b/htdocs/includes/modules/facture/pdf_crabe.modules.php index e204e235e60514711c45846c1609b42df68cc07b..ab843fbd01b43420d63098ae9fbe57a8fe2fa866 100644 --- a/htdocs/includes/modules/facture/pdf_crabe.modules.php +++ b/htdocs/includes/modules/facture/pdf_crabe.modules.php @@ -470,7 +470,7 @@ class pdf_crabe extends ModelePDFFactures else { $this->error=$this->db->lasterror(); - dolibarr_syslog($this->db,$this->error); + dol_syslog($this->db,$this->error); return -1; } @@ -529,7 +529,7 @@ class pdf_crabe extends ModelePDFFactures else { $this->error=$this->db->lasterror(); - dolibarr_syslog($this->db,$this->error); + dol_syslog($this->db,$this->error); return -1; } @@ -984,7 +984,7 @@ class pdf_crabe extends ModelePDFFactures $posy+=5; $pdf->SetXY(100,$posy); $pdf->SetTextColor(0,0,60); - $pdf->MultiCell(100, 3, $outputlangs->transnoentities("DateInvoice")." : " . dolibarr_print_date($object->date,"day",false,$outpulangs), '', 'R'); + $pdf->MultiCell(100, 3, $outputlangs->transnoentities("DateInvoice")." : " . dol_print_date($object->date,"day",false,$outpulangs), '', 'R'); if ($object->type != 2) { diff --git a/htdocs/includes/modules/facture/pdf_oursin.modules.php b/htdocs/includes/modules/facture/pdf_oursin.modules.php index 1d8e3725de196cc9bb988af8f2b1942e22250e98..273d263978db049387a29d5fb87103dd94f6caac 100644 --- a/htdocs/includes/modules/facture/pdf_oursin.modules.php +++ b/htdocs/includes/modules/facture/pdf_oursin.modules.php @@ -382,7 +382,7 @@ class pdf_oursin extends ModelePDFFactures else { $this->error=$outputlangs->trans("ErrorSQL")." sql=".$sql; - dolibarr_syslog($this->db,$this->error, LOG_ERR); + dol_syslog($this->db,$this->error, LOG_ERR); return -1; } @@ -442,7 +442,7 @@ class pdf_oursin extends ModelePDFFactures else { $this->error=$outputlangs->trans("ErrorSQL")." sql=".$sql; - dolibarr_syslog($this->db,$this->error, LOG_ERR); + dol_syslog($this->db,$this->error, LOG_ERR); return -1; } diff --git a/htdocs/includes/modules/facture/terre/terre.modules.php b/htdocs/includes/modules/facture/terre/terre.modules.php index 0ac07f847422c3fa1d12728d9a6122d07fbfedc6..4ae6811df4fed985f65ffecf8c2cc0a8fdd33132 100644 --- a/htdocs/includes/modules/facture/terre/terre.modules.php +++ b/htdocs/includes/modules/facture/terre/terre.modules.php @@ -134,7 +134,7 @@ class mod_facture_terre extends ModeleNumRefFactures } else { - dolibarr_syslog("mod_facture_terre::getNextValue sql=".$sql); + dol_syslog("mod_facture_terre::getNextValue sql=".$sql); return -1; } @@ -143,7 +143,7 @@ class mod_facture_terre extends ModeleNumRefFactures $yymm = strftime("%y%m",$date); $num = sprintf("%04s",$max+1); - dolibarr_syslog("mod_facture_terre::getNextValue return ".$prefix.$yymm."-".$num); + dol_syslog("mod_facture_terre::getNextValue return ".$prefix.$yymm."-".$num); return $prefix.$yymm."-".$num; } diff --git a/htdocs/includes/modules/fichinter/modules_fichinter.php b/htdocs/includes/modules/fichinter/modules_fichinter.php index 1fa8b6cf7d86a8bbb3e26f59d978a3f0c03c6ab3..882832b9b2486fc25b50c2d189ef7b9c7ee34d76 100644 --- a/htdocs/includes/modules/fichinter/modules_fichinter.php +++ b/htdocs/includes/modules/fichinter/modules_fichinter.php @@ -182,7 +182,7 @@ function fichinter_create($db, $object, $modele='', $outputlangs='') } else { - dolibarr_syslog("Error ".$langs->trans("Error_FICHEINTER_ADDON_PDF_NotDefined"), LOG_ERR); + dol_syslog("Error ".$langs->trans("Error_FICHEINTER_ADDON_PDF_NotDefined"), LOG_ERR); print "Error ".$langs->trans("Error_FICHEINTER_ADDON_PDF_NotDefined"); return 0; } @@ -197,7 +197,7 @@ function fichinter_create($db, $object, $modele='', $outputlangs='') $obj = new $classname($db); - dolibarr_syslog("fichinter_create build PDF", LOG_DEBUG); + dol_syslog("fichinter_create build PDF", LOG_DEBUG); // We save charset_output to restore it because write_file can change it if needed for // output format that does not support UTF8. @@ -210,7 +210,7 @@ function fichinter_create($db, $object, $modele='', $outputlangs='') else { $outputlangs->charset_output=$sav_charset_output; - dolibarr_print_error($db,$obj->pdferror()); + dol_print_error($db,$obj->pdferror()); return 0; } } diff --git a/htdocs/includes/modules/fichinter/pdf_soleil.modules.php b/htdocs/includes/modules/fichinter/pdf_soleil.modules.php index 6cbcf6af6477de9bddf9f196045f4246b4841583..fbd0a35c15f6c3a9a80b290efe9411ad9247c002 100644 --- a/htdocs/includes/modules/fichinter/pdf_soleil.modules.php +++ b/htdocs/includes/modules/fichinter/pdf_soleil.modules.php @@ -104,7 +104,7 @@ class pdf_soleil extends ModelePDFFicheinter $result=$fichinter->fetch($id); if ($result < 0) { - dolibarr_print_error($db,$fichinter->error); + dol_print_error($db,$fichinter->error); } } @@ -271,7 +271,7 @@ class pdf_soleil extends ModelePDFFicheinter $pdf->MultiCell(0, 4, '', 0, 'J'); // Set interline to 4 - //dolibarr_syslog("desc=".dol_htmlentitiesbr($fichinter->description)); + //dol_syslog("desc=".dol_htmlentitiesbr($fichinter->description)); $num = sizeof($fichinter->lignes); $i=0;$j=0; $height=9; diff --git a/htdocs/includes/modules/livraison/modules_livraison.php b/htdocs/includes/modules/livraison/modules_livraison.php index cf877d6dc7424ecbe8d19118029c856a4b77ec27..a1475acae120dcde6c1971835c2b7df0dd7b1655 100644 --- a/htdocs/includes/modules/livraison/modules_livraison.php +++ b/htdocs/includes/modules/livraison/modules_livraison.php @@ -206,8 +206,8 @@ function delivery_order_pdf_create($db, $deliveryid, $modele='', $outputlangs='' else { $outputlangs->charset_output=$sav_charset_output; - dolibarr_syslog("Erreur dans delivery_order_pdf_create"); - dolibarr_print_error($db,$obj->pdferror()); + dol_syslog("Erreur dans delivery_order_pdf_create"); + dol_print_error($db,$obj->pdferror()); return 0; } } diff --git a/htdocs/includes/modules/livraison/pdf/pdf_sirocco.modules.php b/htdocs/includes/modules/livraison/pdf/pdf_sirocco.modules.php index f5aad96e6caf70bc67f2973be80a0300a4afb610..ab5d99e25b7b98cbb067b2a1ea8bb834d820b3cc 100644 --- a/htdocs/includes/modules/livraison/pdf/pdf_sirocco.modules.php +++ b/htdocs/includes/modules/livraison/pdf/pdf_sirocco.modules.php @@ -117,7 +117,7 @@ class pdf_sirocco extends ModelePDFDeliveryOrder $delivery->id = $id; if ($result < 0) { - dolibarr_print_error($db,$delivery->error); + dol_print_error($db,$delivery->error); } } diff --git a/htdocs/includes/modules/livraison/pdf/pdf_typhon.modules.php b/htdocs/includes/modules/livraison/pdf/pdf_typhon.modules.php index d9017e10ee6789eabc9631ddd1575fff5c933ffe..d5e1294739b770bb758d4b9580eea6e403574b42 100644 --- a/htdocs/includes/modules/livraison/pdf/pdf_typhon.modules.php +++ b/htdocs/includes/modules/livraison/pdf/pdf_typhon.modules.php @@ -138,7 +138,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder if ($result < 0) { - dolibarr_print_error($db,$delivery->error); + dol_print_error($db,$delivery->error); } } diff --git a/htdocs/includes/modules/mailings/fraise.modules.php b/htdocs/includes/modules/mailings/fraise.modules.php index 8c93a001224d0d9b300ce23543a1225bf5f6e00e..d146b1d067b3a2c16e5fdfee92fb6116755bdd2d 100644 --- a/htdocs/includes/modules/mailings/fraise.modules.php +++ b/htdocs/includes/modules/mailings/fraise.modules.php @@ -149,7 +149,7 @@ class mailing_fraise extends MailingTargets $i = 0; $j = 0; - dolibarr_syslog(get_class($this)."::add_to_target mailing ".$num." targets found"); + dol_syslog(get_class($this)."::add_to_target mailing ".$num." targets found"); $old = ''; while ($i < $num) @@ -174,7 +174,7 @@ class mailing_fraise extends MailingTargets } else { - dolibarr_syslog($this->db->error()); + dol_syslog($this->db->error()); $this->error=$this->db->error(); return -1; } diff --git a/htdocs/includes/modules/mailings/kiwi.modules.php b/htdocs/includes/modules/mailings/kiwi.modules.php index 73b80f40d53c3ae4876d05a2cf5308939e4daa87..786cd9e71fd1ba307cb48157814257c0894b9ada 100644 --- a/htdocs/includes/modules/mailings/kiwi.modules.php +++ b/htdocs/includes/modules/mailings/kiwi.modules.php @@ -76,7 +76,7 @@ class mailing_kiwi extends MailingTargets $i = 0; $j = 0; - dolibarr_syslog(get_class($this)."::add_to_target mailing ".$num." targets found"); + dol_syslog(get_class($this)."::add_to_target mailing ".$num." targets found"); $old = ''; while ($i < $num) @@ -101,7 +101,7 @@ class mailing_kiwi extends MailingTargets } else { - dolibarr_syslog($this->db->error()); + dol_syslog($this->db->error()); $this->error=$this->db->error(); return -1; } diff --git a/htdocs/includes/modules/mailings/modules_mailings.php b/htdocs/includes/modules/mailings/modules_mailings.php index b003cbab3bb6a8b33ea052e6b9abe83220c4c6a3..5776ec8f0ab0acd14e84150baeca7ebb8c3408f8 100644 --- a/htdocs/includes/modules/mailings/modules_mailings.php +++ b/htdocs/includes/modules/mailings/modules_mailings.php @@ -114,7 +114,7 @@ class MailingTargets $sql .= " SET nbemail = ".$nb." WHERE rowid = ".$mailing_id; if (!$this->db->query($sql)) { - dolibarr_syslog($this->db->error()); + dol_syslog($this->db->error()); $this->error=$this->db->error(); return -1; } @@ -162,7 +162,7 @@ class MailingTargets if ($this->db->errno() != 'DB_ERROR_RECORD_ALREADY_EXISTS') { // Si erreur autre que doublon - dolibarr_syslog($this->db->error()); + dol_syslog($this->db->error()); $this->error=$this->db->error(); $this->db->rollback(); return -1; @@ -170,7 +170,7 @@ class MailingTargets } } - dolibarr_syslog("MailingTargets::add_to_target: mailing ".$j." targets added"); + dol_syslog("MailingTargets::add_to_target: mailing ".$j." targets added"); $this->update_nb($mailing_id); @@ -189,7 +189,7 @@ class MailingTargets if (! $this->db->query($sql)) { - dolibarr_syslog($this->db->error()); + dol_syslog($this->db->error()); } $this->update_nb($mailing_id); diff --git a/htdocs/includes/modules/mailings/peche.modules.php b/htdocs/includes/modules/mailings/peche.modules.php index 859b1e28faf015fdafb262509359296aaed54c39..183303db12a644a93370897d9b1d3bae1fa6624c 100644 --- a/htdocs/includes/modules/mailings/peche.modules.php +++ b/htdocs/includes/modules/mailings/peche.modules.php @@ -80,7 +80,7 @@ class mailing_peche extends MailingTargets { global $langs; return $langs->trans('LineInFile',$id); - //' - '.$langs->trans("File").' '.dolibarr_trunc( ,12); + //' - '.$langs->trans("File").' '.dol_trunc( ,12); } @@ -181,7 +181,7 @@ class mailing_peche extends MailingTargets return -1; } - dolibarr_syslog(get_class($this)."::add_to_target mailing ".$cpt." targets found"); + dol_syslog(get_class($this)."::add_to_target mailing ".$cpt." targets found"); } else if ($result < 0) { diff --git a/htdocs/includes/modules/mailings/poire.modules.php b/htdocs/includes/modules/mailings/poire.modules.php index dc043ba6acb2db0a51c461fb51dcc50acadcc254..947185109a579d5e04b96f0022d5b0626e7195d9 100644 --- a/htdocs/includes/modules/mailings/poire.modules.php +++ b/htdocs/includes/modules/mailings/poire.modules.php @@ -165,7 +165,7 @@ class mailing_poire extends MailingTargets $i++; } } - else dolibarr_print_error($this->db); + else dol_print_error($this->db); // La requete doit retourner: id, email, fk_contact, name, firstname, other $sql = "SELECT c.rowid as id, c.email as email, c.rowid as fk_contact,"; @@ -194,7 +194,7 @@ class mailing_poire extends MailingTargets $i = 0; $j = 0; - dolibarr_syslog(get_class($this)."::add_to_target mailing ".$num." targets found"); + dol_syslog(get_class($this)."::add_to_target mailing ".$num." targets found"); $old = ''; while ($i < $num) @@ -222,7 +222,7 @@ class mailing_poire extends MailingTargets } else { - dolibarr_syslog($this->db->error()); + dol_syslog($this->db->error()); $this->error=$this->db->error(); return -1; } diff --git a/htdocs/includes/modules/mailings/pomme.modules.php b/htdocs/includes/modules/mailings/pomme.modules.php index aa2464d02319cab21ec74db864169699bd16aa22..972bf110d29c852b34eb6211a291b6de575a5675 100644 --- a/htdocs/includes/modules/mailings/pomme.modules.php +++ b/htdocs/includes/modules/mailings/pomme.modules.php @@ -142,7 +142,7 @@ class mailing_pomme extends MailingTargets $i = 0; $j = 0; - dolibarr_syslog(get_class($this)."::add_to_target mailing ".$num." targets found"); + dol_syslog(get_class($this)."::add_to_target mailing ".$num." targets found"); $old = ''; while ($i < $num) @@ -167,7 +167,7 @@ class mailing_pomme extends MailingTargets } else { - dolibarr_syslog($this->db->error()); + dol_syslog($this->db->error()); $this->error=$this->db->error(); return -1; } diff --git a/htdocs/includes/modules/propale/mod_propale_marbre.php b/htdocs/includes/modules/propale/mod_propale_marbre.php index f25fe96b907fa04d94cc736acd177fb1ad52f136..243e392f4f3f3b219b39fe9c7226bdc8a92f09dd 100644 --- a/htdocs/includes/modules/propale/mod_propale_marbre.php +++ b/htdocs/includes/modules/propale/mod_propale_marbre.php @@ -110,7 +110,7 @@ class mod_propale_marbre extends ModeleNumRefPropales } else { - dolibarr_syslog("mod_propale_marbre::getNextValue sql=".$sql); + dol_syslog("mod_propale_marbre::getNextValue sql=".$sql); return -1; } @@ -119,7 +119,7 @@ class mod_propale_marbre extends ModeleNumRefPropales $yymm = strftime("%y%m",$date); $num = sprintf("%04s",$max+1); - dolibarr_syslog("mod_propale_marbre::getNextValue return ".$this->prefix.$yymm."-".$num); + dol_syslog("mod_propale_marbre::getNextValue return ".$this->prefix.$yymm."-".$num); return $this->prefix.$yymm."-".$num; } diff --git a/htdocs/includes/modules/propale/modules_propale.php b/htdocs/includes/modules/propale/modules_propale.php index 7176311a057d2568f3d4f9180825c995a2c53769..f85a517bf97eda415028a495f426b07791dfbf26 100644 --- a/htdocs/includes/modules/propale/modules_propale.php +++ b/htdocs/includes/modules/propale/modules_propale.php @@ -59,7 +59,7 @@ class ModelePDFPropales extends FPDF $sql.=" FROM ".MAIN_DB_PREFIX."document_model"; $sql.=" WHERE type = '".$type."'"; - dolibarr_syslog("modules_propale::liste_modeles sql=".$sql, LOG_DEBUG); + dol_syslog("modules_propale::liste_modeles sql=".$sql, LOG_DEBUG); $resql = $db->query($sql); if ($resql) { @@ -214,8 +214,8 @@ function propale_pdf_create($db, $id, $modele, $outputlangs) else { $outputlangs->charset_output=$sav_charset_output; - dolibarr_syslog("modules_propale::propale_pdf_create error"); - dolibarr_print_error($db,$obj->pdferror()); + dol_syslog("modules_propale::propale_pdf_create error"); + dol_print_error($db,$obj->pdferror()); return 0; } } diff --git a/htdocs/includes/modules/rapport/pdf_paiement.class.php b/htdocs/includes/modules/rapport/pdf_paiement.class.php index ba108a518513d3d3fc6dd0a762db3861fa79b3b2..bd0735e2b84787802067990ddef76c79330dc62b 100644 --- a/htdocs/includes/modules/rapport/pdf_paiement.class.php +++ b/htdocs/includes/modules/rapport/pdf_paiement.class.php @@ -130,7 +130,7 @@ class pdf_paiement extends FPDF $sql .= " AND date_format(p.datep, '%Y%m') = " . sprintf("%04d%02d",$year,$month); $sql .= " ORDER BY p.datep ASC, pf.fk_paiement ASC"; - dolibarr_syslog("pdf_paiement::write_file sql=".$sql); + dol_syslog("pdf_paiement::write_file sql=".$sql); $result = $this->db->query($sql); if ($result) { @@ -157,7 +157,7 @@ class pdf_paiement extends FPDF } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); } $pages = intval($lignes / $this->line_per_page); @@ -221,7 +221,7 @@ class pdf_paiement extends FPDF global $langs; $title=$outputlangs->transnoentities("ListOfCustomerPayments"); - $title.=' - '.dol_print_date(dolibarr_mktime(0,0,0,$this->month,1,$this->year),"%B %Y",false,$outputlangs,true); + $title.=' - '.dol_print_date(dol_mktime(0,0,0,$this->month,1,$this->year),"%B %Y",false,$outputlangs,true); $pdf->SetFont('Arial','B',12); $pdf->Text(70, 10, $title); diff --git a/htdocs/includes/modules/societe/mod_codeclient_elephant.php b/htdocs/includes/modules/societe/mod_codeclient_elephant.php index e08c5d05e375231e8f99f31768f0a9c1f4b65a4e..19e2615a39222123d23f6cb5e28aa8c1292a1d41 100644 --- a/htdocs/includes/modules/societe/mod_codeclient_elephant.php +++ b/htdocs/includes/modules/societe/mod_codeclient_elephant.php @@ -231,7 +231,7 @@ class mod_codeclient_elephant extends ModeleThirdPartyCode $result=check_value($mask,$code); } - dolibarr_syslog("mod_codeclient_elephant::verif type=".$type." result=".$result); + dol_syslog("mod_codeclient_elephant::verif type=".$type." result=".$result); return $result; } diff --git a/htdocs/includes/modules/societe/mod_codeclient_monkey.php b/htdocs/includes/modules/societe/mod_codeclient_monkey.php index 68440aa5f72b0c2173c0174a119752fd95e0d70f..7d8ce030abac1a63394f0897117197df6b5b004c 100644 --- a/htdocs/includes/modules/societe/mod_codeclient_monkey.php +++ b/htdocs/includes/modules/societe/mod_codeclient_monkey.php @@ -120,7 +120,7 @@ class mod_codeclient_monkey extends ModeleThirdPartyCode } else { - dolibarr_syslog("mod_codeclient_monkey::getNextValue sql=".$sql); + dol_syslog("mod_codeclient_monkey::getNextValue sql=".$sql); return -1; } @@ -129,7 +129,7 @@ class mod_codeclient_monkey extends ModeleThirdPartyCode $yymm = strftime("%y%m",$date); $num = sprintf("%04s",$max+1); - dolibarr_syslog("mod_codeclient_monkey::getNextValue return ".$prefix.$yymm."-".$num); + dol_syslog("mod_codeclient_monkey::getNextValue return ".$prefix.$yymm."-".$num); return $prefix.$yymm."-".$num; } @@ -176,7 +176,7 @@ class mod_codeclient_monkey extends ModeleThirdPartyCode } } } - dolibarr_syslog("mod_codeclient_monkey::verif result=".$result); + dol_syslog("mod_codeclient_monkey::verif result=".$result); return $result; } diff --git a/htdocs/includes/modules/societe/mod_codecompta_aquarium.php b/htdocs/includes/modules/societe/mod_codecompta_aquarium.php index 16470d49156643503cdc4e2d545d524a8f36c1b3..2add754fa2c24ea97591304dac6f92a415b38361 100644 --- a/htdocs/includes/modules/societe/mod_codecompta_aquarium.php +++ b/htdocs/includes/modules/societe/mod_codecompta_aquarium.php @@ -72,7 +72,7 @@ class mod_codecompta_aquarium extends ModeleAccountancyCode $i = 0; $this->db = $DB; - dolibarr_syslog("mod_codecompta_aquarium::get_code search code for type=".$type." company=".$societe->nom); + dol_syslog("mod_codecompta_aquarium::get_code search code for type=".$type." company=".$societe->nom); // Regle gestion compte compta $codetouse=''; @@ -106,7 +106,7 @@ class mod_codecompta_aquarium extends ModeleAccountancyCode // Pour retour $this->code=$codetouse; } - dolibarr_syslog("mod_codecompta_aquarium::get_code found code=".$this->code); + dol_syslog("mod_codecompta_aquarium::get_code found code=".$this->code); return $is_dispo; } @@ -136,19 +136,19 @@ class mod_codecompta_aquarium extends ModeleAccountancyCode { if ($db->num_rows($resql) == 0) { - dolibarr_syslog("mod_codecompta_aquarium::verif code '".$code."' available"); + dol_syslog("mod_codecompta_aquarium::verif code '".$code."' available"); return 1; // Dispo } else { - dolibarr_syslog("mod_codecompta_aquarium::verif code '".$code."' not available"); + dol_syslog("mod_codecompta_aquarium::verif code '".$code."' not available"); return 0; // Non dispo } } else { $this->error=$db->error()." sql=".$sql; - dolibarr_syslog("mod_codecompta_aquarium::verif error".$this->error); + dol_syslog("mod_codecompta_aquarium::verif error".$this->error); return -1; // Erreur } } diff --git a/htdocs/includes/modules/supplier_order/modules_commandefournisseur.php b/htdocs/includes/modules/supplier_order/modules_commandefournisseur.php index 9630dfa0048749bd0480fbee746d0c6245e33b43..59b8c6e8d82fa86dc25a2ea81329852ecb5d350f 100644 --- a/htdocs/includes/modules/supplier_order/modules_commandefournisseur.php +++ b/htdocs/includes/modules/supplier_order/modules_commandefournisseur.php @@ -205,8 +205,8 @@ function supplier_order_pdf_create($db, $comid, $modele,$outputlangs) else { $outputlangs->charset_output=$sav_charset_output; - dolibarr_syslog("Erreur dans supplier_order_pdf_create"); - dolibarr_print_error($db,$obj->pdferror()); + dol_syslog("Erreur dans supplier_order_pdf_create"); + dol_print_error($db,$obj->pdferror()); return 0; } } diff --git a/htdocs/includes/triggers/interface_all_Logevents.class.php b/htdocs/includes/triggers/interface_all_Logevents.class.php index 627870657277e827402c4fa3a87e2f0c8761bafe..9f1da9bb8e4c3d09951791ccb875178c52566147 100644 --- a/htdocs/includes/triggers/interface_all_Logevents.class.php +++ b/htdocs/includes/triggers/interface_all_Logevents.class.php @@ -100,13 +100,13 @@ class InterfaceLogevents if (! empty($conf->global->MAIN_LOGEVENTS_DISABLE_ALL)) return 0; // Log events is disabled (hidden features) $key='MAIN_LOGEVENTS_'.$action; - //dolibarr_syslog("xxxxxxxxxxx".$key); + //dol_syslog("xxxxxxxxxxx".$key); if (empty($conf->global->$key)) return 0; // Log events not enabled for this action // Actions if ($action == 'USER_LOGIN') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); // Initialisation donnees (date,duree,texte,desc) $this->date=time(); @@ -116,7 +116,7 @@ class InterfaceLogevents } if ($action == 'USER_LOGIN_FAILED') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); // Initialisation donnees (date,duree,texte,desc) $this->date=time(); @@ -126,7 +126,7 @@ class InterfaceLogevents } if ($action == 'USER_CREATE') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("users"); // Initialisation donnees (date,duree,texte,desc) @@ -137,7 +137,7 @@ class InterfaceLogevents } elseif ($action == 'USER_MODIFY') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("users"); // Initialisation donnees (date,duree,texte,desc) @@ -148,7 +148,7 @@ class InterfaceLogevents } elseif ($action == 'USER_NEW_PASSWORD') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("users"); // Initialisation donnees (date,duree,texte,desc) @@ -159,7 +159,7 @@ class InterfaceLogevents } elseif ($action == 'USER_ENABLEDISABLE') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("users"); // Initialisation donnees (date,duree,texte,desc) $this->date=time(); @@ -177,7 +177,7 @@ class InterfaceLogevents } elseif ($action == 'USER_DELETE') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("users"); // Initialisation donnees (date,duree,texte,desc) $this->date=time(); @@ -189,7 +189,7 @@ class InterfaceLogevents // Groupes elseif ($action == 'GROUP_CREATE') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("users"); // Initialisation donnees (date,duree,texte,desc) $this->date=time(); @@ -199,7 +199,7 @@ class InterfaceLogevents } elseif ($action == 'GROUP_MODIFY') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("users"); // Initialisation donnees (date,duree,texte,desc) $this->date=time(); @@ -209,7 +209,7 @@ class InterfaceLogevents } elseif ($action == 'GROUP_DELETE') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("users"); // Initialisation donnees (date,duree,texte,desc) $this->date=time(); @@ -221,7 +221,7 @@ class InterfaceLogevents // Actions if ($action == 'ACTION_CREATE') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("other"); // Initialisation donnees (date,duree,texte,desc) @@ -250,7 +250,7 @@ class InterfaceLogevents // Third parties elseif ($action == 'COMPANY_CREATE') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("other"); // Initialisation donnees (date,duree,texte,desc) @@ -267,7 +267,7 @@ class InterfaceLogevents // Contracts elseif ($action == 'CONTRACT_VALIDATE') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("other"); // Initialisation donnees (date,duree,texte,desc) @@ -279,7 +279,7 @@ class InterfaceLogevents } elseif ($action == 'CONTRACT_CANCEL') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("other"); $this->date=time(); @@ -290,7 +290,7 @@ class InterfaceLogevents } elseif ($action == 'CONTRACT_CLOSE') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("other"); $this->date=time(); @@ -303,7 +303,7 @@ class InterfaceLogevents // Proposals elseif ($action == 'PROPAL_VALIDATE') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("other"); $this->date=time(); @@ -314,7 +314,7 @@ class InterfaceLogevents } elseif ($action == 'PROPAL_CLOSE_SIGNED') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("other"); $this->date=time(); @@ -325,7 +325,7 @@ class InterfaceLogevents } elseif ($action == 'PROPAL_CLOSE_REFUSED') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("other"); $this->date=time(); @@ -338,7 +338,7 @@ class InterfaceLogevents // Invoices elseif ($action == 'BILL_VALIDATE') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("other"); $this->date=time(); @@ -349,7 +349,7 @@ class InterfaceLogevents } elseif ($action == 'BILL_PAYED') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("other"); $this->date=time(); @@ -360,7 +360,7 @@ class InterfaceLogevents } elseif ($action == 'BILL_CANCELED') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("other"); $this->date=time(); @@ -373,7 +373,7 @@ class InterfaceLogevents // Payments elseif ($action == 'PAYMENT_CUSTOMER_CREATE') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("other"); $this->date=time(); @@ -385,7 +385,7 @@ class InterfaceLogevents } elseif ($action == 'PAYMENT_SUPPLIER_CREATE') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("other"); $this->date=time(); @@ -399,7 +399,7 @@ class InterfaceLogevents // Members elseif ($action == 'MEMBER_CREATE') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("other"); $langs->load("members"); @@ -413,7 +413,7 @@ class InterfaceLogevents } elseif ($action == 'MEMBER_VALIDATE') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("other"); $langs->load("members"); @@ -427,7 +427,7 @@ class InterfaceLogevents } elseif ($action == 'MEMBER_SUBSCRIPTION') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("other"); $langs->load("members"); @@ -438,12 +438,12 @@ class InterfaceLogevents $this->desc.="\n".$langs->transnoentities("Member").': '.$object->fullname; $this->desc.="\n".$langs->transnoentities("Type").': '.$object->type; $this->desc.="\n".$langs->transnoentities("Amount").': '.$object->last_subscription_amount; - $this->desc.="\n".$langs->transnoentities("Period").': '.dolibarr_print_date($object->last_subscription_date_start,'day').' - '.dolibarr_print_date($object->last_subscription_date_end,'day'); + $this->desc.="\n".$langs->transnoentities("Period").': '.dol_print_date($object->last_subscription_date_start,'day').' - '.dol_print_date($object->last_subscription_date_end,'day'); $this->desc.="\n".$langs->transnoentities("Author").': '.$user->login; } elseif ($action == 'MEMBER_MODIFY') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("other"); $langs->load("members"); @@ -457,7 +457,7 @@ class InterfaceLogevents } elseif ($action == 'MEMBER_RESILIATE') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("other"); $langs->load("members"); @@ -471,7 +471,7 @@ class InterfaceLogevents } elseif ($action == 'MEMBER_DELETE') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("other"); $langs->load("members"); @@ -488,7 +488,7 @@ class InterfaceLogevents /* else { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' was ran by ".__FILE__." but no handler found for this action."); + dol_syslog("Trigger '".$this->name."' for action '$action' was ran by ".__FILE__." but no handler found for this action."); return 0; } */ @@ -514,7 +514,7 @@ class InterfaceLogevents $error ="Failed to insert security event: ".$event->error; $this->error=$error; - dolibarr_syslog("interface_all_Logevents.class.php: ".$this->error); + dol_syslog("interface_all_Logevents.class.php: ".$this->error); return -1; } } diff --git a/htdocs/includes/triggers/interface_modAgenda_ActionsAuto.class.php b/htdocs/includes/triggers/interface_modAgenda_ActionsAuto.class.php index 06e825924353c0f5cfeada25ca9863bef486f3ca..e97d3c083c7a110ce8b48de402d4f412ffaa9e43 100644 --- a/htdocs/includes/triggers/interface_modAgenda_ActionsAuto.class.php +++ b/htdocs/includes/triggers/interface_modAgenda_ActionsAuto.class.php @@ -99,7 +99,7 @@ class InterfaceActionsAuto function run_trigger($action,$object,$user,$langs,$conf) { $key='MAIN_AGENDA_ACTIONAUTO_'.$action; - //dolibarr_syslog("xxxxxxxxxxx".$key); + //dol_syslog("xxxxxxxxxxx".$key); if (empty($conf->global->$key)) return 0; // Log events not enabled for this action // Following properties must be filled: @@ -118,7 +118,7 @@ class InterfaceActionsAuto // Actions if ($action == 'COMPANY_CREATE') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("other"); $langs->load("agenda"); @@ -137,7 +137,7 @@ class InterfaceActionsAuto } elseif ($action == 'CONTRACT_VALIDATE') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("other"); $langs->load("contracts"); $langs->load("agenda"); @@ -153,7 +153,7 @@ class InterfaceActionsAuto } elseif ($action == 'PROPAL_VALIDATE') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("propal"); $langs->load("agenda"); @@ -169,7 +169,7 @@ class InterfaceActionsAuto } elseif ($action == 'PROPAL_SENTBYMAIL') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("propal"); $langs->load("agenda"); $ok=1; @@ -178,7 +178,7 @@ class InterfaceActionsAuto } elseif ($action == 'PROPAL_CLOSE_SIGNED') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("propal"); $langs->load("agenda"); @@ -194,7 +194,7 @@ class InterfaceActionsAuto } elseif ($action == 'PROPAL_CLOSE_REFUSED') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("propal"); $langs->load("agenda"); @@ -210,7 +210,7 @@ class InterfaceActionsAuto } elseif ($action == 'ORDER_VALIDATE') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("orders"); $langs->load("agenda"); @@ -226,7 +226,7 @@ class InterfaceActionsAuto } elseif ($action == 'ORDER_SENTBYMAIL') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("orders"); $langs->load("agenda"); $ok=1; @@ -235,7 +235,7 @@ class InterfaceActionsAuto } elseif ($action == 'BILL_VALIDATE') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("other"); $langs->load("bills"); $langs->load("agenda"); @@ -252,7 +252,7 @@ class InterfaceActionsAuto } elseif ($action == 'BILL_SENTBYMAIL') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("other"); $langs->load("bills"); $langs->load("agenda"); @@ -262,7 +262,7 @@ class InterfaceActionsAuto } elseif ($action == 'BILL_PAYED') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("other"); $langs->load("bills"); $langs->load("agenda"); @@ -279,7 +279,7 @@ class InterfaceActionsAuto } elseif ($action == 'BILL_CANCELED') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("other"); $langs->load("bills"); $langs->load("agenda"); @@ -296,7 +296,7 @@ class InterfaceActionsAuto } elseif ($action == 'ORDER_SUPPLIER_VALIDATE') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("orders"); $langs->load("agenda"); @@ -312,7 +312,7 @@ class InterfaceActionsAuto } elseif ($action == 'BILL_SUPPLIER_VALIDATE') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("other"); $langs->load("bills"); $langs->load("agenda"); @@ -331,7 +331,7 @@ class InterfaceActionsAuto // Members elseif ($action == 'MEMBER_VALIDATE') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("other"); $langs->load("members"); $langs->load("agenda"); @@ -350,7 +350,7 @@ class InterfaceActionsAuto } elseif ($action == 'MEMBER_SUBSCRIPTION') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("other"); $langs->load("members"); $langs->load("agenda"); @@ -361,7 +361,7 @@ class InterfaceActionsAuto $object->actionmsg.="\n".$langs->transnoentities("Member").': '.$object->fullname; $object->actionmsg.="\n".$langs->transnoentities("Type").': '.$object->type; $object->actionmsg.="\n".$langs->transnoentities("Amount").': '.$object->last_subscription_amount; - $object->actionmsg.="\n".$langs->transnoentities("Period").': '.dolibarr_print_date($object->last_subscription_date_start,'day').' - '.dolibarr_print_date($object->last_subscription_date_end,'day'); + $object->actionmsg.="\n".$langs->transnoentities("Period").': '.dol_print_date($object->last_subscription_date_start,'day').' - '.dol_print_date($object->last_subscription_date_end,'day'); $object->actionmsg.="\n".$langs->transnoentities("Author").': '.$user->login; $object->sendtoid=0; @@ -370,11 +370,11 @@ class InterfaceActionsAuto } elseif ($action == 'MEMBER_MODIFY') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); } elseif ($action == 'MEMBER_RESILIATE') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("other"); $langs->load("members"); $langs->load("agenda"); @@ -392,7 +392,7 @@ class InterfaceActionsAuto } elseif ($action == 'MEMBER_DELETE') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("other"); $langs->load("members"); $langs->load("agenda"); @@ -413,7 +413,7 @@ class InterfaceActionsAuto /* else { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' was ran by ".__FILE__." but no handler found for this action."); + dol_syslog("Trigger '".$this->name."' for action '$action' was ran by ".__FILE__." but no handler found for this action."); return 0; } */ @@ -453,7 +453,7 @@ class InterfaceActionsAuto $error ="Failed to insert : ".$actioncomm->error." "; $this->error=$error; - dolibarr_syslog("interface_modAgenda_ActionsAuto.class.php: ".$this->error); + dol_syslog("interface_modAgenda_ActionsAuto.class.php: ".$this->error); return -1; } } diff --git a/htdocs/includes/triggers/interface_modLdap_Ldapsynchro.class.php b/htdocs/includes/triggers/interface_modLdap_Ldapsynchro.class.php index 8dd70a540ffa00d2e4ae33d1a21d046b9db212cc..c018f4df571e5e32b363717b758a48eadef0e23c 100644 --- a/htdocs/includes/triggers/interface_modLdap_Ldapsynchro.class.php +++ b/htdocs/includes/triggers/interface_modLdap_Ldapsynchro.class.php @@ -103,14 +103,14 @@ class InterfaceLdapsynchro if (! function_exists('ldap_connect')) { - dolibarr_syslog("Warning, module LDAP is enabled but LDAP functions not available in this PHP", LOG_WARNING); + dol_syslog("Warning, module LDAP is enabled but LDAP functions not available in this PHP", LOG_WARNING); return 0; } // Users if ($action == 'USER_CREATE') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); if ($conf->ldap->enabled && $conf->global->LDAP_SYNCHRO_ACTIVE == 'dolibarr2ldap') { $ldap=new Ldap(); @@ -129,7 +129,7 @@ class InterfaceLdapsynchro } elseif ($action == 'USER_MODIFY') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); if ($conf->ldap->enabled && $conf->global->LDAP_SYNCHRO_ACTIVE == 'dolibarr2ldap') { $ldap=new Ldap(); @@ -148,15 +148,15 @@ class InterfaceLdapsynchro } elseif ($action == 'USER_NEW_PASSWORD') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); } elseif ($action == 'USER_ENABLEDISABLE') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); } elseif ($action == 'USER_DELETE') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); if ($conf->ldap->enabled && $conf->global->LDAP_SYNCHRO_ACTIVE == 'dolibarr2ldap') { $ldap=new Ldap(); @@ -233,7 +233,7 @@ class InterfaceLdapsynchro // Contacts elseif ($action == 'CONTACT_CREATE') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); if ($conf->ldap->enabled && $conf->global->LDAP_CONTACT_ACTIVE) { $ldap=new Ldap(); @@ -252,7 +252,7 @@ class InterfaceLdapsynchro } elseif ($action == 'CONTACT_MODIFY') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); if ($conf->ldap->enabled && $conf->global->LDAP_CONTACT_ACTIVE) { $ldap=new Ldap(); @@ -271,7 +271,7 @@ class InterfaceLdapsynchro } elseif ($action == 'CONTACT_DELETE') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); if ($conf->ldap->enabled && $conf->global->LDAP_CONTACT_ACTIVE) { $ldap=new Ldap(); @@ -292,7 +292,7 @@ class InterfaceLdapsynchro // Members elseif ($action == 'MEMBER_CREATE') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); if ($conf->ldap->enabled && $conf->global->LDAP_MEMBER_ACTIVE) { $ldap=new Ldap(); @@ -311,7 +311,7 @@ class InterfaceLdapsynchro } elseif ($action == 'MEMBER_VALIDATE') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); if ($conf->ldap->enabled && $conf->global->LDAP_MEMBER_ACTIVE) { # If status field is setup to be synchronized @@ -334,7 +334,7 @@ class InterfaceLdapsynchro } elseif ($action == 'MEMBER_SUBSCRIPTION') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); if ($conf->ldap->enabled && $conf->global->LDAP_MEMBER_ACTIVE) { # If subscriptions fields are setup to be synchronized @@ -361,7 +361,7 @@ class InterfaceLdapsynchro } elseif ($action == 'MEMBER_MODIFY') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); if ($conf->ldap->enabled && $conf->global->LDAP_MEMBER_ACTIVE) { $ldap=new Ldap(); @@ -380,7 +380,7 @@ class InterfaceLdapsynchro } elseif ($action == 'MEMBER_NEW_PASSWORD') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); if ($conf->ldap->enabled && $conf->global->LDAP_MEMBER_ACTIVE) { # If password field is setup to be synchronized @@ -403,7 +403,7 @@ class InterfaceLdapsynchro } elseif ($action == 'MEMBER_RESILIATE') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); if ($conf->ldap->enabled && $conf->global->LDAP_MEMBER_ACTIVE) { # If status field is setup to be synchronized @@ -426,7 +426,7 @@ class InterfaceLdapsynchro } elseif ($action == 'MEMBER_DELETE') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); if ($conf->ldap->enabled && $conf->global->LDAP_MEMBER_ACTIVE) { $ldap=new Ldap(); @@ -448,7 +448,7 @@ class InterfaceLdapsynchro /* else { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' was ran by ".__FILE__." but no handler found for this action."); + dol_syslog("Trigger '".$this->name."' for action '$action' was ran by ".__FILE__." but no handler found for this action."); return -1; } */ diff --git a/htdocs/includes/triggers/interface_modNotification_Notification.class.php b/htdocs/includes/triggers/interface_modNotification_Notification.class.php index bd37e8173365649dbcf4e1f03bebc166c3afe651..5a21a52b9c47c14faedb4df64aaa4875a24767d1 100644 --- a/htdocs/includes/triggers/interface_modNotification_Notification.class.php +++ b/htdocs/includes/triggers/interface_modNotification_Notification.class.php @@ -102,7 +102,7 @@ class InterfaceNotification if ($action == 'BILL_VALIDATE') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $action_notify = 2; $ref = sanitizeFileName($object->ref); @@ -115,7 +115,7 @@ class InterfaceNotification elseif ($action == 'FICHEINTER_VALIDATE') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $action_notify = 1; $ref = sanitizeFileName($object->ref); @@ -128,7 +128,7 @@ class InterfaceNotification elseif ($action == 'ORDER_SUPPLIER_VALIDATE') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $action_notify = 3; $ref = sanitizeFileName($object->ref); @@ -143,7 +143,7 @@ class InterfaceNotification /* else { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' was ran by ".__FILE__." but no handler found for this action."); + dol_syslog("Trigger '".$this->name."' for action '$action' was ran by ".__FILE__." but no handler found for this action."); return -1; } */ diff --git a/htdocs/includes/triggers/interface_modPhenix_Phenixsynchro.class.php b/htdocs/includes/triggers/interface_modPhenix_Phenixsynchro.class.php index 1e2037617e88b1d61c5a5b85dd62225bf321bf5e..433600bdd73e4a063cfed25d74285666a889fd9c 100644 --- a/htdocs/includes/triggers/interface_modPhenix_Phenixsynchro.class.php +++ b/htdocs/includes/triggers/interface_modPhenix_Phenixsynchro.class.php @@ -110,7 +110,7 @@ class InterfacePhenixsynchro // Actions if ($action == 'ACTION_CREATE') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("other"); // Initialisation donnees (date,duree,texte,desc) @@ -139,7 +139,7 @@ class InterfacePhenixsynchro // Third parties elseif ($action == 'COMPANY_CREATE') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("other"); // Initialisation donnees (date,duree,texte,desc) @@ -156,7 +156,7 @@ class InterfacePhenixsynchro // Contracts elseif ($action == 'CONTRACT_VALIDATE') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("other"); // Initialisation donnees (date,duree,texte,desc) @@ -168,7 +168,7 @@ class InterfacePhenixsynchro } elseif ($action == 'CONTRACT_CANCEL') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("other"); $this->date=time(); @@ -179,7 +179,7 @@ class InterfacePhenixsynchro } elseif ($action == 'CONTRACT_CLOSE') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("other"); $this->date=time(); @@ -192,7 +192,7 @@ class InterfacePhenixsynchro // Proposals elseif ($action == 'PROPAL_VALIDATE') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("other"); $this->date=time(); @@ -203,7 +203,7 @@ class InterfacePhenixsynchro } elseif ($action == 'PROPAL_CLOSE_SIGNED') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("other"); $this->date=time(); @@ -214,7 +214,7 @@ class InterfacePhenixsynchro } elseif ($action == 'PROPAL_CLOSE_REFUSED') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("other"); $this->date=time(); @@ -227,7 +227,7 @@ class InterfacePhenixsynchro // Invoices elseif ($action == 'BILL_VALIDATE') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("other"); $this->date=time(); @@ -238,7 +238,7 @@ class InterfacePhenixsynchro } elseif ($action == 'BILL_PAYED') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("other"); $this->date=time(); @@ -249,7 +249,7 @@ class InterfacePhenixsynchro } elseif ($action == 'BILL_CANCELED') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("other"); $this->date=time(); @@ -262,7 +262,7 @@ class InterfacePhenixsynchro // Payments elseif ($action == 'PAYMENT_CUSTOMER_CREATE') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("other"); $this->date=time(); @@ -274,7 +274,7 @@ class InterfacePhenixsynchro } elseif ($action == 'PAYMENT_SUPPLIER_CREATE') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("other"); $this->date=time(); @@ -288,7 +288,7 @@ class InterfacePhenixsynchro // Members elseif ($action == 'MEMBER_CREATE') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("other"); $langs->load("members"); @@ -302,7 +302,7 @@ class InterfacePhenixsynchro } elseif ($action == 'MEMBER_VALIDATE') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("other"); $langs->load("members"); @@ -316,7 +316,7 @@ class InterfacePhenixsynchro } elseif ($action == 'MEMBER_SUBSCRIPTION') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("other"); $langs->load("members"); @@ -327,12 +327,12 @@ class InterfacePhenixsynchro $this->desc.="\n".$langs->transnoentities("Member").': '.$object->fullname; $this->desc.="\n".$langs->transnoentities("Type").': '.$object->type; $this->desc.="\n".$langs->transnoentities("Amount").': '.$object->last_subscription_amount; - $this->desc.="\n".$langs->transnoentities("Period").': '.dolibarr_print_date($object->last_subscription_date_start,'day').' - '.dolibarr_print_date($object->last_subscription_date_end,'day'); + $this->desc.="\n".$langs->transnoentities("Period").': '.dol_print_date($object->last_subscription_date_start,'day').' - '.dol_print_date($object->last_subscription_date_end,'day'); $this->desc.="\n".$langs->transnoentities("Author").': '.$user->login; } elseif ($action == 'MEMBER_MODIFY') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("other"); $langs->load("members"); @@ -346,7 +346,7 @@ class InterfacePhenixsynchro } elseif ($action == 'MEMBER_RESILIATE') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("other"); $langs->load("members"); @@ -360,7 +360,7 @@ class InterfacePhenixsynchro } elseif ($action == 'MEMBER_DELETE') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("other"); $langs->load("members"); @@ -377,7 +377,7 @@ class InterfacePhenixsynchro /* else { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' was ran by ".__FILE__." but no handler found for this action."); + dol_syslog("Trigger '".$this->name."' for action '$action' was ran by ".__FILE__." but no handler found for this action."); return 0; } */ @@ -395,7 +395,7 @@ class InterfacePhenixsynchro $error.="La mise a jour Webcalendar a �t� ignor�e."; $this->error=$error; - //dolibarr_syslog("interface_phenix.class.php: ".$this->error); + //dol_syslog("interface_phenix.class.php: ".$this->error); return -1; } @@ -415,7 +415,7 @@ class InterfacePhenixsynchro $error.="La mise a jour Phenix a �t� ignor�e."; $this->error=$error; - //dolibarr_syslog("interface_phenix.class.php: ".$this->error); + //dol_syslog("interface_phenix.class.php: ".$this->error); return -2; } } diff --git a/htdocs/includes/triggers/interface_modWebcalendar_Webcalsynchro.class.php b/htdocs/includes/triggers/interface_modWebcalendar_Webcalsynchro.class.php index a49bcbba9109fd8f361b442ef0a1bfd098a293c1..cee1deea4a4fb66be66c52c95ddde27f8027e73b 100644 --- a/htdocs/includes/triggers/interface_modWebcalendar_Webcalsynchro.class.php +++ b/htdocs/includes/triggers/interface_modWebcalendar_Webcalsynchro.class.php @@ -109,7 +109,7 @@ class InterfaceWebcalsynchro // Actions if ($action == 'ACTION_CREATE') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("other"); // Initialisation donnees (date,duree,texte,desc) @@ -138,7 +138,7 @@ class InterfaceWebcalsynchro // Third parties elseif ($action == 'COMPANY_CREATE') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("other"); // Initialisation donnees (date,duree,texte,desc) @@ -155,7 +155,7 @@ class InterfaceWebcalsynchro // Contracts elseif ($action == 'CONTRACT_VALIDATE') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("other"); // Initialisation donnees (date,duree,texte,desc) @@ -169,7 +169,7 @@ class InterfaceWebcalsynchro // Proposals elseif ($action == 'PROPAL_VALIDATE') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("other"); $this->date=time(); @@ -180,7 +180,7 @@ class InterfaceWebcalsynchro } elseif ($action == 'PROPAL_CLOSE_SIGNED') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("other"); $this->date=time(); @@ -191,7 +191,7 @@ class InterfaceWebcalsynchro } elseif ($action == 'PROPAL_CLOSE_REFUSED') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("other"); $this->date=time(); @@ -204,7 +204,7 @@ class InterfaceWebcalsynchro // Invoices elseif ($action == 'BILL_VALIDATE') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("other"); $this->date=time(); @@ -215,7 +215,7 @@ class InterfaceWebcalsynchro } elseif ($action == 'BILL_PAYED') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("other"); $this->date=time(); @@ -226,7 +226,7 @@ class InterfaceWebcalsynchro } elseif ($action == 'BILL_CANCELED') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("other"); $this->date=time(); @@ -239,7 +239,7 @@ class InterfaceWebcalsynchro // Payments elseif ($action == 'PAYMENT_CUSTOMER_CREATE') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("other"); $this->date=time(); @@ -251,7 +251,7 @@ class InterfaceWebcalsynchro } elseif ($action == 'PAYMENT_SUPPLIER_CREATE') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("other"); $this->date=time(); @@ -265,7 +265,7 @@ class InterfaceWebcalsynchro // Members elseif ($action == 'MEMBER_CREATE') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("other"); $langs->load("members"); @@ -279,7 +279,7 @@ class InterfaceWebcalsynchro } elseif ($action == 'MEMBER_VALIDATE') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("other"); $langs->load("members"); @@ -293,7 +293,7 @@ class InterfaceWebcalsynchro } elseif ($action == 'MEMBER_SUBSCRIPTION') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("other"); $langs->load("members"); @@ -304,12 +304,12 @@ class InterfaceWebcalsynchro $this->desc.="\n".$langs->transnoentities("Member").': '.$object->fullname; $this->desc.="\n".$langs->transnoentities("Type").': '.$object->type; $this->desc.="\n".$langs->transnoentities("Amount").': '.$object->last_subscription_amount; - $this->desc.="\n".$langs->transnoentities("Period").': '.dolibarr_print_date($object->last_subscription_date_start,'day').' - '.dolibarr_print_date($object->last_subscription_date_end,'day'); + $this->desc.="\n".$langs->transnoentities("Period").': '.dol_print_date($object->last_subscription_date_start,'day').' - '.dol_print_date($object->last_subscription_date_end,'day'); $this->desc.="\n".$langs->transnoentities("Author").': '.$user->login; } elseif ($action == 'MEMBER_MODIFY') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("other"); $langs->load("members"); @@ -323,7 +323,7 @@ class InterfaceWebcalsynchro } elseif ($action == 'MEMBER_RESILIATE') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("other"); $langs->load("members"); @@ -337,7 +337,7 @@ class InterfaceWebcalsynchro } elseif ($action == 'MEMBER_DELETE') { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("other"); $langs->load("members"); @@ -354,7 +354,7 @@ class InterfaceWebcalsynchro /* else { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' was ran by ".__FILE__." but no handler found for this action."); + dol_syslog("Trigger '".$this->name."' for action '$action' was ran by ".__FILE__." but no handler found for this action."); return 0; } */ @@ -372,7 +372,7 @@ class InterfaceWebcalsynchro $error.="La mise a jour Webcalendar a �t� ignor�e."; $this->error=$error; - //dolibarr_syslog("interface_webcal.class.php: ".$this->error); + //dol_syslog("interface_webcal.class.php: ".$this->error); return -1; } @@ -392,7 +392,7 @@ class InterfaceWebcalsynchro $error.="La mise a jour Webcalendar a �t� ignor�e."; $this->error=$error; - //dolibarr_syslog("interface_webcal.class.php: ".$this->error); + //dol_syslog("interface_webcal.class.php: ".$this->error); return -2; } } diff --git a/htdocs/index.php b/htdocs/index.php index da2a18dfea056eba5c353d7210def25b22286e25..adc07878910fb533364e7dbc22302e8984eb1e09 100644 --- a/htdocs/index.php +++ b/htdocs/index.php @@ -99,7 +99,7 @@ $userstring=$user->fullname; print '<td nowrap>'.$langs->trans("User").'</td><td>'.$userstring.'</td></tr>'; print '<tr '.$bc[true].'>'; print '<td nowrap>'.$langs->trans("PreviousConnexion").'</td><td>'; -if ($user->datepreviouslogin) print dolibarr_print_date($user->datepreviouslogin,"dayhour"); +if ($user->datepreviouslogin) print dol_print_date($user->datepreviouslogin,"dayhour"); else print $langs->trans("Unknown"); print '</td>'; print "</tr>\n"; diff --git a/htdocs/install/etape0.php b/htdocs/install/etape0.php index 22ecfc580fecba04862657864b5b1f8ba9044cd7..1cc31844d6dd3afc017a91c10f82933126be1111 100644 --- a/htdocs/install/etape0.php +++ b/htdocs/install/etape0.php @@ -137,7 +137,7 @@ if (! $error) //print $_POST["db_type"].",".$_POST["db_host"].",$userroot,$passroot,$databasefortest,".$_POST["db_port"]; $db = new DoliDb($_POST["db_type"],$_POST["db_host"],$userroot,$passroot,$databasefortest,$_POST["db_port"]); - dolibarr_syslog("databasefortest=".$databasefortest." connected=".$db->connected." database_selected=".$db->database_selected, LOG_DEBUG); + dol_syslog("databasefortest=".$databasefortest." connected=".$db->connected." database_selected=".$db->database_selected, LOG_DEBUG); //print "databasefortest=".$databasefortest." connected=".$db->connected." database_selected=".$db->database_selected; if (empty($_POST["db_create_database"]) && $db->connected && ! $db->database_selected) diff --git a/htdocs/install/etape1.php b/htdocs/install/etape1.php index f76702fcbbab426b9ed4e805e70fa580e77ac380..87db4fde57bf18528bf63c8234908af814954f07 100644 --- a/htdocs/install/etape1.php +++ b/htdocs/install/etape1.php @@ -473,7 +473,7 @@ function write_conf_file($conffile) fputs($fp, '<?php'); fputs($fp,"\n"); fputs($fp,"#\n"); - fputs($fp,"# File generated by Dolibarr installer on ".dolibarr_print_date(gmmktime(),'')); + fputs($fp,"# File generated by Dolibarr installer on ".dol_print_date(gmmktime(),'')); fputs($fp,"\n"); fputs($fp,"#\n"); fputs($fp,"# Take a look at conf.php.example file for an example of conf.php file\n"); diff --git a/htdocs/install/inc.php b/htdocs/install/inc.php index ef471bab68070f18d86b3313545d53c9abf95238..8455890ef34317516e9e4896f332c7c273d1463b 100644 --- a/htdocs/install/inc.php +++ b/htdocs/install/inc.php @@ -317,7 +317,7 @@ function pFooter($nonext=0,$setuplang='') function dolibarr_install_syslog($message, $level=LOG_DEBUG) { if (! defined('LOG_DEBUG')) define('LOG_DEBUG',6); - dolibarr_syslog($message,$level); + dol_syslog($message,$level); } ?> \ No newline at end of file diff --git a/htdocs/install/upgrade2.php b/htdocs/install/upgrade2.php index c6014b5d2cd55a001b752778e2b14c906e35b8bd..ed3e8d4c5c895cb15f0de4f768ac90c35c56fd15 100644 --- a/htdocs/install/upgrade2.php +++ b/htdocs/install/upgrade2.php @@ -251,7 +251,7 @@ function migrate_paiements($db,$langs,$conf) } } else { - dolibarr_print_error($db); + dol_print_error($db); } if ($num) @@ -341,7 +341,7 @@ function migrate_paiements_orphelins_1($db,$langs,$conf) } } else { - dolibarr_print_error($db); + dol_print_error($db); } if (sizeof($row)) @@ -449,7 +449,7 @@ function migrate_paiements_orphelins_2($db,$langs,$conf) } } else { - dolibarr_print_error($db); + dol_print_error($db); } if (sizeof($row)) @@ -585,7 +585,7 @@ function migrate_contracts_det($db,$langs,$conf) } else { - dolibarr_print_error($db); + dol_print_error($db); $nberr++; } @@ -611,7 +611,7 @@ function migrate_contracts_det($db,$langs,$conf) else { print $langs->trans('MigrationContractsFieldDontExist')."<br>\n"; - // dolibarr_print_error($db); + // dol_print_error($db); } print '</td></tr>'; @@ -663,7 +663,7 @@ function migrate_links_transfert($db,$langs,$conf) if (! $db->query($sql)) { - dolibarr_print_error($db); + dol_print_error($db); $nberr++; } @@ -688,7 +688,7 @@ function migrate_links_transfert($db,$langs,$conf) } else { - dolibarr_print_error($db); + dol_print_error($db); } print '</td></tr>'; @@ -707,7 +707,7 @@ function migrate_contracts_date1($db,$langs,$conf) $sql="update llx_contrat set date_contrat=tms where date_contrat is null"; $resql = $db->query($sql); - if (! $resql) dolibarr_print_error($db); + if (! $resql) dol_print_error($db); if ($db->affected_rows($resql) > 0) print $langs->trans('MigrationContractsEmptyDatesUpdateSuccess')."<br>\n"; else @@ -715,7 +715,7 @@ function migrate_contracts_date1($db,$langs,$conf) $sql="update llx_contrat set datec=tms where datec is null"; $resql = $db->query($sql); - if (! $resql) dolibarr_print_error($db); + if (! $resql) dol_print_error($db); if ($db->affected_rows($resql) > 0) print $langs->trans('MigrationContractsEmptyCreationDatesUpdateSuccess')."<br>\n"; else @@ -765,7 +765,7 @@ function migrate_contracts_date2($db,$langs,$conf) $sql.=" SET date_contrat='".$obj->datemin."'"; $sql.=" WHERE rowid=".$obj->cref; $resql2=$db->query($sql); - if (! $resql2) dolibarr_print_error($db); + if (! $resql2) dol_print_error($db); $nbcontratsmodifie++; } @@ -782,7 +782,7 @@ function migrate_contracts_date2($db,$langs,$conf) } else { - dolibarr_print_error($db); + dol_print_error($db); } print '</td></tr>'; @@ -801,7 +801,7 @@ function migrate_contracts_date3($db,$langs,$conf) $sql="update llx_contrat set datec=date_contrat where datec is null or datec > date_contrat"; $resql = $db->query($sql); - if (! $resql) dolibarr_print_error($db); + if (! $resql) dol_print_error($db); if ($db->affected_rows() > 0) print $langs->trans('MigrationContractsIncoherentCreationDateUpdateSuccess')."<br>\n"; else @@ -824,7 +824,7 @@ function migrate_contracts_open($db,$langs,$conf) $sql = "SELECT c.rowid as cref FROM llx_contrat as c, llx_contratdet as cd"; $sql.= " WHERE cd.statut = 4 AND c.statut=2 AND c.rowid=cd.fk_contrat"; $resql = $db->query($sql); - if (! $resql) dolibarr_print_error($db); + if (! $resql) dol_print_error($db); if ($db->affected_rows() > 0) { $i = 0; $row = array(); @@ -844,7 +844,7 @@ function migrate_contracts_open($db,$langs,$conf) $sql.=" SET statut=1"; $sql.=" WHERE rowid=".$obj->cref; $resql2=$db->query($sql); - if (! $resql2) dolibarr_print_error($db); + if (! $resql2) dol_print_error($db); $nbcontratsmodifie++; @@ -1367,7 +1367,7 @@ function migrate_price_commande($db,$langs,$conf) $resql=$db->query($sql); if (! $resql) { - dolibarr_print_error($db); + dol_print_error($db); } $db->commit(); @@ -1478,7 +1478,7 @@ function migrate_price_commande_fournisseur($db,$langs,$conf) $resql=$db->query($sql); if (! $resql) { - dolibarr_print_error($db); + dol_print_error($db); } $db->commit(); @@ -1515,7 +1515,7 @@ function migrate_modeles($db,$langs,$conf) // Aucun model par defaut. $sql=" insert into llx_document_model(nom,type) values('crabe','invoice')"; $resql = $db->query($sql); - if (! $resql) dolibarr_print_error($db); + if (! $resql) dol_print_error($db); } } @@ -1529,7 +1529,7 @@ function migrate_modeles($db,$langs,$conf) // Aucun model par defaut. $sql=" insert into llx_document_model(nom,type) values('einstein','order')"; $resql = $db->query($sql); - if (! $resql) dolibarr_print_error($db); + if (! $resql) dol_print_error($db); } } @@ -1543,7 +1543,7 @@ function migrate_modeles($db,$langs,$conf) // Aucun model par defaut. $sql=" insert into llx_document_model(nom,type) values('rouget','shipping')"; $resql = $db->query($sql); - if (! $resql) dolibarr_print_error($db); + if (! $resql) dol_print_error($db); } } @@ -1658,7 +1658,7 @@ function migrate_commande_expedition($db,$langs,$conf) if (!$resql2) { $error++; - dolibarr_print_error($db); + dol_print_error($db); } print ". "; $i++; @@ -1679,7 +1679,7 @@ function migrate_commande_expedition($db,$langs,$conf) } else { - dolibarr_print_error($db); + dol_print_error($db); $db->rollback(); } } @@ -1738,13 +1738,13 @@ function migrate_commande_livraison($db,$langs,$conf) if (!$resql3) { $error++; - dolibarr_print_error($db); + dol_print_error($db); } } else { $error++; - dolibarr_print_error($db); + dol_print_error($db); } print ". "; $i++; @@ -1765,7 +1765,7 @@ function migrate_commande_livraison($db,$langs,$conf) } else { - dolibarr_print_error($db); + dol_print_error($db); $db->rollback(); } } @@ -1839,19 +1839,19 @@ function migrate_detail_livraison($db,$langs,$conf) if (!$resql4) { $error++; - dolibarr_print_error($db); + dol_print_error($db); } } else { $error++; - dolibarr_print_error($db); + dol_print_error($db); } } else { $error++; - dolibarr_print_error($db); + dol_print_error($db); } print ". "; $i++; @@ -1873,7 +1873,7 @@ function migrate_detail_livraison($db,$langs,$conf) } else { - dolibarr_print_error($db); + dol_print_error($db); $db->rollback(); } } @@ -1934,7 +1934,7 @@ function migrate_stocks($db,$langs,$conf) else { $error++; - dolibarr_print_error($db); + dol_print_error($db); } print ". "; $i++; @@ -1953,7 +1953,7 @@ function migrate_stocks($db,$langs,$conf) } else { - dolibarr_print_error($db); + dol_print_error($db); $db->rollback(); } diff --git a/htdocs/interfaces.class.php b/htdocs/interfaces.class.php index cac5f7dc2d1f71c1b1e083fe4d2b979a08b31c3d..0b11041f663a39df0285de493fad2f729c0ec0e2 100644 --- a/htdocs/interfaces.class.php +++ b/htdocs/interfaces.class.php @@ -72,7 +72,7 @@ class Interfaces if (in_array($modName,$modules)) { $langs->load("errors"); - dolibarr_syslog("Interface::run_triggers ".$langs->trans("ErrorDuplicateTrigger",$modName,"/htdocs/includes/triggers/"),LOG_ERR); + dol_syslog("Interface::run_triggers ".$langs->trans("ErrorDuplicateTrigger",$modName,"/htdocs/includes/triggers/"),LOG_ERR); continue; } @@ -92,18 +92,18 @@ class Interfaces if (! $qualified) { - dolibarr_syslog("Interfaces::run_triggers Triggers for file '".$file."' need module to be enabled",LOG_INFO); + dol_syslog("Interfaces::run_triggers Triggers for file '".$file."' need module to be enabled",LOG_INFO); continue; } - dolibarr_syslog("Interfaces::run_triggers Launch triggers for file '".$file."'",LOG_INFO); + dol_syslog("Interfaces::run_triggers Launch triggers for file '".$file."'",LOG_INFO); include_once($this->dir."/".$file); $objMod = new $modName($this->db); $i=0; if ($objMod) { $modules[$i] = $modName; - //dolibarr_syslog("Interfaces::run_triggers Launch triggers for file '".$file."'",LOG_INFO); + //dol_syslog("Interfaces::run_triggers Launch triggers for file '".$file."'",LOG_INFO); $result=$objMod->run_trigger($action,$object,$user,$langs,$conf); if ($result > 0) { @@ -129,12 +129,12 @@ class Interfaces } if ($nbko) { - dolibarr_syslog("Interfaces::run_triggers Files found: ".$nbfile.", Files launched: ".$nbtotal.", Done: ".$nbok.", Failed: ".$nbko, LOG_ERR); + dol_syslog("Interfaces::run_triggers Files found: ".$nbfile.", Files launched: ".$nbtotal.", Done: ".$nbok.", Failed: ".$nbko, LOG_ERR); return -$nbko; } else { - //dolibarr_syslog("Interfaces::run_triggers Files found: ".$nbfile.", Files launched: ".$nbtotal.", Done: ".$nbok.", Failed: ".$nbko, LOG_DEBUG); + //dol_syslog("Interfaces::run_triggers Files found: ".$nbfile.", Files launched: ".$nbtotal.", Done: ".$nbok.", Failed: ".$nbko, LOG_DEBUG); return $nbok; } } diff --git a/htdocs/lib/CMailFile.class.php b/htdocs/lib/CMailFile.class.php index fb867c6e7365bd95261cb405598f051d458d72e3..ed9d8b348da0e1d2b9fcbc288bb05071746ca4b0 100644 --- a/htdocs/lib/CMailFile.class.php +++ b/htdocs/lib/CMailFile.class.php @@ -78,8 +78,8 @@ class CMailFile // If ending method not defined if (empty($conf->global->MAIN_MAIL_SENDMODE)) $conf->global->MAIN_MAIL_SENDMODE='mail'; - dolibarr_syslog("CMailFile::CMailfile: MAIN_MAIL_SENDMODE=".$conf->global->MAIN_MAIL_SENDMODE." charset=".$conf->character_set_client." from=$from, to=$to, addr_cc=$addr_cc, addr_bcc=$addr_bcc, errors_to=$errors_to", LOG_DEBUG); - dolibarr_syslog("CMailFile::CMailfile: subject=$subject, deliveryreceipt=$deliveryreceipt, msgishtml=$msgishtml", LOG_DEBUG); + dol_syslog("CMailFile::CMailfile: MAIN_MAIL_SENDMODE=".$conf->global->MAIN_MAIL_SENDMODE." charset=".$conf->character_set_client." from=$from, to=$to, addr_cc=$addr_cc, addr_bcc=$addr_bcc, errors_to=$errors_to", LOG_DEBUG); + dol_syslog("CMailFile::CMailfile: subject=$subject, deliveryreceipt=$deliveryreceipt, msgishtml=$msgishtml", LOG_DEBUG); // Detect if message is HTML (use fast method) if ($msgishtml == -1) @@ -98,7 +98,7 @@ class CMailFile if ($filename_list[$i]) { $this->atleastonefile=1; - dolibarr_syslog("CMailFile::CMailfile: filename_list[$i]=".$filename_list[$i].", mimetype_list[$i]=".$mimetype_list[$i]." mimefilename_list[$i]=".$mimefilename_list[$i], LOG_DEBUG); + dol_syslog("CMailFile::CMailfile: filename_list[$i]=".$filename_list[$i].", mimetype_list[$i]=".$mimetype_list[$i]." mimefilename_list[$i]=".$mimefilename_list[$i], LOG_DEBUG); } } @@ -217,9 +217,9 @@ class CMailFile // Use mail php function (default PHP method) // ------------------------------------------ - dolibarr_syslog("CMailFile::sendfile addr_to=".$this->addr_to.", subject=".$this->subject, LOG_DEBUG); - dolibarr_syslog("CMailFile::sendfile header=\n".$this->headers, LOG_DEBUG); - //dolibarr_syslog("CMailFile::sendfile message=\n".$message); + dol_syslog("CMailFile::sendfile addr_to=".$this->addr_to.", subject=".$this->subject, LOG_DEBUG); + dol_syslog("CMailFile::sendfile header=\n".$this->headers, LOG_DEBUG); + //dol_syslog("CMailFile::sendfile message=\n".$message); if (! empty($conf->global->MAIN_MAIL_DEBUG)) $this->dump_mail(); @@ -240,12 +240,12 @@ class CMailFile if (! $dest) { $this->error="Failed to send mail to SMTP=".ini_get('SMTP').", PORT=".ini_get('smtp_port')."<br>Recipient address '$dest' invalid"; - dolibarr_syslog("CMailFile::sendfile: mail end error=".$this->error, LOG_DEBUG); + dol_syslog("CMailFile::sendfile: mail end error=".$this->error, LOG_DEBUG); } else { - dolibarr_syslog("CMailFile::sendfile: mail start SMTP=".ini_get('SMTP').", PORT=".ini_get('smtp_port'), LOG_DEBUG); - //dolibarr_syslog("to=".getValidAddress($this->addr_to,2).", subject=".$this->subject.", message=".stripslashes($this->message).", header=".$this->headers); + dol_syslog("CMailFile::sendfile: mail start SMTP=".ini_get('SMTP').", PORT=".ini_get('smtp_port'), LOG_DEBUG); + //dol_syslog("to=".getValidAddress($this->addr_to,2).", subject=".$this->subject.", message=".stripslashes($this->message).", header=".$this->headers); $bounce = ''; if ($conf->global->MAIN_MAIL_ALLOW_SENDMAIL_F) @@ -261,11 +261,11 @@ class CMailFile if (! $res) { $this->error="Failed to send mail to SMTP=".ini_get('SMTP').", PORT=".ini_get('smtp_port')."<br>Check your server logs and your firewalls setup"; - dolibarr_syslog("CMailFile::sendfile: mail end error=".$this->error, LOG_DEBUG); + dol_syslog("CMailFile::sendfile: mail end error=".$this->error, LOG_DEBUG); } else { - dolibarr_syslog("CMailFile::sendfile: mail end success", LOG_DEBUG); + dol_syslog("CMailFile::sendfile: mail end success", LOG_DEBUG); } } @@ -300,7 +300,7 @@ class CMailFile if (! $dest) { $this->error="Failed to send mail to SMTP=".$conf->global->MAIN_MAIL_SMTP_SERVER.", PORT=".$conf->global->MAIN_MAIL_SMTP_PORT."<br>Recipient address '$dest' invalid"; - dolibarr_syslog("CMailFile::sendfile: mail end error=".$this->error, LOG_DEBUG); + dol_syslog("CMailFile::sendfile: mail end error=".$this->error, LOG_DEBUG); } else { @@ -329,7 +329,7 @@ class CMailFile else { $this->error='No mail sent. Feature is disabled by option MAIN_DISABLE_ALL_MAILS'; - dolibarr_syslog("CMailFile::sendfile: ".$this->error); + dol_syslog("CMailFile::sendfile: ".$this->error); } error_reporting($errorlevel); // Reactive niveau erreur origine @@ -357,7 +357,7 @@ class CMailFile else { $this->error="Error: Can't read file '$sourcefile'"; - dolibarr_syslog("CMailFile::encode_file: ".$this->error, LOG_ERR); + dol_syslog("CMailFile::encode_file: ".$this->error, LOG_ERR); return -1; } } @@ -428,7 +428,7 @@ class CMailFile $out.= "Content-Transfer-Encoding: 8bit".$this->eol; } - dolibarr_syslog("CMailFile::write_smtpheaders smtp_header=\n".$out, LOG_DEBUG); + dol_syslog("CMailFile::write_smtpheaders smtp_header=\n".$out, LOG_DEBUG); return $out; } @@ -456,7 +456,7 @@ class CMailFile } } //$out.= $this->eol; - dolibarr_syslog("CMailFile::write_mimeheaders mime_header=\n".$out, LOG_DEBUG); + dol_syslog("CMailFile::write_mimeheaders mime_header=\n".$out, LOG_DEBUG); return $out; } @@ -517,7 +517,7 @@ class CMailFile { if ($filename_list[$i]) { - dolibarr_syslog("CMailFile::write_files: i=$i"); + dol_syslog("CMailFile::write_files: i=$i"); $encoded = $this->_encode_file($filename_list[$i]); if ($encoded >= 0) { diff --git a/htdocs/lib/admin.lib.php b/htdocs/lib/admin.lib.php index cdf89069459f9f43949203ad09784c57cd94b787..e95b722880f1736a6e286d22bad1ec7b4b74d1b2 100644 --- a/htdocs/lib/admin.lib.php +++ b/htdocs/lib/admin.lib.php @@ -89,7 +89,7 @@ function run_sql($sqlfile,$silent=1) { global $db, $conf, $langs, $user; - dolibarr_syslog("Admin.lib::run_sql run sql file ".$sqlfile, LOG_DEBUG); + dol_syslog("Admin.lib::run_sql run sql file ".$sqlfile, LOG_DEBUG); $ok=0; $error=0; @@ -174,7 +174,7 @@ function run_sql($sqlfile,$silent=1) $from='__+MAX_'.$table.'__'; $to='+'.$listofmaxrowid[$table]; $newsql=str_replace($from,$to,$newsql); - dolibarr_syslog('Admin.lib::run_sql New Request '.($i+1).' sql='.$newsql, LOG_DEBUG); + dol_syslog('Admin.lib::run_sql New Request '.($i+1).' sql='.$newsql, LOG_DEBUG); $arraysql[$i]=$newsql; } @@ -192,7 +192,7 @@ function run_sql($sqlfile,$silent=1) // Ajout trace sur requete (eventuellement ? commenter si beaucoup de requetes) if (! $silent) print '<tr><td valign="top">'.$langs->trans("Request").' '.($i+1)." sql='".$newsql."'</td></tr>\n"; - dolibarr_syslog('Admin.lib::run_sql Request '.($i+1).' sql='.$newsql, LOG_DEBUG); + dol_syslog('Admin.lib::run_sql Request '.($i+1).' sql='.$newsql, LOG_DEBUG); if (eregi('insert into ([^ ]+)',$newsql,$reg)) { @@ -215,7 +215,7 @@ function run_sql($sqlfile,$silent=1) $from='__'.$cursor.'__'; $to=$listofinsertedrowid[$cursor]; $newsql=str_replace($from,$to,$newsql); - dolibarr_syslog('Admin.lib::run_sql New Request '.($i+1).' sql='.$newsql, LOG_DEBUG); + dol_syslog('Admin.lib::run_sql New Request '.($i+1).' sql='.$newsql, LOG_DEBUG); } $result=$db->query($newsql); @@ -227,7 +227,7 @@ function run_sql($sqlfile,$silent=1) $table=eregi_replace('[^a-zA-Z_]+','',$reg[1]); $insertedrowid=$db->last_insert_id($table); $listofinsertedrowid[$cursorinsert]=$insertedrowid; - dolibarr_syslog('Admin.lib::run_sql Insert nb '.$cursorinsert.', done in table '.$table.', rowid is '.$listofinsertedrowid[$cursorinsert], LOG_DEBUG); + dol_syslog('Admin.lib::run_sql Insert nb '.$cursorinsert.', done in table '.$table.', rowid is '.$listofinsertedrowid[$cursorinsert], LOG_DEBUG); } // print '<td align="right">OK</td>'; } @@ -255,7 +255,7 @@ function run_sql($sqlfile,$silent=1) if (! $silent) print '<tr><td valign="top" colspan="2">'; if (! $silent) print '<div class="error">'.$langs->trans("Error")." ".$db->errno().": ".$newsql."<br>".$db->error()."</div></td>"; if (! $silent) print '</tr>'; - dolibarr_syslog('Admin.lib::run_sql Request '.($i+1)." Error ".$db->errno()." ".$newsql."<br>".$db->error(), LOG_ERR); + dol_syslog('Admin.lib::run_sql Request '.($i+1)." Error ".$db->errno()." ".$newsql."<br>".$db->error(), LOG_ERR); $error++; } } @@ -295,7 +295,7 @@ function dolibarr_del_const($db, $name) $sql = "DELETE FROM llx_const"; $sql.=" WHERE name='".addslashes($name)."' or rowid='".addslashes($name)."'"; - dolibarr_syslog("admin.lib::dolibarr_del_const sql=".$sql); + dol_syslog("admin.lib::dolibarr_del_const sql=".$sql); $resql=$db->query($sql); if ($resql) { @@ -323,7 +323,7 @@ function dolibarr_get_const($db, $name) $sql.=" FROM llx_const"; $sql.=" WHERE name = '".addslashes($name)."'"; - dolibarr_syslog("admin.lib::dolibarr_get_const sql=".$sql); + dol_syslog("admin.lib::dolibarr_get_const sql=".$sql); $resql=$db->query($sql); if ($resql) { @@ -351,15 +351,15 @@ function dolibarr_set_const($db, $name, $value, $type='chaine', $visible=0, $not if (empty($name)) { - dolibarr_print_error("Error: Call to function dolibarr_set_const with wrong parameters", LOG_ERR); + dol_print_error("Error: Call to function dolibarr_set_const with wrong parameters", LOG_ERR); exit; } $db->begin(); - //dolibarr_syslog("dolibarr_set_const name=$name, value=$value"); + //dol_syslog("dolibarr_set_const name=$name, value=$value"); $sql = "DELETE FROM llx_const WHERE name = '".addslashes($name)."';"; - dolibarr_syslog("admin.lib::dolibarr_set_const sql=".$sql, LOG_DEBUG); + dol_syslog("admin.lib::dolibarr_set_const sql=".$sql, LOG_DEBUG); $resql=$db->query($sql); if (strcmp($value,'')) // true if different. Must work for $value='0' or $value=0 @@ -367,7 +367,7 @@ function dolibarr_set_const($db, $name, $value, $type='chaine', $visible=0, $not $sql = "INSERT INTO llx_const(name,value,type,visible,note)"; $sql.= " VALUES ('".$name."','".addslashes($value)."','".$type."',".$visible.",'".addslashes($note)."')"; - dolibarr_syslog("admin.lib::dolibarr_set_const sql=".$sql, LOG_DEBUG); + dol_syslog("admin.lib::dolibarr_set_const sql=".$sql, LOG_DEBUG); $resql=$db->query($sql); } @@ -380,7 +380,7 @@ function dolibarr_set_const($db, $name, $value, $type='chaine', $visible=0, $not else { $this->error=$db->lasterror(); - dolibarr_syslog("admin.lib::dolibarr_set_const ".$this->error, LOG_ERR); + dol_syslog("admin.lib::dolibarr_set_const ".$this->error, LOG_ERR); $db->rollback(); return -1; } diff --git a/htdocs/lib/agenda.lib.php b/htdocs/lib/agenda.lib.php index 1d0f3ce2fe8d3781a17b716c0de62856f0c2a7ba..169a8771d6c8fbaebd365656d625ca087486fcd1 100644 --- a/htdocs/lib/agenda.lib.php +++ b/htdocs/lib/agenda.lib.php @@ -78,7 +78,7 @@ function show_array_actions_to_do($max=5) $staticaction->id=$obj->id; print '<td>'.$staticaction->getNomUrl(1,12).'</td>'; - print '<td>'.dolibarr_trunc($obj->label,24).'</td>'; + print '<td>'.dol_trunc($obj->label,24).'</td>'; $customerstatic->id=$obj->rowid; $customerstatic->nom=$obj->sname; @@ -86,7 +86,7 @@ function show_array_actions_to_do($max=5) print '<td>'.$customerstatic->getNomUrl(1,'',16).'</td>'; // Date - print '<td width="100" alig="right">'.dolibarr_print_date($obj->dp,'day').' '; + print '<td width="100" alig="right">'.dol_print_date($obj->dp,'day').' '; $late=0; if ($obj->percent == 0 && $obj->dp && date("U",$obj->dp) < time()) $late=1; if ($obj->percent == 0 && ! $obj->dp && $obj->dp2 && date("U",$obj->dp) < time()) $late=1; @@ -108,7 +108,7 @@ function show_array_actions_to_do($max=5) } else { - dolibarr_print_error($db); + dol_print_error($db); } } @@ -166,7 +166,7 @@ function show_array_last_actions_done($max=5) $staticaction->id=$obj->id; print '<td>'.$staticaction->getNomUrl(1,12).'</td>'; - print '<td>'.dolibarr_trunc($obj->label,24).'</td>'; + print '<td>'.dol_trunc($obj->label,24).'</td>'; $customerstatic->id=$obj->rowid; $customerstatic->nom=$obj->sname; @@ -174,7 +174,7 @@ function show_array_last_actions_done($max=5) print '<td>'.$customerstatic->getNomUrl(1,'',24).'</td>'; // Date - print '<td width="100" align="right">'.dolibarr_print_date($obj->da2,'day'); + print '<td width="100" align="right">'.dol_print_date($obj->da2,'day'); print "</td>"; // Statut @@ -191,7 +191,7 @@ function show_array_last_actions_done($max=5) } else { - dolibarr_print_error($db); + dol_print_error($db); } } diff --git a/htdocs/lib/antispamimage.php b/htdocs/lib/antispamimage.php index 6462026d5a0b8c186c4ab124e63c76172d536592..e579ec70544fc8973f08727340794fb3c420e141 100644 --- a/htdocs/lib/antispamimage.php +++ b/htdocs/lib/antispamimage.php @@ -40,7 +40,7 @@ $sessionname="DOLSESSID_".$dolibarr_main_db_name; if (! empty($conf->global->MAIN_SESSION_TIMEOUT)) ini_set('session.gc_maxlifetime',$conf->global->MAIN_SESSION_TIMEOUT); session_name($sessionname); session_start(); -dolibarr_syslog("Start session name=".$sessionname." Session id()=".session_id().", _SESSION['dol_login']=".$_SESSION["dol_login"].", ".ini_get("session.gc_maxlifetime")); +dol_syslog("Start session name=".$sessionname." Session id()=".session_id().", _SESSION['dol_login']=".$_SESSION["dol_login"].", ".ini_get("session.gc_maxlifetime")); // On cree l'objet anti-spam diff --git a/htdocs/lib/bank.lib.php b/htdocs/lib/bank.lib.php index 613f2106f16e63835b8b5ca37d0096f6bcda1e32..5ea54a51d7832361ef160b8fde9fc901af6f7b06 100644 --- a/htdocs/lib/bank.lib.php +++ b/htdocs/lib/bank.lib.php @@ -99,7 +99,7 @@ function checkBanForAccount($account) if (empty($account->number)) $account->number=$account->num_compte; if (empty($account->cle)) $account->cle=$account->cle_rib; - dolibarr_syslog("Bank.lib::checkBanForAccount account->code_banque=".$account->code_banque." account->code_guichet=".$account->code_guichet." account->number=".$account->number." account->cle=".$account->cle." account->iban=".$account->iban." country_code=".$country_code, LOG_DEBUG); + dol_syslog("Bank.lib::checkBanForAccount account->code_banque=".$account->code_banque." account->code_guichet=".$account->code_guichet." account->number=".$account->number." account->cle=".$account->cle." account->iban=".$account->iban." country_code=".$country_code, LOG_DEBUG); if ($country_code == 'FR') // France rules { diff --git a/htdocs/lib/bookmark.lib.php b/htdocs/lib/bookmark.lib.php index 8e0c8b6331d299deffac8555af8ad930420c52e5..b363cd3e9d6a032e6e726f18664d89b2722e9ac4 100644 --- a/htdocs/lib/bookmark.lib.php +++ b/htdocs/lib/bookmark.lib.php @@ -62,7 +62,7 @@ function showArrayOfBookmark($fac) } else { - dolibarr_print_error($db); + dol_print_error($db); } } diff --git a/htdocs/lib/company.lib.php b/htdocs/lib/company.lib.php index 36c46302c4c3781230fa1b37ef48df4538f1c61c..651124a3099888bfe08aaa90857c6851cca8dfc2 100644 --- a/htdocs/lib/company.lib.php +++ b/htdocs/lib/company.lib.php @@ -173,7 +173,7 @@ function getCountryLabel($id,$withcode=0) $sql = "SELECT rowid, code, libelle FROM ".MAIN_DB_PREFIX."c_pays"; $sql.= " WHERE rowid=".$id; - dolibarr_syslog("Company.lib::getCountryLabel sql=".$sql); + dol_syslog("Company.lib::getCountryLabel sql=".$sql); $resql=$db->query($sql); if ($resql) { @@ -207,7 +207,7 @@ function getFormeJuridiqueLabel($code) $sql = "SELECT libelle FROM ".MAIN_DB_PREFIX."c_forme_juridique"; $sql.= " WHERE code='$code'"; - dolibarr_syslog("Company.lib::getFormeJuridiqueLabel sql=".$sql); + dol_syslog("Company.lib::getFormeJuridiqueLabel sql=".$sql); $resql=$db->query($sql); if ($resql) { @@ -370,7 +370,7 @@ function show_actions_todo($conf,$langs,$db,$objsoc,$objcon='') $sql.= " AND c.id=a.fk_action AND a.percent < 100"; $sql.= " ORDER BY a.datep DESC, a.id DESC"; - dolibarr_syslog("company.lib::show_actions_todo sql=".$sql); + dol_syslog("company.lib::show_actions_todo sql=".$sql); $result=$db->query($sql); if ($result) { @@ -387,7 +387,7 @@ function show_actions_todo($conf,$langs,$db,$objsoc,$objcon='') $obj = $db->fetch_object($result); print "<tr ".$bc[$var].">"; - print '<td width="100" align="left">'.dolibarr_print_date($obj->dp,'dayhour')."</td>\n"; + print '<td width="100" align="left">'.dol_print_date($obj->dp,'dayhour')."</td>\n"; // Picto warning print '<td width="16">'; @@ -448,7 +448,7 @@ function show_actions_todo($conf,$langs,$db,$objsoc,$objcon='') } else { - dolibarr_print_error($db); + dol_print_error($db); } print "</table>\n"; @@ -492,7 +492,7 @@ function show_actions_done($conf,$langs,$db,$objsoc,$objcon='') $sql.= " AND a.percent = 100"; $sql.= " ORDER BY a.datea DESC, a.id DESC"; - dolibarr_syslog("company.lib::show_actions_done sql=".$sql, LOG_DEBUG); + dol_syslog("company.lib::show_actions_done sql=".$sql, LOG_DEBUG); $resql=$db->query($sql); if ($resql) { @@ -513,7 +513,7 @@ function show_actions_done($conf,$langs,$db,$objsoc,$objcon='') } else { - dolibarr_print_error($db); + dol_print_error($db); } } @@ -532,7 +532,7 @@ function show_actions_done($conf,$langs,$db,$objsoc,$objcon='') $sql.= " AND mc.fk_mailing=m.rowid"; $sql.= " ORDER BY mc.date_envoi DESC, m.rowid DESC"; - dolibarr_syslog("company.lib::show_actions_done sql=".$sql, LOG_DEBUG); + dol_syslog("company.lib::show_actions_done sql=".$sql, LOG_DEBUG); $resql=$db->query($sql); if ($resql) { @@ -552,7 +552,7 @@ function show_actions_done($conf,$langs,$db,$objsoc,$objcon='') } else { - dolibarr_print_error($db); + dol_print_error($db); } } @@ -581,7 +581,7 @@ function show_actions_done($conf,$langs,$db,$objsoc,$objcon='') print "<tr ".$bc[$var].">"; // Champ date - print '<td width="100" align="left">'.dolibarr_print_date($histo[$key]['date'],'dayhour')."</td>\n"; + print '<td width="100" align="left">'.dol_print_date($histo[$key]['date'],'dayhour')."</td>\n"; // Picto print '<td width="16"> </td>'; @@ -600,12 +600,12 @@ function show_actions_done($conf,$langs,$db,$objsoc,$objcon='') print '<a href="'.DOL_URL_ROOT.'/comm/mailing/fiche.php?id='.$histo[$key]['id'].'">'.img_object($langs->trans("ShowEMailing"),"email").' '; $transcode=$langs->trans("Action".$histo[$key]['acode']); $libelle=($transcode!="Action".$histo[$key]['acode']?$transcode:'Send mass mailing'); - print dolibarr_trunc($libelle,30); + print dol_trunc($libelle,30); } print '</td>'; // Note - print '<td>'.dolibarr_trunc($histo[$key]['note'], 30).'</td>'; + print '<td>'.dol_trunc($histo[$key]['note'], 30).'</td>'; // Objet lie print '<td>'; diff --git a/htdocs/lib/databases/mssql.lib.php b/htdocs/lib/databases/mssql.lib.php index 9c5663c613c0f2a7cefbb9a77786d5a855f57d45..669501df03b441cdd011bbc7a98f11ae20ad5df4 100644 --- a/htdocs/lib/databases/mssql.lib.php +++ b/htdocs/lib/databases/mssql.lib.php @@ -93,7 +93,7 @@ class DoliDb $this->connected = 0; $this->ok = 0; $this->error="Mssql PHP functions for using MSSql driver are not available in this version of PHP"; - dolibarr_syslog("DoliDB::DoliDB : MSsql PHP functions for using MSsql driver are not available in this version of PHP",LOG_ERR); + dol_syslog("DoliDB::DoliDB : MSsql PHP functions for using MSsql driver are not available in this version of PHP",LOG_ERR); return $this->ok; } @@ -102,7 +102,7 @@ class DoliDb $this->connected = 0; $this->ok = 0; $this->error=$langs->trans("ErrorWrongHostParameter"); - dolibarr_syslog("DoliDB::DoliDB : Erreur Connect, wrong host parameters",LOG_ERR); + dol_syslog("DoliDB::DoliDB : Erreur Connect, wrong host parameters",LOG_ERR); return $this->ok; } @@ -121,7 +121,7 @@ class DoliDb $this->connected = 0; $this->ok = 0; $this->error=mssql_get_last_message(); - dolibarr_syslog("DoliDB::DoliDB : Erreur Connect mssql_get_last_message=".$this->error,LOG_ERR); + dol_syslog("DoliDB::DoliDB : Erreur Connect mssql_get_last_message=".$this->error,LOG_ERR); } // Si connexion serveur ok et si connexion base demand�e, on essaie connexion base @@ -139,7 +139,7 @@ class DoliDb $this->database_name = ''; $this->ok = 0; $this->error=$this->error(); - dolibarr_syslog("DoliDB::DoliDB : Erreur Select_db ".$this->error,LOG_ERR); + dol_syslog("DoliDB::DoliDB : Erreur Select_db ".$this->error,LOG_ERR); } } else @@ -183,7 +183,7 @@ class DoliDb */ function connect($host, $login, $passwd, $name, $port=0) { - dolibarr_syslog("DoliDB::connect host=$host, port=$port, login=$login, passwd=--hidden--, name=$name"); + dol_syslog("DoliDB::connect host=$host, port=$port, login=$login, passwd=--hidden--, name=$name"); $newhost=$host; if ($port) $newhost.=':'.$port; $this->db = @mssql_connect($newhost, $login, $passwd); @@ -224,7 +224,7 @@ class DoliDb */ function close() { - dolibarr_syslog("DoliDB::disconnect",LOG_DEBUG); + dol_syslog("DoliDB::disconnect",LOG_DEBUG); return mssql_close($this->db); } @@ -241,7 +241,7 @@ class DoliDb if ($ret) { $this->transaction_opened++; - dolibarr_syslog("BEGIN Transaction",LOG_DEBUG); + dol_syslog("BEGIN Transaction",LOG_DEBUG); } return $ret; } @@ -264,7 +264,7 @@ class DoliDb if ($ret) { $this->transaction_opened=0; - dolibarr_syslog("COMMIT Transaction",LOG_DEBUG); + dol_syslog("COMMIT Transaction",LOG_DEBUG); } return $ret; } @@ -285,7 +285,7 @@ class DoliDb { $ret=$this->query("ROLLBACK TRANSACTION"); $this->transaction_opened=0; - dolibarr_syslog("ROLLBACK Transaction",LOG_DEBUG); + dol_syslog("ROLLBACK Transaction",LOG_DEBUG); return $ret; } else @@ -555,7 +555,7 @@ class DoliDb { $string=eregi_replace('[^0-9]','',$string); $tmp=$string.'000000'; - $date=dolibarr_mktime(substr($tmp,8,2),substr($tmp,10,2),substr($tmp,12,2),substr($tmp,4,2),substr($tmp,6,2),substr($tmp,0,4)); + $date=dol_mktime(substr($tmp,8,2),substr($tmp,10,2),substr($tmp,12,2),substr($tmp,4,2),substr($tmp,6,2),substr($tmp,0,4)); return $date; } @@ -580,7 +580,7 @@ class DoliDb { $string=eregi_replace('[^0-9]','',$string); $tmp=$string.'000000'; - $date=dolibarr_mktime(substr($tmp,8,2),substr($tmp,10,2),substr($tmp,12,2),substr($tmp,4,2),substr($tmp,6,2),substr($tmp,0,4),1); + $date=dol_mktime(substr($tmp,8,2),substr($tmp,10,2),substr($tmp,12,2),substr($tmp,4,2),substr($tmp,6,2),substr($tmp,0,4),1); return $date; }*/ @@ -837,7 +837,7 @@ class DoliDb $sql .= ",".implode(',',$sqlk); $sql .=") type=".$type; - dolibarr_syslog($sql); + dol_syslog($sql); if(! $this -> query($sql)) return -1; else @@ -854,7 +854,7 @@ class DoliDb { $sql="DESC ".$table." ".$field; - dolibarr_syslog($sql); + dol_syslog($sql); $this->results = $this->query($sql); return $this->results; } @@ -904,7 +904,7 @@ class DoliDb function DDLDropField($table,$field_name) { $sql= "ALTER TABLE ".$table." DROP COLUMN `".$field_name."`"; - dolibarr_syslog($sql,LOG_DEBUG); + dol_syslog($sql,LOG_DEBUG); if (! $this->query($sql)) { $this->error=$this->lasterror(); diff --git a/htdocs/lib/databases/mysql.lib.php b/htdocs/lib/databases/mysql.lib.php index cb899763342661552bb0741fc590d07654756c1a..0ccf4ad5270dd196086b556fb9cba597a596039f 100644 --- a/htdocs/lib/databases/mysql.lib.php +++ b/htdocs/lib/databases/mysql.lib.php @@ -99,7 +99,7 @@ class DoliDb $this->connected = 0; $this->ok = 0; $this->error="Mysql PHP functions for using MySql driver are not available in this version of PHP. Try to use another driver."; - dolibarr_syslog("DoliDB::DoliDB : Mysql PHP functions for using Mysql driver are not available in this version of PHP. Try to use another driver.",LOG_ERR); + dol_syslog("DoliDB::DoliDB : Mysql PHP functions for using Mysql driver are not available in this version of PHP. Try to use another driver.",LOG_ERR); return $this->ok; } @@ -108,7 +108,7 @@ class DoliDb $this->connected = 0; $this->ok = 0; $this->error=$langs->trans("ErrorWrongHostParameter"); - dolibarr_syslog("DoliDB::DoliDB : Erreur Connect, wrong host parameters",LOG_ERR); + dol_syslog("DoliDB::DoliDB : Erreur Connect, wrong host parameters",LOG_ERR); return $this->ok; } @@ -125,7 +125,7 @@ class DoliDb $this->connected = 0; $this->ok = 0; $this->error=mysql_error(); - dolibarr_syslog("DoliDB::DoliDB : Erreur Connect mysql_error=".$this->error,LOG_ERR); + dol_syslog("DoliDB::DoliDB : Erreur Connect mysql_error=".$this->error,LOG_ERR); } // Si connexion serveur ok et si connexion base demandee, on essaie connexion base @@ -153,7 +153,7 @@ class DoliDb $this->database_name = ''; $this->ok = 0; $this->error=$this->error(); - dolibarr_syslog("DoliDB::DoliDB : Erreur Select_db ".$this->error,LOG_ERR); + dol_syslog("DoliDB::DoliDB : Erreur Select_db ".$this->error,LOG_ERR); } } else @@ -196,7 +196,7 @@ class DoliDb */ function select_db($database) { - dolibarr_syslog("DoliDB::select_db database=".$database, LOG_DEBUG); + dol_syslog("DoliDB::select_db database=".$database, LOG_DEBUG); return mysql_select_db($database, $this->db); } @@ -212,7 +212,7 @@ class DoliDb */ function connect($host, $login, $passwd, $name, $port=0) { - dolibarr_syslog("DoliDB::connect host=$host, port=$port, login=$login, passwd=--hidden--, name=$name",LOG_DEBUG); + dol_syslog("DoliDB::connect host=$host, port=$port, login=$login, passwd=--hidden--, name=$name",LOG_DEBUG); $newhost=$host; @@ -269,7 +269,7 @@ class DoliDb */ function close() { - dolibarr_syslog("DoliDB::disconnect",LOG_DEBUG); + dol_syslog("DoliDB::disconnect",LOG_DEBUG); return mysql_close($this->db); } @@ -286,7 +286,7 @@ class DoliDb if ($ret) { $this->transaction_opened++; - dolibarr_syslog("BEGIN Transaction",LOG_DEBUG); + dol_syslog("BEGIN Transaction",LOG_DEBUG); } return $ret; } @@ -310,7 +310,7 @@ class DoliDb if ($ret) { $this->transaction_opened=0; - dolibarr_syslog("COMMIT Transaction".($log?' '.$log:''),LOG_DEBUG); + dol_syslog("COMMIT Transaction".($log?' '.$log:''),LOG_DEBUG); } return $ret; } @@ -332,7 +332,7 @@ class DoliDb { $ret=$this->query("ROLLBACK"); $this->transaction_opened=0; - dolibarr_syslog("ROLLBACK Transaction".($log?' '.$log:''),LOG_DEBUG); + dol_syslog("ROLLBACK Transaction".($log?' '.$log:''),LOG_DEBUG); return $ret; } else @@ -546,7 +546,7 @@ class DoliDb { $string=eregi_replace('[^0-9]','',$string); $tmp=$string.'000000'; - $date=dolibarr_mktime(substr($tmp,8,2),substr($tmp,10,2),substr($tmp,12,2),substr($tmp,4,2),substr($tmp,6,2),substr($tmp,0,4)); + $date=dol_mktime(substr($tmp,8,2),substr($tmp,10,2),substr($tmp,12,2),substr($tmp,4,2),substr($tmp,6,2),substr($tmp,0,4)); return $date; } @@ -571,7 +571,7 @@ class DoliDb { $string=eregi_replace('[^0-9]','',$string); $tmp=$string.'000000'; - $date=dolibarr_mktime(substr($tmp,8,2),substr($tmp,10,2),substr($tmp,12,2),substr($tmp,4,2),substr($tmp,6,2),substr($tmp,0,4),1); + $date=dol_mktime(substr($tmp,8,2),substr($tmp,10,2),substr($tmp,12,2),substr($tmp,4,2),substr($tmp,6,2),substr($tmp,0,4),1); return $date; }*/ @@ -736,14 +736,14 @@ class DoliDb $sql = 'CREATE DATABASE '.$database; $sql.= ' DEFAULT CHARACTER SET '.$charset.' DEFAULT COLLATE '.$collation; - dolibarr_syslog($sql,LOG_DEBUG); + dol_syslog($sql,LOG_DEBUG); $ret=$this->query($sql); if (! $ret) { // We try again for compatibility with Mysql < 4.1.1 $sql = 'CREATE DATABASE '.$database; $ret=$this->query($sql); - dolibarr_syslog($sql,LOG_DEBUG); + dol_syslog($sql,LOG_DEBUG); } return $ret; } @@ -839,7 +839,7 @@ class DoliDb $sql .= ",".implode(',',$sqlk); $sql .=") type=".$type; - dolibarr_syslog($sql,LOG_DEBUG); + dol_syslog($sql,LOG_DEBUG); if(! $this -> query($sql)) return -1; else @@ -856,7 +856,7 @@ class DoliDb { $sql="DESC ".$table." ".$field; - dolibarr_syslog($sql,LOG_DEBUG); + dol_syslog($sql,LOG_DEBUG); $this->results = $this->query($sql); return $this->results; } @@ -890,7 +890,7 @@ class DoliDb $sql .= " ".$field_desc['extra']; $sql .= " ".$field_position; - dolibarr_syslog($sql,LOG_DEBUG); + dol_syslog($sql,LOG_DEBUG); if(! $this -> query($sql)) return -1; else @@ -906,7 +906,7 @@ class DoliDb function DDLDropField($table,$field_name) { $sql= "ALTER TABLE ".$table." DROP COLUMN `".$field_name."`"; - dolibarr_syslog($sql,LOG_DEBUG); + dol_syslog($sql,LOG_DEBUG); if (! $this->query($sql)) { $this->error=$this->lasterror(); @@ -931,7 +931,7 @@ class DoliDb $sql.= " VALUES ('$dolibarr_main_db_host','$dolibarr_main_db_user',password('$dolibarr_main_db_pass')"; $sql.= ",'Y','Y','Y','Y','Y','Y','Y','Y');"; - dolibarr_syslog("mysql.lib::DDLCreateUser", LOG_DEBUG); // No sql to avoid password in log + dol_syslog("mysql.lib::DDLCreateUser", LOG_DEBUG); // No sql to avoid password in log $resql=$this->query($sql); if (! $resql) { @@ -943,7 +943,7 @@ class DoliDb $sql.= " VALUES ('$dolibarr_main_db_host','$dolibarr_main_db_name','$dolibarr_main_db_user'"; $sql.= ",'Y','Y','Y','Y','Y','Y','Y','Y');"; - dolibarr_syslog("mysql.lib::DDLCreateUser sql=".$sql,LOG_DEBUG); + dol_syslog("mysql.lib::DDLCreateUser sql=".$sql,LOG_DEBUG); $resql=$this->query($sql); if (! $resql) { @@ -952,7 +952,7 @@ class DoliDb $sql="FLUSH Privileges"; - dolibarr_syslog("mysql.lib::DDLCreateUser sql=".$sql,LOG_DEBUG); + dol_syslog("mysql.lib::DDLCreateUser sql=".$sql,LOG_DEBUG); $resql=$this->query($sql); return 1; diff --git a/htdocs/lib/databases/mysqli.lib.php b/htdocs/lib/databases/mysqli.lib.php index 4dc206263b1989d550e2c28c64eb8e85f86b2f8f..331c8052937573cbe36cc9046b173ac7e3f8159e 100644 --- a/htdocs/lib/databases/mysqli.lib.php +++ b/htdocs/lib/databases/mysqli.lib.php @@ -99,7 +99,7 @@ class DoliDb $this->connected = 0; $this->ok = 0; $this->error="Mysqli PHP functions for using Mysqli driver are not available in this version of PHP. Try to use another driver."; - dolibarr_syslog("DoliDB::DoliDB : Mysqli PHP functions for using Mysqli driver are not available in this version of PHP. Try to use another driver.",LOG_ERR); + dol_syslog("DoliDB::DoliDB : Mysqli PHP functions for using Mysqli driver are not available in this version of PHP. Try to use another driver.",LOG_ERR); return $this->ok; } @@ -108,7 +108,7 @@ class DoliDb $this->connected = 0; $this->ok = 0; $this->error=$langs->trans("ErrorWrongHostParameter"); - dolibarr_syslog("DoliDB::DoliDB : Erreur Connect, wrong host parameters",LOG_ERR); + dol_syslog("DoliDB::DoliDB : Erreur Connect, wrong host parameters",LOG_ERR); return $this->ok; } @@ -127,7 +127,7 @@ class DoliDb $this->connected = 0; $this->ok = 0; $this->error=mysqli_connect_error(); - dolibarr_syslog("DoliDB::DoliDB : Erreur Connect mysqli_connect_error=".$this->error,LOG_ERR); + dol_syslog("DoliDB::DoliDB : Erreur Connect mysqli_connect_error=".$this->error,LOG_ERR); } // Si connexion serveur ok et si connexion base demandee, on essaie connexion base @@ -155,7 +155,7 @@ class DoliDb $this->database_name = ''; $this->ok = 0; $this->error=$this->error(); - dolibarr_syslog("DoliDB::DoliDB : Erreur Select_db ".$this->error,LOG_ERR); + dol_syslog("DoliDB::DoliDB : Erreur Select_db ".$this->error,LOG_ERR); } } else @@ -198,7 +198,7 @@ class DoliDb */ function select_db($database) { - dolibarr_syslog("DoliDB::select_db database=".$database, LOG_DEBUG); + dol_syslog("DoliDB::select_db database=".$database, LOG_DEBUG); return mysqli_select_db($this->db,$database); } @@ -215,7 +215,7 @@ class DoliDb */ function connect($host, $login, $passwd, $name, $port=0) { - dolibarr_syslog("DoliDB::connect host=$host, port=$port, login=$login, passwd=--hidden--, name=$name",LOG_DEBUG); + dol_syslog("DoliDB::connect host=$host, port=$port, login=$login, passwd=--hidden--, name=$name",LOG_DEBUG); $newhost=$host; $newport=$port; @@ -275,7 +275,7 @@ class DoliDb */ function close() { - dolibarr_syslog("DoliDB::disconnect",LOG_DEBUG); + dol_syslog("DoliDB::disconnect",LOG_DEBUG); return mysqli_close($this->db); } @@ -292,7 +292,7 @@ class DoliDb if ($ret) { $this->transaction_opened++; - dolibarr_syslog("BEGIN Transaction",LOG_DEBUG); + dol_syslog("BEGIN Transaction",LOG_DEBUG); } return $ret; } @@ -316,7 +316,7 @@ class DoliDb if ($ret) { $this->transaction_opened=0; - dolibarr_syslog("COMMIT Transaction".($log?' '.$log:''),LOG_DEBUG); + dol_syslog("COMMIT Transaction".($log?' '.$log:''),LOG_DEBUG); } return $ret; } @@ -338,7 +338,7 @@ class DoliDb { $ret=$this->query("ROLLBACK"); $this->transaction_opened=0; - dolibarr_syslog("ROLLBACK Transaction".($log?' '.$log:''),LOG_DEBUG); + dol_syslog("ROLLBACK Transaction".($log?' '.$log:''),LOG_DEBUG); return $ret; } else @@ -560,7 +560,7 @@ class DoliDb { $string=eregi_replace('[^0-9]','',$string); $tmp=$string.'000000'; - $date=dolibarr_mktime(substr($tmp,8,2),substr($tmp,10,2),substr($tmp,12,2),substr($tmp,4,2),substr($tmp,6,2),substr($tmp,0,4)); + $date=dol_mktime(substr($tmp,8,2),substr($tmp,10,2),substr($tmp,12,2),substr($tmp,4,2),substr($tmp,6,2),substr($tmp,0,4)); return $date; } @@ -585,7 +585,7 @@ class DoliDb { $string=eregi_replace('[^0-9]','',$string); $tmp=$string.'000000'; - $date=dolibarr_mktime(substr($tmp,8,2),substr($tmp,10,2),substr($tmp,12,2),substr($tmp,4,2),substr($tmp,6,2),substr($tmp,0,4),1); + $date=dol_mktime(substr($tmp,8,2),substr($tmp,10,2),substr($tmp,12,2),substr($tmp,4,2),substr($tmp,6,2),substr($tmp,0,4),1); return $date; } */ @@ -750,14 +750,14 @@ class DoliDb $sql = 'CREATE DATABASE '.$database; $sql.= ' DEFAULT CHARACTER SET '.$charset.' DEFAULT COLLATE '.$collation; - dolibarr_syslog($sql,LOG_DEBUG); + dol_syslog($sql,LOG_DEBUG); $ret=$this->query($sql); if (! $ret) { // We try again for compatibility with Mysql < 4.1.1 $sql = 'CREATE DATABASE '.$database; $ret=$this->query($sql); - dolibarr_syslog($sql,LOG_DEBUG); + dol_syslog($sql,LOG_DEBUG); } return $ret; } @@ -853,7 +853,7 @@ class DoliDb $sql .= ",".implode(',',$sqlk); $sql .=") type=".$type; - dolibarr_syslog($sql,LOG_DEBUG); + dol_syslog($sql,LOG_DEBUG); if(! $this -> query($sql)) return -1; else @@ -870,7 +870,7 @@ class DoliDb { $sql="DESC ".$table." ".$field; - dolibarr_syslog($sql,LOG_DEBUG); + dol_syslog($sql,LOG_DEBUG); $this->results = $this->query($sql); return $this->results; } @@ -904,7 +904,7 @@ class DoliDb $sql .= " ".$field_desc['extra']; $sql .= " ".$field_position; - dolibarr_syslog($sql,LOG_DEBUG); + dol_syslog($sql,LOG_DEBUG); if(! $this -> query($sql)) return -1; else @@ -921,7 +921,7 @@ class DoliDb function DDLDropField($table,$field_name) { $sql= "ALTER TABLE ".$table." DROP COLUMN `".$field_name."`"; - dolibarr_syslog($sql,LOG_DEBUG); + dol_syslog($sql,LOG_DEBUG); if (! $this->query($sql)) { $this->error=$this->lasterror(); @@ -946,7 +946,7 @@ class DoliDb $sql.= " VALUES ('$dolibarr_main_db_host','$dolibarr_main_db_user',password('$dolibarr_main_db_pass')"; $sql.= ",'Y','Y','Y','Y','Y','Y','Y','Y');"; - dolibarr_syslog("mysqli.lib::DDLCreateUser", LOG_DEBUG); // No sql to avoid password in log + dol_syslog("mysqli.lib::DDLCreateUser", LOG_DEBUG); // No sql to avoid password in log $resql=$this->query($sql); if (! $resql) { @@ -958,7 +958,7 @@ class DoliDb $sql.= " VALUES ('$dolibarr_main_db_host','$dolibarr_main_db_name','$dolibarr_main_db_user'"; $sql.= ",'Y','Y','Y','Y','Y','Y','Y','Y');"; - dolibarr_syslog("mysqli.lib::DDLCreateUser sql=".$sql); + dol_syslog("mysqli.lib::DDLCreateUser sql=".$sql); $resql=$this->query($sql); if (! $resql) { @@ -967,7 +967,7 @@ class DoliDb $sql="FLUSH Privileges"; - dolibarr_syslog("mysqli.lib::DDLCreateUser sql=".$sql); + dol_syslog("mysqli.lib::DDLCreateUser sql=".$sql); $resql=$this->query($sql); return 1; diff --git a/htdocs/lib/databases/pgsql.lib.php b/htdocs/lib/databases/pgsql.lib.php index 21e6db757e8ebf342347901d90d50a205941b4eb..924d88f76a25b26ecf6b6eab15ed467588974aef 100644 --- a/htdocs/lib/databases/pgsql.lib.php +++ b/htdocs/lib/databases/pgsql.lib.php @@ -85,7 +85,7 @@ class DoliDb $this->connected = 0; $this->ok = 0; $this->error="Pgsql PHP functions are not available in this version of PHP"; - dolibarr_syslog("DoliDB::DoliDB : Pgsql PHP functions are not available in this version of PHP",LOG_ERR); + dol_syslog("DoliDB::DoliDB : Pgsql PHP functions are not available in this version of PHP",LOG_ERR); return $this->ok; } @@ -94,7 +94,7 @@ class DoliDb $this->connected = 0; $this->ok = 0; $this->error=$langs->trans("ErrorWrongHostParameter"); - dolibarr_syslog("DoliDB::DoliDB : Erreur Connect, wrong host parameters",LOG_ERR); + dol_syslog("DoliDB::DoliDB : Erreur Connect, wrong host parameters",LOG_ERR); return $this->ok; } @@ -112,7 +112,7 @@ class DoliDb $this->connected = 0; $this->ok = 0; $this->error='Host, login or password incorrect'; - dolibarr_syslog("DoliDB::DoliDB : Erreur Connect ".$this->error,LOG_ERR); + dol_syslog("DoliDB::DoliDB : Erreur Connect ".$this->error,LOG_ERR); } // Si connexion serveur ok et si connexion base demand�e, on essaie connexion base @@ -130,7 +130,7 @@ class DoliDb $this->database_name = ''; $this->ok = 0; $this->error=$this->error(); - dolibarr_syslog("DoliDB::DoliDB : Erreur Select_db ".$this->error,LOG_ERR); + dol_syslog("DoliDB::DoliDB : Erreur Select_db ".$this->error,LOG_ERR); } } else @@ -412,7 +412,7 @@ class DoliDb */ function close() { - dolibarr_syslog("DoliDB::disconnect",LOG_DEBUG); + dol_syslog("DoliDB::disconnect",LOG_DEBUG); return pg_close($this->db); } @@ -429,7 +429,7 @@ class DoliDb if ($ret) { $this->transaction_opened++; - dolibarr_syslog("BEGIN Transaction",LOG_DEBUG); + dol_syslog("BEGIN Transaction",LOG_DEBUG); } return $ret; } @@ -452,7 +452,7 @@ class DoliDb if ($ret) { $this->transaction_opened=0; - dolibarr_syslog("COMMIT Transaction",LOG_DEBUG); + dol_syslog("COMMIT Transaction",LOG_DEBUG); } return $ret; } @@ -473,7 +473,7 @@ class DoliDb { $ret=$this->query("ROLLBACK;"); $this->transaction_opened=0; - dolibarr_syslog("ROLLBACK Transaction",LOG_DEBUG); + dol_syslog("ROLLBACK Transaction",LOG_DEBUG); return $ret; } else @@ -680,7 +680,7 @@ class DoliDb { $string=eregi_replace('[^0-9]','',$string); $tmp=$string.'000000'; - $date=dolibarr_mktime(substr($tmp,8,2),substr($tmp,10,2),substr($tmp,12,2),substr($tmp,4,2),substr($tmp,6,2),substr($tmp,0,4)); + $date=dol_mktime(substr($tmp,8,2),substr($tmp,10,2),substr($tmp,12,2),substr($tmp,4,2),substr($tmp,6,2),substr($tmp,0,4)); return $date; } @@ -705,7 +705,7 @@ class DoliDb { $string=eregi_replace('[^0-9]','',$string); $tmp=$string.'000000'; - $date=dolibarr_mktime(substr($tmp,8,2),substr($tmp,10,2),substr($tmp,12,2),substr($tmp,4,2),substr($tmp,6,2),substr($tmp,0,4),1); + $date=dol_mktime(substr($tmp,8,2),substr($tmp,10,2),substr($tmp,12,2),substr($tmp,4,2),substr($tmp,6,2),substr($tmp,0,4),1); return $date; }*/ @@ -865,7 +865,7 @@ class DoliDb { $sql = "create user \"".$dolibarr_main_db_user."\" with password '".$dolibarr_main_db_pass."'"; - dolibarr_syslog("pgsql.lib::DDLCreateUser", LOG_DEBUG); // No sql to avoid password in log + dol_syslog("pgsql.lib::DDLCreateUser", LOG_DEBUG); // No sql to avoid password in log $resql=$this->query($sql); if (! $resql) { @@ -904,7 +904,7 @@ class DoliDb $sql .= " ".$field_desc['extra']; $sql .= " ".$field_position; - dolibarr_syslog($sql,LOG_DEBUG); + dol_syslog($sql,LOG_DEBUG); if(! $this -> query($sql)) return -1; else @@ -920,7 +920,7 @@ class DoliDb function DDLDropField($table,$field_name) { $sql= "ALTER TABLE ".$table." DROP COLUMN `".$field_name."`"; - dolibarr_syslog($sql,LOG_DEBUG); + dol_syslog($sql,LOG_DEBUG); if (! $this->query($sql)) { $this->error=$this->lasterror(); diff --git a/htdocs/lib/datepicker.php b/htdocs/lib/datepicker.php index b0c7141eb0d956668ad56cabcd02e7c6707cb8ed..4f7669d853a5603a2a05589bd1255f66a3a07fd8 100644 --- a/htdocs/lib/datepicker.php +++ b/htdocs/lib/datepicker.php @@ -93,7 +93,7 @@ if ($qualified) } else { - dolibarr_print_error('','ErrorBadParameters'); + dol_print_error('','ErrorBadParameters'); } @@ -104,7 +104,7 @@ function xyzToUnixTimestamp($mysqldate){ $year=substr($mysqldate,0,4); $month=substr($mysqldate,4,2); $day=substr($mysqldate,6,2); - $unixtimestamp=dolibarr_mktime(12,0,0,$month,$day,$year); + $unixtimestamp=dol_mktime(12,0,0,$month,$day,$year); return $unixtimestamp; } @@ -112,14 +112,14 @@ function displayBox($selectedDate,$month,$year){ global $dolibarr_main_url_root,$langs,$conf; //print "$selectedDate,$month,$year"; - $thedate=dolibarr_mktime(12,0,0,$month,1,$year); + $thedate=dol_mktime(12,0,0,$month,1,$year); //print "thedate=$thedate"; $today=mktime(); $todayArray=dol_getdate($today); if($selectedDate != "00000000") { $selDate=xyzToUnixTimestamp($selectedDate); - $xyz=dolibarr_date("Ymd",$selDate); + $xyz=dol_date("Ymd",$selDate); } else { @@ -131,8 +131,8 @@ function displayBox($selectedDate,$month,$year){ <tr> <td colspan="6" class="dpHead"> <?php - $selectMonth = dolibarr_date("F", $thedate); - $selectYear = dolibarr_date("Y", $thedate); + $selectMonth = dol_date("F", $thedate); + $selectYear = dol_date("Y", $thedate); echo $langs->trans($selectMonth).", ".$selectYear; ?> </td> @@ -141,7 +141,7 @@ function displayBox($selectedDate,$month,$year){ <tr> <td class="dpButtons" onClick="loadMonth('<?php echo $dolibarr_main_url_root.'/lib/' ?>','<?php echo $month?>','<?php echo $year-1?>','<?php echo $xyz ?>')"><<</td> <td class="dpButtons" onClick="loadMonth('<?php echo $dolibarr_main_url_root.'/lib/' ?>','<?php if($month==1) echo "12"; else echo $month-1?>','<?php if($month==1) echo $year-1; else echo $year?>','<?php echo $xyz ?>')"><</td> - <td colspan="3" class="dpButtons" onClick="loadMonth('<?php echo $dolibarr_main_url_root.'/lib/' ?>','<?php echo dolibarr_date('m',$today)?>','<?php echo $todayArray["year"]?>','<?php echo $xyz ?>')"><?php echo $langs->trans("MonthOfDay") ?></td> + <td colspan="3" class="dpButtons" onClick="loadMonth('<?php echo $dolibarr_main_url_root.'/lib/' ?>','<?php echo dol_date('m',$today)?>','<?php echo $todayArray["year"]?>','<?php echo $xyz ?>')"><?php echo $langs->trans("MonthOfDay") ?></td> <td class="dpButtons" onClick="loadMonth('<?php echo $dolibarr_main_url_root.'/lib/' ?>','<?php if($month==12) echo "1"; else echo $month+1?>','<?php if($month==12) echo $year+1; else echo $year;?>','<?php echo $xyz ?>')">></td> <td class="dpButtons" onClick="loadMonth('<?php echo $dolibarr_main_url_root.'/lib/' ?>','<?php echo $month?>','<?php echo $year+1?>','<?php echo $xyz ?>')">>></td> </tr> @@ -189,8 +189,8 @@ function displayBox($selectedDate,$month,$year){ // Sur click dans calendrier, appelle fonction dpClickDay echo "<TD class=\"".$dayclass."\""; - echo " onMouseOver=\"dpHighlightDay(".$mydate["year"].",".dolibarr_date("n",$thedate).",".$mydate["mday"].",tradMonths)\""; - echo " onClick=\"dpClickDay(".$mydate["year"].",".dolibarr_date("n",$thedate).",".$mydate["mday"].",'".$conf->format_date_short_java."')\""; + echo " onMouseOver=\"dpHighlightDay(".$mydate["year"].",".dol_date("n",$thedate).",".$mydate["mday"].",tradMonths)\""; + echo " onClick=\"dpClickDay(".$mydate["year"].",".dol_date("n",$thedate).",".$mydate["mday"].",'".$conf->format_date_short_java."')\""; echo ">".sprintf("%02s",$mydate["mday"])."</TD>"; $cols++; @@ -198,7 +198,7 @@ function displayBox($selectedDate,$month,$year){ //$thedate=strtotime("tomorrow",$thedate); $day++; - $thedate=dolibarr_mktime(12,0,0,$month,$day,$year); + $thedate=dol_mktime(12,0,0,$month,$day,$year); if ($thedate == '') { $stoploop=1; diff --git a/htdocs/lib/doleditor.class.php b/htdocs/lib/doleditor.class.php index f91abb1f85ca15409880d408b6aeef4530e4c99a..7f6bca8dc8ef313723e20d28affb249e75405535 100644 --- a/htdocs/lib/doleditor.class.php +++ b/htdocs/lib/doleditor.class.php @@ -51,7 +51,7 @@ class DolEditor { global $conf,$langs; - dolibarr_syslog("DolEditor::DolEditor modulepart=".$modulepart); + dol_syslog("DolEditor::DolEditor modulepart=".$modulepart); require_once(DOL_DOCUMENT_ROOT."/includes/fckeditor/fckeditor.php"); diff --git a/htdocs/lib/files.lib.php b/htdocs/lib/files.lib.php index 5e7bd2bfa77227164c07d356d810d03da41a21ff..6d8e7d0284e032cca4bd84f6768ca513dd56356e 100644 --- a/htdocs/lib/files.lib.php +++ b/htdocs/lib/files.lib.php @@ -37,7 +37,7 @@ */ function dol_dir_list($path, $types="all", $recursive=0, $filter="", $excludefilter="", $sortcriteria="name", $sortorder=SORT_ASC, $mode=0) { - dolibarr_syslog("files.lib.php::dol_dir_list $path"); + dol_syslog("files.lib.php::dol_dir_list $path"); $loaddate=$mode?true:false; $loadsize=$mode?true:false; diff --git a/htdocs/lib/functions.lib.php b/htdocs/lib/functions.lib.php index eebad430d8bd06f239e16d82eee412693710df45..5258a8b4edb90ed3fe84c297d3a2eb1bd4e377e4 100644 --- a/htdocs/lib/functions.lib.php +++ b/htdocs/lib/functions.lib.php @@ -273,7 +273,7 @@ function dol_fiche_head($links, $active='0', $title='', $notab=0) print '<a class="tabTitle">'; print ((!defined('MAIN_USE_SHORT_TITLE')) || (defined('MAIN_USE_SHORT_TITLE') && MAIN_USE_SHORT_TITLE)) - ? dolibarr_trunc($title,$limittitle) + ? dol_trunc($title,$limittitle) : $title; print '</a>'; } @@ -380,7 +380,7 @@ function dol_print_date($time,$format='',$to_gmt=false,$outputlangs='',$encodeto || eregi('^([0-9][0-9][0-9][0-9])([0-9][0-9])([0-9][0-9])([0-9][0-9])([0-9][0-9])([0-9][0-9])$',$time,$reg)) { // This part of code should not be used. - dol_syslog("Functions.lib::dolibarr_print_date function call with deprecated value of time in page ".$_SERVER["PHP_SELF"], LOG_WARNING); + dol_syslog("Functions.lib::dol_print_date function call with deprecated value of time in page ".$_SERVER["PHP_SELF"], LOG_WARNING); // Date has format 'YYYY-MM-DD' or 'YYYY-MM-DD HH:MM:SS' or 'YYYYMMDDHHMMSS' $syear = $reg[1]; $smonth = $reg[2]; @@ -389,7 +389,7 @@ function dol_print_date($time,$format='',$to_gmt=false,$outputlangs='',$encodeto $smin = $reg[5]; $ssec = $reg[6]; - $time=dolibarr_mktime($shour,$smin,$ssec,$smonth,$sday,$syear); + $time=dol_mktime($shour,$smin,$ssec,$smonth,$sday,$syear); $ret=adodb_strftime($format,$time,$to_gmt); } else @@ -460,7 +460,7 @@ function dol_stringtotime($string) $string=eregi_replace('[^0-9]','',$string); $tmp=$string.'000000'; - $date=dolibarr_mktime(substr($tmp,8,2),substr($tmp,10,2),substr($tmp,12,2),substr($tmp,4,2),substr($tmp,6,2),substr($tmp,0,4),1); + $date=dol_mktime(substr($tmp,8,2),substr($tmp,10,2),substr($tmp,12,2),substr($tmp,4,2),substr($tmp,6,2),substr($tmp,0,4),1); return $date; } @@ -637,7 +637,7 @@ function dol_print_url($url,$target='_blank',$max=32) $link.=$url; if ($target) $link.='" target="'.$target.'">'; if (! eregi('^http',$url)) $link.='http://'; - $link.=dolibarr_trunc($url,$max); + $link.=dol_trunc($url,$max); $link.='</a>'; return $link; } @@ -1531,7 +1531,7 @@ function dol_print_error($db='',$error='') print $langs->trans("InformationToHelpDiagnose").":<br>\n"; print "<b>".$langs->trans("Dolibarr").":</b> ".DOL_VERSION."<br>\n";; - print "<b>".$langs->trans("Date").":</b> ".dolibarr_print_date(time(),'dayhourlog')."<br>\n";; + print "<b>".$langs->trans("Date").":</b> ".dol_print_date(time(),'dayhourlog')."<br>\n";; if (isset($conf->global->MAIN_FEATURES_LEVEL)) print "<b>".$langs->trans("LevelOfFeature").":</b> ".$conf->global->MAIN_FEATURES_LEVEL."<br>\n";; print "<b>".$langs->trans("Server").":</b> ".$_SERVER["SERVER_SOFTWARE"]."<br>\n";; print "<b>".$langs->trans("RequestedUrl").":</b> ".$_SERVER["REQUEST_URI"]."<br>\n";; @@ -2625,15 +2625,15 @@ function print_date_range($date_start,$date_end,$format = '',$outputlangs='') if ($date_start && $date_end) { - print ' ('.$outputlangs->trans('DateFromTo',dolibarr_print_date($date_start, $format, false, $outputlangs),dolibarr_print_date($date_end, $format, false, $outputlangs)).')'; + print ' ('.$outputlangs->trans('DateFromTo',dol_print_date($date_start, $format, false, $outputlangs),dol_print_date($date_end, $format, false, $outputlangs)).')'; } if ($date_start && ! $date_end) { - print ' ('.$outputlangs->trans('DateFrom',dolibarr_print_date($date_start, $format, false, $outputlangs)).')'; + print ' ('.$outputlangs->trans('DateFrom',dol_print_date($date_start, $format, false, $outputlangs)).')'; } if (! $date_start && $date_end) { - print ' ('.$outputlangs->trans('DateUntil',dolibarr_print_date($date_end, $format, false, $outputlangs)).')'; + print ' ('.$outputlangs->trans('DateUntil',dol_print_date($date_end, $format, false, $outputlangs)).')'; } } diff --git a/htdocs/lib/functions2.lib.php b/htdocs/lib/functions2.lib.php index 93115725668abea6edd6cb8c58ddf36f17763d77..71ddda16f7cc4b3a63d1c83ecbc845b1ce8b67bd 100644 --- a/htdocs/lib/functions2.lib.php +++ b/htdocs/lib/functions2.lib.php @@ -87,31 +87,31 @@ function dol_print_object_info($object) print $langs->trans("CreatedBy")." : " . $object->user_creation->fullname . '<br>'; if (isset($object->date_creation)) - print $langs->trans("DateCreation")." : " . dolibarr_print_date($object->date_creation,"dayhourtext") . '<br>'; + print $langs->trans("DateCreation")." : " . dol_print_date($object->date_creation,"dayhourtext") . '<br>'; if (isset($object->user_modification) && $object->user_modification->fullname) print $langs->trans("ModifiedBy")." : " . $object->user_modification->fullname . '<br>'; if (isset($object->date_modification)) - print $langs->trans("DateLastModification")." : " . dolibarr_print_date($object->date_modification,"dayhourtext") . '<br>'; + print $langs->trans("DateLastModification")." : " . dol_print_date($object->date_modification,"dayhourtext") . '<br>'; if (isset($object->user_validation) && $object->user_validation->fullname) print $langs->trans("ValidatedBy")." : " . $object->user_validation->fullname . '<br>'; if (isset($object->date_validation)) - print $langs->trans("DateValidation")." : " . dolibarr_print_date($object->date_validation,"dayhourtext") . '<br>'; + print $langs->trans("DateValidation")." : " . dol_print_date($object->date_validation,"dayhourtext") . '<br>'; if (isset($object->user_cloture) && $object->user_cloture->fullname ) print $langs->trans("ClosedBy")." : " . $object->user_cloture->fullname . '<br>'; if (isset($object->date_cloture)) - print $langs->trans("DateClosing")." : " . dolibarr_print_date($object->date_cloture,"dayhourtext") . '<br>'; + print $langs->trans("DateClosing")." : " . dol_print_date($object->date_cloture,"dayhourtext") . '<br>'; if (isset($object->user_rappro) && $object->user_rappro->fullname ) print $langs->trans("ConciliatedBy")." : " . $object->user_rappro->fullname . '<br>'; if (isset($object->date_rappro)) - print $langs->trans("DateConciliating")." : " . dolibarr_print_date($object->date_rappro,"dayhourtext") . '<br>'; + print $langs->trans("DateConciliating")." : " . dol_print_date($object->date_rappro,"dayhourtext") . '<br>'; } @@ -316,7 +316,7 @@ function get_next_value($db,$mask,$table,$field,$where='',$valueforccc='',$date= $obj = $db->fetch_object($resql); $counter = $obj->val; } - else dolibarr_print_error($db); + else dol_print_error($db); if (empty($counter) || eregi('[^0-9]',$counter)) $counter=$maskoffset; $counter++; @@ -359,7 +359,7 @@ function get_next_value($db,$mask,$table,$field,$where='',$valueforccc='',$date= $maskrefclient_obj = $db->fetch_object($maskrefclient_resql); $maskrefclient_counter = $maskrefclient_obj->val; } - else dolibarr_print_error($db); + else dol_print_error($db); if (empty($maskrefclient_counter) || eregi('[^0-9]',$maskrefclient_counter)) $maskrefclient_counter=$maskrefclient_maskoffset; $maskrefclient_counter++; } @@ -702,7 +702,7 @@ function dol_set_user_param($db, &$user, $tab) $resql=$db->query($sql); if (! $resql) { - dolibarr_print_error($db); + dol_print_error($db); $db->rollback(); return -1; } @@ -720,7 +720,7 @@ function dol_set_user_param($db, &$user, $tab) $result=$db->query($sql); if (! $result) { - dolibarr_print_error($db); + dol_print_error($db); $db->rollback(); return -1; } diff --git a/htdocs/lib/images.lib.php b/htdocs/lib/images.lib.php index 2d388e941c4380b11e53aeb853e27f558c3d3ec4..83ec91fa998f1b31e1f5b8d20ef9caa07c7f2cfa 100644 --- a/htdocs/lib/images.lib.php +++ b/htdocs/lib/images.lib.php @@ -43,7 +43,7 @@ function vignette($file, $maxWidth = 160, $maxHeight = 120, $extName='_small', $ global $conf,$langs; - dolibarr_syslog("functions.inc::vignette file=".$file." extName=".$extName." maxWidth=".$maxWidth." maxHeight=".$maxHeight." quality=".$quality); + dol_syslog("functions.inc::vignette file=".$file." extName=".$extName." maxWidth=".$maxWidth." maxHeight=".$maxHeight." quality=".$quality); // Clean parameters $file=trim($file); @@ -84,7 +84,7 @@ function vignette($file, $maxWidth = 160, $maxHeight = 120, $extName='_small', $ if ($infoImg[0] < $maxWidth && $infoImg[1] < $maxHeight) { // On cree toujours les vignettes - dolibarr_syslog("File size is smaller than thumb size",LOG_DEBUG); + dol_syslog("File size is smaller than thumb size",LOG_DEBUG); //return 'Le fichier '.$file.' ne necessite pas de creation de vignette'; } @@ -208,7 +208,7 @@ function vignette($file, $maxWidth = 160, $maxHeight = 120, $extName='_small', $ } if (function_exists("imagefill")) imagefill($imgThumb, 0, 0, $trans_colour); - dolibarr_syslog("vignette: convert image from ($imgWidth x $imgHeight) to ($thumbWidth x $thumbHeight) as $extImg, newquality=$newquality"); + dol_syslog("vignette: convert image from ($imgWidth x $imgHeight) to ($thumbWidth x $thumbHeight) as $extImg, newquality=$newquality"); //imagecopyresized($imgThumb, $img, 0, 0, 0, 0, $thumbWidth, $thumbHeight, $imgWidth, $imgHeight); // Insere l'image de base redimensionnee imagecopyresampled($imgThumb, $img, 0, 0, 0, 0, $thumbWidth, $thumbHeight, $imgWidth, $imgHeight); // Insere l'image de base redimensionnee diff --git a/htdocs/lib/ldap.class.php b/htdocs/lib/ldap.class.php index 70d4b64c39dd0dcdfc42ce3261af193b862cbe07..860173f7be0241078270a42d0cce85f177362fc1 100644 --- a/htdocs/lib/ldap.class.php +++ b/htdocs/lib/ldap.class.php @@ -214,7 +214,7 @@ class Ldap if ($this->serverType == "activedirectory") { $result=$this->setReferrals(); - dolibarr_syslog("Ldap::connect_bind try bindauth for activedirectory on ".$host." user=".$this->searchUser,LOG_DEBUG); + dol_syslog("Ldap::connect_bind try bindauth for activedirectory on ".$host." user=".$this->searchUser,LOG_DEBUG); $this->result=$this->bindauth($this->searchUser,$this->searchPassword); if ($this->result) { @@ -232,7 +232,7 @@ class Ldap // Try in auth mode if ($this->searchUser && $this->searchPassword) { - dolibarr_syslog("Ldap::connect_bind try bindauth on ".$host." user=".$this->searchUser,LOG_DEBUG); + dol_syslog("Ldap::connect_bind try bindauth on ".$host." user=".$this->searchUser,LOG_DEBUG); $this->result=$this->bindauth($this->searchUser,$this->searchPassword); if ($this->result) { @@ -248,7 +248,7 @@ class Ldap // Try in anonymous if (! $this->bind) { - dolibarr_syslog("Ldap::connect_bind try bind on ".$host,LOG_DEBUG); + dol_syslog("Ldap::connect_bind try bind on ".$host,LOG_DEBUG); $result=$this->bind(); if ($result) { @@ -270,13 +270,13 @@ class Ldap if ($connected) { $return=$connected; - dolibarr_syslog("Ldap::connect_bind return=".$return, LOG_DEBUG); + dol_syslog("Ldap::connect_bind return=".$return, LOG_DEBUG); } else { $this->error='Failed to connect to LDAP'; $return=-1; - dolibarr_syslog("Ldap::connect_bind return=".$return, LOG_WARNING); + dol_syslog("Ldap::connect_bind return=".$return, LOG_WARNING); } return $return; } @@ -413,7 +413,7 @@ class Ldap if (! $olddn) $olddn=$dn; - dolibarr_syslog("Ldap::update dn=".$dn." olddn=".$olddn); + dol_syslog("Ldap::update dn=".$dn." olddn=".$olddn); // On supprime et on ins�re $result = $this->delete($olddn); @@ -421,13 +421,13 @@ class Ldap if ($result <= 0) { $this->error = ldap_errno($this->connection)." ".ldap_error($this->connection)." ".$this->error; - dolibarr_syslog("Ldap::update ".$this->error,LOG_ERR); + dol_syslog("Ldap::update ".$this->error,LOG_ERR); //print_r($info); return -1; } else { - dolibarr_syslog("Ldap::update done successfully"); + dol_syslog("Ldap::update done successfully"); return 1; } } @@ -489,7 +489,7 @@ class Ldap { global $conf; - dolibarr_syslog("Ldap::add dn=".$dn." info=".join(',',$info)); + dol_syslog("Ldap::add dn=".$dn." info=".join(',',$info)); // Encode to LDAP page code $dn=$this->convFromOutputCharset($dn,$this->ldapcharset); @@ -505,13 +505,13 @@ class Ldap if ($result) { - dolibarr_syslog("Ldap::add successfull", LOG_DEBUG); + dol_syslog("Ldap::add successfull", LOG_DEBUG); return 1; } else { $this->error=@ldap_error($this->connection); - dolibarr_syslog("Ldap::add failed: ".$this->error, LOG_ERR); + dol_syslog("Ldap::add failed: ".$this->error, LOG_ERR); return -1; } } @@ -525,7 +525,7 @@ class Ldap { global $conf; - dolibarr_syslog("Ldap::delete Delete LDAP entry dn=".$dn); + dol_syslog("Ldap::delete Delete LDAP entry dn=".$dn); // Encode to LDAP page code $dn=$this->convFromOutputCharset($dn,$this->ldapcharset); @@ -661,13 +661,13 @@ class Ldap { $fulllist=array(); - dolibarr_syslog("Ldap::getRecords search=".$search." userDn=".$userDn." useridentifier=".$useridentifier." attributeArray=array(".join(',',$attributeArray).")"); + dol_syslog("Ldap::getRecords search=".$search." userDn=".$userDn." useridentifier=".$useridentifier." attributeArray=array(".join(',',$attributeArray).")"); // if the directory is AD, then bind first with the search user first if ($this->serverType == "activedirectory") { $this->bindauth($this->searchUser, $this->searchPassword); - dolibarr_syslog("Ldap::bindauth serverType=activedirectory searchUser=".$this->searchUser); + dol_syslog("Ldap::bindauth serverType=activedirectory searchUser=".$this->searchUser); } // Define filter @@ -690,13 +690,13 @@ class Ldap if (is_array($attributeArray)) { // Return list with required fields - dolibarr_syslog("Ldap::getRecords connection=".$this->connection." userDn=".$userDn." filter=".$filter. " attributeArray=(".join(',',$attributeArray).")"); + dol_syslog("Ldap::getRecords connection=".$this->connection." userDn=".$userDn." filter=".$filter. " attributeArray=(".join(',',$attributeArray).")"); $this->result = @ldap_search($this->connection, $userDn, $filter, $attributeArray); } else { // Return list with fields selected by default - dolibarr_syslog("Ldap::getRecords connection=".$this->connection." userDn=".$userDn." filter=".$filter); + dol_syslog("Ldap::getRecords connection=".$this->connection." userDn=".$userDn." filter=".$filter); $this->result = @ldap_search($this->connection, $userDn, $filter); } if (!$this->result) @@ -842,7 +842,7 @@ class Ldap */ function search($checkDn, $filter) { - dolibarr_syslog("Ldap::search checkDn=".$checkDn." filter=".$filter); + dol_syslog("Ldap::search checkDn=".$checkDn." filter=".$filter); $checkDn=$this->convFromOutputCharset($checkDn,$this->ldapcharset); $filter=$this->convFromOutputCharset($filter,$this->ldapcharset); diff --git a/htdocs/lib/pdf.lib.php b/htdocs/lib/pdf.lib.php index 7e467335e57f51a2d9ccc9807e15946a0c75bfb4..61d319e4f6527838d0706a0b2e600770a9d86fd5 100644 --- a/htdocs/lib/pdf.lib.php +++ b/htdocs/lib/pdf.lib.php @@ -278,15 +278,15 @@ function pdf_getlinedesc($line,$outputlangs) // Show duration if exists if ($line->date_start && $line->date_end) { - $period='('.$outputlangs->transnoentitiesnoconv('DateFromTo',dolibarr_print_date($line->date_start, $format, false, $outputlangs),dolibarr_print_date($line->date_end, $format, false, $outputlangs)).')'; + $period='('.$outputlangs->transnoentitiesnoconv('DateFromTo',dol_print_date($line->date_start, $format, false, $outputlangs),dol_print_date($line->date_end, $format, false, $outputlangs)).')'; } if ($line->date_start && ! $line->date_end) { - $period='('.$outputlangs->transnoentitiesnoconv('DateFrom',dolibarr_print_date($line->date_start, $format, false, $outputlangs)).')'; + $period='('.$outputlangs->transnoentitiesnoconv('DateFrom',dol_print_date($line->date_start, $format, false, $outputlangs)).')'; } if (! $line->date_start && $line->date_end) { - $period='('.$outputlangs->transnoentitiesnoconv('DateUntil',dolibarr_print_date($line->date_end, $format, false, $outputlangs)).')'; + $period='('.$outputlangs->transnoentitiesnoconv('DateUntil',dol_print_date($line->date_end, $format, false, $outputlangs)).')'; } //print '>'.$outputlangs->charset_output.','.$period; $libelleproduitservice.="<br>".dol_htmlentitiesbr($period,1); diff --git a/htdocs/lib/price.lib.php b/htdocs/lib/price.lib.php index 2e7dca9deed4359941b3da49d8050f9dd43402e5..5e837d0c7cc6cdbe8ef7ae6bd97921ba9188ee9b 100644 --- a/htdocs/lib/price.lib.php +++ b/htdocs/lib/price.lib.php @@ -44,7 +44,7 @@ function calcul_price_total($qty, $pu, $remise_percent_ligne, $txtva, $remise_pe $result=array(); - //dolibarr_syslog("price.lib::calcul_price_total $qty, $pu, $remise_percent_ligne, $txtva, $price_base_type $info_bits"); + //dol_syslog("price.lib::calcul_price_total $qty, $pu, $remise_percent_ligne, $txtva, $price_base_type $info_bits"); if ($price_base_type == 'HT') { // On travaille par defaut en partant du prix HT diff --git a/htdocs/lib/product.lib.php b/htdocs/lib/product.lib.php index 10659142e29489b215949c10bf9a9f0288dd89c1..adba6e50ed68c85f7113f1cf52b95301b9c68bf1 100644 --- a/htdocs/lib/product.lib.php +++ b/htdocs/lib/product.lib.php @@ -162,7 +162,7 @@ function show_stats_for_company($product,$socid) if ($conf->propal->enabled && $user->rights->propale->lire) { $ret=$product->load_stats_propale($socid); - if ($ret < 0) dolibarr_print_error($db); + if ($ret < 0) dol_print_error($db); $langs->load("propal"); print '<tr><td>'; print '<a href="propal.php?id='.$product->id.'">'.img_object('','propal').' '.$langs->trans("Proposals").'</a>'; @@ -179,7 +179,7 @@ function show_stats_for_company($product,$socid) if ($conf->commande->enabled && $user->rights->commande->lire) { $ret=$product->load_stats_commande($socid); - if ($ret < 0) dolibarr_print_error($db); + if ($ret < 0) dol_print_error($db); $langs->load("orders"); print '<tr><td>'; print '<a href="commande.php?id='.$product->id.'">'.img_object('','order').' '.$langs->trans("CustomersOrders").'</a>'; @@ -196,7 +196,7 @@ function show_stats_for_company($product,$socid) if ($conf->fournisseur->enabled && $user->rights->fournisseur->commande->lire) { $ret=$product->load_stats_commande_fournisseur($socid); - if ($ret < 0) dolibarr_print_error($db); + if ($ret < 0) dol_print_error($db); $langs->load("orders"); print '<tr><td>'; print '<a href="commande_fournisseur.php?id='.$product->id.'">'.img_object('','order').' '.$langs->trans("SuppliersOrders").'</a>'; @@ -213,7 +213,7 @@ function show_stats_for_company($product,$socid) if ($conf->contrat->enabled && $user->rights->contrat->lire) { $ret=$product->load_stats_contrat($socid); - if ($ret < 0) dolibarr_print_error($db); + if ($ret < 0) dol_print_error($db); $langs->load("contracts"); print '<tr><td>'; print '<a href="contrat.php?id='.$product->id.'">'.img_object('','contract').' '.$langs->trans("Contracts").'</a>'; @@ -230,7 +230,7 @@ function show_stats_for_company($product,$socid) if ($conf->facture->enabled && $user->rights->facture->lire) { $ret=$product->load_stats_facture($socid); - if ($ret < 0) dolibarr_print_error($db); + if ($ret < 0) dol_print_error($db); $langs->load("bills"); print '<tr><td>'; print '<a href="facture.php?id='.$product->id.'">'.img_object('','bill').' '.$langs->trans("CustomersInvoices").'</a>'; @@ -247,7 +247,7 @@ function show_stats_for_company($product,$socid) if ($conf->fournisseur->enabled && $user->rights->fournisseur->facture->lire) { $ret=$product->load_stats_facture_fournisseur($socid); - if ($ret < 0) dolibarr_print_error($db); + if ($ret < 0) dol_print_error($db); $langs->load("bills"); print '<tr><td>'; print '<a href="facture_fournisseur.php?id='.$product->id.'">'.img_object('','bill').' '.$langs->trans("SuppliersInvoices").'</a>'; diff --git a/htdocs/lib/project.lib.php b/htdocs/lib/project.lib.php index 67d55dec480d945487072f6b05b2f4e7bcdd78f6..20d4104abfc5842ad848602f21f95e4bdb64960b 100644 --- a/htdocs/lib/project.lib.php +++ b/htdocs/lib/project.lib.php @@ -100,7 +100,7 @@ function select_projects($socid, $selected='', $htmlname='projectid') $sql.= " WHERE (fk_soc='".$socid."' or fk_soc IS NULL)"; $sql.= " ORDER BY p.title ASC"; - dolibarr_syslog("project.lib::select_projects sql=".$sql); + dol_syslog("project.lib::select_projects sql=".$sql); $resql=$db->query($sql); if ($resql) { @@ -115,11 +115,11 @@ function select_projects($socid, $selected='', $htmlname='projectid') $obj = $db->fetch_object($resql); if (!empty($selected) && $selected == $obj->rowid) { - print '<option value="'.$obj->rowid.'" selected="true">'.dolibarr_trunc($obj->ref,12).' - '.dolibarr_trunc($obj->title,12).'</option>'; + print '<option value="'.$obj->rowid.'" selected="true">'.dol_trunc($obj->ref,12).' - '.dol_trunc($obj->title,12).'</option>'; } else { - print '<option value="'.$obj->rowid.'">'.dolibarr_trunc($obj->ref,12).' - '.dolibarr_trunc($obj->title,12).'</option>'; + print '<option value="'.$obj->rowid.'">'.dol_trunc($obj->ref,12).' - '.dol_trunc($obj->title,12).'</option>'; } $i++; } @@ -130,7 +130,7 @@ function select_projects($socid, $selected='', $htmlname='projectid') } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); return -1; } } @@ -312,7 +312,7 @@ function clean_orphelins($db) } else { - dolibarr_print_error($db); + dol_print_error($db); } if (sizeof($listofid)) diff --git a/htdocs/lib/report.lib.php b/htdocs/lib/report.lib.php index 0f900300f3fe32a9790324ecdf13a3dbad20aa49..3cd6684eee08e7968613adc4d23a1ea435657dcb 100644 --- a/htdocs/lib/report.lib.php +++ b/htdocs/lib/report.lib.php @@ -43,7 +43,7 @@ function report_header($nom,$variante='',$period,$periodlink,$description,$build $h=0; $head[$h][0] = $_SERVER["PHP_SELF"]; $head[$h][1] = $langs->trans("Report"); - dolibarr_fiche_head($head, $hselected, $societe->nom); + dol_fiche_head($head, $hselected, $societe->nom); print '<table width="100%" class="border">'; @@ -78,7 +78,7 @@ function report_header($nom,$variante='',$period,$periodlink,$description,$build print '<td>'.$langs->trans("GeneratedOn").'</td>'; if (! $exportlink) print '<td colspan="3">'; else print '<td>'; - print dolibarr_print_date($builddate); + print dol_print_date($builddate); if ($exportlink) print '</td><td>'.$langs->trans("Export").'</td><td>'.$exportlink; print '</td></tr>'; diff --git a/htdocs/lib/security.lib.php b/htdocs/lib/security.lib.php index 7b08c71233c5ce6617ea2b2d6b3eea2ea666fca1..1fbbd06bc7345838c3eb035fd2f31c18b0f7d156 100644 --- a/htdocs/lib/security.lib.php +++ b/htdocs/lib/security.lib.php @@ -219,7 +219,7 @@ function dol_loginfunction($langs,$conf,$mysoc) */ function makesalt($type=CRYPT_SALT_LENGTH) { - dolibarr_syslog("security.lib.php::makesalt type=".$type); + dol_syslog("security.lib.php::makesalt type=".$type); switch($type) { case 12: // 8 + 4 @@ -234,7 +234,7 @@ function makesalt($type=CRYPT_SALT_LENGTH) while(strlen($salt) < $saltlen) $salt.=chr(rand(64,126)); $result=$saltprefix.$salt.$saltsuffix; - dolibarr_syslog("security.lib.php::makesalt return=".$result); + dol_syslog("security.lib.php::makesalt return=".$result); return $result; } @@ -245,7 +245,7 @@ function makesalt($type=CRYPT_SALT_LENGTH) */ function encodedecode_dbpassconf($level=0) { - dolibarr_syslog("security.lib::encodedecode_dbpassconf level=".$level, LOG_DEBUG); + dol_syslog("security.lib::encodedecode_dbpassconf level=".$level, LOG_DEBUG); $config = ''; if ($fp = fopen(DOL_DOCUMENT_ROOT.'/conf/conf.php','r')) @@ -287,13 +287,13 @@ function encodedecode_dbpassconf($level=0) } else { - dolibarr_syslog("security.lib::encodedecode_dbpassconf Failed to open conf.php file for writing", LOG_WARNING); + dol_syslog("security.lib::encodedecode_dbpassconf Failed to open conf.php file for writing", LOG_WARNING); return -1; } } else { - dolibarr_syslog("security.lib::encodedecode_dbpassconf Failed to read conf.php", LOG_ERR); + dol_syslog("security.lib::encodedecode_dbpassconf Failed to read conf.php", LOG_ERR); return -2; } } diff --git a/htdocs/lib/sendings.lib.php b/htdocs/lib/sendings.lib.php index f8fe8ffee4fd0c203e8b8f99315b911bf767473e..8e1060fdd3ed846ade5c92d3e4940748b7233c70 100644 --- a/htdocs/lib/sendings.lib.php +++ b/htdocs/lib/sendings.lib.php @@ -48,7 +48,7 @@ function show_list_sending_receive($origin='commande',$origin_id,$filter='') $sql.= " AND ed.fk_expedition = e.rowid"; $sql.= " ORDER BY obj.fk_product"; - dolibarr_syslog("show_list_sending_receive sql=".$sql, LOG_DEBUG); + dol_syslog("show_list_sending_receive sql=".$sql, LOG_DEBUG); $resql = $db->query($sql); if ($resql) { @@ -91,13 +91,13 @@ function show_list_sending_receive($origin='commande',$origin_id,$filter='') $product->fetch($objp->fk_product); print '<td>'; - print '<a href="'.DOL_URL_ROOT.'/product/fiche.php?id='.$objp->fk_product.'">'.img_object($langs->trans("ShowProduct"),"product").' '.$product->ref.'</a> - '.dolibarr_trunc($product->libelle,20); - if ($objp->description) print '<br>'.dol_htmlentitiesbr(dolibarr_trunc($objp->description,24)); + print '<a href="'.DOL_URL_ROOT.'/product/fiche.php?id='.$objp->fk_product.'">'.img_object($langs->trans("ShowProduct"),"product").' '.$product->ref.'</a> - '.dol_trunc($product->libelle,20); + if ($objp->description) print '<br>'.dol_htmlentitiesbr(dol_trunc($objp->description,24)); print '</td>'; } else { - print "<td>".dol_htmlentitiesbr(dolibarr_trunc($objp->description,24))."</td>\n"; + print "<td>".dol_htmlentitiesbr(dol_trunc($objp->description,24))."</td>\n"; } //print '<td align="center">'.$objp->qty_asked.'</td>'; @@ -107,14 +107,14 @@ function show_list_sending_receive($origin='commande',$origin_id,$filter='') print '<td align="center">'.$objp->qty_shipped.'</td>'; - print '<td align="center" nowrap="nowrap">'.dolibarr_print_date($objp->date_expedition,'dayhour').'</td>'; + print '<td align="center" nowrap="nowrap">'.dol_print_date($objp->date_expedition,'dayhour').'</td>'; if ($conf->livraison_bon->enabled) { if ($objp->livraison_id) { print '<td><a href="'.DOL_URL_ROOT.'/livraison/fiche.php?id='.$objp->livraison_id.'">'.img_object($langs->trans("ShowSending"),'sending').' '.$objp->livraison_ref.'<a></td>'; print '<td align="center">'.$objp->qty_received.'</td>'; - print '<td>'.dolibarr_print_date($objp->date_delivery,'dayhour').'</td>'; + print '<td>'.dol_print_date($objp->date_delivery,'dayhour').'</td>'; } else { @@ -133,7 +133,7 @@ function show_list_sending_receive($origin='commande',$origin_id,$filter='') } else { - dolibarr_print_error($db); + dol_print_error($db); } return 1; diff --git a/htdocs/lib/tax.lib.php b/htdocs/lib/tax.lib.php index b2ec8c54040245633dafb0b43808a38f3be2e8cd..a69e6d40df092af27689b68433de7e4aee362199 100644 --- a/htdocs/lib/tax.lib.php +++ b/htdocs/lib/tax.lib.php @@ -116,7 +116,7 @@ function vat_by_thirdparty($db, $y, $modetax, $direction) if ($sql && $sql=='TODO') return -2; if ($sql && $sql!='TODO') { - dolibarr_syslog("Client::vat_by_customer sql=".$sql); + dol_syslog("Client::vat_by_customer sql=".$sql); $resql = $db->query($sql); if ($resql) { @@ -129,7 +129,7 @@ function vat_by_thirdparty($db, $y, $modetax, $direction) } else { - dolibarr_print_error($db); + dol_print_error($db); return -3; } } @@ -245,7 +245,7 @@ function vat_by_quarter($db, $y, $q, $modetax, $direction) if ($sql && $sql=='TODO') return -2; if ($sql && $sql!='TODO') { - dolibarr_syslog("Client::vat_by_quarter sql=".$sql); + dol_syslog("Client::vat_by_quarter sql=".$sql); $resql = $db->query($sql); if ($resql) { @@ -285,7 +285,7 @@ function vat_by_quarter($db, $y, $q, $modetax, $direction) } else { - dolibarr_print_error($db); + dol_print_error($db); return -3; } } @@ -364,7 +364,7 @@ function vat_by_quarter($db, $y, $q, $modetax, $direction) if ($sql && $sql=='TODO') return -2; if ($sql && $sql!='TODO') { - dolibarr_syslog("Client::vat_by_quarter sql=".$sql); + dol_syslog("Client::vat_by_quarter sql=".$sql); $resql = $db->query($sql); if ($resql) { @@ -404,7 +404,7 @@ function vat_by_quarter($db, $y, $q, $modetax, $direction) } else { - dolibarr_print_error($db); + dol_print_error($db); return -3; } } diff --git a/htdocs/lib/xcal.lib.php b/htdocs/lib/xcal.lib.php index 13ffdae40a8b2cf09bf347d56c76d7de7cfc88f8..91a1ec3ff71a43f7a0727612ccc6c9d81fd3a6e7 100644 --- a/htdocs/lib/xcal.lib.php +++ b/htdocs/lib/xcal.lib.php @@ -38,7 +38,7 @@ function build_calfile($format='vcal',$title,$desc,$events_array,$outputfile,$fi { global $langs; - dolibarr_syslog("xcal.lib.php::build_calfile Build cal file ".$outputfile." to format ".$format); + dol_syslog("xcal.lib.php::build_calfile Build cal file ".$outputfile." to format ".$format); if (empty($outputfile)) return -1; @@ -143,11 +143,11 @@ function build_calfile($format='vcal',$title,$desc,$events_array,$outputfile,$fi //fwrite($calfileh,"CLASS:PUBLIC\n"); // PUBLIC, PRIVATE, CONFIDENTIAL // Date must be GMT dates - fwrite($calfileh,"DTSTAMP:".dolibarr_print_date($now,'dayhourxcard',true)."\n"); - $startdatef = dolibarr_print_date($startdate,'dayhourxcard',true); + fwrite($calfileh,"DTSTAMP:".dol_print_date($now,'dayhourxcard',true)."\n"); + $startdatef = dol_print_date($startdate,'dayhourxcard',true); fwrite($calfileh,"DTSTART:".$startdatef."\n"); if (empty($enddate)) $enddate=$startdate+$duration; - $enddatef = dolibarr_print_date($enddate,'dayhourxcard',true); + $enddatef = dol_print_date($enddate,'dayhourxcard',true); fwrite($calfileh,"DTEND:".$enddatef."\n"); if (! empty($transparency)) fwrite($calfileh,"TRANSP:".$transparency."\n"); @@ -181,7 +181,7 @@ function build_calfile($format='vcal',$title,$desc,$events_array,$outputfile,$fi fwrite($calfileh,"LOCATION:".$location."\n"); fwrite($calfileh,"TRANSP:OPAQUE\n"); fwrite($calfileh,"CLASS:CONFIDENTIAL\n"); - fwrite($calfileh,"DTSTAMP:".dolibarr_print_date($startdatef,'dayhourxcard',true)."\n"); + fwrite($calfileh,"DTSTAMP:".dol_print_date($startdatef,'dayhourxcard',true)."\n"); fwrite($calfileh,"END:VJOURNAL\n"); } @@ -192,7 +192,7 @@ function build_calfile($format='vcal',$title,$desc,$events_array,$outputfile,$fi $comment=array(); $comment ['eid'] = $eid; $comment ['url'] = $linktoevent; - $comment ['date'] = dolibarr_mktime($evttime,"Ymd"); + $comment ['date'] = dol_mktime($evttime,"Ymd"); $comment ['duration'] = $duration; $comment ['startdate'] = $startdate; $comment ['enddate'] = $enddate; @@ -211,7 +211,7 @@ function build_calfile($format='vcal',$title,$desc,$events_array,$outputfile,$fi } else { - dolibarr_syslog("xcal.lib.php::build_cal_file Failed to open file ".$outputfile." for writing"); + dol_syslog("xcal.lib.php::build_cal_file Failed to open file ".$outputfile." for writing"); return -2; } } @@ -232,7 +232,7 @@ function build_rssfile($format='rss',$title,$desc,$events_array,$outputfile,$fil global $user,$conf,$langs; global $dolibarr_main_url_root; - dolibarr_syslog("xcal.lib.php::build_rssfile Build rss file ".$outputfile." to format ".$format); + dol_syslog("xcal.lib.php::build_rssfile Build rss file ".$outputfile." to format ".$format); if (empty($outputfile)) return -1; diff --git a/htdocs/livraison/fiche.php b/htdocs/livraison/fiche.php index ecf3cb775b6ccfd01604b5ed05495e8507d4a30f..3fcf99ce8c698afd9c3ebaa2c8e1e6e72a82acd8 100644 --- a/htdocs/livraison/fiche.php +++ b/htdocs/livraison/fiche.php @@ -152,7 +152,7 @@ if ($_REQUEST['action'] == 'builddoc') // En get ou en post $result=delivery_order_pdf_create($db, $_REQUEST['id'],$_REQUEST['model'],$outputlangs); if ($result <= 0) { - dolibarr_print_error($db,$result); + dol_print_error($db,$result); exit; } } @@ -217,7 +217,7 @@ if ($_GET["action"] == 'create') print "</td></tr>"; print "<tr><td>".$langs->trans("Date")."</td>"; - print "<td>".dolibarr_print_date($commande->date,'dayhourtext')."</td>\n"; + print "<td>".dol_print_date($commande->date,'dayhourtext')."</td>\n"; print '<td>'.$langs->trans("Order").'</td><td><a href="'.DOL_URL_ROOT.'/commande/fiche.php?id='.$commande->id.'">'.img_object($langs->trans("ShowOrder"),'order').' '.$commande->ref.'</a>'; print "</td></tr>\n"; @@ -347,7 +347,7 @@ if ($_GET["action"] == 'create') } else { - dolibarr_print_error($db); + dol_print_error($db); } } else @@ -390,7 +390,7 @@ else $hselected = $h; $h++; - dolibarr_fiche_head($head, $hselected, $langs->trans("Sending")); + dol_fiche_head($head, $hselected, $langs->trans("Sending")); /* * Confirmation de la suppression @@ -457,7 +457,7 @@ else // Date print '<tr><td>'.$langs->trans("Date").'</td>'; - print '<td colspan="3">'.dolibarr_print_date($livraison->date_creation,'dayhourtext')."</td>\n"; + print '<td colspan="3">'.dol_print_date($livraison->date_creation,'dayhourtext')."</td>\n"; print '</tr>'; // Statut diff --git a/htdocs/livraison/livraison.class.php b/htdocs/livraison/livraison.class.php index d14afe7a014296b40c34c0596ae8c7a2e737c41d..5c23e9c74cfdfb2df1b222a43f24920f302f5798 100644 --- a/htdocs/livraison/livraison.class.php +++ b/htdocs/livraison/livraison.class.php @@ -79,7 +79,7 @@ class Livraison extends CommonObject { global $conf; - dolibarr_syslog("Livraison::create"); + dol_syslog("Livraison::create"); $error = 0; @@ -99,7 +99,7 @@ class Livraison extends CommonObject if ($this->expedition_id) $sql.= ", $this->expedition_id"; $sql.= ")"; - dolibarr_syslog("Livraison::create sql=".$sql, LOG_DEBUG); + dol_syslog("Livraison::create sql=".$sql, LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -109,7 +109,7 @@ class Livraison extends CommonObject $sql = "UPDATE ".MAIN_DB_PREFIX."livraison "; $sql.= "SET ref='".addslashes($numref)."' WHERE rowid=".$this->id; - dolibarr_syslog("Livraison::create sql=".$sql, LOG_DEBUG); + dol_syslog("Livraison::create sql=".$sql, LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -141,7 +141,7 @@ class Livraison extends CommonObject $sql.= " SET fk_statut = 2"; $sql.= " WHERE rowid=".$this->commande_id; - dolibarr_syslog("Livraison::create sql=".$sql, LOG_DEBUG); + dol_syslog("Livraison::create sql=".$sql, LOG_DEBUG); $resql=$this->db->query($sql); if (! $resql) { @@ -158,7 +158,7 @@ class Livraison extends CommonObject { $error++; $this->error=$this->db->lasterror()." - sql=".$this->db->lastqueryerror; - dolibarr_syslog("Livraison::create Error -3 ".$this->error); + dol_syslog("Livraison::create Error -3 ".$this->error); $this->db->rollback(); return -3; } @@ -167,7 +167,7 @@ class Livraison extends CommonObject { $error++; $this->error=$this->db->lasterror()." - sql=".$this->db->lastqueryerror; - dolibarr_syslog("Livraison::create Error -2 ".$this->error); + dol_syslog("Livraison::create Error -2 ".$this->error); $this->db->rollback(); return -2; } @@ -176,7 +176,7 @@ class Livraison extends CommonObject { $error++; $this->error=$this->db->lasterror()." - sql=".$this->db->lastqueryerror; - dolibarr_syslog("Livraison::create Error -1 ".$this->error); + dol_syslog("Livraison::create Error -1 ".$this->error); $this->db->rollback(); return -1; } @@ -199,7 +199,7 @@ class Livraison extends CommonObject $sql.= " ".($description?"'".addslashes($description)."'":"null").","; $sql.= $qty.")"; - dolibarr_syslog("Livraison::create_line sql=".$sql, LOG_DEBUG); + dol_syslog("Livraison::create_line sql=".$sql, LOG_DEBUG); if (! $this->db->query($sql) ) { $error++; @@ -240,7 +240,7 @@ class Livraison extends CommonObject } $sql.= " WHERE l.rowid = ".$id; - dolibarr_syslog("Livraison::fetch sql=".$sql, LOG_DEBUG); + dol_syslog("Livraison::fetch sql=".$sql, LOG_DEBUG); $result = $this->db->query($sql) ; if ($result) { @@ -298,13 +298,13 @@ class Livraison extends CommonObject else { $this->error='Delivery with id '.$rowid.' not found sql='.$sql; - dolibarr_syslog('Livraison::Fetch Error '.$this->error); + dol_syslog('Livraison::Fetch Error '.$this->error); return -2; } } else { - dolibarr_syslog('Livraison::Fetch Error '.$this->error); + dol_syslog('Livraison::Fetch Error '.$this->error); $this->error=$this->db->error(); return -1; } @@ -319,7 +319,7 @@ class Livraison extends CommonObject { global $conf; - dolibarr_syslog("livraison.class.php::valid begin"); + dol_syslog("livraison.class.php::valid begin"); $this->db->begin(); @@ -374,7 +374,7 @@ class Livraison extends CommonObject //Enregistrement d'un mouvement de stock pour chaque produit de l'expedition - dolibarr_syslog("livraison.class.php::valid enregistrement des mouvements"); + dol_syslog("livraison.class.php::valid enregistrement des mouvements"); $sql = "SELECT cd.fk_product, ld.qty "; $sql.= " FROM ".MAIN_DB_PREFIX."commandedet as cd, ".MAIN_DB_PREFIX."livraisondet as ld"; @@ -387,7 +387,7 @@ class Livraison extends CommonObject $i=0; while($i < $num) { - dolibarr_syslog("livraison.class.php::valid movment $i"); + dol_syslog("livraison.class.php::valid movment $i"); $obj = $this->db->fetch_object($resql); @@ -398,7 +398,7 @@ class Livraison extends CommonObject { $this->db->rollback(); $this->error=$this->db->error()." - sql=$sql"; - dolibarr_syslog("livraison.class.php::valid ".$this->error); + dol_syslog("livraison.class.php::valid ".$this->error); return -3; } $i++; @@ -409,7 +409,7 @@ class Livraison extends CommonObject { $this->db->rollback(); $this->error=$this->db->error()." - sql=$sql"; - dolibarr_syslog("livraison.class.php::valid ".$this->error); + dol_syslog("livraison.class.php::valid ".$this->error); return -2; } @@ -439,13 +439,13 @@ class Livraison extends CommonObject } } - dolibarr_syslog("livraison.class.php::valid ok"); + dol_syslog("livraison.class.php::valid ok"); } else { $this->db->rollback(); $this->error=$this->db->error()." - sql=$sql"; - dolibarr_syslog("livraison.class.php::valid ".$this->error); + dol_syslog("livraison.class.php::valid ".$this->error); return -1; } } @@ -454,12 +454,12 @@ class Livraison extends CommonObject else { $this->error="Non autorise"; - dolibarr_syslog("livraison.class.php::valid ".$this->error); + dol_syslog("livraison.class.php::valid ".$this->error); return -1; } $this->db->commit(); - dolibarr_syslog("livraison.class.php::valid commit"); + dol_syslog("livraison.class.php::valid commit"); return 1; } @@ -633,7 +633,7 @@ class Livraison extends CommonObject $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product as p on p.rowid = ld.fk_product"; $sql.= " WHERE ld.fk_origin_line = cd.rowid AND ld.fk_livraison = ".$this->id; - dolibarr_syslog("Livraison::fetch_lignes sql=".$sql); + dol_syslog("Livraison::fetch_lignes sql=".$sql); $resql = $this->db->query($sql); if ($resql) { diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 1618d8795ab3745fb4e04c27c08709bee1d65614..ebf950d7dd7bf9bd45ecf4f9557e2df6a7b0c95a 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -809,8 +809,8 @@ function top_menu($head, $title='', $target='') $htmltext.='<br><b>'.$langs->trans("Type").'</b>: '.($user->societe_id?$langs->trans("External"):$langs->trans("Internal")); $htmltext.='<br>'; $htmltext.='<br><u>'.$langs->trans("Connection").'</u>'; - $htmltext.='<br><b>'.$langs->trans("ConnectedSince").'</b>: '.dolibarr_print_date($user->datelastlogin,"dayhour"); - $htmltext.='<br><b>'.$langs->trans("PreviousConnexion").'</b>: '.dolibarr_print_date($user->datepreviouslogin,"dayhour"); + $htmltext.='<br><b>'.$langs->trans("ConnectedSince").'</b>: '.dol_print_date($user->datelastlogin,"dayhour"); + $htmltext.='<br><b>'.$langs->trans("PreviousConnexion").'</b>: '.dol_print_date($user->datepreviouslogin,"dayhour"); $htmltext.='<br><b>'.$langs->trans("AuthenticationMode").'</b>: '.$_SESSION["dol_authmode"]; $htmltext.='<br><b>'.$langs->trans("CurrentTheme").'</b>: '.$conf->theme; $htmltext.='<br><b>'.$langs->trans("CurrentUserLanguage").'</b>: '.$langs->getDefaultLang(); @@ -1048,6 +1048,10 @@ function llxFooter($foot='',$limitIEbug=1) print "\n"; if ($foot) print '<!-- '.$foot.' -->'."\n"; + + // Add Xdebug coverage of code + if (defined('XDEBUGCOVERAGE')) { var_dump(xdebug_get_code_coverage()); } + print "</body>\n"; print "</html>\n"; } diff --git a/htdocs/master.inc.php b/htdocs/master.inc.php index bf406b74a67bd4e201fe8afd75eaaa6b2e3692b6..59468f834cb38088dbc6bdb79ea75c0e7cb09d35 100644 --- a/htdocs/master.inc.php +++ b/htdocs/master.inc.php @@ -33,6 +33,10 @@ define('DOL_VERSION','2.6-beta'); // Also defined in htdocs/install/inc.php define('EURO',chr(128)); +// Add Xdebug coverage of code +//define('XDEBUGCOVERAGE',1); +if (defined('XDEBUGCOVERAGE')) { xdebug_start_code_coverage(); } + // La fonction clearstatcache ne doit pas etre appel�e de mani�re globale car ralenti. // Elle doit etre appel�e uniquement par les pages qui ont besoin d'un cache fichier vid� // comme par exemple document.php diff --git a/htdocs/notify.class.php b/htdocs/notify.class.php index 4b8fd2c35e98fbdd98c44246240b45b96b4f7594..75ef3fab6898f0e46ad84397f6e6109ad867815e 100644 --- a/htdocs/notify.class.php +++ b/htdocs/notify.class.php @@ -90,7 +90,7 @@ class Notify $sql.= " AND n.fk_action = ".$action; $sql.= " AND s.rowid = ".$socid; - dolibarr_syslog("Notify.class::countDefinedNotifications $action, $socid"); + dol_syslog("Notify.class::countDefinedNotifications $action, $socid"); $resql = $this->db->query($sql); if ($resql) @@ -120,7 +120,7 @@ class Notify $sql .= " AND n.fk_soc = s.rowid AND n.fk_action = ".$action; $sql .= " AND s.rowid = ".$socid; - dolibarr_syslog("Notify.class::send $action, $socid, $texte, $objet_type, $objet_id, $file"); + dol_syslog("Notify.class::send $action, $socid, $texte, $objet_type, $objet_id, $file"); $result = $this->db->query($sql); if ($result) @@ -160,7 +160,7 @@ class Notify $sql.= " VALUES (".$this->db->idate(mktime()).", ".$action." ,".$obj->rowid." , '".$objet_type."', ".$objet_id.");"; if (! $this->db->query($sql) ) { - dolibarr_print_error($db); + dol_print_error($db); } } else diff --git a/htdocs/oscommerce_ws/clients/fiche.php b/htdocs/oscommerce_ws/clients/fiche.php index f25742a965d87a8275b3fdbd54f3734f56573476..bd37ee16b185124f775068a905bc6c98b4e5c795 100644 --- a/htdocs/oscommerce_ws/clients/fiche.php +++ b/htdocs/oscommerce_ws/clients/fiche.php @@ -65,7 +65,7 @@ if ($action == '' && !$cancel) { { print "\n<div class=\"tabsAction\">\n"; print "<p>ERROR 1c</p>\n"; - dolibarr_print_error('',"erreur webservice ".$osc_cust->error); + dol_print_error('',"erreur webservice ".$osc_cust->error); print '<a class="butAction" href="index.php">'.$langs->trans("Retour").'</a>'; print "\n</div><br>\n"; } diff --git a/htdocs/oscommerce_ws/clients/index.php b/htdocs/oscommerce_ws/clients/index.php index b4d45dec585297a9012df3c0dc4ca4122262fda5..a6ccdd59b78a417e857939006734b4a97fd32f6c 100644 --- a/htdocs/oscommerce_ws/clients/index.php +++ b/htdocs/oscommerce_ws/clients/index.php @@ -50,7 +50,7 @@ $result = $client->call("get_Client",$parameters ); // echo '<h2>Result</h2><pre>'; print_r($result); echo '</pre>'; if ($client->fault) { - dolibarr_print_error('',"erreur de connexion "); + dol_print_error('',"erreur de connexion "); } elseif (!($err = $client->getError()) ) { @@ -97,11 +97,11 @@ elseif (!($err = $client->getError()) ) print "</table></p>"; } else { - dolibarr_print_error('',"Aucun client trouv�"); + dol_print_error('',"Aucun client trouv�"); } } else { - dolibarr_print_error('',"Erreur service web ".$err); + dol_print_error('',"Erreur service web ".$err); } print "</TABLE>"; diff --git a/htdocs/oscommerce_ws/clients/osc_customer.class.php b/htdocs/oscommerce_ws/clients/osc_customer.class.php index 195c9470a095144551e7079199168d8573397082..feee9c7d4ff43e834ea04b6c9aca774f60514ecb 100644 --- a/htdocs/oscommerce_ws/clients/osc_customer.class.php +++ b/htdocs/oscommerce_ws/clients/osc_customer.class.php @@ -80,7 +80,7 @@ class Osc_customer global $conf; $this->error = ''; - dolibarr_syslog("Osc_customer::fetch $id=$id ref=$ref"); + dol_syslog("Osc_customer::fetch $id=$id ref=$ref"); // Verification parametres if (! $id ) { @@ -149,7 +149,7 @@ class Osc_customer else { // print "suppression rate ".$sql." * ".$result; - dolibarr_syslog("osc_customer::transcode echec suppression"); + dol_syslog("osc_customer::transcode echec suppression"); // $this->db->rollback(); // return -1; } @@ -163,7 +163,7 @@ class Osc_customer else { // print "insertion rate ".$sql." , ".$result; - dolibarr_syslog("osc_customer::transcode echec insert"); + dol_syslog("osc_customer::transcode echec insert"); // $this->db->rollback(); // return -1; } diff --git a/htdocs/oscommerce_ws/commandes/fiche.php b/htdocs/oscommerce_ws/commandes/fiche.php index ba5df9f06f3fee71c21c6d75b413f4fbe449b94b..127c16541669ab1c704168651b88dc08d6491c64 100644 --- a/htdocs/oscommerce_ws/commandes/fiche.php +++ b/htdocs/oscommerce_ws/commandes/fiche.php @@ -74,7 +74,7 @@ if ($action == '' && !$cancel) { { print "\n<div class=\"tabsAction\">\n"; print "<p>ERROR 1c</p>\n"; - dolibarr_print_error('',"erreur webservice ".$osc_order->error); + dol_print_error('',"erreur webservice ".$osc_order->error); print '<a class="butAction" href="index.php">'.$langs->trans("Retour").'</a>'; print "\n</div><br>\n"; } diff --git a/htdocs/oscommerce_ws/commandes/index.php b/htdocs/oscommerce_ws/commandes/index.php index bd769a8eb4665d8696d9f2920662cb2d3b7bbedd..cb6ac643240bbfff06fa86f14835018b6397dfa2 100644 --- a/htdocs/oscommerce_ws/commandes/index.php +++ b/htdocs/oscommerce_ws/commandes/index.php @@ -51,7 +51,7 @@ $result = $client->call("get_Order",$parameters ); // echo '<h2>Result</h2><pre>'; print_r($result); echo '</pre>'; if ($client->fault) { - dolibarr_print_error('',"erreur de connexion "); + dol_print_error('',"erreur de connexion "); } elseif (!($err = $client->getError()) ) { @@ -98,11 +98,11 @@ elseif (!($err = $client->getError()) ) print "</table></p>"; } else { - dolibarr_print_error('',"Aucune commande trouv�e"); + dol_print_error('',"Aucune commande trouv�e"); } } else { - dolibarr_print_error('',"Erreur service web ".$err); + dol_print_error('',"Erreur service web ".$err); } print "</TABLE>"; diff --git a/htdocs/oscommerce_ws/commandes/osc_order.class.php b/htdocs/oscommerce_ws/commandes/osc_order.class.php index 9cf623926d5ec69fc9fe71d8a2aeb2a8e6b2fc12..1e65a72238a1d4abbe3ec32155f95cc6b93d88e8 100644 --- a/htdocs/oscommerce_ws/commandes/osc_order.class.php +++ b/htdocs/oscommerce_ws/commandes/osc_order.class.php @@ -79,7 +79,7 @@ class Osc_order global $conf; $this->error = ''; - dolibarr_syslog("Osc_order::fetch $id=$id "); + dol_syslog("Osc_order::fetch $id=$id "); // Verification parametres if (! $id ) { @@ -208,7 +208,7 @@ class Osc_order else { // print "suppression rate ".$sql." * ".$result; - dolibarr_syslog("osc_order::transcode echec suppression"); + dol_syslog("osc_order::transcode echec suppression"); // $this->db->rollback(); // return -1; } @@ -222,7 +222,7 @@ class Osc_order else { // print "insertion rate ".$sql." , ".$result; - dolibarr_syslog("osc_product::transcode echec insert"); + dol_syslog("osc_product::transcode echec insert"); // $this->db->rollback(); // return -1; } diff --git a/htdocs/oscommerce_ws/index.php b/htdocs/oscommerce_ws/index.php index 52cc6a8270fa222e025a8a27dc97435c76aabdde..963d40115d09a14d625dbe0d1907ddc84bee6784 100644 --- a/htdocs/oscommerce_ws/index.php +++ b/htdocs/oscommerce_ws/index.php @@ -72,7 +72,7 @@ print '<td align="right">'.$langs->trans("Total").'</td></tr>'; // Call the WebService and store its result in $result. $result = $client->call("get_CAmensuel",$parameters ); if ($client->fault) { - dolibarr_print_error('',"Erreur de connexion "); + dol_print_error('',"Erreur de connexion "); print_r($client->faultstring); } elseif (!($err = $client->getError()) ) @@ -98,7 +98,7 @@ elseif (!($err = $client->getError()) ) } else { - dolibarr_print_error('',"Erreur du service web ".$err); + dol_print_error('',"Erreur du service web ".$err); } @@ -121,7 +121,7 @@ $parameters = array("limit"=>OSC_MAXNBCOM); $result = $client->call("get_orders",$parameters ); if ($client->fault) { - dolibarr_print_error('',"Erreur de connexion "); + dol_print_error('',"Erreur de connexion "); } elseif (!($err = $client->getError()) ) { $num=0; @@ -141,7 +141,7 @@ elseif (!($err = $client->getError()) ) { } } else { - dolibarr_print_error('',"Erreur du service web ".$err); + dol_print_error('',"Erreur du service web ".$err); } print "</table><br>"; @@ -158,7 +158,7 @@ $parameters = array("limit"=>OSC_MAXNBCOM, "status"=>OSC_ORDWAIT); $result = $client->call("get_orders",$parameters ); if ($client->fault) { - dolibarr_print_error('',"Erreur webservice ".$client->faultstring); + dol_print_error('',"Erreur webservice ".$client->faultstring); } elseif (!($err = $client->getError()) ) { $var=True; @@ -179,7 +179,7 @@ elseif (!($err = $client->getError()) ) { } } else { - dolibarr_print_error('',"Erreur du service web ".$err); + dol_print_error('',"Erreur du service web ".$err); } print "</table><br>"; @@ -195,7 +195,7 @@ $parameters = array("limit"=>OSC_MAXNBCOM, "status"=>OSC_ORDPROCESS); $result = $client->call("get_orders",$parameters ); if ($client->fault) { - dolibarr_print_error('',"Erreur webservice ".$client->faultstring); + dol_print_error('',"Erreur webservice ".$client->faultstring); } elseif (!($err = $client->getError()) ) { $var=True; @@ -216,7 +216,7 @@ elseif (!($err = $client->getError()) ) { } } else { - dolibarr_print_error('',"Erreur du service web ".$err); + dol_print_error('',"Erreur du service web ".$err); } print "</table><br>"; @@ -234,7 +234,7 @@ $parameters = array("limit"=>OSC_MAXNBCOM); $result = $client->call("get_lastOrderClients",$parameters ); if ($client->fault) { - dolibarr_print_error('',"Erreur webservice ".$client->faultstring); + dol_print_error('',"Erreur webservice ".$client->faultstring); } elseif (!($err = $client->getError()) ) { $var=True; @@ -256,7 +256,7 @@ elseif (!($err = $client->getError()) ) { } } else { - dolibarr_print_error('',"Erreur du service web ".$err); + dol_print_error('',"Erreur du service web ".$err); } diff --git a/htdocs/oscommerce_ws/produits/OSCvente.php b/htdocs/oscommerce_ws/produits/OSCvente.php index 0d0b7e93518de5a6228707c2c73fc116fa093f21..17a55b36d36c5dd4f578cb2f524e74b6bdbda4d3 100644 --- a/htdocs/oscommerce_ws/produits/OSCvente.php +++ b/htdocs/oscommerce_ws/produits/OSCvente.php @@ -87,7 +87,7 @@ if ($_GET["action"] == 'vendre' ) { if ($img[0]['photo_vignette']) $filename=$img[0]['photo_vignette']; else $filename=$img[0]['photo']; - $prod['image'] = dolibarr_trunc($filename,16); + $prod['image'] = dol_trunc($filename,16); } // print_r($prod); diff --git a/htdocs/oscommerce_ws/produits/categories.php b/htdocs/oscommerce_ws/produits/categories.php index 13f9d988ffb4fa459ae765c29a1b2ed24868a858..51e1e12959194213aba0702b9bae1704adb2819c 100644 --- a/htdocs/oscommerce_ws/produits/categories.php +++ b/htdocs/oscommerce_ws/produits/categories.php @@ -241,7 +241,7 @@ else print_barre_liste("Correspondance des cat�gories", $page, "categories.php"); - dolibarr_syslog("Osc_Categorie.class::get_Osccat sql=".$sql); + dol_syslog("Osc_Categorie.class::get_Osccat sql=".$sql); $resql=$db->query($sql); if ($resql) { @@ -275,7 +275,7 @@ else } else { - dolibarr_print_error(); + dol_print_error(); } } //WebService Client. @@ -294,7 +294,7 @@ $result = $client->call("get_categorylist",$parameters ); if ($client->fault) { if ($client->faultcode == 'Server') print '<p>Il n\'y a pas de cat�gorie fille pour la cat�gorie '.$catid.'</p>'; - else dolibarr_print_error('',"erreur de connexion ".$client->getError()); + else dol_print_error('',"erreur de connexion ".$client->getError()); } elseif ( !($err = $client->getError()) ) diff --git a/htdocs/oscommerce_ws/produits/fiche.php b/htdocs/oscommerce_ws/produits/fiche.php index cd9ffd8a0cfb60cfa8389f186b1343ca811b21de..9a6e9215c4ae6f7eff58cc22eab474322c036a41 100644 --- a/htdocs/oscommerce_ws/produits/fiche.php +++ b/htdocs/oscommerce_ws/produits/fiche.php @@ -62,7 +62,7 @@ if ($action == '' && !$cancel) { else { print "<p>ERROR 1</p>\n"; - dolibarr_print_error('',"erreur webservice ".$osc_prod->error); + dol_print_error('',"erreur webservice ".$osc_prod->error); } } else diff --git a/htdocs/oscommerce_ws/produits/index.php b/htdocs/oscommerce_ws/produits/index.php index 3b9d08e6de071bb98afa857bb59b93dee3f3ab36..d988ff23f229e88d0ee0e31c897199a080dce581 100644 --- a/htdocs/oscommerce_ws/produits/index.php +++ b/htdocs/oscommerce_ws/produits/index.php @@ -47,7 +47,7 @@ $client = new soapclient_nusoap(OSCWS_DIR."ws_articles.php"); $result = $client->call("get_listearticles",$parameters ); if ($client->fault) { - dolibarr_print_error('',"erreur de connexion "); + dol_print_error('',"erreur de connexion "); } elseif (!($err = $client->getError()) ) { @@ -93,11 +93,11 @@ elseif (!($err = $client->getError()) ) print "</table></p>"; } else { - dolibarr_print_error('',"Aucun article trouvé"); + dol_print_error('',"Aucun article trouvé"); } } else { - dolibarr_print_error('',"Erreur service web ".$client->faultstring); + dol_print_error('',"Erreur service web ".$client->faultstring); } print "</TABLE>"; diff --git a/htdocs/oscommerce_ws/produits/osc_categories.class.php b/htdocs/oscommerce_ws/produits/osc_categories.class.php index 626e2956d07ca18b37df42ed30305da222ffc275..a5661da8c947ca54413b965ffe4714f62c413344 100644 --- a/htdocs/oscommerce_ws/produits/osc_categories.class.php +++ b/htdocs/oscommerce_ws/produits/osc_categories.class.php @@ -80,7 +80,7 @@ class Osc_Categorie $sql.= " '".$this->dolicatid."',"; $sql.= " '".$this->osccatid."'"; $sql.= ")"; - dolibarr_syslog("Osc_Categorie.class::create sql=".$sql); + dol_syslog("Osc_Categorie.class::create sql=".$sql); $resql=$this->db->query($sql); if ($resql) @@ -109,7 +109,7 @@ class Osc_Categorie { $this->error=$this->db->lasterror(); $this->error .= "erreur ".$sql; - dolibarr_syslog("Osc_Categorie.class::create ".$this->error); + dol_syslog("Osc_Categorie.class::create ".$this->error); return -1; } } @@ -133,7 +133,7 @@ class Osc_Categorie $sql.= " dolicatid='".addslashes($this->dolicatid)."',"; $sql.= " osccatid='".addslashes($this->osccatid)."'"; $sql.= " WHERE rowid=".$this->id; - dolibarr_syslog("Osc_Categorie.class::update sql=".$sql,LOG_DEBUG); + dol_syslog("Osc_Categorie.class::update sql=".$sql,LOG_DEBUG); $resql = $this->db->query($sql); if (! $resql) @@ -169,7 +169,7 @@ class Osc_Categorie $sql.= " FROM ".MAIN_DB_PREFIX."osc_categories as t"; $sql.= " WHERE c.rowid = ".$id; - dolibarr_syslog("Osc_Categorie.class::fetch sql=".$sql); + dol_syslog("Osc_Categorie.class::fetch sql=".$sql); $resql=$this->db->query($sql); if ($resql) { @@ -188,7 +188,7 @@ class Osc_Categorie else { $this->error="Error ".$this->db->lasterror(); - dolibarr_syslog("Osc_Categorie.class::fetch ".$this->error); + dol_syslog("Osc_Categorie.class::fetch ".$this->error); return -1; } } @@ -206,7 +206,7 @@ class Osc_Categorie $sql.= " FROM ".MAIN_DB_PREFIX."osc_categories as t"; $sql.= " WHERE t.osccatid = ".$oscid; - dolibarr_syslog("Osc_Categorie.class::fetch_osccat sql=".$sql); + dol_syslog("Osc_Categorie.class::fetch_osccat sql=".$sql); $resql=$this->db->query($sql); if ($resql) { @@ -227,7 +227,7 @@ class Osc_Categorie else { $this->error="Error ".$this->db->lasterror(); - dolibarr_syslog("Osc_Categorie.class::fetch_osccat ".$this->error); + dol_syslog("Osc_Categorie.class::fetch_osccat ".$this->error); return -1; } } @@ -245,7 +245,7 @@ class Osc_Categorie $sql.= " FROM ".MAIN_DB_PREFIX."osc_categories as t"; $sql.= " WHERE t.dolicatid = ".$doliid; - dolibarr_syslog("Osc_Categorie.class::fetch_dolicat sql=".$sql); + dol_syslog("Osc_Categorie.class::fetch_dolicat sql=".$sql); $resql=$this->db->query($sql); if ($resql) { @@ -264,7 +264,7 @@ class Osc_Categorie else { $this->error="Error ".$this->db->lasterror(); - dolibarr_syslog("Osc_Categorie.class::fetch_dolicat ".$this->error); + dol_syslog("Osc_Categorie.class::fetch_dolicat ".$this->error); return -1; } } @@ -281,7 +281,7 @@ class Osc_Categorie $sql = "DELETE FROM ".MAIN_DB_PREFIX."osc_categories"; $sql.= " WHERE rowid=".$this->id; - dolibarr_syslog("Osc_Categorie.class::delete sql=".$sql); + dol_syslog("Osc_Categorie.class::delete sql=".$sql); $resql = $this->db->query($sql); if (! $resql) { diff --git a/htdocs/oscommerce_ws/produits/osc_product.class.php b/htdocs/oscommerce_ws/produits/osc_product.class.php index 5c354bb63607f8edf5f19a107634173cf2979f45..f960dc4d1a65ac59da0d386f909c68e8bf22e45d 100644 --- a/htdocs/oscommerce_ws/produits/osc_product.class.php +++ b/htdocs/oscommerce_ws/produits/osc_product.class.php @@ -76,7 +76,7 @@ class Osc_product global $conf; $this->error = ''; - dolibarr_syslog("Osc_product::fetch $id=$id ref=$ref"); + dol_syslog("Osc_product::fetch $id=$id ref=$ref"); // Verification parametres if (! $id && ! $ref) { @@ -166,7 +166,7 @@ class Osc_product } else { - dolibarr_syslog("osc_product::transcode echec suppression"); + dol_syslog("osc_product::transcode echec suppression"); // $this->db->rollback(); // return -1; } @@ -178,7 +178,7 @@ class Osc_product } else { - dolibarr_syslog("osc_product::transcode echec insert"); + dol_syslog("osc_product::transcode echec insert"); // $this->db->rollback(); // return -1; } diff --git a/htdocs/paiement.class.php b/htdocs/paiement.class.php index 2277f126a690c6797841ea5d667516018723bf15..0db2e0c742ff8a4a05d0c7621457b73eee8658f6 100644 --- a/htdocs/paiement.class.php +++ b/htdocs/paiement.class.php @@ -77,7 +77,7 @@ class Paiement $sql.= ' WHERE p.fk_paiement = c.id'; $sql.= ' AND p.rowid = '.$id; - dolibarr_syslog("Paiement::fetch sql=".$sql); + dol_syslog("Paiement::fetch sql=".$sql); $result = $this->db->query($sql); if ($result) @@ -108,7 +108,7 @@ class Paiement } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); return -1; } } @@ -144,7 +144,7 @@ class Paiement $sql.= ' VALUES ('.$this->db->idate(mktime()).', '.$this->db->idate($this->datepaye).', \''.$this->total.'\', '.$this->paiementid.', \''.$this->num_paiement.'\', \''.addslashes($this->note).'\', '.$user->id.')'; $resql = $this->db->query($sql); - dolibarr_syslog("Paiement::Create insert paiement sql=".$sql); + dol_syslog("Paiement::Create insert paiement sql=".$sql); if ($resql) { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX.'paiement'); @@ -159,18 +159,18 @@ class Paiement $sql = 'INSERT INTO '.MAIN_DB_PREFIX.'paiement_facture (fk_facture, fk_paiement, amount)'; $sql .= ' VALUES ('.$facid.','. $this->id.',\''.$amount.'\')'; - dolibarr_syslog("Paiement::Create insert paiement_facture sql=".$sql); + dol_syslog("Paiement::Create insert paiement_facture sql=".$sql); $resql=$this->db->query($sql); if (! $resql) { $this->error=$this->db->error(); - dolibarr_syslog('Paiement::Create insert paiement_facture error='.$this->error, LOG_ERR); + dol_syslog('Paiement::Create insert paiement_facture error='.$this->error, LOG_ERR); $error++; } } else { - dolibarr_syslog('Paiement::Create Montant non num�rique'); + dol_syslog('Paiement::Create Montant non num�rique'); } } @@ -187,7 +187,7 @@ class Paiement else { $this->error=$this->db->error(); - dolibarr_syslog('Paiement::Create insert paiement error='.$this->error, LOG_ERR); + dol_syslog('Paiement::Create insert paiement error='.$this->error, LOG_ERR); $error++; } } @@ -305,7 +305,7 @@ class Paiement } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); return 0; } } @@ -318,7 +318,7 @@ class Paiement { $sql = 'UPDATE '.MAIN_DB_PREFIX.'paiement SET statut = 1 WHERE rowid = '.$this->id; - dolibarr_syslog('Paiement::valide sql='.$sql); + dol_syslog('Paiement::valide sql='.$sql); $result = $this->db->query($sql); if ($result) { @@ -326,7 +326,7 @@ class Paiement } else { - dolibarr_syslog('Paiement::valide Error -1'); + dol_syslog('Paiement::valide Error -1'); return -1; } } @@ -342,7 +342,7 @@ class Paiement $sql .= ' FROM '.MAIN_DB_PREFIX.'paiement as c'; $sql .= ' WHERE c.rowid = '.$id; - dolibarr_syslog('Paiement::info sql='.$sql); + dol_syslog('Paiement::info sql='.$sql); $result = $this->db->query($sql); if ($result) @@ -370,7 +370,7 @@ class Paiement } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); } } @@ -404,7 +404,7 @@ class Paiement else { $this->error=$this->db->error(); - dolibarr_syslog('Paiement::getBillsArray Error '.$this->error.' - sql='.$sql); + dol_syslog('Paiement::getBillsArray Error '.$this->error.' - sql='.$sql); return -1; } } diff --git a/htdocs/phenix/phenix.class.php b/htdocs/phenix/phenix.class.php index 0fe5d95160eb223e11cbaa25afbf8570e9854f69..fea08da2119a92d06290bf6849782e0344a7d9c1 100644 --- a/htdocs/phenix/phenix.class.php +++ b/htdocs/phenix/phenix.class.php @@ -81,14 +81,14 @@ class Phenix { { global $langs; - dolibarr_syslog("Phenix::add user=".$user->id); + dol_syslog("Phenix::add user=".$user->id); // Test si login phenix d�fini pour le user if (! $user->phenix_login) { $langs->load("other"); $this->error=$langs->transnoentities("ErrorPhenixLoginNotDefined","<a href=\"".DOL_URL_ROOT."/user/fiche.php?id=".$user->id."\">".$user->login."</a>"); - dolibarr_syslog("Phenix::add ERROR ".$this->error); + dol_syslog("Phenix::add ERROR ".$this->error); return -4; } @@ -117,7 +117,7 @@ class Phenix { $sql = "INSERT INTO px_agenda (age_id, age_createur_id, cal_date, cal_time, cal_mod_date, cal_mod_time, cal_duration, cal_priority, cal_type, cal_access, cal_name,cal_description)"; $sql.= " VALUES ($age_id, '$age_createur_id', '$cal_date', '$cal_time', '$cal_mod_date', '$cal_mod_time', $cal_duration, $cal_priority, '$cal_type', '$cal_access', '$cal_name','$cal_description')"; - dolibarr_syslog("Phenix::add sql=".$sql); + dol_syslog("Phenix::add sql=".$sql); $resql=$this->localdb->query($sql); if ($resql) { @@ -135,7 +135,7 @@ class Phenix { { $this->localdb->rollback(); $this->error = $this->localdb->error() . '<br>' .$sql; - dolibarr_syslog("Phenix::add ERROR ".$this->error); + dol_syslog("Phenix::add ERROR ".$this->error); return -1; } } @@ -143,7 +143,7 @@ class Phenix { { $this->localdb->rollback(); $this->error = $this->localdb->error() . '<br>' .$sql; - dolibarr_syslog("Phenix::add ERROR ".$this->error); + dol_syslog("Phenix::add ERROR ".$this->error); return -2; } } @@ -151,7 +151,7 @@ class Phenix { { $this->localdb->rollback(); $this->error = $this->localdb->error() . '<br>' .$sql; - dolibarr_syslog("Phenix::add ERROR ".$this->error); + dol_syslog("Phenix::add ERROR ".$this->error); return -3; } } diff --git a/htdocs/postnuke/articles/index.php b/htdocs/postnuke/articles/index.php index 3f83a377ccb94fbd50df023ef435a322c89f93a1..35576a223d3194c33b79707e920e3a9e3f9859a0 100644 --- a/htdocs/postnuke/articles/index.php +++ b/htdocs/postnuke/articles/index.php @@ -74,7 +74,7 @@ if ( $db->query($sql) ) } else { - dolibarr_print_error($db); + dol_print_error($db); } $db->close(); diff --git a/htdocs/product.class.php b/htdocs/product.class.php index b9e26700c392e40d74895d19a7cdccb24d72c6e9..301023c3f50412f0b5c5d3e2d13e9be8ddc1f9b6 100644 --- a/htdocs/product.class.php +++ b/htdocs/product.class.php @@ -207,7 +207,7 @@ class Product extends CommonObject return -1; } - dolibarr_syslog("Product::Create ref=".$this->ref." price=".$this->price." price_ttc=".$this->price_ttc." tva_tx=".$this->tva_tx." price_base_type=".$this->price_base_type." Category : ".$this->catid, LOG_DEBUG); + dol_syslog("Product::Create ref=".$this->ref." price=".$this->price." price_ttc=".$this->price_ttc." tva_tx=".$this->tva_tx." price_base_type=".$this->price_base_type." Category : ".$this->catid, LOG_DEBUG); if ($this->ref) { @@ -242,7 +242,7 @@ class Product extends CommonObject $sql.= "'".$this->canvas."',"; $sql.= " ".$this->finished.")"; - dolibarr_syslog("Product::Create sql=".$sql); + dol_syslog("Product::Create sql=".$sql); $result = $this->db->query($sql); if ( $result ) { @@ -335,7 +335,7 @@ class Product extends CommonObject function _setErrNo($func, $num, $error='') { $this->errno = $num; - dolibarr_syslog(get_class($this)."::".$func." - ERRNO(".$this->errno.")".($error?' - '.$error:''), LOG_ERR); + dol_syslog(get_class($this)."::".$func." - ERRNO(".$this->errno.")".($error?' - '.$error:''), LOG_ERR); } /** @@ -393,7 +393,7 @@ class Product extends CommonObject $sql .= ",duration = '" . $this->duration_value . $this->duration_unit ."'"; $sql .= " WHERE rowid = " . $id; - dolibarr_syslog("Product::update sql=".$sql); + dol_syslog("Product::update sql=".$sql); $resql=$this->db->query($sql); if ($resql) { @@ -665,12 +665,12 @@ class Product extends CommonObject $sql.= " ".$this->price_min.",".$this->price_min_ttc; $sql.= ")"; - dolibarr_syslog("Product::_log_price sql=".$sql); + dol_syslog("Product::_log_price sql=".$sql); $resql=$this->db->query($sql); if(! $resql) { $this->error=$this->db->error(); - dolibarr_print_error($this->db); + dol_print_error($this->db); return -1; } else @@ -691,7 +691,7 @@ class Product extends CommonObject $sql = "DELETE FROM ".MAIN_DB_PREFIX."product_price"; $sql.= " WHERE rowid=".$rowid; - dolibarr_syslog("Product::log_price_delete sql=".$sql, LOG_DEBUG); + dol_syslog("Product::log_price_delete sql=".$sql, LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -723,7 +723,7 @@ class Product extends CommonObject $sql.= " AND pfp.rowid = ".$prodfournprice; $sql.= " AND pfp.quantity <= ".$qty; - dolibarr_syslog("Product::get_buyprice sql=".$sql); + dol_syslog("Product::get_buyprice sql=".$sql); $resql = $this->db->query($sql); if ($resql) { @@ -749,7 +749,7 @@ class Product extends CommonObject $sql.= " ORDER BY pfp.quantity DESC"; $sql.= " LIMIT 1"; - dolibarr_syslog("Product::get_buyprice sql=".$sql); + dol_syslog("Product::get_buyprice sql=".$sql); $resql = $this->db->query($sql); if ($resql) { @@ -798,7 +798,7 @@ class Product extends CommonObject { global $conf,$langs; - dolibarr_syslog("Product::update_price id=".$id." newprice=".$newprice." newpricebase=".$newpricebase." newminprice=".$newminprice." level=".$level, LOG_DEBUG); + dol_syslog("Product::update_price id=".$id." newprice=".$newprice." newpricebase=".$newpricebase." newminprice=".$newminprice." level=".$level, LOG_DEBUG); if ($newvat == '') $newvat=$this->tva_tx; @@ -853,7 +853,7 @@ class Product extends CommonObject $sql.= " tva_tx='".price2num($newvat)."'"; $sql.= " WHERE rowid = " . $id; - dolibarr_syslog("Product::update_price sql=".$sql); + dol_syslog("Product::update_price sql=".$sql); $resql=$this->db->query($sql); if ($resql) { @@ -868,7 +868,7 @@ class Product extends CommonObject } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); } } @@ -887,13 +887,13 @@ class Product extends CommonObject global $langs; global $conf; - dolibarr_syslog("Product::fetch id=$id ref=$ref"); + dol_syslog("Product::fetch id=$id ref=$ref"); // Verification parametres if (! $id && ! $ref) { $this->error=$langs->trans('ErrorWrongParameters'); - dolibarr_print_error("Product::fetch ".$this->error); + dol_print_error("Product::fetch ".$this->error); return -1; } @@ -905,7 +905,7 @@ class Product extends CommonObject if ($id) $sql.= " WHERE rowid = '".$id."'"; if ($ref) $sql.= " WHERE ref = '".addslashes($ref)."'"; - dolibarr_syslog("Product::fetch sql=".$sql); + dol_syslog("Product::fetch sql=".$sql); $result = $this->db->query($sql); if ( $result ) { @@ -971,7 +971,7 @@ class Product extends CommonObject } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); return -1; } } @@ -1001,7 +1001,7 @@ class Product extends CommonObject } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); return -1; } } @@ -1013,7 +1013,7 @@ class Product extends CommonObject } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); return -1; } } @@ -1343,7 +1343,7 @@ class Product extends CommonObject for ($j = 0 ; $j < 12 ; $j++) { - $idx=ucfirst(substr(dolibarr_print_date(dolibarr_mktime(12,0,0,$month,1,$year),"%b"),0,3) ); + $idx=ucfirst(substr(dol_print_date(dol_mktime(12,0,0,$month,1,$year),"%b"),0,3) ); $monthnum=sprintf("%02s",$month); $result[$j] = array($idx,isset($tab[$year.$month])?$tab[$year.$month]:0); @@ -1482,7 +1482,7 @@ class Product extends CommonObject $sql .= ' WHERE fk_product_pere = "'.$id_pere.'" and fk_product_fils = "'.$id_fils.'"'; if (! $this->db->query($sql)) { - dolibarr_print_error($this->db); + dol_print_error($this->db); return -1; } else @@ -1491,7 +1491,7 @@ class Product extends CommonObject $sql .= ' WHERE fk_product_pere = "'.$id_fils.'" and fk_product_fils = "'.$id_pere.'"'; if (! $this->db->query($sql)) { - dolibarr_print_error($this->db); + dol_print_error($this->db); return -1; } else @@ -1511,7 +1511,7 @@ class Product extends CommonObject $sql .= ' VALUES ("'.$id_pere.'","'.$id_fils.'","'.$qty.'")'; if (! $this->db->query($sql)) { - dolibarr_print_error($this->db); + dol_print_error($this->db); return -1; } else @@ -1536,7 +1536,7 @@ class Product extends CommonObject $sql .= ' WHERE fk_product_pere = "'.$id_pere.'" and fk_product_fils = "'.$id_fils.'"'; if (! $this->db->query($sql)) { - dolibarr_print_error($this->db); + dol_print_error($this->db); return -1; } else @@ -1555,7 +1555,7 @@ class Product extends CommonObject $sql .= ' WHERE fk_product_pere = "'.$id_pere.'" and fk_product_fils = "'.$id_fils.'"'; if (! $this->db->query($sql)) { - dolibarr_print_error($this->db); + dol_print_error($this->db); return -1; } else @@ -1619,7 +1619,7 @@ class Product extends CommonObject $sql .= ' VALUES ("'.$this->id.'","'.$id_sub.'")'; if (! $this->db->query($sql)) { - dolibarr_print_error($this->db); + dol_print_error($this->db); return -1; } else @@ -1730,7 +1730,7 @@ class Product extends CommonObject $list = $this->list_suppliers(); if (sizeof($list) > 0) { - dolibarr_syslog("Product::fastappro"); + dol_syslog("Product::fastappro"); $fournisseur = new Fournisseur($this->db); $fournisseur->fetch($this->fourn_appro_open); @@ -1758,7 +1758,7 @@ class Product extends CommonObject } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); return -1; } } @@ -1952,7 +1952,7 @@ class Product extends CommonObject } else { - dolibarr_print_error ($this->db); + dol_print_error ($this->db); return -1; } } @@ -1981,7 +1981,7 @@ class Product extends CommonObject } else { - dolibarr_print_error ($this->db); + dol_print_error ($this->db); return -1; } } @@ -2030,7 +2030,7 @@ class Product extends CommonObject $lienfin='</a>'; } $newref=$this->ref; - if ($maxlength) $newref=dolibarr_trunc($newref,$maxlength,'middle'); + if ($maxlength) $newref=dol_trunc($newref,$maxlength,'middle'); if ($withpicto) { if ($this->type == 0) $result.=($lien.img_object($langs->trans("ShowProduct").' '.$this->ref,'product').$lienfin.' '); @@ -2150,7 +2150,7 @@ class Product extends CommonObject } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); $this->db->rollback(); return -1; } @@ -2555,7 +2555,7 @@ class Product extends CommonObject } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); $this->error=$this->db->error(); return -1; } @@ -2579,7 +2579,7 @@ class Product extends CommonObject } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); return -1; } } @@ -2602,7 +2602,7 @@ class Product extends CommonObject } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); return -1; } } diff --git a/htdocs/product/barcode.php b/htdocs/product/barcode.php index a42866e7003240ab22c42d0362a5926217d48ae9..97227d209bb6996466cf93bd2715045f15ccc6ac 100644 --- a/htdocs/product/barcode.php +++ b/htdocs/product/barcode.php @@ -81,7 +81,7 @@ if ($_GET["id"]) $result = $product->fetch($_GET["id"]); $head=product_prepare_head($product, $user); $titre=$langs->trans("CardProduct".$product->type); -dolibarr_fiche_head($head, 'barcode', $titre); +dol_fiche_head($head, 'barcode', $titre); print '<table class="border" width="100%">'; diff --git a/htdocs/product/canvas/product.livre.class.php b/htdocs/product/canvas/product.livre.class.php index 00fbb411cf93aa5e6c89ce25f3a6bf0038304177..73c09ae751fda74ff52ac27f921e6e43ae065dc3 100644 --- a/htdocs/product/canvas/product.livre.class.php +++ b/htdocs/product/canvas/product.livre.class.php @@ -184,7 +184,7 @@ class ProductLivre extends Product else { $this->db->rollback(); - dolibarr_syslog("ProductLivre::Create ROLLBACK ERRNO (".$this->errno.")"); + dol_syslog("ProductLivre::Create ROLLBACK ERRNO (".$this->errno.")"); return -1; } } @@ -256,7 +256,7 @@ class ProductLivre extends Product */ function UpdateCanvas($datas) { - dolibarr_syslog("ProductLivre::UpdateCanvas ID : ".$this->id, LOG_DEBUG); + dol_syslog("ProductLivre::UpdateCanvas ID : ".$this->id, LOG_DEBUG); $isbna = trim($datas["isbna"]); $isbnb = trim($datas["isbnb"]); @@ -290,17 +290,17 @@ class ProductLivre extends Product $sql.= " SET isbn = '$isbn'"; $sql.= " , ean = '$ean'"; $sql.= " , pages = '".$this->pages."'"; - $sql.= " , px_feuillet = '".$this->px_feuillet."'"; - $sql.= " , px_revient = '".price2num($this->px_revient)."'"; - $sql.= " , px_reliure = '".price2num($this->px_reliure)."'"; - $sql.= " , px_couverture = '".price2num($this->px_couverture)."'"; + $sql.= " , px_feuillet = ".($this->px_feuillet?price2num($this->px_feuillet):'null'); + $sql.= " , px_revient = ".($this->px_revient?price2num($this->px_revient):'null'); + $sql.= " , px_reliure = ".($this->px_reliure?price2num($this->px_reliure):'null'); + $sql.= " , px_couverture = ".($this->px_couverture?price2num($this->px_couverture):'null'); $sql.= " , fk_couverture = '".$this->couverture->id."'"; $sql.= " , fk_contrat = '".$this->contrat->id."'"; $sql.= " , fk_auteur = '".$datas["auteur"]."'"; $sql.= " , format = '$format'"; $sql.= " WHERE rowid = " . $this->id; - dolibarr_syslog("ProductLivre::UpdateCanvas sql=".$sql, LOG_DEBUG); + dol_syslog("ProductLivre::UpdateCanvas sql=".$sql, LOG_DEBUG); if ( $this->db->query($sql) ) { $this->errno = 0; @@ -328,7 +328,7 @@ class ProductLivre extends Product */ function _calculate_prix_revient($pages, $couv, $feuil, $price_ht, $reliure, $taux) { - dolibarr_syslog("ProductLivre::UpdateCanvas $pages, $couv, $feuil, $price_ht, $taux", LOG_DEBUG); + dol_syslog("ProductLivre::UpdateCanvas $pages, $couv, $feuil, $price_ht, $taux", LOG_DEBUG); $cost = ($pages / 2 * $feuil) + $couv + $reliure + ($price_ht * $taux / 100); diff --git a/htdocs/product/canvas/product.livrecontrat.class.php b/htdocs/product/canvas/product.livrecontrat.class.php index d56b7682e0480004f45bed633d62eb76a0348cbe..d66f9909a22d0a29c395d76c7ccdcd091f43cb07 100644 --- a/htdocs/product/canvas/product.livrecontrat.class.php +++ b/htdocs/product/canvas/product.livrecontrat.class.php @@ -153,7 +153,7 @@ class ProductLivreContrat extends Product */ function UpdateCanvas($datas) { - dolibarr_syslog("ProductLivreContrat::UpdateCanvas"); + dol_syslog("ProductLivreContrat::UpdateCanvas"); $taux = ereg_replace(',','.',trim($datas["contrat_taux"])); $quant = trim($datas["contrat_quant"]); diff --git a/htdocs/product/document.php b/htdocs/product/document.php index ca905a8a353a97f55f7edfab78263346763093d3..331f7db422e2706be31cc0924616f604b5aea472 100755 --- a/htdocs/product/document.php +++ b/htdocs/product/document.php @@ -125,7 +125,7 @@ if ($product->id) $head=product_prepare_head($product, $user); $titre=$langs->trans("CardProduct".$product->type); - dolibarr_fiche_head($head, 'documents', $titre); + dol_fiche_head($head, 'documents', $titre); // Construit liste des fichiers diff --git a/htdocs/product/droitpret/modules_droitpret.php b/htdocs/product/droitpret/modules_droitpret.php index ba11284b155414765e7bca48c208c2b26f575c8d..11a3c62d55d8af6ecf9294c7aa0d4d50125d7735 100644 --- a/htdocs/product/droitpret/modules_droitpret.php +++ b/htdocs/product/droitpret/modules_droitpret.php @@ -69,7 +69,7 @@ class ModeleDroitPret } else { - dolibarr_print_error($db); + dol_print_error($db); return -1; } diff --git a/htdocs/product/fiche.php b/htdocs/product/fiche.php index c93af7d323583b40d07165b7c768829c289668eb..c4be4ea17ad1cc50c479604713d37b3606ef98a8 100644 --- a/htdocs/product/fiche.php +++ b/htdocs/product/fiche.php @@ -241,12 +241,12 @@ if ($_GET["action"] == 'clone' && $user->rights->produit->creer) $_GET["action"] = ""; $mesg='<div class="error">'.$langs->trans("ErrorProductAlreadyExists",$product->ref).'</div>'; - //dolibarr_print_error($product->db); + //dol_print_error($product->db); } else { $db->rollback(); - dolibarr_print_error($product->db); + dol_print_error($product->db); } } } @@ -254,7 +254,7 @@ if ($_GET["action"] == 'clone' && $user->rights->produit->creer) else { $db->rollback(); - dolibarr_print_error($product->db); + dol_print_error($product->db); } } @@ -289,7 +289,7 @@ if ($_POST["action"] == 'addinpropal') $result=$propal->fetch($_POST["propalid"]); if ($result <= 0) { - dolibarr_print_error($db,$propal->error); + dol_print_error($db,$propal->error); exit; } @@ -297,7 +297,7 @@ if ($_POST["action"] == 'addinpropal') $result=$soc->fetch($propal->socid,$user); if ($result <= 0) { - dolibarr_print_error($db,$soc->error); + dol_print_error($db,$soc->error); exit; } @@ -305,7 +305,7 @@ if ($_POST["action"] == 'addinpropal') $result=$prod->fetch($_GET['id']); if ($result <= 0) { - dolibarr_print_error($db,$prod->error); + dol_print_error($db,$prod->error); exit; } @@ -370,7 +370,7 @@ if ($_POST["action"] == 'addincommande') $result=$commande->fetch($_POST["commandeid"]); if ($result <= 0) { - dolibarr_print_error($db,$commande->error); + dol_print_error($db,$commande->error); exit; } @@ -378,7 +378,7 @@ if ($_POST["action"] == 'addincommande') $result=$soc->fetch($commande->socid,$user); if ($result <= 0) { - dolibarr_print_error($db,$soc->error); + dol_print_error($db,$soc->error); exit; } @@ -386,7 +386,7 @@ if ($_POST["action"] == 'addincommande') $result=$prod->fetch($_GET['id']); if ($result <= 0) { - dolibarr_print_error($db,$prod->error); + dol_print_error($db,$prod->error); exit; } @@ -450,7 +450,7 @@ if ($_POST["action"] == 'addinfacture' && $user->rights->facture->creer) $result=$facture->fetch($_POST["factureid"]); if ($result <= 0) { - dolibarr_print_error($db,$facture->error); + dol_print_error($db,$facture->error); exit; } @@ -458,7 +458,7 @@ if ($_POST["action"] == 'addinfacture' && $user->rights->facture->creer) $soc->fetch($facture->socid,$user); if ($result <= 0) { - dolibarr_print_error($db,$soc->error); + dol_print_error($db,$soc->error); exit; } @@ -466,7 +466,7 @@ if ($_POST["action"] == 'addinfacture' && $user->rights->facture->creer) $result = $prod->fetch($_GET["id"]); if ($result <= 0) { - dolibarr_print_error($db,$prod->error); + dol_print_error($db,$prod->error); exit; } @@ -789,7 +789,7 @@ if ($_GET["id"] || $_GET["ref"]) { $head=product_prepare_head($product, $user); $titre=$langs->trans("CardProduct".$product->type); - dolibarr_fiche_head($head, 'card', $titre); + dol_fiche_head($head, 'card', $titre); print "\n<!-- CUT HERE -->\n"; // Confirmation de la suppression de la facture if ($_GET["action"] == 'delete') @@ -1234,8 +1234,8 @@ if ($_GET["id"] && $_GET["action"] == '' && $product->status) print "<td nowrap>"; print '<input type="hidden" name="action" value="addinpropal">'; print "<a href=\"../comm/propal.php?propalid=".$objp->propalid."\">".img_object($langs->trans("ShowPropal"),"propal")." ".$objp->ref."</a></td>\n"; - print "<td><a href=\"../comm/fiche.php?socid=".$objp->socid."\">".dolibarr_trunc($objp->nom,18)."</a></td>\n"; - print "<td nowrap=\"nowrap\">".dolibarr_print_date($objp->dp,"%d %b")."</td>\n"; + print "<td><a href=\"../comm/fiche.php?socid=".$objp->socid."\">".dol_trunc($objp->nom,18)."</a></td>\n"; + print "<td nowrap=\"nowrap\">".dol_print_date($objp->dp,"%d %b")."</td>\n"; print '<td><input type="hidden" name="propalid" value="'.$objp->propalid.'">'; print '<input type="text" class="flat" name="qty" size="1" value="1"></td><td nowrap>'.$langs->trans("ReductionShort"); print '<input type="text" class="flat" name="remise_percent" size="1" value="0">%'; @@ -1347,8 +1347,8 @@ if ($_GET["id"] && $_GET["action"] == '' && $product->status) print "<td nowrap>"; print '<input type="hidden" name="action" value="addincommande">'; print "<a href=\"../commande/fiche.php?id=".$objc->commandeid."\">".img_object($langs->trans("ShowOrder"),"order")." ".$objc->ref."</a></td>\n"; - print "<td><a href=\"../comm/fiche.php?socid=".$objc->socid."\">".dolibarr_trunc($objc->nom,18)."</a></td>\n"; - print "<td nowrap=\"nowrap\">".dolibarr_print_date($objc->dc,"%d %b")."</td>\n"; + print "<td><a href=\"../comm/fiche.php?socid=".$objc->socid."\">".dol_trunc($objc->nom,18)."</a></td>\n"; + print "<td nowrap=\"nowrap\">".dol_print_date($objc->dc,"%d %b")."</td>\n"; print '<td><input type="hidden" name="commandeid" value="'.$objc->commandeid.'">'; print '<input type="text" class="flat" name="qty" size="1" value="1"></td><td nowrap>'.$langs->trans("ReductionShort"); print '<input type="text" class="flat" name="remise_percent" size="1" value="0">%'; @@ -1456,8 +1456,8 @@ if ($_GET["id"] && $_GET["action"] == '' && $product->status) print "<td nowrap>"; print '<input type="hidden" name="action" value="addinfacture">'; print "<a href=\"../compta/facture.php?facid=".$objp->factureid."\">".img_object($langs->trans("ShowBills"),"bill")." ".$objp->facnumber."</a></td>\n"; - print "<td><a href=\"../comm/fiche.php?socid=".$objp->socid."\">".dolibarr_trunc($objp->nom,18)."</a></td>\n"; - print "<td nowrap=\"nowrap\">".dolibarr_print_date($objp->df,"%d %b")."</td>\n"; + print "<td><a href=\"../comm/fiche.php?socid=".$objp->socid."\">".dol_trunc($objp->nom,18)."</a></td>\n"; + print "<td nowrap=\"nowrap\">".dol_print_date($objp->df,"%d %b")."</td>\n"; print '<td><input type="hidden" name="factureid" value="'.$objp->factureid.'">'; print '<input type="text" class="flat" name="qty" size="1" value="1"></td><td nowrap>'.$langs->trans("ReductionShort"); print '<input type="text" class="flat" name="remise_percent" size="1" value="0">%'; @@ -1479,7 +1479,7 @@ if ($_GET["id"] && $_GET["action"] == '' && $product->status) } else { - dolibarr_print_error($db); + dol_print_error($db); } print '</td>'; @@ -1512,7 +1512,7 @@ if ($_GET["id"] && $_GET["action"] == '' && $product->status) print '<form method="POST" action="fiche.php?id='.$product->id.'">'; print "<tr $bc[$var]>"; print "<td><a href=\"../compta/facture.php?facid=".$objp->factureid."\">$objp->facnumber</a></td>\n"; - print "<td><a href=\"../comm/fiche.php?socid=".$objp->socid."\">".dolibarr_trunc($objp->nom,24)."</a></td>\n"; + print "<td><a href=\"../comm/fiche.php?socid=".$objp->socid."\">".dol_trunc($objp->nom,24)."</a></td>\n"; print "<td colspan=\"2\">".$langs->trans("Qty"); print '<input type="hidden" name="action" value="addinfacture">'; print "</td>"; @@ -1537,7 +1537,7 @@ if ($_GET["id"] && $_GET["action"] == '' && $product->status) } else { - dolibarr_print_error($db); + dol_print_error($db); } } diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php index 1f720aa60120a5be6d70771d8e2206f91db1699b..2f2b9129cf327c135ccbf96abdfb09fcb22f1455 100644 --- a/htdocs/product/fournisseurs.php +++ b/htdocs/product/fournisseurs.php @@ -188,7 +188,7 @@ if ($_GET["id"] || $_GET["ref"]) $head=product_prepare_head($product, $user); $titre=$langs->trans("CardProduct".$product->type); - dolibarr_fiche_head($head, 'suppliers', $titre); + dol_fiche_head($head, 'suppliers', $titre); print '<table class="border" width="100%">'; @@ -399,7 +399,7 @@ if ($_GET["id"] || $_GET["ref"]) $db->free($resql); } else { - dolibarr_print_error($db); + dol_print_error($db); } print '</table>'; diff --git a/htdocs/product/index.php b/htdocs/product/index.php index 6228c043b41564e398079a096d63e29c50e8cb35..ac5e9a8f190bd6736c23183bdbcb22f05b9f93af 100644 --- a/htdocs/product/index.php +++ b/htdocs/product/index.php @@ -184,9 +184,9 @@ if ($result) $staticproduct->type=$objp->fk_product_type; print $staticproduct->getNomUrl(1,'',16); print "</td>\n"; - print '<td>'.dolibarr_trunc($objp->label,32).'</td>'; + print '<td>'.dol_trunc($objp->label,32).'</td>'; print "<td>"; - print dolibarr_print_date($objp->datem,'day'); + print dol_print_date($objp->datem,'day'); print "</td>"; print '<td align="right" nowrap="nowrap">'; print $staticproduct->LibStatut($objp->envente,5); @@ -202,7 +202,7 @@ if ($result) } else { - dolibarr_print_error($db); + dol_print_error($db); } print '</td></tr></table>'; diff --git a/htdocs/product/liste.php b/htdocs/product/liste.php index 999d672af0cb57030f05133621ba381dbabd8d30..8d963cbadb1258568ce9fb67f606be63dee7ce28 100644 --- a/htdocs/product/liste.php +++ b/htdocs/product/liste.php @@ -287,10 +287,10 @@ if ($resql) print "</td>\n"; // Label - print '<td>'.dolibarr_trunc($objp->label,40).'</td>'; + print '<td>'.dol_trunc($objp->label,40).'</td>'; // Date - print '<td align="center">'.dolibarr_print_date($objp->datem,'day')."</td>\n"; + print '<td align="center">'.dol_print_date($objp->datem,'day')."</td>\n"; // Duration if ($conf->service->enabled && $type != 0) @@ -359,7 +359,7 @@ if ($resql) } else { - dolibarr_print_error($db); + dol_print_error($db); } diff --git a/htdocs/product/photos.php b/htdocs/product/photos.php index 6fd0dcca84449dc0274505135bce61270d6e8d7b..e4dceaed813ea8688d89aa745bd2f37c6caba472 100644 --- a/htdocs/product/photos.php +++ b/htdocs/product/photos.php @@ -97,7 +97,7 @@ if ($_GET["id"] || $_GET["ref"]) */ $head=product_prepare_head($product, $user); $titre=$langs->trans("CardProduct".$product->type); - dolibarr_fiche_head($head, 'photos', $titre); + dol_fiche_head($head, 'photos', $titre); /* * Confirmation de la suppression de photo diff --git a/htdocs/product/price.php b/htdocs/product/price.php index e0a40b5bb14670cc8ac02d1130d3d095e917a340..7a5dabf1dd1a438e798382caea33742d90003f96 100644 --- a/htdocs/product/price.php +++ b/htdocs/product/price.php @@ -112,7 +112,7 @@ llxHeader("","",$langs->trans("CardProduct".$product->type)); $head=product_prepare_head($product, $user); $titre=$langs->trans("CardProduct".$product->type); -dolibarr_fiche_head($head, 'price', $titre); +dol_fiche_head($head, 'price', $titre); print '<table class="border" width="100%">'; @@ -401,7 +401,7 @@ if ($result) $var=!$var; print "<tr $bc[$var]>"; // Date - print "<td>".dolibarr_print_date($objp->dp,"dayhour")."</td>"; + print "<td>".dol_print_date($objp->dp,"dayhour")."</td>"; // Price level if ($conf->global->PRODUIT_MULTIPRICES) @@ -443,7 +443,7 @@ if ($result) } else { - dolibarr_print_error($db); + dol_print_error($db); } diff --git a/htdocs/product/reassort.php b/htdocs/product/reassort.php index d6c3e2864d8c10930f4b8c8696cd13d50693c1b5..68ed4b1f404be840c63908cb8e1e9b22a310ae4e 100644 --- a/htdocs/product/reassort.php +++ b/htdocs/product/reassort.php @@ -286,7 +286,7 @@ if ($resql) } else { - dolibarr_print_error($db); + dol_print_error($db); } diff --git a/htdocs/product/sousproduits/fiche.php b/htdocs/product/sousproduits/fiche.php index 0157565fbc44907214fd5dc023dbeeeecd79b4df..4fe27255643b480db7ae198f07bd3956590756b2 100644 --- a/htdocs/product/sousproduits/fiche.php +++ b/htdocs/product/sousproduits/fiche.php @@ -138,7 +138,7 @@ if ($mesg) { $head=product_prepare_head($product, $user); $titre=$langs->trans("CardProduct".$product->type); -dolibarr_fiche_head($head, 'subproduct', $titre); +dol_fiche_head($head, 'subproduct', $titre); /* * Fiche produit @@ -316,7 +316,7 @@ if ($id || $ref) } else { - dolibarr_print_error($db); + dol_print_error($db); } print '<input type="hidden" name="max_prod" value="'.$i.'">'; if($num > 0) diff --git a/htdocs/product/stats/commande.php b/htdocs/product/stats/commande.php index c87b8848e14b0cfe04f43a1c63d233502d47eabb..b792381d4b71cde265afe305552f3cbaca1385dd 100644 --- a/htdocs/product/stats/commande.php +++ b/htdocs/product/stats/commande.php @@ -87,7 +87,7 @@ if ($_GET["id"] || $_GET["ref"]) */ $head=product_prepare_head($product, $user); $titre=$langs->trans("CardProduct".$product->type); - dolibarr_fiche_head($head, 'referers', $titre); + dol_fiche_head($head, 'referers', $titre); print '<table class="border" width="100%">'; @@ -175,10 +175,10 @@ if ($_GET["id"] || $_GET["ref"]) print '<td><a href="'.DOL_URL_ROOT.'/commande/fiche.php?id='.$objp->commandeid.'">'.img_object($langs->trans("ShowOrder"),"order").' '; print $objp->ref; print "</a></td>\n"; - print '<td><a href="'.DOL_URL_ROOT.'/compta/fiche.php?socid='.$objp->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.dolibarr_trunc($objp->nom,44).'</a></td>'; + print '<td><a href="'.DOL_URL_ROOT.'/compta/fiche.php?socid='.$objp->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($objp->nom,44).'</a></td>'; print "<td>".$objp->code_client."</td>\n"; print "<td align=\"center\">"; - print dolibarr_print_date($objp->date)."</td>"; + print dol_print_date($objp->date)."</td>"; print "<td align=\"right\">".price($objp->total_ht)."</td>\n"; print '<td align="right">'.$commandestatic->LibStatut($objp->statut,$objp->facture,5).'</td>'; print "</tr>\n"; @@ -188,7 +188,7 @@ if ($_GET["id"] || $_GET["ref"]) } else { - dolibarr_print_error($db); + dol_print_error($db); } print "</table>"; print '<br>'; @@ -197,7 +197,7 @@ if ($_GET["id"] || $_GET["ref"]) } else { - dolibarr_print_error(); + dol_print_error(); } $db->close(); diff --git a/htdocs/product/stats/commande_fournisseur.php b/htdocs/product/stats/commande_fournisseur.php index 157e66d2367cb1e3a72879d8f9952e8bd34b0158..bb70543b47099781b826c1eac50b4247e1d44ef7 100644 --- a/htdocs/product/stats/commande_fournisseur.php +++ b/htdocs/product/stats/commande_fournisseur.php @@ -85,7 +85,7 @@ if ($_GET["id"] || $_GET["ref"]) */ $head=product_prepare_head($product, $user); $titre=$langs->trans("CardProduct".$product->type); - dolibarr_fiche_head($head, 'referers', $titre); + dol_fiche_head($head, 'referers', $titre); print '<table class="border" width="100%">'; @@ -168,10 +168,10 @@ if ($_GET["id"] || $_GET["ref"]) print '<td><a href="'.DOL_URL_ROOT.'/fourn/commande/fiche.php?id='.$objp->commandeid.'">'.img_object($langs->trans("ShowOrder"),"order").' '; print $objp->ref; print "</a></td>\n"; - print '<td><a href="'.DOL_URL_ROOT.'/compta/fiche.php?socid='.$objp->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.dolibarr_trunc($objp->nom,44).'</a></td>'; + print '<td><a href="'.DOL_URL_ROOT.'/compta/fiche.php?socid='.$objp->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($objp->nom,44).'</a></td>'; print "<td>".$objp->code_client."</td>\n"; print "<td align=\"center\">"; - print dolibarr_print_date($objp->date)."</td>"; + print dol_print_date($objp->date)."</td>"; print "<td align=\"right\">".price($objp->total_ht)."</td>\n"; print '<td align="right">'.$commandestatic->LibStatut($objp->statut,$objp->facture,5).'</td>'; print "</tr>\n"; @@ -181,7 +181,7 @@ if ($_GET["id"] || $_GET["ref"]) } else { - dolibarr_print_error($db); + dol_print_error($db); } print "</table>"; print '<br>'; @@ -190,7 +190,7 @@ if ($_GET["id"] || $_GET["ref"]) } else { - dolibarr_print_error(); + dol_print_error(); } $db->close(); diff --git a/htdocs/product/stats/contrat.php b/htdocs/product/stats/contrat.php index 5464cb8bde31ffd05847782db07afdd0d180314d..56d1bdb51500daa8108d182ffa62d5d4ae204732 100644 --- a/htdocs/product/stats/contrat.php +++ b/htdocs/product/stats/contrat.php @@ -87,7 +87,7 @@ if ($_GET["id"] || $_GET["ref"]) */ $head=product_prepare_head($product,$user); $titre=$langs->trans("CardProduct".$product->type); - dolibarr_fiche_head($head, 'referers', $titre); + dol_fiche_head($head, 'referers', $titre); print '<table class="border" width="100%">'; @@ -180,10 +180,10 @@ if ($_GET["id"] || $_GET["ref"]) print '<td><a href="'.DOL_URL_ROOT.'/contrat/fiche.php?id='.$objp->rowid.'">'.img_object($langs->trans("ShowContract"),"contract").' '; print $objp->rowid; print "</a></td>\n"; - print '<td><a href="'.DOL_URL_ROOT.'/compta/fiche.php?socid='.$objp->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.dolibarr_trunc($objp->nom,44).'</a></td>'; + print '<td><a href="'.DOL_URL_ROOT.'/compta/fiche.php?socid='.$objp->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($objp->nom,44).'</a></td>'; print "<td>".$objp->code_client."</td>\n"; print "<td align=\"center\">"; - print dolibarr_print_date($objp->date)."</td>"; + print dol_print_date($objp->date)."</td>"; //print "<td align=\"right\">".price($objp->total_ht)."</td>\n"; //print '<td align="right">'; print '<td align="center">'.($objp->nb_initial>0?$objp->nb_initial:'').'</td>'; @@ -197,7 +197,7 @@ if ($_GET["id"] || $_GET["ref"]) } else { - dolibarr_print_error($db); + dol_print_error($db); } print "</table>"; print '<br>'; @@ -206,7 +206,7 @@ if ($_GET["id"] || $_GET["ref"]) } else { - dolibarr_print_error(); + dol_print_error(); } $db->close(); diff --git a/htdocs/product/stats/facture.php b/htdocs/product/stats/facture.php index cd098d8b8d17d916f63b584bc2b8a496c034ab96..cea8a22dee3dfdf36a007609ebfa8cd8f5be8925 100644 --- a/htdocs/product/stats/facture.php +++ b/htdocs/product/stats/facture.php @@ -83,7 +83,7 @@ if ($_GET["id"] || $_GET["ref"]) */ $head=product_prepare_head($product, $user); $titre=$langs->trans("CardProduct".$product->type); - dolibarr_fiche_head($head, 'referers', $titre); + dol_fiche_head($head, 'referers', $titre); print '<table class="border" width="100%">'; @@ -171,10 +171,10 @@ if ($_GET["id"] || $_GET["ref"]) $invoicestatic->ref=$objp->facnumber; print $invoicestatic->getNomUrl(1); print "</td>\n"; - print '<td><a href="'.DOL_URL_ROOT.'/compta/fiche.php?socid='.$objp->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.dolibarr_trunc($objp->nom,44).'</a></td>'; + print '<td><a href="'.DOL_URL_ROOT.'/compta/fiche.php?socid='.$objp->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($objp->nom,44).'</a></td>'; print "<td>".$objp->code_client."</td>\n"; print "<td align=\"center\">"; - print dolibarr_print_date($objp->date)."</td>"; + print dol_print_date($objp->date)."</td>"; print "<td align=\"right\">".price($objp->total_ht)."</td>\n"; print '<td align="right">'.$invoicestatic->LibStatut($objp->paye,$objp->statut,5).'</td>'; print "</tr>\n"; @@ -184,7 +184,7 @@ if ($_GET["id"] || $_GET["ref"]) } else { - dolibarr_print_error($db); + dol_print_error($db); } print "</table>"; print '<br>'; @@ -193,7 +193,7 @@ if ($_GET["id"] || $_GET["ref"]) } else { - dolibarr_print_error(); + dol_print_error(); } $db->close(); diff --git a/htdocs/product/stats/facture_fournisseur.php b/htdocs/product/stats/facture_fournisseur.php index a03cfc02cbfaa19a8fbe10f446c756ca49fa0d05..2b0ccd44055aefc7814dc5b7d4482cb55bf65681 100644 --- a/htdocs/product/stats/facture_fournisseur.php +++ b/htdocs/product/stats/facture_fournisseur.php @@ -83,7 +83,7 @@ if ($_GET["id"] || $_GET["ref"]) */ $head=product_prepare_head($product, $user); $titre=$langs->trans("CardProduct".$product->type); - dolibarr_fiche_head($head, 'referers', $titre); + dol_fiche_head($head, 'referers', $titre); print '<table class="border" width="100%">'; @@ -171,10 +171,10 @@ if ($_GET["id"] || $_GET["ref"]) $supplierinvoicestatic->ref=$objp->facnumber; print $supplierinvoicestatic->getNomUrl(1); print "</td>\n"; - print '<td><a href="'.DOL_URL_ROOT.'/compta/fiche.php?socid='.$objp->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.dolibarr_trunc($objp->nom,44).'</a></td>'; + print '<td><a href="'.DOL_URL_ROOT.'/compta/fiche.php?socid='.$objp->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($objp->nom,44).'</a></td>'; print "<td>".$objp->code_client."</td>\n"; print "<td align=\"center\">"; - print dolibarr_print_date($objp->date)."</td>"; + print dol_print_date($objp->date)."</td>"; print "<td align=\"right\">".price($objp->total_ht)."</td>\n"; $fac=new Facture($db); print '<td align="right">'.$fac->LibStatut($objp->paye,$objp->statut,5).'</td>'; @@ -185,7 +185,7 @@ if ($_GET["id"] || $_GET["ref"]) } else { - dolibarr_print_error($db); + dol_print_error($db); } print "</table>"; print '<br>'; @@ -194,7 +194,7 @@ if ($_GET["id"] || $_GET["ref"]) } else { - dolibarr_print_error(); + dol_print_error(); } $db->close(); diff --git a/htdocs/product/stats/fiche.php b/htdocs/product/stats/fiche.php index 7b34bf5f402b6f9d01786ac41df94d38dbd75973..29c7e1667ce41b2dfef44682be2cb6364ec724e6 100644 --- a/htdocs/product/stats/fiche.php +++ b/htdocs/product/stats/fiche.php @@ -70,7 +70,7 @@ if ($_GET["id"] || $_GET["ref"]) { $head=product_prepare_head($product, $user); $titre=$langs->trans("CardProduct".$product->type); - dolibarr_fiche_head($head, 'stats', $titre); + dol_fiche_head($head, 'stats', $titre); print '<table class="border" width="100%">'; @@ -199,7 +199,7 @@ if ($_GET["id"] || $_GET["ref"]) } else { - dolibarr_print_error($db,'Error for calculating graph on key='.$key.' - '.$product->error); + dol_print_error($db,'Error for calculating graph on key='.$key.' - '.$product->error); } } } @@ -239,7 +239,7 @@ if ($_GET["id"] || $_GET["ref"]) print '<tr>'; if (file_exists($dir."/".$graphfiles[$key]['file']) && filemtime($dir."/".$graphfiles[$key]['file']) && ! $px->isGraphKo()) { - print '<td>'.$langs->trans("GeneratedOn",dolibarr_print_date(filemtime($dir."/".$graphfiles[$key]['file']),"dayhour")).'</td>'; + print '<td>'.$langs->trans("GeneratedOn",dol_print_date(filemtime($dir."/".$graphfiles[$key]['file']),"dayhour")).'</td>'; } else { @@ -269,7 +269,7 @@ if ($_GET["id"] || $_GET["ref"]) } else { - dolibarr_print_error(); + dol_print_error(); } diff --git a/htdocs/product/stats/index.php b/htdocs/product/stats/index.php index 18c7a379a7a1d22bf33b86af713d5a7c0f7db4ef..4adba2a6213bd817dbee07fada2b2d74982ea33c 100644 --- a/htdocs/product/stats/index.php +++ b/htdocs/product/stats/index.php @@ -185,7 +185,7 @@ if ($db->query($sql)) } } else { - dolibarr_print_error($db); + dol_print_error($db); } print "</table>\n"; $db->free(); diff --git a/htdocs/product/stats/propal.php b/htdocs/product/stats/propal.php index 2e97d52e1e27364dd8867e1206b3bc28515ab39a..8e76590b69ad30fa6bca4ac48e8a1e21d42b8a7a 100644 --- a/htdocs/product/stats/propal.php +++ b/htdocs/product/stats/propal.php @@ -85,7 +85,7 @@ if ($_GET["id"] || $_GET["ref"]) */ $head=product_prepare_head($product, $user); $titre=$langs->trans("CardProduct".$product->type); - dolibarr_fiche_head($head, 'referers', $titre); + dol_fiche_head($head, 'referers', $titre); print '<table class="border" width="100%">'; @@ -171,9 +171,9 @@ if ($_GET["id"] || $_GET["ref"]) print '<td><a href="'.DOL_URL_ROOT.'/comm/propal.php?propalid='.$objp->propalid.'">'.img_object($langs->trans("ShowPropal"),"propal").' '; print $objp->ref; print "</a></td>\n"; - print '<td><a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$objp->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.dolibarr_trunc($objp->nom,44).'</a></td>'; + print '<td><a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$objp->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($objp->nom,44).'</a></td>'; print "<td align=\"center\">"; - print dolibarr_print_date($objp->date)."</td>"; + print dol_print_date($objp->date)."</td>"; print "<td align=\"right\">".price($objp->amount)."</td>\n"; print '<td align="right">'.$propalstatic->LibStatut($objp->statut,5).'</td>'; print "</tr>\n"; @@ -183,7 +183,7 @@ if ($_GET["id"] || $_GET["ref"]) } else { - dolibarr_print_error($db); + dol_print_error($db); } print "</table>"; print '<br>'; @@ -192,7 +192,7 @@ if ($_GET["id"] || $_GET["ref"]) } else { - dolibarr_print_error(); + dol_print_error(); } $db->close(); diff --git a/htdocs/product/stock/entrepot.class.php b/htdocs/product/stock/entrepot.class.php index 63c9e6697bff28a4b62092fb212e32b934320df7..4b122a7b6b41d0a4fe7f0a5501a1b0942a678708 100644 --- a/htdocs/product/stock/entrepot.class.php +++ b/htdocs/product/stock/entrepot.class.php @@ -83,7 +83,7 @@ class Entrepot extends CommonObject $sql = "INSERT INTO ".MAIN_DB_PREFIX."entrepot (datec, fk_user_author, label)"; $sql .= " VALUES (".$this->db->idate(mktime()).",".$user->id.",'".addslashes($this->libelle)."')"; - dolibarr_syslog("Entrepot::create sql=".$sql); + dol_syslog("Entrepot::create sql=".$sql); $result=$this->db->query($sql); if ($result) { @@ -99,21 +99,21 @@ class Entrepot extends CommonObject } else { - dolibarr_syslog("Entrepot::Create return -3"); + dol_syslog("Entrepot::Create return -3"); $this->db->rollback(); return -3; } } else { $this->error="Failed to get insert id"; - dolibarr_syslog("Entrepot::Create return -2"); + dol_syslog("Entrepot::Create return -2"); return -2; } } else { $this->error=$this->db->error(); - dolibarr_syslog("Entrepot::Create Error ".$this->db->error()); + dol_syslog("Entrepot::Create Error ".$this->db->error()); $this->db->rollback(); return -1; } @@ -154,8 +154,8 @@ class Entrepot extends CommonObject else { $this->error=$this->db->error()." sql=$sql";; - dolibarr_syslog("Entrepot::Update return -1"); - dolibarr_syslog("Entrepot::Update ".$this->error); + dol_syslog("Entrepot::Update return -1"); + dol_syslog("Entrepot::Update ".$this->error); return -1; } } @@ -197,7 +197,7 @@ class Entrepot extends CommonObject } else { - dolibarr_print_error($db); + dol_print_error($db); } $this->pays=$objp->libelle; } @@ -256,7 +256,7 @@ class Entrepot extends CommonObject } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); } } diff --git a/htdocs/product/stock/fiche-valo.php b/htdocs/product/stock/fiche-valo.php index fe72b4aa8aea7c07c321a77393614f9882a597e3..cf7b192dd4ca7d3a2cc5db90da067164a0f2d2c7 100644 --- a/htdocs/product/stock/fiche-valo.php +++ b/htdocs/product/stock/fiche-valo.php @@ -49,7 +49,7 @@ if ($_GET["id"]) $result = $entrepot->fetch($_GET["id"]); if ($result < 0) { - dolibarr_print_error($db); + dol_print_error($db); } /* @@ -84,7 +84,7 @@ if ($_GET["id"]) $head[$h][1] = $langs->trans("Info"); $h++; - dolibarr_fiche_head($head, $hselected, $langs->trans("Warehouse")); + dol_fiche_head($head, $hselected, $langs->trans("Warehouse")); print '<table class="border" width="100%">'; diff --git a/htdocs/product/stock/fiche.php b/htdocs/product/stock/fiche.php index 8857e6a863c728eb2ab41b285b9a6ccb0933c144..334fe7744411f9cdef7d040a8994b03f9571355d 100644 --- a/htdocs/product/stock/fiche.php +++ b/htdocs/product/stock/fiche.php @@ -196,7 +196,7 @@ else $result = $entrepot->fetch($_GET["id"]); if ($result < 0) { - dolibarr_print_error($db); + dol_print_error($db); } /* @@ -237,7 +237,7 @@ else $head[$h][1] = $langs->trans("Info"); $h++; - dolibarr_fiche_head($head, $hselected, $langs->trans("Warehouse")); + dol_fiche_head($head, $hselected, $langs->trans("Warehouse")); print '<table class="border" width="100%">'; @@ -282,11 +282,11 @@ else } else { - dolibarr_print_error($db); + dol_print_error($db); } print '<tr><td valign="top">'.$langs->trans("LastMovement").'</td><td colspan="3">'; - print '<a href="mouvement.php?id='.$entrepot->id.'">'.dolibarr_print_date($row[0]).'</a>'; + print '<a href="mouvement.php?id='.$entrepot->id.'">'.dol_print_date($row[0]).'</a>'; print "</td></tr>"; print "</table>"; @@ -373,7 +373,7 @@ else } $var=!$var; - //print '<td>'.dolibarr_print_date($objp->datem).'</td>'; + //print '<td>'.dol_print_date($objp->datem).'</td>'; print "<tr $bc[$var]>"; print "<td><a href=\"../fiche.php?id=$objp->rowid\">"; print img_object($langs->trans("ShowProduct"),"product").' '.$objp->ref; @@ -405,7 +405,7 @@ else } else { - dolibarr_print_error($db); + dol_print_error($db); } print "</table>\n"; } diff --git a/htdocs/product/stock/index.php b/htdocs/product/stock/index.php index 92203b4fbd341a71710b9597f588d7797ba272d3..8d16dd8105707b5e9991fc4f5becb4e518adba9a 100644 --- a/htdocs/product/stock/index.php +++ b/htdocs/product/stock/index.php @@ -89,7 +89,7 @@ if ($result) } else { - dolibarr_print_error($db); + dol_print_error($db); } print '</td><td valign="top" width="70%" class="notopnoleft">'; @@ -113,7 +113,7 @@ if ($conf->categorie->enabled && !$user->rights->categorie->voir) $sql .= " ORDER BY datem DESC"; $sql .= $db->plimit($max,0); -dolibarr_syslog("Index:list stock movements sql=".$sql, LOG_DEBUG); +dol_syslog("Index:list stock movements sql=".$sql, LOG_DEBUG); $resql = $db->query($sql) ; if ($resql) { @@ -134,7 +134,7 @@ if ($resql) $objp = $db->fetch_object($resql); $var=!$var; print "<tr $bc[$var]>"; - print '<td>'.dolibarr_print_date($objp->datem,'dayhour').'</td>'; + print '<td>'.dol_print_date($objp->datem,'dayhour').'</td>'; print "<td><a href=\"../fiche.php?id=$objp->rowid\">"; print img_object($langs->trans("ShowProduct"),"product").' '.$objp->produit; print "</a></td>\n"; diff --git a/htdocs/product/stock/info.php b/htdocs/product/stock/info.php index 16c85e63570c2e7f2f31dc9f77d811d9d787e0fc..236118c3026b0aa93ddb9a3d778309491ec6e5ff 100644 --- a/htdocs/product/stock/info.php +++ b/htdocs/product/stock/info.php @@ -67,7 +67,7 @@ $head[$h][1] = $langs->trans("Info"); $hselected=$h; $h++; -dolibarr_fiche_head($head, $hselected, $langs->trans("Warehouse")); +dol_fiche_head($head, $hselected, $langs->trans("Warehouse")); print '<table width="100%"><tr><td>'; diff --git a/htdocs/product/stock/liste.php b/htdocs/product/stock/liste.php index 3290cb54d609a10418481e4673e3d7af297bde1a..1ded8c4247b12de053819c2b51f433c74bfa78dd 100644 --- a/htdocs/product/stock/liste.php +++ b/htdocs/product/stock/liste.php @@ -103,7 +103,7 @@ if ($result) } else { - dolibarr_print_error($db); + dol_print_error($db); } diff --git a/htdocs/product/stock/mouvement.php b/htdocs/product/stock/mouvement.php index 3a749027d0fec2b9565f0a0bc0f2c8b3390a6880..57db6d3d8e6c7718fb8ba418b7057f69c103b999 100644 --- a/htdocs/product/stock/mouvement.php +++ b/htdocs/product/stock/mouvement.php @@ -77,7 +77,7 @@ if ($resql) $result = $entrepot->fetch($_GET["id"]); if ($result < 0) { - dolibarr_print_error($db); + dol_print_error($db); } } @@ -121,7 +121,7 @@ if ($resql) $head[$h][1] = $langs->trans("Info"); $h++; - dolibarr_fiche_head($head, $hselected, $langs->trans("Warehouse")); + dol_fiche_head($head, $hselected, $langs->trans("Warehouse")); print '<table class="border" width="100%">'; @@ -159,7 +159,7 @@ if ($resql) $objp = $db->fetch_object($resql); $var=!$var; print "<tr $bc[$var]>"; - print '<td>'.dolibarr_print_date($objp->datem,'dayhour').'</td>'; + print '<td>'.dol_print_date($objp->datem,'dayhour').'</td>'; print "<td><a href=\"../fiche.php?id=$objp->rowid\">"; print img_object($langs->trans("ShowProduct"),"product").' '.$objp->produit; print "</a></td>\n"; @@ -179,7 +179,7 @@ if ($resql) } else { - dolibarr_print_error($db); + dol_print_error($db); } diff --git a/htdocs/product/stock/mouvementstock.class.php b/htdocs/product/stock/mouvementstock.class.php index 79bd9eda19df3a3204c6e2090d8643a6ba77765c..aeda63dba379ff6e2a6a71fa62655210272611df 100644 --- a/htdocs/product/stock/mouvementstock.class.php +++ b/htdocs/product/stock/mouvementstock.class.php @@ -47,7 +47,7 @@ class MouvementStock global $conf; $error = 0; - dolibarr_syslog("MouvementStock::_create $user->id, $fk_product, $entrepot_id, qty=$qty, type=$type, $price"); + dol_syslog("MouvementStock::_create $user->id, $fk_product, $entrepot_id, qty=$qty, type=$type, $price"); $this->db->begin(); @@ -58,14 +58,14 @@ class MouvementStock $sql.= " VALUES (".$this->db->idate(gmmktime()).", ".$fk_product.", ".$entrepot_id.", ".$qty.", ".$type.", ".$user->id; $sql.= ",'".price2num($price)."')"; - dolibarr_syslog("MouvementStock::_create sql=".$sql, LOG_DEBUG); + dol_syslog("MouvementStock::_create sql=".$sql, LOG_DEBUG); if ($resql = $this->db->query($sql)) { $mvid = $this->db->last_insert_id($resql); } else { - dolibarr_syslog("MouvementStock::_create ".$this->error); + dol_syslog("MouvementStock::_create ".$this->error); $error = -1; } @@ -83,7 +83,7 @@ class MouvementStock } else { - dolibarr_syslog("MouvementStock::_create echec update ".$this->error); + dol_syslog("MouvementStock::_create echec update ".$this->error); $error = -2; } } @@ -103,13 +103,13 @@ class MouvementStock $sql.= " (".$qty.",".$entrepot_id.",".$fk_product.")"; } - dolibarr_syslog("MouvementStock::_create sql=".$sql, LOG_DEBUG); + dol_syslog("MouvementStock::_create sql=".$sql, LOG_DEBUG); if ($this->db->query($sql)) { $sql = "UPDATE ".MAIN_DB_PREFIX."product SET stock = stock + ".$qty; $sql.= " WHERE rowid = ".$fk_product; - dolibarr_syslog("MouvementStock::_create sql=".$sql, LOG_DEBUG); + dol_syslog("MouvementStock::_create sql=".$sql, LOG_DEBUG); if ($this->db->query($sql)) { @@ -118,14 +118,14 @@ class MouvementStock } else { - dolibarr_syslog("MouvementStock::_create ".$this->error, LOG_ERR); + dol_syslog("MouvementStock::_create ".$this->error, LOG_ERR); $error = -4; } } else { - dolibarr_syslog("MouvementStock::_create ".$this->error, LOG_ERR); + dol_syslog("MouvementStock::_create ".$this->error, LOG_ERR); $error = -3; } } @@ -165,7 +165,7 @@ class MouvementStock { $this->db->rollback(); $this->error=$this->db->lasterror(); - dolibarr_syslog("MouvementStock::_create ".$this->error); + dol_syslog("MouvementStock::_create ".$this->error); return -2; } } @@ -185,7 +185,7 @@ class MouvementStock $sql.= " FROM ".MAIN_DB_PREFIX."product_association"; $sql.= " WHERE fk_product_pere = ".$idProduct; - dolibarr_syslog("MouvementStock::_createSubProduct sql=".$sql, LOG_DEBUG); + dol_syslog("MouvementStock::_createSubProduct sql=".$sql, LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -200,7 +200,7 @@ class MouvementStock } else { - dolibarr_syslog("MouvementStock::_createSubProduct ".$this->error, LOG_ERR); + dol_syslog("MouvementStock::_createSubProduct ".$this->error, LOG_ERR); $error = -2; } @@ -220,7 +220,7 @@ class MouvementStock */ function _createProductComposition($user, $fk_product, $entrepot_id, $qty, $type, $price=0) { - dolibarr_syslog("MouvementStock::_createComposition $user->id, $fk_product, $entrepot_id, $qty, $type, $price"); + dol_syslog("MouvementStock::_createComposition $user->id, $fk_product, $entrepot_id, $qty, $type, $price"); $products_compo = array(); $sql = "SELECT fk_product_composition, qte, etat_stock"; @@ -239,7 +239,7 @@ class MouvementStock } else { - dolibarr_syslog("MouvementStock::_Create echec update ".$this->error); + dol_syslog("MouvementStock::_Create echec update ".$this->error); return -1; } @@ -301,7 +301,7 @@ class MouvementStock function CalculateEntrepotValoPmp($user, $entrepot_id, $valo_mouvement) { $error = 0; - dolibarr_syslog("MouvementStock::CalculateEntrepotValoPmp $user->id, $entrepot_id, $valo_mouvement"); + dol_syslog("MouvementStock::CalculateEntrepotValoPmp $user->id, $entrepot_id, $valo_mouvement"); if ( $valo_mouvement <> 0 ) { @@ -324,7 +324,7 @@ class MouvementStock else { $error = -26; - dolibarr_syslog("MouvementStock::CalculateEntrepotValoPmp ERRORSQL[$error]"); + dol_syslog("MouvementStock::CalculateEntrepotValoPmp ERRORSQL[$error]"); } } @@ -356,7 +356,7 @@ class MouvementStock else { $error = -27; - dolibarr_syslog("MouvementStock::CalculateEntrepotValoPmp ERRORSQL[$error]"); + dol_syslog("MouvementStock::CalculateEntrepotValoPmp ERRORSQL[$error]"); } } @@ -373,7 +373,7 @@ class MouvementStock else { $error = -28; - dolibarr_syslog("MouvementStock::CalculateEntrepotValoPmp ERRORSQL[$error]"); + dol_syslog("MouvementStock::CalculateEntrepotValoPmp ERRORSQL[$error]"); } } @@ -383,7 +383,7 @@ class MouvementStock } else { - dolibarr_syslog("MouvementStock::CalculateEntrepotValoPmp RETURN IN ERROR[$error]"); + dol_syslog("MouvementStock::CalculateEntrepotValoPmp RETURN IN ERROR[$error]"); return $error; } } @@ -407,7 +407,7 @@ class MouvementStock function CalculateValoPmp($mvid, $fk_product, $qty, $price=0, &$value_ope) { $error = 0; - dolibarr_syslog("MouvementStock::CalculateValoPmp $mvid, $fk_product, $qty, $price"); + dol_syslog("MouvementStock::CalculateValoPmp $mvid, $fk_product, $qty, $price"); if ( $qty <> 0 ) { @@ -432,7 +432,7 @@ class MouvementStock } else { - dolibarr_syslog("MouvementStock::CalculateValoPmp ERRORSQL[1] ".$this->error); + dol_syslog("MouvementStock::CalculateValoPmp ERRORSQL[1] ".$this->error); $error = -16; } } @@ -478,7 +478,7 @@ class MouvementStock } else { - dolibarr_syslog("MouvementStock::CalculateValoPmp ERRORSQL[2] insert ".$this->error); + dol_syslog("MouvementStock::CalculateValoPmp ERRORSQL[2] insert ".$this->error); $error = -17; } } @@ -489,7 +489,7 @@ class MouvementStock } else { - dolibarr_syslog("MouvementStock::CalculateValoPmp ERROR : $error"); + dol_syslog("MouvementStock::CalculateValoPmp ERROR : $error"); return -21; } } diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php index f0e51c99c1c6a757e5cb8cdacd2f74901ab04387..6eb93067eaa8f178a3afc71a400fac74479083aa 100644 --- a/htdocs/product/stock/product.php +++ b/htdocs/product/stock/product.php @@ -122,7 +122,7 @@ if ($_GET["id"] || $_GET["ref"]) { $head=product_prepare_head($product, $user); $titre=$langs->trans("CardProduct".$product->type); - dolibarr_fiche_head($head, 'stock', $titre); + dol_fiche_head($head, 'stock', $titre); $html = new Form($db); @@ -171,13 +171,13 @@ if ($_GET["id"] || $_GET["ref"]) if ($conf->commande->enabled) { $result=$product->load_stats_commande(0,'1,2'); - if ($result < 0) dolibarr_print_error($db,$product->error); + if ($result < 0) dol_print_error($db,$product->error); $stock_commande_client=$product->stats_commande['qty']; } if ($conf->fournisseur->enabled) { $result=$product->load_stats_commande_fournisseur(0,'3'); - if ($result < 0) dolibarr_print_error($db,$product->error); + if ($result < 0) dol_print_error($db,$product->error); $stock_commande_fournisseur=$product->stats_commande_fournisseur['qty']; } @@ -207,7 +207,7 @@ if ($_GET["id"] || $_GET["ref"]) if ($found) print '<br>'; else $found=1; print $langs->trans("CustomersOrdersRunning").': '.($stock_commande_client+$stock_sending_client); $result=$product->load_stats_commande(0,'0'); - if ($result < 0) dolibarr_print_error($db,$product->error); + if ($result < 0) dol_print_error($db,$product->error); print ' ('.$langs->trans("Draft").': '.$product->stats_commande['qty'].')'; //print '<br>'; //print $langs->trans("CustomersSendingRunning").': '.$stock_sending_client; @@ -219,7 +219,7 @@ if ($_GET["id"] || $_GET["ref"]) if ($found) print '<br>'; else $found=1; print $langs->trans("SuppliersOrdersRunning").': '.$stock_commande_fournisseur; $result=$product->load_stats_commande_fournisseur(0,'0,1,2'); - if ($result < 0) dolibarr_print_error($db,$product->error); + if ($result < 0) dol_print_error($db,$product->error); print ' ('.$langs->trans("DraftOrWaitingApproved").': '.$product->stats_commande_fournisseur['qty'].')'; } print '</td></tr>'; @@ -310,7 +310,7 @@ if ($_GET["id"] || $_GET["ref"]) } else { - dolibarr_print_error(); + dol_print_error(); } diff --git a/htdocs/product/stock/user.php b/htdocs/product/stock/user.php index 07cc50dc35544dee2eb08bebecbfb49f208a15eb..06553fe52643065dbecb08286e5fe677fe6e2392 100644 --- a/htdocs/product/stock/user.php +++ b/htdocs/product/stock/user.php @@ -66,7 +66,7 @@ $form=new Form($db); $result = $entrepot->fetch($_GET["id"]); if ($result < 0) { - dolibarr_print_error($db); + dol_print_error($db); } /* @@ -101,7 +101,7 @@ $form=new Form($db); $head[$h][1] = $langs->trans("Info"); $h++; - dolibarr_fiche_head($head, $hselected, $langs->trans("Warehouse").': '.$entrepot->libelle); + dol_fiche_head($head, $hselected, $langs->trans("Warehouse").': '.$entrepot->libelle); print '<table class="border" width="100%">'; @@ -190,7 +190,7 @@ $form=new Form($db); } else { - dolibarr_print_error($db); + dol_print_error($db); } print "</table>\n"; } diff --git a/htdocs/product/stock/valo.php b/htdocs/product/stock/valo.php index e29b2219e4fa846633a8cf392c11ed32beb87f48..aac41622852b2cc08c1a5de35857ea172a01eec6 100644 --- a/htdocs/product/stock/valo.php +++ b/htdocs/product/stock/valo.php @@ -137,7 +137,7 @@ if ($result) } else { - dolibarr_print_error($db); + dol_print_error($db); } $db->close(); diff --git a/htdocs/product/traduction.php b/htdocs/product/traduction.php index 71d1e64f5dd64094502c24e1243e2b75f879755d..2f925d472bddf09ed9905cac24653f79f36c3429 100644 --- a/htdocs/product/traduction.php +++ b/htdocs/product/traduction.php @@ -136,7 +136,7 @@ $html = new Form($db); $head=product_prepare_head($product, $user); $titre=$langs->trans("CardProduct".$product->type); -dolibarr_fiche_head($head, 'translation', $titre); +dol_fiche_head($head, 'translation', $titre); print '<table class="border" width="100%">'; diff --git a/htdocs/project.class.php b/htdocs/project.class.php index c9db0aa62b0c6a739163f057713b2513ec033fcd..b30c1013ef29828350d781850bda7a78313755ad 100644 --- a/htdocs/project.class.php +++ b/htdocs/project.class.php @@ -66,7 +66,7 @@ class Project extends CommonObject if (! trim($this->ref)) { $this->error='ErrorFieldsRequired'; - dolibarr_syslog("Project::Create error -1 ref null"); + dol_syslog("Project::Create error -1 ref null"); return -1; } @@ -77,7 +77,7 @@ class Project extends CommonObject $sql.= " ".($this->user_resp_id>0?$this->user_resp_id:'null').","; $sql.= " ".$this->db->idate(mktime()).", 0)"; - dolibarr_syslog("Project::create sql=".$sql,LOG_DEBUG); + dol_syslog("Project::create sql=".$sql,LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -86,7 +86,7 @@ class Project extends CommonObject } else { - dolibarr_syslog("Project::Create error -2"); + dol_syslog("Project::Create error -2"); $this->error=$this->db->error(); $result = -2; } @@ -106,20 +106,20 @@ class Project extends CommonObject $sql.= ", fk_user_resp = ".$this->user_resp_id; $sql.= " WHERE rowid = ".$this->id; - dolibarr_syslog("Project::update sql=".$sql,LOG_DEBUG); + dol_syslog("Project::update sql=".$sql,LOG_DEBUG); if ($this->db->query($sql) ) { $result = 0; } else { - dolibarr_syslog($this->db->error()); + dol_syslog($this->db->error()); $result = -2; } } else { - dolibarr_syslog("Project::Update ref null"); + dol_syslog("Project::Update ref null"); $result = -1; } @@ -140,7 +140,7 @@ class Project extends CommonObject if ($ref) $sql.= " WHERE ref='".$ref."'"; else $sql.= " WHERE rowid=".$id; - dolibarr_syslog("Project::fetch sql=".$sql, LOG_DEBUG); + dol_syslog("Project::fetch sql=".$sql, LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -234,7 +234,7 @@ class Project extends CommonObject if ($type == 'contract') $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."contrat WHERE fk_projet=".$this->id; if (! $sql) return -1; - dolibarr_syslog("Project::get_element_list sql=".$sql); + dol_syslog("Project::get_element_list sql=".$sql); $result=$this->db->query($sql); if ($result) { @@ -258,7 +258,7 @@ class Project extends CommonObject } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); } } @@ -271,7 +271,7 @@ class Project extends CommonObject $sql = "DELETE FROM ".MAIN_DB_PREFIX."projet"; $sql.= " WHERE rowid=".$this->id; - dolibarr_syslog("Project::delete sql=".$sql, LOG_DEBUG); + dol_syslog("Project::delete sql=".$sql, LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -280,7 +280,7 @@ class Project extends CommonObject else { $this->error=$this->db->lasterror(); - dolibarr_syslog("Project::delete ".$this->error, LOG_ERR); + dol_syslog("Project::delete ".$this->error, LOG_ERR); return -1; } } @@ -305,7 +305,7 @@ class Project extends CommonObject $sql = "INSERT INTO ".MAIN_DB_PREFIX."projet_task (fk_projet, title, fk_user_creat, fk_task_parent, duration_effective)"; $sql.= " VALUES (".$this->id.",'".addslashes($title)."', ".$user->id.",".($parent>0?$parent:'0').", 0)"; - dolibarr_syslog("Project::CreateTask sql=".$sql, LOG_DEBUG); + dol_syslog("Project::CreateTask sql=".$sql, LOG_DEBUG); if ($this->db->query($sql)) { $task_id = $this->db->last_insert_id(MAIN_DB_PREFIX."projet_task"); @@ -314,7 +314,7 @@ class Project extends CommonObject else { $this->error=$this->db->lasterror(); - dolibarr_syslog("Project::CreateTask error -1 ".$this->error, LOG_ERR); + dol_syslog("Project::CreateTask error -1 ".$this->error, LOG_ERR); $result = -1; } @@ -325,7 +325,7 @@ class Project extends CommonObject $sql = "INSERT INTO ".MAIN_DB_PREFIX."projet_task_actors (fk_projet_task, fk_user)"; $sql.= " VALUES (".$task_id.",".($id_resp>0?$id_resp:'null').")"; - dolibarr_syslog("Project::CreateTask sql=".$sql,LOG_DEBUG); + dol_syslog("Project::CreateTask sql=".$sql,LOG_DEBUG); if ($this->db->query($sql) ) { $this->db->commit(); @@ -334,7 +334,7 @@ class Project extends CommonObject else { $this->error=$this->db->lasterror(); - dolibarr_syslog("Project::CreateTask error -3 ".$this->error,LOG_ERR); + dol_syslog("Project::CreateTask error -3 ".$this->error,LOG_ERR); $this->db->rollback(); return -3; } @@ -347,14 +347,14 @@ class Project extends CommonObject } else { - dolibarr_syslog("Project::CreateTask error -2 ".$this->error,LOG_ERR); + dol_syslog("Project::CreateTask error -2 ".$this->error,LOG_ERR); $this->db->rollback(); return -2; } } else { - dolibarr_syslog("Project::CreateTask error -1 ref null"); + dol_syslog("Project::CreateTask error -1 ref null"); $result = -1; } @@ -375,7 +375,7 @@ class Project extends CommonObject $sql = "INSERT INTO ".MAIN_DB_PREFIX."projet_task_time (fk_task, task_date, task_duration, fk_user)"; $sql .= " VALUES (".$task.",'".$this->db->idate($date)."',".$time.", ".$user->id.")"; - dolibarr_syslog("Project::TaskAddTime sql=".$sql, LOG_DEBUG); + dol_syslog("Project::TaskAddTime sql=".$sql, LOG_DEBUG); if ($this->db->query($sql) ) { $task_id = $this->db->last_insert_id(MAIN_DB_PREFIX."projet_task"); @@ -383,7 +383,7 @@ class Project extends CommonObject } else { - dolibarr_syslog("Project::TaskAddTime error -2",LOG_ERR); + dol_syslog("Project::TaskAddTime error -2",LOG_ERR); $this->error=$this->db->error(); $result = -2; } @@ -394,14 +394,14 @@ class Project extends CommonObject $sql .= " SET duration_effective = duration_effective + '".price2num($time)."'"; $sql .= " WHERE rowid = '".$task."';"; - dolibarr_syslog("Project::TaskAddTime sql=".$sql, LOG_DEBUG); + dol_syslog("Project::TaskAddTime sql=".$sql, LOG_DEBUG); if ($this->db->query($sql) ) { $result = 0; } else { - dolibarr_syslog("Project::TaskAddTime error -3",LOG_ERR); + dol_syslog("Project::TaskAddTime error -3",LOG_ERR); $this->error=$this->db->error(); $result = -2; } @@ -440,7 +440,7 @@ class Project extends CommonObject } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); } return $tasksrole; @@ -500,7 +500,7 @@ class Project extends CommonObject $sql.= " ORDER BY p.ref, t.title"; } - dolibarr_syslog("Project::getTasksArray sql=".$sql, LOG_DEBUG); + dol_syslog("Project::getTasksArray sql=".$sql, LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -524,7 +524,7 @@ class Project extends CommonObject } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); } return $tasks; diff --git a/htdocs/projet/activity/index.php b/htdocs/projet/activity/index.php index 9181987683383abc05f9b3b0701ffbc4491e6a1d..2ab4bd2cafa091245226f6f2f88fa3f620b4ce9d 100644 --- a/htdocs/projet/activity/index.php +++ b/htdocs/projet/activity/index.php @@ -106,7 +106,7 @@ if ( $resql ) } else { - dolibarr_print_error($db); + dol_print_error($db); } print "</table>"; @@ -150,7 +150,7 @@ if ( $resql ) } else { - dolibarr_print_error($db); + dol_print_error($db); } print '<tr class="liste_total">'; print '<td>'.$langs->trans('Total').'</td>'; @@ -198,7 +198,7 @@ if ( $resql ) } else { - dolibarr_print_error($db); + dol_print_error($db); } print '<tr class="liste_total">'; print '<td>'.$langs->trans('Total').'</td>'; @@ -247,7 +247,7 @@ if ( $resql ) } else { - dolibarr_print_error($db); + dol_print_error($db); } print '<tr class="liste_total">'; print '<td>'.$langs->trans('Total').'</td>'; @@ -258,7 +258,7 @@ print "</table><br />"; /* Affichage de la liste des projets du mois */ print '<table class="noborder" width="100%">'; print '<tr class="liste_titre">'; -print '<td>'.$langs->trans("ActivityOnProjectThisMonth").': '.dolibarr_print_date($now,"%B %Y").'</td>'; +print '<td>'.$langs->trans("ActivityOnProjectThisMonth").': '.dol_print_date($now,"%B %Y").'</td>'; print '<td align="right">'.$langs->trans("Time").'</td>'; print "</tr>\n"; @@ -292,7 +292,7 @@ if ( $resql ) } else { - dolibarr_print_error($db); + dol_print_error($db); } print "</table>"; @@ -333,7 +333,7 @@ if ( $resql ) } else { - dolibarr_print_error($db); + dol_print_error($db); } print "</table>"; diff --git a/htdocs/projet/activity/list.php b/htdocs/projet/activity/list.php index dcfb970c49593589c19d5139244dd9f599ddee4e..b32775638b3765354edb99b84c0b14b757c47c63 100644 --- a/htdocs/projet/activity/list.php +++ b/htdocs/projet/activity/list.php @@ -77,7 +77,7 @@ if ($_POST["action"] == 'addtime' && $user->rights->projet->creer) $project = new Project($db); $result = $project->fetch($task->fk_projet); - $date = dolibarr_mktime(12,0,0,$_POST["$id"."month"],$_POST["$id"."day"],$_POST["$id"."year"]); + $date = dol_mktime(12,0,0,$_POST["$id"."month"],$_POST["$id"."day"],$_POST["$id"."year"]); $project->TaskAddTime($user, $id , $post, $date); } else diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index 53f9a2991fd5a39453a2a6bd04c7e5c10cf65fc2..6387297f88bb16e1e21a22d3ff94effe9a51330b 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -71,7 +71,7 @@ if ($projet->user_resp_id > 0) } $head=project_prepare_head($projet); -dolibarr_fiche_head($head, 'element', $langs->trans("Project")); +dol_fiche_head($head, 'element', $langs->trans("Project")); print '<table class="border" width="100%">'; @@ -169,7 +169,7 @@ foreach ($listofreferent as $key => $value) $date=$element->date; if (empty($date)) $date=$element->datep; if (empty($date)) $date=$element->date_contrat; - print '<td>'.dolibarr_print_date($date,'day').'</td>'; + print '<td>'.dol_print_date($date,'day').'</td>'; print '<td align="right">'.(isset($element->total_ht)?price($element->total_ht):' ').'</td>'; print '<td align="right">'.$element->getLibStatut(5).'</td>'; print '</tr>'; diff --git a/htdocs/projet/fiche.php b/htdocs/projet/fiche.php index 12076d3d074d39f066cbf58e338285416f8bcf8a..61493d2d3b5c96e2c504abbd4c72e4159e70e921 100644 --- a/htdocs/projet/fiche.php +++ b/htdocs/projet/fiche.php @@ -196,7 +196,7 @@ else if ($projet->user_resp_id > 0) $result=$projet->fetch_user($projet->user_resp_id); $head=project_prepare_head($projet); - dolibarr_fiche_head($head, 'project', $langs->trans("Project")); + dol_fiche_head($head, 'project', $langs->trans("Project")); if ($_GET["action"] == 'delete') { diff --git a/htdocs/projet/index.php b/htdocs/projet/index.php index 159a99241a556e9f084412cb61c466d0ab98eb65..bbec383fa33f8a4bda135bc0fa9b2ddabeea3fcb 100644 --- a/htdocs/projet/index.php +++ b/htdocs/projet/index.php @@ -95,7 +95,7 @@ if ( $resql ) } else { - dolibarr_print_error($db); + dol_print_error($db); } print "</table>"; @@ -145,7 +145,7 @@ if ( $resql ) } else { - dolibarr_print_error($db); + dol_print_error($db); } print "</table>"; diff --git a/htdocs/projet/liste.php b/htdocs/projet/liste.php index 1826bfa0b853ba67262815249b63ec22e667d54b..06bbd4fcbb2559740964c7d0ce0d380830c5a258 100644 --- a/htdocs/projet/liste.php +++ b/htdocs/projet/liste.php @@ -149,7 +149,7 @@ if ($resql) // Title print '<td>'; - print dolibarr_trunc($objp->title,24); + print dol_trunc($objp->title,24); print '</td>'; // Company @@ -184,7 +184,7 @@ if ($resql) } else { - dolibarr_print_error($db); + dol_print_error($db); } print "</table>"; diff --git a/htdocs/projet/tasks/fiche.php b/htdocs/projet/tasks/fiche.php index b604b2994f06bae2cbef2e507ed4d820a337e7dd..da145d27fdbf93cab187e66216f48ef3cba937d5 100644 --- a/htdocs/projet/tasks/fiche.php +++ b/htdocs/projet/tasks/fiche.php @@ -103,7 +103,7 @@ if ($_POST["action"] == 'addtime' && $user->rights->projet->creer) $id = ereg_replace("task","",$key); - $date = dolibarr_mktime(12,0,0,$_POST["$id"."month"],$_POST["$id"."day"],$_POST["$id"."year"]); + $date = dol_mktime(12,0,0,$_POST["$id"."month"],$_POST["$id"."day"],$_POST["$id"."year"]); $project->TaskAddTime($user, $id , $post, $date); } } @@ -185,7 +185,7 @@ else if ($_REQUEST["mode"]=='mine') $tab='mytasks'; $head=project_prepare_head($projet); - dolibarr_fiche_head($head, $tab, $langs->trans("Project")); + dol_fiche_head($head, $tab, $langs->trans("Project")); $param=($_REQUEST["mode"]=='mine'?'&mode=mine':''); diff --git a/htdocs/projet/tasks/index.php b/htdocs/projet/tasks/index.php index ca7d725cb1c04adb3460b39e50256a522e100204..67a453630ae6838b50cfbfb28b86667441dc1630 100644 --- a/htdocs/projet/tasks/index.php +++ b/htdocs/projet/tasks/index.php @@ -77,7 +77,7 @@ $head[$h][1] = $title; $head[$h][2] = 'tasks'; $h++; -dolibarr_fiche_head($head, 'tasks', $title); +dol_fiche_head($head, 'tasks', $title); $projet = new Project($db); $tasksarray=$projet->getTasksArray($_GET["mode"]=='mine'?$user:0); diff --git a/htdocs/projet/tasks/task.php b/htdocs/projet/tasks/task.php index 21fbea9e979a64f2253f27ef199f381169f373f0..cde131b79b11e112160d3a2c1925b87b99c2824c 100644 --- a/htdocs/projet/tasks/task.php +++ b/htdocs/projet/tasks/task.php @@ -86,7 +86,7 @@ if ($_GET["id"] > 0) $head=task_prepare_head($task); - dolibarr_fiche_head($head, 'tasks', $langs->trans("Task")); + dol_fiche_head($head, 'tasks', $langs->trans("Task")); if ($mesg) print $mesg.'<br>'; @@ -138,7 +138,7 @@ if ($_GET["id"] > 0) } else { - dolibarr_print_error($db); + dol_print_error($db); } print '</table></form>'; @@ -172,7 +172,7 @@ if ($_GET["id"] > 0) print "<tr ".$bc[$var].">"; // Date - print '<td>'.dolibarr_print_date($db->jdate($task_time->task_date),'day').' '.dolibarr_print_date($db->jdate($task_time->task_date),'%A').'</td>'; + print '<td>'.dol_print_date($db->jdate($task_time->task_date),'day').' '.dol_print_date($db->jdate($task_time->task_date),'%A').'</td>'; // Time spent $heure = intval($task_time->task_duration); diff --git a/htdocs/projet/tasks/who.php b/htdocs/projet/tasks/who.php index 9ec31a82e182d5458550f8bba01e5dd6b1003085..5696dd89bd3bd146d95ef29d98ae7eb905f575a2 100644 --- a/htdocs/projet/tasks/who.php +++ b/htdocs/projet/tasks/who.php @@ -63,7 +63,7 @@ if ($_GET["id"] > 0) $head=task_prepare_head($task); - dolibarr_fiche_head($head, 'who', $langs->trans("Task")); + dol_fiche_head($head, 'who', $langs->trans("Task")); if ($mesg) print $mesg.'<br>'; @@ -112,7 +112,7 @@ if ($_GET["id"] > 0) } else { - dolibarr_print_error($db); + dol_print_error($db); } print '</table></form>'; diff --git a/htdocs/propal.class.php b/htdocs/propal.class.php index 68c641c3a3fd1a818843ba374df7abeda71022d7..4578eb2f72c2bf98712fd444856142bcb56bfcbf 100644 --- a/htdocs/propal.class.php +++ b/htdocs/propal.class.php @@ -139,7 +139,7 @@ class Propal extends CommonObject if (! $qty) $qty = 1; - dolibarr_syslog("Propal::add_product $idproduct, $qty, $remise_percent"); + dol_syslog("Propal::add_product $idproduct, $qty, $remise_percent"); if ($idproduct > 0) { $prod=new Product($this->db); @@ -267,7 +267,7 @@ class Propal extends CommonObject { global $conf; - dolibarr_syslog("Propal::Addline propalid=$propalid, desc=$desc, pu_ht=$pu_ht, qty=$qty, txtva=$txtva, fk_product=$fk_product, remise_except=$remise_percent, price_base_type=$price_base_type, pu_ttc=$pu_ttc, info_bits=$info_bits"); + dol_syslog("Propal::Addline propalid=$propalid, desc=$desc, pu_ht=$pu_ht, qty=$qty, txtva=$txtva, fk_product=$fk_product, remise_except=$remise_percent, price_base_type=$price_base_type, pu_ttc=$pu_ttc, info_bits=$info_bits"); include_once(DOL_DOCUMENT_ROOT.'/lib/price.lib.php'); if ($this->statut == 0) @@ -357,7 +357,7 @@ class Propal extends CommonObject else { $this->error=$this->db->error(); - dolibarr_syslog("Error sql=$sql, error=".$this->error,LOG_ERR); + dol_syslog("Error sql=$sql, error=".$this->error,LOG_ERR); $this->db->rollback(); return -1; } @@ -388,7 +388,7 @@ class Propal extends CommonObject { global $conf; - dolibarr_syslog("Propal::UpdateLine $rowid, $pu, $qty, $remise_percent, $txtva, $desc, $price_base_type, $info_bits"); + dol_syslog("Propal::UpdateLine $rowid, $pu, $qty, $remise_percent, $txtva, $desc, $price_base_type, $info_bits"); include_once(DOL_DOCUMENT_ROOT.'/lib/price.lib.php'); if ($this->statut == 0) @@ -455,13 +455,13 @@ class Propal extends CommonObject { $this->error=$this->db->error(); $this->db->rollback(); - dolibarr_syslog("Propal::UpdateLine Erreur sql=$sql, error=".$this->error); + dol_syslog("Propal::UpdateLine Erreur sql=$sql, error=".$this->error); return -1; } } else { - dolibarr_syslog("Propal::UpdateLigne Erreur -2 Propal en mode incompatible pour cette action"); + dol_syslog("Propal::UpdateLigne Erreur -2 Propal en mode incompatible pour cette action"); return -2; } } @@ -536,7 +536,7 @@ class Propal extends CommonObject $sql.= " ".($this->date_livraison!=''?$this->db->idate($this->date_livraison):'null'); $sql.= ")"; - dolibarr_syslog("Propal::create sql=".$sql, LOG_DEBUG); + dol_syslog("Propal::create sql=".$sql, LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -563,7 +563,7 @@ class Propal extends CommonObject if ($resql < 0) { $this->error=$this->db->error; - dolibarr_print_error($this->db); + dol_print_error($this->db); break; } } @@ -596,13 +596,13 @@ class Propal extends CommonObject // Fin appel triggers $this->db->commit(); - dolibarr_syslog("Propal::ass::Create done id=".$this->id); + dol_syslog("Propal::ass::Create done id=".$this->id); return $this->id; } else { $this->error=$this->db->error(); - dolibarr_syslog("Propal::Create -2 ".$this->error); + dol_syslog("Propal::Create -2 ".$this->error); $this->db->rollback(); return -2; } @@ -612,13 +612,13 @@ class Propal extends CommonObject else { $this->error=$this->db->error(); - dolibarr_syslog("Propal::Create -1 ".$this->error); + dol_syslog("Propal::Create -1 ".$this->error); $this->db->rollback(); return -1; } $this->db->commit(); - dolibarr_syslog("Propal::Create done id=".$this->id); + dol_syslog("Propal::Create done id=".$this->id); return $this->id; } @@ -724,7 +724,7 @@ class Propal extends CommonObject if ($ref) $sql.= " AND p.ref='".$ref."'"; else $sql.= " AND p.rowid=".$rowid; - dolibarr_syslog("Propal::fecth sql=".$sql, LOG_DEBUG); + dol_syslog("Propal::fecth sql=".$sql, LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -822,7 +822,7 @@ class Propal extends CommonObject $ligne->ref = $objp->ref; $this->lignes[$i] = $ligne; - //dolibarr_syslog("1 ".$ligne->fk_product); + //dol_syslog("1 ".$ligne->fk_product); //print "xx $i ".$this->lignes[$i]->fk_product; $i++; } @@ -831,7 +831,7 @@ class Propal extends CommonObject else { $this->error=$this->db->error(); - dolibarr_syslog("Propal::Fetch Error ".$this->error, LOG_ERR); + dol_syslog("Propal::Fetch Error ".$this->error, LOG_ERR); return -1; } @@ -844,7 +844,7 @@ class Propal extends CommonObject else { $this->error=$this->db->error(); - dolibarr_syslog("Propal::Fetch Error ".$this->error, LOG_ERR); + dol_syslog("Propal::Fetch Error ".$this->error, LOG_ERR); return -1; } } @@ -909,7 +909,7 @@ class Propal extends CommonObject else { $this->error=$this->db->error(); - dolibarr_syslog("Propal::set_echeance Erreur SQL"); + dol_syslog("Propal::set_echeance Erreur SQL"); return -1; } } @@ -937,7 +937,7 @@ class Propal extends CommonObject else { $this->error=$this->db->error(); - dolibarr_syslog("Propal::set_date_livraison Erreur SQL"); + dol_syslog("Propal::set_date_livraison Erreur SQL"); return -1; } } @@ -964,7 +964,7 @@ class Propal extends CommonObject else { $this->error=$this->db->error(); - dolibarr_syslog("Propal::set_adresse_livraison Erreur SQL"); + dol_syslog("Propal::set_adresse_livraison Erreur SQL"); return -1; } } @@ -980,7 +980,7 @@ class Propal extends CommonObject { if ($user->rights->propale->creer) { - dolibarr_syslog('Propale::set_ref_client this->id='.$this->id.', ref_client='.$ref_client); + dol_syslog('Propale::set_ref_client this->id='.$this->id.', ref_client='.$ref_client); $sql = 'UPDATE '.MAIN_DB_PREFIX.'propal SET ref_client = '.(empty($ref_client) ? 'NULL' : '\''.addslashes($ref_client).'\''); $sql.= ' WHERE rowid = '.$this->id; @@ -992,7 +992,7 @@ class Propal extends CommonObject else { $this->error=$this->db->error(); - dolibarr_syslog('Propale::set_ref_client Erreur '.$this->error.' - '.$sql); + dol_syslog('Propale::set_ref_client Erreur '.$this->error.' - '.$sql); return -2; } } @@ -1028,7 +1028,7 @@ class Propal extends CommonObject else { $this->error=$this->db->error(); - dolibarr_syslog("Propal::set_remise_percent Error sql=$sql"); + dol_syslog("Propal::set_remise_percent Error sql=$sql"); return -1; } } @@ -1062,7 +1062,7 @@ class Propal extends CommonObject else { $this->error=$this->db->error(); - dolibarr_syslog("Propal::set_remise_absolue Error sql=$sql"); + dol_syslog("Propal::set_remise_absolue Error sql=$sql"); return -1; } } @@ -1159,7 +1159,7 @@ class Propal extends CommonObject } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); } } @@ -1305,7 +1305,7 @@ class Propal extends CommonObject } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); } } @@ -1384,12 +1384,12 @@ class Propal extends CommonObject //$sql = "SELECT fk_facture FROM ".MAIN_DB_PREFIX."fa_pr as fp"; //$sql .= " WHERE fk_propal = " . $id; - dolibarr_syslog("Propal::InvoiceArrayList sql=".$sql); + dol_syslog("Propal::InvoiceArrayList sql=".$sql); $resql=$this->db->query($sql); $resql2=null; if ($resql) { - dolibarr_syslog("Propal::InvoiceArrayList sql2=".$sql2); + dol_syslog("Propal::InvoiceArrayList sql2=".$sql2); $resql2=$this->db->query($sql2); } if ($resql2) @@ -1482,7 +1482,7 @@ class Propal extends CommonObject } } - dolibarr_syslog("Suppression de la proposition $this->id par $user->id", LOG_DEBUG); + dol_syslog("Suppression de la proposition $this->id par $user->id", LOG_DEBUG); $this->db->commit(); return 1; } @@ -1507,7 +1507,7 @@ class Propal extends CommonObject */ function cond_reglement($cond_reglement_id) { - dolibarr_syslog('Propale::cond_reglement('.$cond_reglement_id.')'); + dol_syslog('Propale::cond_reglement('.$cond_reglement_id.')'); if ($this->statut >= 0) { $sql = 'UPDATE '.MAIN_DB_PREFIX.'propal'; @@ -1520,14 +1520,14 @@ class Propal extends CommonObject } else { - dolibarr_syslog('Propale::cond_reglement Erreur '.$sql.' - '.$this->db->error()); + dol_syslog('Propale::cond_reglement Erreur '.$sql.' - '.$this->db->error()); $this->error=$this->db->error(); return -1; } } else { - dolibarr_syslog('Propale::cond_reglement, etat propale incompatible'); + dol_syslog('Propale::cond_reglement, etat propale incompatible'); $this->error='Etat propale incompatible '.$this->statut; return -2; } @@ -1541,7 +1541,7 @@ class Propal extends CommonObject */ function mode_reglement($mode_reglement_id) { - dolibarr_syslog('Propale::mode_reglement('.$mode_reglement_id.')'); + dol_syslog('Propale::mode_reglement('.$mode_reglement_id.')'); if ($this->statut >= 0) { $sql = 'UPDATE '.MAIN_DB_PREFIX.'propal'; @@ -1554,14 +1554,14 @@ class Propal extends CommonObject } else { - dolibarr_syslog('Propale::mode_reglement Erreur '.$sql.' - '.$this->db->error()); + dol_syslog('Propale::mode_reglement Erreur '.$sql.' - '.$this->db->error()); $this->error=$this->db->error(); return -1; } } else { - dolibarr_syslog('Propale::mode_reglement, etat propale incompatible'); + dol_syslog('Propale::mode_reglement, etat propale incompatible'); $this->error='Etat facture incompatible '.$this->statut; return -2; } @@ -1619,7 +1619,7 @@ class Propal extends CommonObject } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); } } @@ -1849,7 +1849,7 @@ class Propal extends CommonObject } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); $this->error=$this->db->error(); return -1; } @@ -1908,7 +1908,7 @@ class Propal extends CommonObject } else { - dolibarr_print_error($db,"Propale::getNextNumRef ".$obj->error); + dol_print_error($db,"Propale::getNextNumRef ".$obj->error); return ""; } } @@ -2059,7 +2059,7 @@ class PropaleLigne } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); } } @@ -2069,7 +2069,7 @@ class PropaleLigne */ function insert() { - dolibarr_syslog("PropaleLigne::insert rang=".$this->rang); + dol_syslog("PropaleLigne::insert rang=".$this->rang); $this->db->begin(); // Nettoyage parameteres @@ -2091,7 +2091,7 @@ class PropaleLigne } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); $this->db->rollback(); return -1; } @@ -2124,7 +2124,7 @@ class PropaleLigne $sql.= ' '.$rangtouse; $sql.= ')'; - dolibarr_syslog("PropaleLigne::insert sql=$sql"); + dol_syslog("PropaleLigne::insert sql=$sql"); $resql=$this->db->query($sql); if ($resql) @@ -2136,7 +2136,7 @@ class PropaleLigne else { $this->error=$this->db->error()." sql=".$sql; - dolibarr_syslog("PropaleLigne::insert Error ".$this->error); + dol_syslog("PropaleLigne::insert Error ".$this->error); $this->db->rollback(); return -1; } @@ -2171,7 +2171,7 @@ class PropaleLigne $sql.= ",marque_tx='".$this->marque_tx."'"; $sql.= " WHERE rowid = ".$this->rowid; - dolibarr_syslog("PropaleLigne::update sql=$sql"); + dol_syslog("PropaleLigne::update sql=$sql"); $resql=$this->db->query($sql); if ($resql) @@ -2182,7 +2182,7 @@ class PropaleLigne else { $this->error=$this->db->error(); - dolibarr_syslog("PropaleLigne::update Error ".$this->error); + dol_syslog("PropaleLigne::update Error ".$this->error); $this->db->rollback(); return -2; } @@ -2204,7 +2204,7 @@ class PropaleLigne $sql.= ",total_ttc=".price2num($this->total_ttc,'MT').""; $sql.= " WHERE rowid = ".$this->rowid; - dolibarr_syslog("PropaleLigne::update_total sql=$sql"); + dol_syslog("PropaleLigne::update_total sql=$sql"); $resql=$this->db->query($sql); if ($resql) @@ -2215,7 +2215,7 @@ class PropaleLigne else { $this->error=$this->db->error(); - dolibarr_syslog("PropaleLigne::update_total Error ".$this->error); + dol_syslog("PropaleLigne::update_total Error ".$this->error); $this->db->rollback(); return -2; } diff --git a/htdocs/prospect.class.php b/htdocs/prospect.class.php index 2247d8f1e03788b58cf2d42212b51b40bf9005e7..f8001997ffacafcba63c721b4c6b6145f40baaaf 100644 --- a/htdocs/prospect.class.php +++ b/htdocs/prospect.class.php @@ -87,7 +87,7 @@ class Prospect extends Societe } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); $this->error=$this->db->error(); return -1; } diff --git a/htdocs/public/donations/donateurs_code.php b/htdocs/public/donations/donateurs_code.php index c77eee5b87982bac8384efcd6a309a29ad61fc88..eae1ddf719c143c1ce867db6be1d2ff375d92e6d 100644 --- a/htdocs/public/donations/donateurs_code.php +++ b/htdocs/public/donations/donateurs_code.php @@ -63,7 +63,7 @@ if ( $db->query( $sql) ) { print "<td>Anonyme Anonyme</td>\n"; } - print "<td>".dolibarr_print_date($objp->datedon)."</td>\n"; + print "<td>".dol_print_date($objp->datedon)."</td>\n"; print '<td align="right">'.number_format($objp->amount,2,'.',' ').' '.$langs->trans("Currency".$conf->monnaie).'</td>'; print "</tr>"; $i++; @@ -78,7 +78,7 @@ if ( $db->query( $sql) ) } else { - dolibarr_print_error($db); + dol_print_error($db); } $db->close(); diff --git a/htdocs/public/members/public_list.php b/htdocs/public/members/public_list.php index ddfea193fbebfeb807a7abe1ccdd87bea9a68048..b4fd45fdb4bf9cc5b033054655e32b07f870c5ed 100644 --- a/htdocs/public/members/public_list.php +++ b/htdocs/public/members/public_list.php @@ -129,7 +129,7 @@ if ($result) } else { - dolibarr_print_error($db); + dol_print_error($db); } diff --git a/htdocs/public/paybox/newpayment.php b/htdocs/public/paybox/newpayment.php index 3a8267f55f31f7301e4698b293b8774148f60ce3..543fbb57901abdfd17b656bf905b09bb722b8b11 100644 --- a/htdocs/public/paybox/newpayment.php +++ b/htdocs/public/paybox/newpayment.php @@ -52,18 +52,18 @@ if (empty($_REQUEST["currency"])) $currency=$conf->global->MAIN_MONNAIE; else $currency=$_REQUEST["currency"]; if (empty($_REQUEST["amount"])) { - dolibarr_print_error('','ErrorBadParameters'); + dol_print_error('','ErrorBadParameters'); exit; } $amount=$_REQUEST["amount"]; if (is_numeric($amount) && empty($_REQUEST["tag"])) { - dolibarr_print_error('','ErrorBadParameters'); + dol_print_error('','ErrorBadParameters'); exit; } if (! is_numeric($amount) && empty($_REQUEST["ref"])) { - dolibarr_print_error('','ErrorBadParameters'); + dol_print_error('','ErrorBadParameters'); exit; } @@ -353,7 +353,7 @@ if ($_REQUEST["amount"] == 'contractline') $amount=$pu_ttc; if (empty($amount)) { - dolibarr_print_error('','ErrorNoPriceDefinedForThisProduct'); + dol_print_error('','ErrorNoPriceDefinedForThisProduct'); exit; } } @@ -385,13 +385,13 @@ if ($_REQUEST["amount"] == 'contractline') if ($contractline->description) $text.='<br>'.dol_htmlentitiesbr($contractline->description); //if ($contractline->date_fin_validite) { // $text.='<br>'.$langs->trans("DateEndPlanned").': '; - // $text.=dolibarr_print_date($contractline->date_fin_validite); + // $text.=dol_print_date($contractline->date_fin_validite); //} if ($contractline->date_fin_validite) { //$dateactend = dol_time_plus_duree ($contractline->date_fin_validite, $product->duration_value, $product->duration_unit); - //print ', '.$langs->trans("DateEndPlanned").': '.dolibarr_print_date($contractline->date_fin_validite); - $text.='<br>'.$langs->trans("ExpiredSince").': '.dolibarr_print_date($contractline->date_fin_validite); + //print ', '.$langs->trans("DateEndPlanned").': '.dol_print_date($contractline->date_fin_validite); + $text.='<br>'.$langs->trans("ExpiredSince").': '.dol_print_date($contractline->date_fin_validite); } print '<tr><td class="CTableRow'.($var?'1':'2').'">'.$langs->trans("Designation"); diff --git a/htdocs/rapport/Atome.class.php b/htdocs/rapport/Atome.class.php index 33b015dff658c7d872a5f78a9586c138217cee25..304e086d79935e3d644b2d60e42160b4effc1f5c 100644 --- a/htdocs/rapport/Atome.class.php +++ b/htdocs/rapport/Atome.class.php @@ -75,7 +75,7 @@ class Atome $value = $this->datas[$index]; } - $libelle = ucfirst(strftime("%b", dolibarr_mktime(12,0,0,($i+1),1,2004))); + $libelle = ucfirst(strftime("%b", dol_mktime(12,0,0,($i+1),1,2004))); $this->graph_values[$i] = array($libelle, $value); } diff --git a/htdocs/searchpostalcode.php b/htdocs/searchpostalcode.php index 7c6dfe5b152e0e8a4c2ce76e7339c1b1936aeb87..1ed5358c0f222dba76813da5daa87a8d4d53d175 100644 --- a/htdocs/searchpostalcode.php +++ b/htdocs/searchpostalcode.php @@ -63,7 +63,7 @@ function run_request($table) $result=$db->query($sql); if (!$result) { - dolibarr_print_error($db); + dol_print_error($db); } // print $sql; } diff --git a/htdocs/service.class.php b/htdocs/service.class.php index d2264bd9e45f8ca6cb01bde6009bfa902c98d8d5..2f8e2715e7fca5a78d83fbe365abe79a7a6f3ac9 100644 --- a/htdocs/service.class.php +++ b/htdocs/service.class.php @@ -227,7 +227,7 @@ class Service } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); $this->error=$this->db->error(); return -1; } diff --git a/htdocs/soc.php b/htdocs/soc.php index 9bd030a2f9a9a4a2c5209a9bc2b15e6ac532e306..9d5e1ac8425449dc4b3a188f3ef6d89713247de0 100644 --- a/htdocs/soc.php +++ b/htdocs/soc.php @@ -143,7 +143,7 @@ if ((! $_POST["getcustomercode"] && ! $_POST["getsuppliercode"]) { if ($soc->particulier) { - dolibarr_syslog("This thirdparty is a personal people",LOG_DEBUG); + dol_syslog("This thirdparty is a personal people",LOG_DEBUG); $contact=new Contact($db); $contact->civilite_id = $soc->civilite_id; @@ -339,7 +339,7 @@ $_GET["action"] == 'create' || $_POST["action"] == 'create') } else { - dolibarr_print_error($db); + dol_print_error($db); } $soc->pays_code=$obj->code; $soc->pays=$obj->libelle; @@ -689,7 +689,7 @@ elseif ($_GET["action"] == 'edit' || $_POST["action"] == 'edit') } else { - dolibarr_print_error($db); + dol_print_error($db); } $soc->pays_code=$obj->code; $soc->pays=$langs->trans("Country".$obj->code)?$langs->trans("Country".$obj->code):$obj->libelle; @@ -938,13 +938,13 @@ else $result=$soc->fetch($socid); if ($result < 0) { - dolibarr_print_error($db,$soc->error); + dol_print_error($db,$soc->error); exit; } $head = societe_prepare_head($soc); - dolibarr_fiche_head($head, 'company', $langs->trans("ThirdParty")); + dol_fiche_head($head, 'company', $langs->trans("ThirdParty")); // Confirmation de la suppression de la facture @@ -1203,7 +1203,7 @@ else print $obj->nb?($obj->nb):$langs->trans("NoSalesRepresentativeAffected"); } else { - dolibarr_print_error($db); + dol_print_error($db); } print '</td></tr>'; diff --git a/htdocs/societe.class.php b/htdocs/societe.class.php index 5e42a2c3a676624c779339a3460504ec8dfb9e6a..ce8f5a5c15fe01621e16ff431add7797d79d406b 100644 --- a/htdocs/societe.class.php +++ b/htdocs/societe.class.php @@ -141,7 +141,7 @@ class Societe extends CommonObject // clean parameters $this->nom=trim($this->nom); - dolibarr_syslog("Societe::create ".$this->nom); + dol_syslog("Societe::create ".$this->nom); $this->db->begin(); @@ -158,7 +158,7 @@ class Societe extends CommonObject $sql.= " ".($user->id > 0 ? "'".$user->id."'":"null"); $sql.= ")"; - dolibarr_syslog("Societe::create sql=".$sql); + dol_syslog("Societe::create sql=".$sql); $result=$this->db->query($sql); if ($result) { @@ -191,13 +191,13 @@ class Societe extends CommonObject if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers - dolibarr_syslog("Societe::Create success id=".$this->id); + dol_syslog("Societe::Create success id=".$this->id); $this->db->commit(); return 0; } else { - dolibarr_syslog("Societe::Create echec update"); + dol_syslog("Societe::Create echec update"); $this->db->rollback(); return -3; } @@ -211,7 +211,7 @@ class Societe extends CommonObject } else { - dolibarr_syslog("Societe::Create echec insert sql=".$sql); + dol_syslog("Societe::Create echec insert sql=".$sql); } $this->db->rollback(); return -2; @@ -221,7 +221,7 @@ class Societe extends CommonObject else { $this->db->rollback(); - dolibarr_syslog("Societe::Create echec verify sql=".$sql); + dol_syslog("Societe::Create echec verify sql=".$sql); return -1; } } @@ -311,7 +311,7 @@ class Societe extends CommonObject { global $langs,$conf; - dolibarr_syslog("Societe::Update id=".$id." call_trigger=".$call_triger." allowmodcodeclient=".$allowmodcodeclient." allowmodcodefournisseur=".$allowmodcodefournisseur); + dol_syslog("Societe::Update id=".$id." call_trigger=".$call_triger." allowmodcodeclient=".$allowmodcodeclient." allowmodcodefournisseur=".$allowmodcodefournisseur); // Clean parameters $this->id=$id; @@ -358,7 +358,7 @@ class Societe extends CommonObject if ($result >= 0) { - dolibarr_syslog("Societe::Update verify ok"); + dol_syslog("Societe::Update verify ok"); $sql = "UPDATE ".MAIN_DB_PREFIX."societe"; $sql.= " SET nom = '" . addslashes($this->nom) ."'"; // Champ obligatoire @@ -426,7 +426,7 @@ class Societe extends CommonObject $sql .= " WHERE rowid = '" . $id ."'"; - dolibarr_syslog("Societe::update sql=".$sql); + dol_syslog("Societe::update sql=".$sql); $resql=$this->db->query($sql); if ($resql) { @@ -457,7 +457,7 @@ class Societe extends CommonObject { $this->error = $langs->trans("Error sql=".$sql); - dolibarr_syslog("Societe::Update echec sql=".$sql); + dol_syslog("Societe::Update echec sql=".$sql); $result = -2; } } @@ -609,7 +609,7 @@ class Societe extends CommonObject } else { - dolibarr_syslog('Erreur Societe::Fetch aucune societe avec id='.$this->id.' - '.$sql); + dol_syslog('Erreur Societe::Fetch aucune societe avec id='.$this->id.' - '.$sql); $this->error='Erreur Societe::Fetch aucune societe avec id='.$this->id.' - '.$sql; $result = -2; } @@ -618,8 +618,8 @@ class Societe extends CommonObject } else { - dolibarr_syslog('Erreur Societe::Fetch echec sql='.$sql); - dolibarr_syslog('Erreur Societe::Fetch '.$this->db->error()); + dol_syslog('Erreur Societe::Fetch echec sql='.$sql); + dol_syslog('Erreur Societe::Fetch '.$this->db->error()); $this->error=$this->db->error(); $result = -3; } @@ -689,7 +689,7 @@ class Societe extends CommonObject { global $user,$langs,$conf; - dolibarr_syslog("Societe::Delete", LOG_DEBUG); + dol_syslog("Societe::Delete", LOG_DEBUG); $sqr = 0; // Check if third party can be deleted @@ -710,7 +710,7 @@ class Societe extends CommonObject else { $this->error .= $this->db->lasterror(); - dolibarr_syslog("Societe::Delete erreur -1 ".$this->error); + dol_syslog("Societe::Delete erreur -1 ".$this->error); return -1; } @@ -747,7 +747,7 @@ class Societe extends CommonObject // Remove contacts $sql = "DELETE from ".MAIN_DB_PREFIX."socpeople"; $sql.= " WHERE fk_soc = " . $id; - dolibarr_syslog("Societe::Delete sql=".$sql, LOG_DEBUG); + dol_syslog("Societe::Delete sql=".$sql, LOG_DEBUG); if ($this->db->query($sql)) { $sqr++; @@ -755,13 +755,13 @@ class Societe extends CommonObject else { $this->error .= $this->db->lasterror(); - dolibarr_syslog("Societe::Delete erreur -1 ".$this->error); + dol_syslog("Societe::Delete erreur -1 ".$this->error); } // Update link in member table $sql = "UPDATE ".MAIN_DB_PREFIX."adherent"; $sql.= " SET fk_soc = NULL where fk_soc = " . $id; - dolibarr_syslog("Societe::Delete sql=".$sql, LOG_DEBUG); + dol_syslog("Societe::Delete sql=".$sql, LOG_DEBUG); if ($this->db->query($sql)) { $sqr++; @@ -769,13 +769,13 @@ class Societe extends CommonObject else { $this->error .= $this->db->lasterror(); - dolibarr_syslog("Societe::Delete erreur -1 ".$this->error); + dol_syslog("Societe::Delete erreur -1 ".$this->error); } // Remove ban $sql = "DELETE from ".MAIN_DB_PREFIX."societe_rib"; $sql.= " WHERE fk_soc = " . $id; - dolibarr_syslog("Societe::Delete sql=".$sql, LOG_DEBUG); + dol_syslog("Societe::Delete sql=".$sql, LOG_DEBUG); if ($this->db->query($sql)) { $sqr++; @@ -783,13 +783,13 @@ class Societe extends CommonObject else { $this->error = $this->db->lasterror(); - dolibarr_syslog("Societe::Delete erreur -2 ".$this->error); + dol_syslog("Societe::Delete erreur -2 ".$this->error); } // Remove third party $sql = "DELETE from ".MAIN_DB_PREFIX."societe"; $sql.= " WHERE rowid = " . $id; - dolibarr_syslog("Societe::Delete sql=".$sql, LOG_DEBUG); + dol_syslog("Societe::Delete sql=".$sql, LOG_DEBUG); if ($this->db->query($sql)) { $sqr++; @@ -797,7 +797,7 @@ class Societe extends CommonObject else { $this->error = $this->db->lasterror(); - dolibarr_syslog("Societe::Delete erreur -3 ".$this->error); + dol_syslog("Societe::Delete erreur -3 ".$this->error); } if ($sqr == 4) @@ -897,19 +897,19 @@ class Societe extends CommonObject } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); } } } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); } } } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); } return $prefix; } @@ -986,7 +986,7 @@ class Societe extends CommonObject return -2; } - dolibarr_syslog("Societe::set_remise_client ".$remise.", ".$note.", ".$user->id); + dol_syslog("Societe::set_remise_client ".$remise.", ".$note.", ".$user->id); if ($this->id) { @@ -1144,7 +1144,7 @@ class Societe extends CommonObject if (! $this->db->query($sql) ) { - dolibarr_print_error($this->db); + dol_print_error($this->db); } } @@ -1169,7 +1169,7 @@ class Societe extends CommonObject if (! $this->db->query($sql) ) { - dolibarr_syslog("Societe::add_commercial Erreur"); + dol_syslog("Societe::add_commercial Erreur"); } } @@ -1189,7 +1189,7 @@ class Societe extends CommonObject if (! $this->db->query($sql) ) { - dolibarr_syslog("Societe::del_commercial Erreur"); + dol_syslog("Societe::del_commercial Erreur"); } } @@ -1240,7 +1240,7 @@ class Societe extends CommonObject $lienfin='</a>'; } if ($withpicto) $result.=($lien.img_object($langs->trans("ShowCompany").': '.$this->nom,'company').$lienfin.' '); - $result.=$lien.($maxlen?dolibarr_trunc($this->nom,$maxlen):$this->nom).$lienfin; + $result.=$lien.($maxlen?dol_trunc($this->nom,$maxlen):$this->nom).$lienfin; return $result; } @@ -1268,7 +1268,7 @@ class Societe extends CommonObject $this->db->free(); } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); } } @@ -1286,7 +1286,7 @@ class Societe extends CommonObject if ($this->email) { // TODO: Tester si email non deja present dans tableau contact - $contact_email[-1]=$langs->trans("ThirdParty").': '.dolibarr_trunc($this->nom,16)." <".$this->email.">"; + $contact_email[-1]=$langs->trans("ThirdParty").': '.dol_trunc($this->nom,16)." <".$this->email.">"; } return $contact_email; } @@ -1319,7 +1319,7 @@ class Societe extends CommonObject } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); } return $contact_email; } @@ -1351,7 +1351,7 @@ class Societe extends CommonObject } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); } return $contacts; } @@ -1382,7 +1382,7 @@ class Societe extends CommonObject } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); } } @@ -1450,7 +1450,7 @@ class Societe extends CommonObject $this->code_client = $mod->getNextValue($objsoc,$type); $this->prefixCustomerIsRequired = $mod->prefixIsRequired; - dolibarr_syslog("Societe::get_codeclient code_client=".$this->code_client." module=".$var); + dol_syslog("Societe::get_codeclient code_client=".$this->code_client." module=".$var); } } @@ -1470,7 +1470,7 @@ class Societe extends CommonObject $this->code_fournisseur = $mod->getNextValue($objsoc,$type); $this->prefixSupplierIsRequired = $mod->prefixIsRequired; - dolibarr_syslog("Societe::get_codefournisseur code_fournisseur=".$this->code_fournisseur." module=".$var); + dol_syslog("Societe::get_codefournisseur code_fournisseur=".$this->code_fournisseur." module=".$var); } } @@ -1490,7 +1490,7 @@ class Societe extends CommonObject $mod = new $var; - dolibarr_syslog("Societe::codeclient_modifiable code_client=".$this->code_client." module=".$var); + dol_syslog("Societe::codeclient_modifiable code_client=".$this->code_client." module=".$var); if ($mod->code_modifiable_null && ! $this->code_client) return 1; if ($mod->code_modifiable_invalide && $this->check_codeclient() < 0) return 1; if ($mod->code_modifiable) return 1; // A mettre en dernier @@ -1518,7 +1518,7 @@ class Societe extends CommonObject $mod = new $var; - dolibarr_syslog("Societe::codefournisseur_modifiable code_founisseur=".$this->code_fournisseur." module=".$var); + dol_syslog("Societe::codefournisseur_modifiable code_founisseur=".$this->code_fournisseur." module=".$var); if ($mod->code_modifiable_null && ! $this->code_fournisseur) return 1; if ($mod->code_modifiable_invalide && $this->check_codefournisseur() < 0) return 1; if ($mod->code_modifiable) return 1; // A mettre en dernier @@ -1546,7 +1546,7 @@ class Societe extends CommonObject $mod = new $var; - dolibarr_syslog("Societe::check_codeclient code_client=".$this->code_client." module=".$var); + dol_syslog("Societe::check_codeclient code_client=".$this->code_client." module=".$var); $result = $mod->verif($this->db, $this->code_client, $this, 0); return $result; } @@ -1571,7 +1571,7 @@ class Societe extends CommonObject $mod = new $var; - dolibarr_syslog("Societe::check_codefournisseur code_fournisseur=".$this->code_fournisseur." module=".$var); + dol_syslog("Societe::check_codefournisseur code_fournisseur=".$this->code_fournisseur." module=".$var); $result = $mod->verif($this->db, $this->code_fournisseur, $this ,1); return $result; } @@ -1813,7 +1813,7 @@ class Societe extends CommonObject } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); } } @@ -1991,7 +1991,7 @@ class Societe extends CommonObject $sql.= " SET fk_soc=".$this->id; $sql.= " WHERE rowid=".$member->id; - dolibarr_syslog("Societe::create_from_member sql=".$sql, LOG_DEBUG); + dol_syslog("Societe::create_from_member sql=".$sql, LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -2001,7 +2001,7 @@ class Societe extends CommonObject else { $this->error=$this->db->error(); - dolibarr_syslog("Societe::create_from_member - 1 - ".$this->error, LOG_ERR); + dol_syslog("Societe::create_from_member - 1 - ".$this->error, LOG_ERR); $this->db->rollback(); return -1; @@ -2010,7 +2010,7 @@ class Societe extends CommonObject else { // $this->error deja positionne - dolibarr_syslog("Societe::create_from_member - 2 - ".$this->error, LOG_ERR); + dol_syslog("Societe::create_from_member - 2 - ".$this->error, LOG_ERR); $this->db->rollback(); return $result; diff --git a/htdocs/societe.php b/htdocs/societe.php index 9e93a8278826c92a7b50e47b80bfdda63e3fec6b..0966a91074da3523e5c209310e16ac5677f193e1 100644 --- a/htdocs/societe.php +++ b/htdocs/societe.php @@ -341,7 +341,7 @@ if ($resql) } else { - dolibarr_print_error($db); + dol_print_error($db); } $db->close(); diff --git a/htdocs/societe/ajaxcompanies.php b/htdocs/societe/ajaxcompanies.php index c0e4439c6d3efe3478125f99da16595fa262d816..19a7fdc3693c77aedae3715864bb370b3530dbfa 100644 --- a/htdocs/societe/ajaxcompanies.php +++ b/htdocs/societe/ajaxcompanies.php @@ -46,7 +46,7 @@ if (! empty($_POST['newcompany']) || ! empty($_POST['socid']) || ! empty($_POST[ if (! empty($_GET["filter"])) $sql.= " AND ".$_GET["filter"]; // Add other filters $sql.= " ORDER BY nom ASC"; - //dolibarr_syslog("ajaxcompanies sql=".$sql); + //dol_syslog("ajaxcompanies sql=".$sql); $resql=$db->query($sql); if ($resql) { diff --git a/htdocs/societe/checkvat/checkVatPopup.php b/htdocs/societe/checkvat/checkVatPopup.php index 9dde1911a828c011c6b35f61e3bb02bf95a0bdd8..b4f0224c149230ef9f3a998292c76e08275d79da 100644 --- a/htdocs/societe/checkvat/checkVatPopup.php +++ b/htdocs/societe/checkvat/checkVatPopup.php @@ -65,11 +65,11 @@ else "vatNumber" => $_REQUEST["vatNumber"]); // Set the WebService URL - dolibarr_syslog("Create soapclient_nusoap for URL=".$WS_DOL_URL); + dol_syslog("Create soapclient_nusoap for URL=".$WS_DOL_URL); $soapclient = new soapclient_nusoap($WS_DOL_URL); // Call the WebService and store its result in $result. - dolibarr_syslog("Call method ".$WS_METHOD); + dol_syslog("Call method ".$WS_METHOD); $result = $soapclient->call($WS_METHOD,$parameters); // print "x".is_array($result)."i"; diff --git a/htdocs/societe/commerciaux.php b/htdocs/societe/commerciaux.php index dd2070224d16827b8231b18578a6e214764cfbdf..0c2ad851abe6c3a00db86d39b9f9168efbd1faa1 100644 --- a/htdocs/societe/commerciaux.php +++ b/htdocs/societe/commerciaux.php @@ -94,7 +94,7 @@ if ($_GET["socid"]) $head=societe_prepare_head2($soc); - dolibarr_fiche_head($head, 'salesrepresentative', $langs->trans("ThirdParty")); + dol_fiche_head($head, 'salesrepresentative', $langs->trans("ThirdParty")); /* * Fiche soci�t� en mode visu @@ -169,7 +169,7 @@ if ($_GET["socid"]) } else { - dolibarr_print_error($db); + dol_print_error($db); } if($i == 0) { print $langs->trans("NoSalesRepresentativeAffected"); } @@ -232,7 +232,7 @@ if ($_GET["socid"]) } else { - dolibarr_print_error($db); + dol_print_error($db); } } diff --git a/htdocs/societe/document.php b/htdocs/societe/document.php index c5816fb523ad9b7afb683465cc24d9fda71a0745..dfbc5fd944f4d3e726027e65a8520150373d7815 100644 --- a/htdocs/societe/document.php +++ b/htdocs/societe/document.php @@ -124,7 +124,7 @@ if ($socid > 0) $html=new Form($db); - dolibarr_fiche_head($head, 'document', $langs->trans("ThirdParty")); + dol_fiche_head($head, 'document', $langs->trans("ThirdParty")); // Construit liste des fichiers @@ -218,7 +218,7 @@ if ($socid > 0) print "</td>\n"; print '<td align="right">'.filesize($courrier_dir."/".$file). ' '.$langs->trans("bytes").'</td>'; - print '<td align="center">'.dolibarr_print_date(filemtime($courrier_dir."/".$file),"dayhour").'</td>'; + print '<td align="center">'.dol_print_date(filemtime($courrier_dir."/".$file),"dayhour").'</td>'; print "</tr>\n"; } } @@ -227,12 +227,12 @@ if ($socid > 0) } else { - dolibarr_print_error($db); + dol_print_error($db); } } else { - dolibarr_print_error(); + dol_print_error(); } $db->close(); diff --git a/htdocs/societe/info.php b/htdocs/societe/info.php index 758d61d09a795b9e114f2753d1657080594409cf..84f409e8116b13a6c37f11b68079d5f1a1985a10 100644 --- a/htdocs/societe/info.php +++ b/htdocs/societe/info.php @@ -53,7 +53,7 @@ $soc->info($socid); */ $head = societe_prepare_head($soc); -dolibarr_fiche_head($head, 'info', $langs->trans("ThirdParty")); +dol_fiche_head($head, 'info', $langs->trans("ThirdParty")); diff --git a/htdocs/societe/lien.php b/htdocs/societe/lien.php index 7b6f478045fce800624a33e7ef7c55e7100a2d03..3c8763fa1b6ce272ff3d21cbcdd6ffbfedfeecd4 100644 --- a/htdocs/societe/lien.php +++ b/htdocs/societe/lien.php @@ -96,7 +96,7 @@ if($_GET["socid"]) $head=societe_prepare_head2($soc); - dolibarr_fiche_head($head, 'links', $langs->trans("ThirdParty")); + dol_fiche_head($head, 'links', $langs->trans("ThirdParty")); /* * Fiche soci�t� en mode visu @@ -270,7 +270,7 @@ if($_GET["socid"]) } else { - dolibarr_print_error($db); + dol_print_error($db); } } } diff --git a/htdocs/societe/notify/fiche.php b/htdocs/societe/notify/fiche.php index 36e5a7f1a5464b924f08f96660b8ef3f24505aea..28b514e045395f966205b2a9b558fad2b89b57e6 100644 --- a/htdocs/societe/notify/fiche.php +++ b/htdocs/societe/notify/fiche.php @@ -66,12 +66,12 @@ if ($_POST["action"] == 'add') } else { - dolibarr_print_error($db); + dol_print_error($db); } } else { - dolibarr_print_error($db); + dol_print_error($db); } } @@ -102,7 +102,7 @@ if ( $soc->fetch($soc->id) ) */ $head = societe_prepare_head($soc); - dolibarr_fiche_head($head, 'notify', $soc->nom); + dol_fiche_head($head, 'notify', $soc->nom); print '<table class="border"width="100%">'; @@ -125,7 +125,7 @@ if ( $soc->fetch($soc->id) ) } } else { - dolibarr_print_error($db); + dol_print_error($db); } print $nb; print '</td></tr>'; @@ -170,7 +170,7 @@ if ( $soc->fetch($soc->id) ) } else { - dolibarr_print_error($db); + dol_print_error($db); } $var=false; @@ -234,7 +234,7 @@ if ( $soc->fetch($soc->id) ) } else { - dolibarr_print_error($db); + dol_print_error($db); } print '</table>'; diff --git a/htdocs/societe/notify/index.php b/htdocs/societe/notify/index.php index 5740735d338a91ed8f82437280e25e17bbe9c809..577a857bf2cf46339f31a1f281897750547004c6 100644 --- a/htdocs/societe/notify/index.php +++ b/htdocs/societe/notify/index.php @@ -105,7 +105,7 @@ if ($result) } else { - dolibarr_print_error($db); + dol_print_error($db); } $db->close(); diff --git a/htdocs/societe/rib.php b/htdocs/societe/rib.php index 00643b430d611afa156fa7f485910b54349c4ea8..104280d9a665f30eace7eaaa452f9ae57244248a 100644 --- a/htdocs/societe/rib.php +++ b/htdocs/societe/rib.php @@ -91,7 +91,7 @@ llxHeader(); $head=societe_prepare_head2($soc); -dolibarr_fiche_head($head, 'rib', $langs->trans("ThirdParty")); +dol_fiche_head($head, 'rib', $langs->trans("ThirdParty")); $account = new CompanyBankAccount($db); $account->socid=$soc->id; diff --git a/htdocs/societe/socnote.php b/htdocs/societe/socnote.php index cde98edd3df3cf7fd906a1547e84bf7a39619e51..64c0cf77d011d0315897039eaa5f1bdf1d6b973b 100644 --- a/htdocs/societe/socnote.php +++ b/htdocs/societe/socnote.php @@ -64,7 +64,7 @@ if ($socid > 0) */ $head = societe_prepare_head($societe); - dolibarr_fiche_head($head, 'note', $langs->trans("ThirdParty")); + dol_fiche_head($head, 'note', $langs->trans("ThirdParty")); print "<form method=\"post\" action=\"".DOL_URL_ROOT."/societe/socnote.php\">"; diff --git a/htdocs/stats.class.php b/htdocs/stats.class.php index f9b43a5a09245900a74d2d2dccfcdc069f3d69e0..22004e76f90089f8777330f3bfea18d40be77169 100644 --- a/htdocs/stats.class.php +++ b/htdocs/stats.class.php @@ -116,7 +116,7 @@ class Stats { $result = array(); - dolibarr_syslog("Stats::_getNbByYear sql=".$sql); + dol_syslog("Stats::_getNbByYear sql=".$sql); $resql=$this->db->query($sql); if ($resql) { @@ -131,7 +131,7 @@ class Stats $this->db->free($resql); } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); } return $result; } @@ -145,7 +145,7 @@ class Stats { $result = array(); - dolibarr_syslog("Stats::_getAllByYear sql=".$sql); + dol_syslog("Stats::_getAllByYear sql=".$sql); $resql=$this->db->query($sql); if ($resql) { @@ -163,7 +163,7 @@ class Stats $this->db->free($resql); } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); } return $result; } @@ -176,7 +176,7 @@ class Stats { $result = array(); - dolibarr_syslog("Stats::_getNbByMonth sql=".$sql); + dol_syslog("Stats::_getNbByMonth sql=".$sql); $resql=$this->db->query($sql); if ($resql) { @@ -193,7 +193,7 @@ class Stats } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); } for ($i = 1 ; $i < 13 ; $i++) @@ -205,7 +205,7 @@ class Stats for ($i = 1 ; $i < 13 ; $i++) { - $month=dolibarr_print_date(dolibarr_mktime(12,0,0,$i,1,$year),"%b"); + $month=dol_print_date(dol_mktime(12,0,0,$i,1,$year),"%b"); $month=dol_substr($month,0,3); $data[$i-1] = array(ucfirst($month), $res[$i]); } @@ -222,7 +222,7 @@ class Stats { $result = array(); - dolibarr_syslog("Stats::_getAmountByMonth sql=".$sql); + dol_syslog("Stats::_getAmountByMonth sql=".$sql); $resql=$this->db->query($sql); if ($resql) { @@ -247,7 +247,7 @@ class Stats for ($i = 1 ; $i < 13 ; $i++) { - $month=dolibarr_print_date(dolibarr_mktime(12,0,0,$i,1,$year),"%b"); + $month=dol_print_date(dol_mktime(12,0,0,$i,1,$year),"%b"); $month=dol_substr($month,0,3); $data[$i-1] = array(ucfirst($month), $res[$i]); } @@ -263,7 +263,7 @@ class Stats { $result = array(); - dolibarr_syslog("Stats::_getAverageByMonth sql=".$sql); + dol_syslog("Stats::_getAverageByMonth sql=".$sql); $resql=$this->db->query($sql); if ($resql) { diff --git a/htdocs/support/inc.php b/htdocs/support/inc.php index 198e2d46e137f366525fcc185c3846fde3e891fc..6afca5b1a1970a420cdb62287274bf48970c0bdc 100644 --- a/htdocs/support/inc.php +++ b/htdocs/support/inc.php @@ -228,7 +228,7 @@ function pFooter($nonext=0,$setuplang='') function dolibarr_support_syslog($message, $level=LOG_DEBUG) { if (! defined('LOG_DEBUG')) define('LOG_DEBUG',6); - dolibarr_syslog($message,$level); + dol_syslog($message,$level); } ?> \ No newline at end of file diff --git a/htdocs/task.class.php b/htdocs/task.class.php index 21865b49b351c29c39c340cf717445c07c23bce0..fbda91af4d009ed5a5ef4167034de7c1f8c63698 100644 --- a/htdocs/task.class.php +++ b/htdocs/task.class.php @@ -120,7 +120,7 @@ class Task // extends CommonObject $this->db->begin(); - dolibarr_syslog(get_class($this)."::create sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::create sql=".$sql, LOG_DEBUG); $resql=$this->db->query($sql); if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); } @@ -147,7 +147,7 @@ class Task // extends CommonObject { foreach($this->errors as $errmsg) { - dolibarr_syslog(get_class($this)."::create ".$errmsg, LOG_ERR); + dol_syslog(get_class($this)."::create ".$errmsg, LOG_ERR); $this->error.=($this->error?', '.$errmsg:$errmsg); } $this->db->rollback(); @@ -184,7 +184,7 @@ class Task // extends CommonObject $sql.= " FROM ".MAIN_DB_PREFIX."projet_task as t"; $sql.= " WHERE t.rowid = ".$id; - dolibarr_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -211,7 +211,7 @@ class Task // extends CommonObject else { $this->error="Error ".$this->db->lasterror(); - dolibarr_syslog(get_class($this)."::fetch ".$this->error, LOG_ERR); + dol_syslog(get_class($this)."::fetch ".$this->error, LOG_ERR); return -1; } } @@ -259,7 +259,7 @@ class Task // extends CommonObject $this->db->begin(); - dolibarr_syslog(get_class($this)."::update sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::update sql=".$sql, LOG_DEBUG); $resql = $this->db->query($sql); if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); } @@ -284,7 +284,7 @@ class Task // extends CommonObject { foreach($this->errors as $errmsg) { - dolibarr_syslog(get_class($this)."::update ".$errmsg, LOG_ERR); + dol_syslog(get_class($this)."::update ".$errmsg, LOG_ERR); $this->error.=($this->error?', '.$errmsg:$errmsg); } $this->db->rollback(); @@ -313,7 +313,7 @@ class Task // extends CommonObject if ($this->hasChildren() > 0) { - dolibarr_syslog(get_class($this)."::delete Can't delete record as it has some child", LOG_WARNING); + dol_syslog(get_class($this)."::delete Can't delete record as it has some child", LOG_WARNING); $this->error='ErrorRecordHasChildren'; $this->db->rollback(); return 0; @@ -322,7 +322,7 @@ class Task // extends CommonObject $sql = "DELETE FROM ".MAIN_DB_PREFIX."projet_task"; $sql.= " WHERE rowid=".$this->id; - dolibarr_syslog(get_class($this)."::delete sql=".$sql); + dol_syslog(get_class($this)."::delete sql=".$sql); $resql = $this->db->query($sql); if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); } @@ -347,7 +347,7 @@ class Task // extends CommonObject { foreach($this->errors as $errmsg) { - dolibarr_syslog(get_class($this)."::delete ".$errmsg, LOG_ERR); + dol_syslog(get_class($this)."::delete ".$errmsg, LOG_ERR); $this->error.=($this->error?', '.$errmsg:$errmsg); } $this->db->rollback(); @@ -371,7 +371,7 @@ class Task // extends CommonObject $sql = "SELECT COUNT(*) as nb FROM ".MAIN_DB_PREFIX."projet_task"; $sql.= " WHERE fk_task_parent=".$this->id; - dolibarr_syslog(get_class($this)."::hasChildren sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::hasChildren sql=".$sql, LOG_DEBUG); $resql = $this->db->query($sql); if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); } else diff --git a/htdocs/telephonie/adsl/fiche.php b/htdocs/telephonie/adsl/fiche.php index 1183b3ced765c54cd359fd5cff4898530fcde038..483deb14625e72911fb3cb3772cccc477696c96d 100644 --- a/htdocs/telephonie/adsl/fiche.php +++ b/htdocs/telephonie/adsl/fiche.php @@ -644,7 +644,7 @@ else $head[$h][1] = $langs->trans('Historique'); $h++; - dolibarr_fiche_head($head, $hselected, 'Liaison ADSL : '.$ligne->numero); + dol_fiche_head($head, $hselected, 'Liaison ADSL : '.$ligne->numero); print_fiche_titre('Fiche Liaison ADSL', $mesg); @@ -659,7 +659,7 @@ else print $client->nom.'</a></td><td>'.$client->code_client; print '</td></tr>'; - print '<tr><td width="20%">Num�ro</td><td>'.dolibarr_print_phone($ligne->numero,0,0,true).'</td>'; + print '<tr><td width="20%">Num�ro</td><td>'.dol_print_phone($ligne->numero,0,0,true).'</td>'; print '<td> </td></tr>'; print '<tr><td width="20%">D�bit de la liaison</td><td>'.$ligne->type.'</td>'; diff --git a/htdocs/telephonie/adsl/fournisseurxdsl.class.php b/htdocs/telephonie/adsl/fournisseurxdsl.class.php index 85e49bd252f1d1fa7aeaadd9e75f1fb5510ad98f..f04773ee232d8e468ebf7ed5904640fac347b658 100644 --- a/htdocs/telephonie/adsl/fournisseurxdsl.class.php +++ b/htdocs/telephonie/adsl/fournisseurxdsl.class.php @@ -59,13 +59,13 @@ class FournisseurXdsl { } else { - dolibarr_syslog("FournisseurXdsl::Create Error -3"); + dol_syslog("FournisseurXdsl::Create Error -3"); return -3; } } else { - dolibarr_syslog("FournisseurXdsl::Create Error -2"); + dol_syslog("FournisseurXdsl::Create Error -2"); return -2; } } @@ -86,7 +86,7 @@ class FournisseurXdsl { } else { - dolibarr_syslog("FournisseurXdsl::SwithCommandeActive Error -20", LOG_ERR); + dol_syslog("FournisseurXdsl::SwithCommandeActive Error -20", LOG_ERR); return -20; } @@ -117,7 +117,7 @@ class FournisseurXdsl { } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); $this->error=$this->db->error(); } diff --git a/htdocs/telephonie/adsl/history.php b/htdocs/telephonie/adsl/history.php index 31d6cad9a777d672bf9fcb8f6deb6fa0cbc1d576..2fa4f2fc66f37abfe58391788d5c1bafe716cd81 100644 --- a/htdocs/telephonie/adsl/history.php +++ b/htdocs/telephonie/adsl/history.php @@ -54,11 +54,11 @@ if ($_GET["id"]) $hselected = $h; $h++; - dolibarr_fiche_head($head, $hselected, 'Liaison ADSL : '.$ligne->numero); + dol_fiche_head($head, $hselected, 'Liaison ADSL : '.$ligne->numero); print '<table class="border" width="100%" cellspacing="0" cellpadding="4">'; - print '<tr><td width="20%">Num�ro de support</td><td colspan="2">'.dolibarr_print_phone($ligne->numero,0,0,true).'</td></tr>'; + print '<tr><td width="20%">Num�ro de support</td><td colspan="2">'.dol_print_phone($ligne->numero,0,0,true).'</td></tr>'; $client = new Societe($db, $ligne->client_id); diff --git a/htdocs/telephonie/adsl/ligneadsl.class.php b/htdocs/telephonie/adsl/ligneadsl.class.php index 230cdf2b964540817ff11449d331fd31c260f7ff..79496cbd5e8fc13222d2f63404e23be8c8685c26 100644 --- a/htdocs/telephonie/adsl/ligneadsl.class.php +++ b/htdocs/telephonie/adsl/ligneadsl.class.php @@ -120,14 +120,14 @@ class LigneAdsl { if ($lex->fetch($this->numero) == 1) { $this->error_message = "Echec de la cr�ation de la ligne, cette ligne existe d�j� !"; - dolibarr_syslog("LigneAdsl::Create Error -3"); + dol_syslog("LigneAdsl::Create Error -3"); return -3; } else { $this->error_message = "Echec de la cr�ation de la ligne"; - dolibarr_syslog("LigneAdsl::Create Error -1"); - dolibarr_syslog("LigneAdsl::Create $sql"); + dol_syslog("LigneAdsl::Create Error -1"); + dol_syslog("LigneAdsl::Create $sql"); return -1; } } @@ -135,7 +135,7 @@ class LigneAdsl { else { $this->error_message = "Echec de la cr�ation de la ligne, le num�ro de la ligne est incorrect !"; - dolibarr_syslog("LigneAdsl::Create Error -2"); + dol_syslog("LigneAdsl::Create Error -2"); return -2; } } @@ -165,13 +165,13 @@ class LigneAdsl { } else { - dolibarr_syslog("LigneAdsl::Delete Error -1"); + dol_syslog("LigneAdsl::Delete Error -1"); return -1; } } else { - dolibarr_syslog("LigneAdsl::Delete Error -2"); + dol_syslog("LigneAdsl::Delete Error -2"); return -2; } } diff --git a/htdocs/telephonie/adsl/liste.php b/htdocs/telephonie/adsl/liste.php index ebb60ddc26b5a5190ae2ac8c27462d067cc6e244..c7857c6d9143ceae614bc40c1bcb86f80294b050 100644 --- a/htdocs/telephonie/adsl/liste.php +++ b/htdocs/telephonie/adsl/liste.php @@ -131,7 +131,7 @@ if ($resql) print img_file(); print '</a> '; - print '<a href="fiche.php?id='.$obj->rowid.'">'.dolibarr_print_phone($obj->numero_ligne,0,0,true)."</a></td>\n"; + print '<a href="fiche.php?id='.$obj->rowid.'">'.dol_print_phone($obj->numero_ligne,0,0,true)."</a></td>\n"; print '<td><a href="'.DOL_URL_ROOT.'/compta/fiche.php?socid='.$obj->socid.'">'.img_object($langs->trans("Fiche Compta"),"bill")."</a> "; diff --git a/htdocs/telephonie/adsl/productxdsl.class.php b/htdocs/telephonie/adsl/productxdsl.class.php index d745b08c51d150baadaf011e090923d609dd5892..308faf9c3e6673a8ecc7b58805cfd44d452582d6 100644 --- a/htdocs/telephonie/adsl/productxdsl.class.php +++ b/htdocs/telephonie/adsl/productxdsl.class.php @@ -59,13 +59,13 @@ class ProductXdsl { } else { - dolibarr_syslog("ProductXdsl::Create Error -3"); + dol_syslog("ProductXdsl::Create Error -3"); return -3; } } else { - dolibarr_syslog("ProductXdsl::Create Error -2"); + dol_syslog("ProductXdsl::Create Error -2"); return -2; } } @@ -86,7 +86,7 @@ class ProductXdsl { } else { - dolibarr_syslog("ProductXdsl::SwithCommandeActive Error -20", LOG_ERR); + dol_syslog("ProductXdsl::SwithCommandeActive Error -20", LOG_ERR); return -20; } @@ -117,7 +117,7 @@ class ProductXdsl { } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); $this->error=$this->db->error(); } diff --git a/htdocs/telephonie/ca/index.php b/htdocs/telephonie/ca/index.php index b115f2150f92ee5e1f7e266969a67647442f1e54..a10b55b310bd67cd09c6c4e755e5ba8051633a56 100644 --- a/htdocs/telephonie/ca/index.php +++ b/htdocs/telephonie/ca/index.php @@ -83,7 +83,7 @@ if ($resql) } else { - dolibarr_print_error($db); + dol_print_error($db); } print '</td><td valign="top" width="50%">'."\n"; diff --git a/htdocs/telephonie/client/commentaires.php b/htdocs/telephonie/client/commentaires.php index adc0e130f69a1d82a204db65b79c2909cb47ec54..d894d696b17d608e2e83526c84fb125fbe40fe13 100644 --- a/htdocs/telephonie/client/commentaires.php +++ b/htdocs/telephonie/client/commentaires.php @@ -107,15 +107,15 @@ if ($_GET["id"]) $h++; } - dolibarr_fiche_head($head, $hselected, 'Client : '.$soc->nom); + dol_fiche_head($head, $hselected, 'Client : '.$soc->nom); print '<table class="border" cellpadding="3" cellspacing="0" width="100%">'; print '<tr><td width="20%">'.$langs->trans('Name').'</td><td>'.$soc->nom.'</td><td>'.$langs->trans('Code client').'</td><td>'.$soc->code_client.'</td></tr>'; print "<tr><td valign=\"top\">".$langs->trans('Address')."</td><td colspan=\"3\">".nl2br($soc->adresse)."<br>".$soc->cp." ".$soc->ville." ".$soc->pays."</td></tr>"; - print '<tr><td>'.$langs->trans('Phone').'</td><td>'.dolibarr_print_phone($soc->tel,$soc->pays_code,0,$soc->id).'</td>'; - print '<td>'.$langs->trans('Fax').'</td><td>'.dolibarr_print_phone($soc->fax,$soc->pays_code,0,$soc->id).'</td></tr>'; + print '<tr><td>'.$langs->trans('Phone').'</td><td>'.dol_print_phone($soc->tel,$soc->pays_code,0,$soc->id).'</td>'; + print '<td>'.$langs->trans('Fax').'</td><td>'.dol_print_phone($soc->fax,$soc->pays_code,0,$soc->id).'</td></tr>'; print '<tr><td><a href="'.DOL_URL_ROOT.'/societe/rib.php?socid='.$soc->id.'">'.img_edit() ."</a> "; print $langs->trans('RIB').'</td><td colspan="3">'; diff --git a/htdocs/telephonie/client/facture.php b/htdocs/telephonie/client/facture.php index 7cf5d379025a991bd7da93164c9ef71eec6ab9ae..296eca45f13a306908a528bd0ca59135f8c77a1f 100644 --- a/htdocs/telephonie/client/facture.php +++ b/htdocs/telephonie/client/facture.php @@ -147,18 +147,18 @@ if ($_POST["action"] == 'send' || $_POST["action"] == 'relance') else { $msg='<div class="error">'.$langs->trans("ErrorMailRecipientIsEmpty").'</div>'; - dolibarr_syslog("Le mail du destinataire est vide"); + dol_syslog("Le mail du destinataire est vide"); } } else { - dolibarr_syslog("Impossible de lire :".$file); + dol_syslog("Impossible de lire :".$file); } } else { - dolibarr_syslog("Impossible de lire les donn�es de la facture. Le fichier facture n'a peut-�tre pas �t� g�n�r�."); + dol_syslog("Impossible de lire les donn�es de la facture. Le fichier facture n'a peut-�tre pas �t� g�n�r�."); } } @@ -202,7 +202,7 @@ if ($_GET["facid"] > 0) $hselected = $h; $h++; - dolibarr_fiche_head($head, $hselected, $langs->trans("Bill")." : $fac->ref"); + dol_fiche_head($head, $hselected, $langs->trans("Bill")." : $fac->ref"); /* * Facture @@ -215,8 +215,8 @@ if ($_GET["facid"] > 0) print "<td>Conditions de r�glement</td><td>" . $fac->cond_reglement ."</td></tr>"; print '<tr><td>'.$langs->trans("Date").'</td>'; - print "<td colspan=\"3\">".dolibarr_print_date($fac->date,"dayhourtext")."</td>\n"; - print '<td>'.$langs->trans("DateMaxPayment").'</td><td>' . dolibarr_print_date($fac->date_lim_reglement,"dayhourtext"); + print "<td colspan=\"3\">".dol_print_date($fac->date,"dayhourtext")."</td>\n"; + print '<td>'.$langs->trans("DateMaxPayment").'</td><td>' . dol_print_date($fac->date_lim_reglement,"dayhourtext"); print "</td></tr>"; print '<tr>'; @@ -294,7 +294,7 @@ if ($_GET["facid"] > 0) print "</table>"; $db->free($result); } else { - dolibarr_print_error($db); + dol_print_error($db); } print "</td></tr>"; @@ -387,17 +387,17 @@ if ($_GET["facid"] > 0) if ($objp->fk_product_type==1) print img_object($langs->trans("ShowService"),"service"); else print img_object($langs->trans("ShowProduct"),"product"); print ' '.stripslashes(nl2br($objp->description)).'</a>'; - if ($objp->date_start && $objp->date_end) { print " (Du ".dolibarr_print_date($objp->date_start)." au ".dolibarr_print_date($objp->date_end).")"; } - if ($objp->date_start && ! $objp->date_end) { print " (A partir du ".dolibarr_print_date($objp->date_start).")"; } - if (! $objp->date_start && $objp->date_end) { print " (Jusqu'au ".dolibarr_print_date($objp->date_end).")"; } + if ($objp->date_start && $objp->date_end) { print " (Du ".dol_print_date($objp->date_start)." au ".dol_print_date($objp->date_end).")"; } + if ($objp->date_start && ! $objp->date_end) { print " (A partir du ".dol_print_date($objp->date_start).")"; } + if (! $objp->date_start && $objp->date_end) { print " (Jusqu'au ".dol_print_date($objp->date_end).")"; } print '</td>'; } else { print "<td>".stripslashes(nl2br($objp->description)); - if ($objp->date_start && $objp->date_end) { print " (Du ".dolibarr_print_date($objp->date_start)." au ".dolibarr_print_date($objp->date_end).")"; } - if ($objp->date_start && ! $objp->date_end) { print " (A partir du ".dolibarr_print_date($objp->date_start).")"; } - if (! $objp->date_start && $objp->date_end) { print " (Jusqu'au ".dolibarr_print_date($objp->date_end).")"; } + if ($objp->date_start && $objp->date_end) { print " (Du ".dol_print_date($objp->date_start)." au ".dol_print_date($objp->date_end).")"; } + if ($objp->date_start && ! $objp->date_end) { print " (A partir du ".dol_print_date($objp->date_start).")"; } + if (! $objp->date_start && $objp->date_end) { print " (Jusqu'au ".dol_print_date($objp->date_end).")"; } print "</td>\n"; } @@ -454,7 +454,7 @@ if ($_GET["facid"] > 0) } else { - dolibarr_print_error($db); + dol_print_error($db); } /* * Ajouter une ligne @@ -566,7 +566,7 @@ if ($_GET["facid"] > 0) $var=!$var; print "<tr $bc[$var]>"; print '<td><a href="propal.php?propalid='.$objp->propalid.'">'.img_object($langs->trans("ShowPropal"),"propal").' '.$objp->ref.'</a></td>'; - print "<td>".dolibarr_print_date($objp->dp)."</td>\n"; + print "<td>".dol_print_date($objp->dp)."</td>\n"; print '<td align="right">'.price($objp->price).'</td>'; print "</tr>"; $total = $total + $objp->price; @@ -578,7 +578,7 @@ if ($_GET["facid"] > 0) } else { - dolibarr_print_error($db); + dol_print_error($db); } @@ -616,7 +616,7 @@ if ($_GET["facid"] > 0) $var=!$var; print "<tr $bc[$var]>"; print '<td>'.img_object($langs->trans("ShowTask"),"task").' '.$objp->id.'</td>'; - print '<td>'.dolibarr_print_date($objp->da)."</td>\n"; + print '<td>'.dol_print_date($objp->da)."</td>\n"; print '<td>'.stripslashes($objp->label).'</td>'; print '<td>'.$objp->login.'</td>'; print "</tr>\n"; @@ -627,7 +627,7 @@ if ($_GET["facid"] > 0) } else { - dolibarr_print_error($db); + dol_print_error($db); } print "</td></tr></table>"; diff --git a/htdocs/telephonie/client/factures.php b/htdocs/telephonie/client/factures.php index 4b336df857dc366c1db4a10b36e2fb2303239ee1..3440f85ba9b955db5009a8166a099fa67205aacd 100644 --- a/htdocs/telephonie/client/factures.php +++ b/htdocs/telephonie/client/factures.php @@ -79,15 +79,15 @@ if ($_GET["id"]) $head[$h][1] = $langs->trans("Tarifs (".$row[0].")"); $h++; - dolibarr_fiche_head($head, $hselected, 'Client : '.$soc->nom); + dol_fiche_head($head, $hselected, 'Client : '.$soc->nom); print '<table class="border" cellpadding="3" cellspacing="0" width="100%">'; print '<tr><td width="20%">'.$langs->trans('Name').'</td><td>'.$soc->nom.'</td><td>'.$langs->trans('Code Client').'</td><td>'.$soc->code_client.'</td></tr>'; print "<tr><td valign=\"top\">".$langs->trans('Address')."</td><td colspan=\"3\">".nl2br($soc->adresse)."<br>".$soc->cp." ".$soc->ville." ".$soc->pays."</td></tr>"; - print '<tr><td>'.$langs->trans('Phone').'</td><td>'.dolibarr_print_phone($soc->tel,$soc->pays_code,0,$soc->id).'</td>'; - print '<td>'.$langs->trans('Fax').'</td><td>'.dolibarr_print_phone($soc->fax,$soc->pays_code,0,$soc->id).'</td></tr>'; + print '<tr><td>'.$langs->trans('Phone').'</td><td>'.dol_print_phone($soc->tel,$soc->pays_code,0,$soc->id).'</td>'; + print '<td>'.$langs->trans('Fax').'</td><td>'.dol_print_phone($soc->fax,$soc->pays_code,0,$soc->id).'</td></tr>'; print '</table><br />'; diff --git a/htdocs/telephonie/client/fiche.php b/htdocs/telephonie/client/fiche.php index a921b2deb1102efd0b3f195832ab71b85896f62b..5cdc2e911c36d7347b0b6387fd63aab2b8ef50d2 100644 --- a/htdocs/telephonie/client/fiche.php +++ b/htdocs/telephonie/client/fiche.php @@ -113,15 +113,15 @@ if ($_GET["id"]) $h++; } - dolibarr_fiche_head($head, $hselected, 'Client : '.$soc->nom); + dol_fiche_head($head, $hselected, 'Client : '.$soc->nom); print '<table class="border" cellpadding="3" cellspacing="0" width="100%">'; print '<tr><td width="20%">'.$langs->trans('Name').'</td><td>'.$soc->nom.'</td><td>'.$langs->trans('Code client').'</td><td>'.$soc->code_client.'</td></tr>'; print '<tr><td valign="top">'.$langs->trans('Address')."</td><td colspan=\"3\">".nl2br($soc->adresse)."<br>".$soc->cp." ".$soc->ville." ".$soc->pays."</td></tr>"; - print '<tr><td>'.$langs->trans('Phone').'</td><td>'.dolibarr_print_phone($soc->tel,$soc->pays_code,0,$soc->id).'</td>'; - print '<td>'.$langs->trans('Fax').'</td><td>'.dolibarr_print_phone($soc->fax,$soc->pays_code,0,$soc->id).'</td></tr>'; + print '<tr><td>'.$langs->trans('Phone').'</td><td>'.dol_print_phone($soc->tel,$soc->pays_code,0,$soc->id).'</td>'; + print '<td>'.$langs->trans('Fax').'</td><td>'.dol_print_phone($soc->fax,$soc->pays_code,0,$soc->id).'</td></tr>'; print '<tr><td><a href="'.DOL_URL_ROOT.'/societe/rib.php?socid='.$soc->id.'">'.img_edit() ."</a> "; print $langs->trans('RIB').'</td><td colspan="3">'; diff --git a/htdocs/telephonie/client/lignes.php b/htdocs/telephonie/client/lignes.php index df94e23f854c0e6fddca1b0b4c31aec15abb16c2..d6c9ae6fe6d2d89824d9a507e4f3b903645b600e 100644 --- a/htdocs/telephonie/client/lignes.php +++ b/htdocs/telephonie/client/lignes.php @@ -93,7 +93,7 @@ if ($_GET["id"]) $h++; - dolibarr_fiche_head($head, $hselected, 'Client : '.$soc->nom); + dol_fiche_head($head, $hselected, 'Client : '.$soc->nom); print '<table class="border" cellpadding="3" cellspacing="0" width="100%">'; print '<tr><td width="20%">'.$langs->trans('Name').'</td><td>'.$soc->nom.'</td><td>'.$langs->trans('Code client').'</td><td>'.$soc->code_client.'</td></tr>'; @@ -101,14 +101,14 @@ if ($_GET["id"]) print "<tr><td valign=\"top\">".$langs->trans('Address')."</td><td colspan=\"3\">".nl2br($soc->adresse)."<br>".$soc->cp." ".$soc->ville." ".$soc->pays."</td></tr>"; - print '<tr><td>'.$langs->trans('Phone').'</td><td>'.dolibarr_print_phone($soc->tel,$soc->pays_code,0,$soc->id).'</td>'; - print '<td>'.$langs->trans('Fax').'</td><td>'.dolibarr_print_phone($soc->fax,$soc->pays_code,0,$soc->id).'</td></tr>'; + print '<tr><td>'.$langs->trans('Phone').'</td><td>'.dol_print_phone($soc->tel,$soc->pays_code,0,$soc->id).'</td>'; + print '<td>'.$langs->trans('Fax').'</td><td>'.dol_print_phone($soc->fax,$soc->pays_code,0,$soc->id).'</td></tr>'; print '</table><br />'; print '<table class="border" width="100%" cellspacing="0" cellpadding="4">'; - //print '<tr><td width="20%">Num�ro</td><td>'.dolibarr_print_phone($ligne->numero).'</td>'; + //print '<tr><td width="20%">Num�ro</td><td>'.dol_print_phone($ligne->numero).'</td>'; //print '<td>Factur�e : '.$ligne->facturable.'</td></tr>'; /* Lignes */ @@ -157,7 +157,7 @@ if ($_GET["id"]) print '</a> '; - print '<a href="'.DOL_URL_ROOT.'/telephonie/ligne/fiche.php?id='.$obj->rowid.'">'.dolibarr_print_phone($obj->ligne,0,0,true)."</a></td>\n"; + print '<a href="'.DOL_URL_ROOT.'/telephonie/ligne/fiche.php?id='.$obj->rowid.'">'.dol_print_phone($obj->ligne,0,0,true)."</a></td>\n"; print '<td>'.$obj->code_client."</td>\n"; print '<td>'.$obj->agence."</td>\n"; diff --git a/htdocs/telephonie/client/new.php b/htdocs/telephonie/client/new.php index 15bc572b46ce02c01e0378d7796ec3044992d23c..bfbd08e894391aaf5a38dc971c4785e102c13461 100644 --- a/htdocs/telephonie/client/new.php +++ b/htdocs/telephonie/client/new.php @@ -615,7 +615,7 @@ $form = new Form($db); if ($user->rights->telephonie->ligne->creer) { - dolibarr_fiche_head($head, $hselected, 'Nouveau client'); + dol_fiche_head($head, $hselected, 'Nouveau client'); /* */ @@ -663,7 +663,7 @@ if ($user->rights->telephonie->ligne->creer) } else { - dolibarr_print_error($db); + dol_print_error($db); } $soc->pays_code=$obj->code; $soc->pays=$obj->libelle; diff --git a/htdocs/telephonie/client/permissions.php b/htdocs/telephonie/client/permissions.php index 07c359be7c3aeae3a1c603eafe1fead6c74da9a9..a2d1a717b96b44b15c74816aeae1cc3a090f063e 100644 --- a/htdocs/telephonie/client/permissions.php +++ b/htdocs/telephonie/client/permissions.php @@ -102,15 +102,15 @@ if ($soc->id) $hselected = $h; $h++; - dolibarr_fiche_head($head, $hselected, 'Client : '.$soc->nom); + dol_fiche_head($head, $hselected, 'Client : '.$soc->nom); print '<table class="border" cellpadding="3" cellspacing="0" width="100%">'; print '<tr><td width="20%">'.$langs->trans('Name').'</td><td>'.$soc->nom.'</td><td>'.$langs->trans('Code client').'</td><td>'.$soc->code_client.'</td></tr>'; print "<tr><td valign=\"top\">".$langs->trans('Address')."</td><td colspan=\"3\">".nl2br($soc->adresse)."<br>".$soc->cp." ".$soc->ville." ".$soc->pays."</td></tr>"; - print '<tr><td>'.$langs->trans('Phone').'</td><td>'.dolibarr_print_phone($soc->tel,$soc->pays_code,0,$soc->id).'</td>'; - print '<td>'.$langs->trans('Fax').'</td><td>'.dolibarr_print_phone($soc->fax,$soc->pays_code,0,$soc->id).'</td></tr>'; + print '<tr><td>'.$langs->trans('Phone').'</td><td>'.dol_print_phone($soc->tel,$soc->pays_code,0,$soc->id).'</td>'; + print '<td>'.$langs->trans('Fax').'</td><td>'.dol_print_phone($soc->fax,$soc->pays_code,0,$soc->id).'</td></tr>'; print '</table><br />'; print '<form method="POST" action="permissions.php?id='.$soc->id.'">'; diff --git a/htdocs/telephonie/client/stats.php b/htdocs/telephonie/client/stats.php index b16d93a1f3d1a92e2266cb2e055101a29ace82f5..f46144457ee197b63f11d9f82264634147e13f18 100644 --- a/htdocs/telephonie/client/stats.php +++ b/htdocs/telephonie/client/stats.php @@ -81,7 +81,7 @@ if ($_GET["id"]) $head[$h][1] = $langs->trans("Tarifs (".$row[0].")"); $h++; - dolibarr_fiche_head($head, $hselected, 'Client : '.$soc->nom); + dol_fiche_head($head, $hselected, 'Client : '.$soc->nom); print '<table class="border" cellpadding="3" cellspacing="0" width="100%">'; print '<tr><td width="20%">'.$langs->trans('Name').'</td><td>'.$soc->nom.'</td>'; diff --git a/htdocs/telephonie/client/tarifs.php b/htdocs/telephonie/client/tarifs.php index 733250a2a3be119f324946b88025d48399224be0..806cb02aa277c200783a913a2b410c69aa10b62d 100644 --- a/htdocs/telephonie/client/tarifs.php +++ b/htdocs/telephonie/client/tarifs.php @@ -202,15 +202,15 @@ if ($_GET["id"]) $hselected = $h; $h++; - dolibarr_fiche_head($head, $hselected, 'Client : '.$soc->nom); + dol_fiche_head($head, $hselected, 'Client : '.$soc->nom); print '<table class="border" cellpadding="3" cellspacing="0" width="100%">'; print '<tr><td width="20%">'.$langs->trans('Name').'</td><td>'.$soc->nom.'</td><td>'.$langs->trans('Code client').'</td><td>'.$soc->code_client.'</td></tr>'; print "<tr><td valign=\"top\">".$langs->trans('Address')."</td><td colspan=\"3\">".nl2br($soc->adresse)."<br>".$soc->cp." ".$soc->ville." ".$soc->pays."</td></tr>"; - print '<tr><td>'.$langs->trans('Phone').'</td><td>'.dolibarr_print_phone($soc->tel,$soc->pays_code,0,$soc->id).'</td>'; - print '<td>'.$langs->trans('Fax').'</td><td>'.dolibarr_print_phone($soc->fax,$soc->pays_code,0,$soc->id).'</td></tr>'; + print '<tr><td>'.$langs->trans('Phone').'</td><td>'.dol_print_phone($soc->tel,$soc->pays_code,0,$soc->id).'</td>'; + print '<td>'.$langs->trans('Fax').'</td><td>'.dol_print_phone($soc->fax,$soc->pays_code,0,$soc->id).'</td></tr>'; print "</table>\n<br />\n"; diff --git a/htdocs/telephonie/communication.class.php b/htdocs/telephonie/communication.class.php index c39f32e5535e9b26bb961567248265b8db93b60a..a698fec49e964be87a8021295fedf528f0adfad4 100644 --- a/htdocs/telephonie/communication.class.php +++ b/htdocs/telephonie/communication.class.php @@ -105,14 +105,14 @@ class CommunicationTelephonique { /* Fin Numeros speciaux */ if ($tarif_achat->cout($num, $this->cout_temp_achat, $this->cout_fixe_achat, $tarif_libelle_achat) == 0) { - dolibarr_syslog("CommunicationTelephonique::Cout Tarif achat manquant pour $num"); + dol_syslog("CommunicationTelephonique::Cout Tarif achat manquant pour $num"); array_push($this->messages, array('warning',"Tarif achat manquant pour le numero $this->numero")); //$error++; } if ($tarif_vente->cout($num, $this->cout_temp_vente, $this->cout_fixe_vente, $this->tarif_libelle_vente) == 0) { - dolibarr_syslog("CommunicationTelephonique::Cout Tarif vente manquant pour $num"); + dol_syslog("CommunicationTelephonique::Cout Tarif vente manquant pour $num"); array_push($this->messages, array('error',"Tarif vente manquant pour le numero $this->numero")); $error++; } @@ -196,8 +196,8 @@ class CommunicationTelephonique { if (! $db->query($sql)) { - dolibarr_syslog("CommunicationTelephonique::logsql Erreur"); - dolibarr_syslog("CommunicationTelephonique::logsql ".$db->error()); + dol_syslog("CommunicationTelephonique::logsql Erreur"); + dol_syslog("CommunicationTelephonique::logsql ".$db->error()); return 1; } else diff --git a/htdocs/telephonie/config/perms.php b/htdocs/telephonie/config/perms.php index a3c0f45c86ffa54274f56bc414cb6244b9a6d1e5..f8ae4ff20e0ed613c96f5f1dcae627febfa13ba8 100644 --- a/htdocs/telephonie/config/perms.php +++ b/htdocs/telephonie/config/perms.php @@ -93,7 +93,7 @@ $head[$h][1] = $langs->trans("Specials"); $hselected = $h; $h++; -dolibarr_fiche_head($head, $hselected, "Definitions des permissions"); +dol_fiche_head($head, $hselected, "Definitions des permissions"); print_titre("Actions speciales"); diff --git a/htdocs/telephonie/config/xdsl.php b/htdocs/telephonie/config/xdsl.php index 4e25d0880c6c592c67800465c65dd4d421ac775c..e4c7ededd3e8cba5eb5fd2d596c32f94e1388cae 100644 --- a/htdocs/telephonie/config/xdsl.php +++ b/htdocs/telephonie/config/xdsl.php @@ -76,7 +76,7 @@ $head[$h][1] = $langs->trans("Workflow"); $h++; -dolibarr_fiche_head($head, $hselected, "Configuration des liens xDSL"); +dol_fiche_head($head, $hselected, "Configuration des liens xDSL"); print_titre("Fournisseurs"); print '<form method="post" action="xdsl.php?action=addfourn">'; diff --git a/htdocs/telephonie/config/xdsl_product.php b/htdocs/telephonie/config/xdsl_product.php index e40eb17f5105c5a46410a703e7746605bc0dc1fd..4cded85cbcad340399cd1680c24bee921d821bef 100644 --- a/htdocs/telephonie/config/xdsl_product.php +++ b/htdocs/telephonie/config/xdsl_product.php @@ -76,7 +76,7 @@ $head[$h][1] = $langs->trans("Workflow"); $h++; -dolibarr_fiche_head($head, $hselected, "Configuration des liens xDSL"); +dol_fiche_head($head, $hselected, "Configuration des liens xDSL"); $form = new Form($db); print_titre($langs->trans("Products")); print '<form method="post" action="xdsl_product.php?action=addproduct">'; diff --git a/htdocs/telephonie/config/xdsl_wkf.php b/htdocs/telephonie/config/xdsl_wkf.php index 122e455796da47412fe22e42af3c4bffa4025096..ec048205ef264f3dfb87e5f7c617ad77691c3c90 100644 --- a/htdocs/telephonie/config/xdsl_wkf.php +++ b/htdocs/telephonie/config/xdsl_wkf.php @@ -78,7 +78,7 @@ $hselected = $h; $h++; -dolibarr_fiche_head($head, $hselected, "Configuration des liens xDSL"); +dol_fiche_head($head, $hselected, "Configuration des liens xDSL"); print_titre("Workflow"); print '<form method="post" action="xdsl_wkf.php?action=add">'; diff --git a/htdocs/telephonie/contrat/fiche.php b/htdocs/telephonie/contrat/fiche.php index 7415b06fef121b52d07b3ef200d9aa5acc0e61c3..7055d7b397418b54998ac972a8ab9a37f7d25d0d 100644 --- a/htdocs/telephonie/contrat/fiche.php +++ b/htdocs/telephonie/contrat/fiche.php @@ -466,7 +466,7 @@ else if($plugin->tabs($head,$h)) $h++; else - dolibarr_syslog("$var::tabs error"); + dol_syslog("$var::tabs error"); } $head[$h][0] = DOL_URL_ROOT."/telephonie/contrat/stats.php?id=".$contrat->id; @@ -480,7 +480,7 @@ else $contrat->load_previous_next_id(); $previous_ref = $contrat->ref_previous?'<a href="'.$_SERVER["PHP_SELF"].'?id='.$contrat->ref_previous.'">'.img_previous().'</a>':''; $next_ref = $contrat->ref_next?'<a href="'.$_SERVER["PHP_SELF"].'?id='.$contrat->ref_next.'">'.img_next().'</a>':''; - dolibarr_fiche_head($head, $hselected, 'Contrat : '.$contrat->ref); + dol_fiche_head($head, $hselected, 'Contrat : '.$contrat->ref); //print_fiche_titre('Fiche Contrat', $mesg); @@ -644,7 +644,7 @@ else print '</a> '; - print '<a href="'.DOL_URL_ROOT.'/telephonie/ligne/fiche.php?id='.$obj->rowid.'">'.dolibarr_print_phone($obj->ligne,0,0,true)."</a></td>\n"; + print '<a href="'.DOL_URL_ROOT.'/telephonie/ligne/fiche.php?id='.$obj->rowid.'">'.dol_print_phone($obj->ligne,0,0,true)."</a></td>\n"; print '<td>'.$obj->code_client." ".$obj->agence."</td>\n"; print '<td align="center">'.$ligne->statuts[$obj->statut]."</td>\n"; @@ -749,7 +749,7 @@ else $hselected = $h; $h++; - dolibarr_fiche_head($head, $hselected, 'Contrat : '.$contrat->ref); + dol_fiche_head($head, $hselected, 'Contrat : '.$contrat->ref); print_fiche_titre('Edition du contrat', $mesg); diff --git a/htdocs/telephonie/contrat/info.php b/htdocs/telephonie/contrat/info.php index c3c798ec75b28e117ebb85fdefb2dad29c476e87..516e9f7d67e7aac0365221772a879ce556a44a24 100644 --- a/htdocs/telephonie/contrat/info.php +++ b/htdocs/telephonie/contrat/info.php @@ -79,7 +79,7 @@ if ($_GET["id"]) $hselected = $h; $h++; - dolibarr_fiche_head($head, $hselected, 'Contrat : '.$contrat->ref); + dol_fiche_head($head, $hselected, 'Contrat : '.$contrat->ref); print_fiche_titre('Fiche Contrat', $mesg); diff --git a/htdocs/telephonie/contrat/services.php b/htdocs/telephonie/contrat/services.php index ca9dd464791127feb7ccb1b3c2b5090364f97ba6..1f000e7a3f7a6314a5798a189d33e1fa44fb8de9 100644 --- a/htdocs/telephonie/contrat/services.php +++ b/htdocs/telephonie/contrat/services.php @@ -101,7 +101,7 @@ if ($_GET["id"]) $head[$h][1] = $langs->trans("Infos"); $h++; - dolibarr_fiche_head($head, $hselected, 'Contrat : '.$contrat->ref); + dol_fiche_head($head, $hselected, 'Contrat : '.$contrat->ref); print_fiche_titre('Fiche Contrat', $mesg); diff --git a/htdocs/telephonie/contrat/stats.php b/htdocs/telephonie/contrat/stats.php index d4f02f9bbf7c9feda10042feeca0606ed06385f6..ad01e9cf8e264c81f68d63db0dbd1207744999ca 100644 --- a/htdocs/telephonie/contrat/stats.php +++ b/htdocs/telephonie/contrat/stats.php @@ -74,7 +74,7 @@ if ($_GET["id"]) $head[$h][1] = $langs->trans("Infos"); $h++; - dolibarr_fiche_head($head, $hselected, 'Contrat : '.$contrat->ref); + dol_fiche_head($head, $hselected, 'Contrat : '.$contrat->ref); print_fiche_titre('Fiche Contrat', $mesg); diff --git a/htdocs/telephonie/distributeurs/comm/ca.php b/htdocs/telephonie/distributeurs/comm/ca.php index d935383ecf56b96e33478ac47d9970c413e0fd22..7e6eb98caf2cec07a57f0e454f863306a843c094 100644 --- a/htdocs/telephonie/distributeurs/comm/ca.php +++ b/htdocs/telephonie/distributeurs/comm/ca.php @@ -80,7 +80,7 @@ if ($_GET["id"] && $_GET["did"]) $head[$h][1] = "Statistiques"; $h++; */ - dolibarr_fiche_head($head, $hselected, "Distributeur"); + dol_fiche_head($head, $hselected, "Distributeur"); print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">'; diff --git a/htdocs/telephonie/distributeurs/comm/commercial.php b/htdocs/telephonie/distributeurs/comm/commercial.php index 7c9b3dd532b9a47cbb5269cac546010e20dee203..8a0adb2aaebab4311d9322a75eb9b8d6f35cc871 100644 --- a/htdocs/telephonie/distributeurs/comm/commercial.php +++ b/htdocs/telephonie/distributeurs/comm/commercial.php @@ -69,7 +69,7 @@ if ($_GET["id"] && $_GET["did"]) $head[$h][1] = "Statistiques"; $h++; */ - dolibarr_fiche_head($head, $hselected, "Distributeur"); + dol_fiche_head($head, $hselected, "Distributeur"); print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">'; diff --git a/htdocs/telephonie/distributeurs/commissions.php b/htdocs/telephonie/distributeurs/commissions.php index 62ab0a497f4fbcc52c56014f53104ac80e6f29eb..a70095b7388a734674ac3dd30f69049242acd947 100644 --- a/htdocs/telephonie/distributeurs/commissions.php +++ b/htdocs/telephonie/distributeurs/commissions.php @@ -70,7 +70,7 @@ if ($_GET["id"]) $head[$h][1] = "Statistiques"; $h++; - dolibarr_fiche_head($head, $hselected, "Distributeur"); + dol_fiche_head($head, $hselected, "Distributeur"); /* Conso */ diff --git a/htdocs/telephonie/distributeurs/contrat.php b/htdocs/telephonie/distributeurs/contrat.php index ed89ebb59faf8bcf3dc42f7237266262fa841a6c..6221c6e896cc486e1f316e4d3ed982c70d58daae 100644 --- a/htdocs/telephonie/distributeurs/contrat.php +++ b/htdocs/telephonie/distributeurs/contrat.php @@ -70,7 +70,7 @@ $h = 0; $h++; -dolibarr_fiche_head($head, $hselected, "Distributeurs"); +dol_fiche_head($head, $hselected, "Distributeurs"); print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">'; diff --git a/htdocs/telephonie/distributeurs/distributeur.php b/htdocs/telephonie/distributeurs/distributeur.php index b2de131f3c363c2da1c77ae6226bf698b458ff51..8abfb553b889488aaca7fb2ae853ebd6822e4d68 100644 --- a/htdocs/telephonie/distributeurs/distributeur.php +++ b/htdocs/telephonie/distributeurs/distributeur.php @@ -65,7 +65,7 @@ if ($_GET["id"]) $h++; } - dolibarr_fiche_head($head, $hselected, "Distributeur"); + dol_fiche_head($head, $hselected, "Distributeur"); print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">'; diff --git a/htdocs/telephonie/distributeurs/fiche.php b/htdocs/telephonie/distributeurs/fiche.php index 988293bdea491309f0db486d07e42e487a565963..6b4cdd17a8fe68db3736e3b2ac30bc106c9d6a6e 100644 --- a/htdocs/telephonie/distributeurs/fiche.php +++ b/htdocs/telephonie/distributeurs/fiche.php @@ -83,7 +83,7 @@ if ($_GET["action"] == 'create_commercial') $hselected = $h; $h++; - dolibarr_fiche_head($head, $hselected, $distri->nom); + dol_fiche_head($head, $hselected, $distri->nom); print '<form method="POST" action="fiche.php?distri='.$_GET["distri"].'">'; print '<input type="hidden" name="action" value="add_commercial"></td></tr>'; @@ -117,7 +117,7 @@ $head[$h][1] = "Nouveau distributeur"; $hselected = $h; $h++; -dolibarr_fiche_head($head, $hselected, "Distributeurs"); +dol_fiche_head($head, $hselected, "Distributeurs"); print '<form method="POST" action="fiche.php">'; print '<input type="hidden" name="action" value="add"></td></tr>'; diff --git a/htdocs/telephonie/distributeurs/index.php b/htdocs/telephonie/distributeurs/index.php index 0e754075d3f6e7660d8c0f5c34834e6427ae6b2b..0dabf4953a58bf44df0e2ea54413c51f8b6b0d68 100644 --- a/htdocs/telephonie/distributeurs/index.php +++ b/htdocs/telephonie/distributeurs/index.php @@ -38,7 +38,7 @@ $head[$h][1] = "Liste"; $hselected = $h; $h++; -dolibarr_fiche_head($head, $hselected, "Distributeurs"); +dol_fiche_head($head, $hselected, "Distributeurs"); print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">'; diff --git a/htdocs/telephonie/distributeurs/po.php b/htdocs/telephonie/distributeurs/po.php index fcd2143f1a4ea8e3a79e0575e121d38ff7be8688..133b6c4295deee744e7486802082bf3b5dd2c3e5 100644 --- a/htdocs/telephonie/distributeurs/po.php +++ b/htdocs/telephonie/distributeurs/po.php @@ -71,7 +71,7 @@ if ($_GET["id"]) $head[$h][1] = "Statistiques"; $h++; - dolibarr_fiche_head($head, $hselected, "Distributeur"); + dol_fiche_head($head, $hselected, "Distributeur"); if ($page == -1) { $page = 0 ; } diff --git a/htdocs/telephonie/distributeurs/remav.php b/htdocs/telephonie/distributeurs/remav.php index 33fec60ed8d2d8b21f2c708f10868a0b6d45b429..38aeeff7c759ebf5e0ad21d7ab6d8a4a45dcb930 100644 --- a/htdocs/telephonie/distributeurs/remav.php +++ b/htdocs/telephonie/distributeurs/remav.php @@ -75,7 +75,7 @@ if ($_GET["id"]) $head[$h][1] = "Statistiques"; $h++; - dolibarr_fiche_head($head, $hselected, "Distributeur"); + dol_fiche_head($head, $hselected, "Distributeur"); print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">'; print '<tr><td width="70%" valign="top">'; diff --git a/htdocs/telephonie/distributeurs/remconso.php b/htdocs/telephonie/distributeurs/remconso.php index d3e2005ee5b88abc5463d30e383a8d0f9908c959..1b500690d762b2c645ed2d61548962a7199ed327 100644 --- a/htdocs/telephonie/distributeurs/remconso.php +++ b/htdocs/telephonie/distributeurs/remconso.php @@ -75,7 +75,7 @@ if ($_GET["id"]) $head[$h][1] = "Statistiques"; $h++; - dolibarr_fiche_head($head, $hselected, "Distributeur"); + dol_fiche_head($head, $hselected, "Distributeur"); print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">'; print '<tr><td width="70%" valign="top">'; diff --git a/htdocs/telephonie/distributeurs/remuneration.php b/htdocs/telephonie/distributeurs/remuneration.php index 95ada13444c0aa63bf056e8449079c52769a7e9b..1e98aadf0bfdbf0b59e4636c4c1842d2f67ae54f 100644 --- a/htdocs/telephonie/distributeurs/remuneration.php +++ b/htdocs/telephonie/distributeurs/remuneration.php @@ -71,7 +71,7 @@ if ($_GET["id"]) $head[$h][1] = "Statistiques"; $h++; - dolibarr_fiche_head($head, $hselected, "Distributeur"); + dol_fiche_head($head, $hselected, "Distributeur"); print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">'; print '<tr><td width="40%" valign="top">'; diff --git a/htdocs/telephonie/distributeurs/stats.php b/htdocs/telephonie/distributeurs/stats.php index 0372fa30453218f4e3ecd5e994e230636139f155..15c7b72fe99a3431f68dd32604ed48818f4dd92c 100644 --- a/htdocs/telephonie/distributeurs/stats.php +++ b/htdocs/telephonie/distributeurs/stats.php @@ -68,7 +68,7 @@ if ($_GET["id"]) $hselected = $h; $h++; - dolibarr_fiche_head($head, $hselected, "Distributeur"); + dol_fiche_head($head, $hselected, "Distributeur"); print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">'; diff --git a/htdocs/telephonie/distributeurtel.class.php b/htdocs/telephonie/distributeurtel.class.php index 534956a1acd27d13e1d7ad06291c5edb04e92112..9f7e8d00614efd022fdbae181a54cdec7f938624 100644 --- a/htdocs/telephonie/distributeurtel.class.php +++ b/htdocs/telephonie/distributeurtel.class.php @@ -131,7 +131,7 @@ class DistributeurTelephonie { } else { - dolibarr_syslog("DistributeurTelephonie::Create"); + dol_syslog("DistributeurTelephonie::Create"); $this->error_string["prelev"] = "Erreur SQL : $sql"; $this->error_string["autre"] = $this->db->error(); $error++; @@ -177,13 +177,13 @@ class DistributeurTelephonie { } else { - dolibarr_syslog("DistributeurTelephonie::Fetch Erreur id=".$this->id); + dol_syslog("DistributeurTelephonie::Fetch Erreur id=".$this->id); return -1; } } else { - dolibarr_syslog("DistributeurTelephonie::Fetch Erreur SQL id=".$this->id); + dol_syslog("DistributeurTelephonie::Fetch Erreur SQL id=".$this->id); return -2; } } diff --git a/htdocs/telephonie/dolibarrmail.class.php b/htdocs/telephonie/dolibarrmail.class.php index 83233600aabd2a7181b3f524b9919889ee4d0ac3..98e4ac3a560c43ef71b5781f175b52b4da3309ef 100644 --- a/htdocs/telephonie/dolibarrmail.class.php +++ b/htdocs/telephonie/dolibarrmail.class.php @@ -156,7 +156,7 @@ class DolibarrMail } else { - dolibarr_syslog("DolibarrMail::encode_file Erreur"); + dol_syslog("DolibarrMail::encode_file Erreur"); } return $encoded; } @@ -178,12 +178,12 @@ class DolibarrMail if ($this->errors_to) { - //dolibarr_syslog("DolibarrMail::sendfile with errorsto : ".$this->errors_to); + //dol_syslog("DolibarrMail::sendfile with errorsto : ".$this->errors_to); $res = mail($this->addr_to,$this->subject,stripslashes($message_comp),$headers,"-f".$this->errors_to); } else { - //dolibarr_syslog("DolibarrMail::sendfile without errorsto"); + //dol_syslog("DolibarrMail::sendfile without errorsto"); $res = mail($this->addr_to,$this->subject,stripslashes($message_comp),$headers); } @@ -226,7 +226,7 @@ class DolibarrMail } else { - //dolibarr_syslog("DolibarrMail::write_body"); + //dol_syslog("DolibarrMail::write_body"); } $out = $out . $this->message . "\n\n"; diff --git a/htdocs/telephonie/facturation/FacturationCalcul.class.php b/htdocs/telephonie/facturation/FacturationCalcul.class.php index d7374e1c8a7ed93782dc5ced1710511ac8d1bb8c..6ad245acb7af9d61e2118fb192b66120dfccbd5a 100644 --- a/htdocs/telephonie/facturation/FacturationCalcul.class.php +++ b/htdocs/telephonie/facturation/FacturationCalcul.class.php @@ -88,13 +88,13 @@ class FacturationCalcul { $num = $this->db->num_rows($resql); $row = $this->db->fetch_row($resql); - dolibarr_syslog("FacturationCalcul::Calcul Communications a traiter ".$row[0],LOG_INFO); + dol_syslog("FacturationCalcul::Calcul Communications a traiter ".$row[0],LOG_INFO); $this->db->free($resql); } else { $error = 1; - dolibarr_syslog("FacturationCalcul Erreur ".$error); + dol_syslog("FacturationCalcul Erreur ".$error); } /********************************************************** @@ -111,13 +111,13 @@ class FacturationCalcul { { $row = $this->db->fetch_row($resql); - dolibarr_syslog("FacturationCalcul Max rowid avant facture ".$row[0]); + dol_syslog("FacturationCalcul Max rowid avant facture ".$row[0]); $this->db->free($resql); } else { $error = 2; - dolibarr_syslog("FacturationCalcul Erreur ".$error); + dol_syslog("FacturationCalcul Erreur ".$error); } /** @@ -145,12 +145,12 @@ class FacturationCalcul { $i++; } $this->db->free($resql); - dolibarr_syslog(sizeof($lines_keys)." lignes trouvees"); + dol_syslog(sizeof($lines_keys)." lignes trouvees"); } else { $error = 3; - dolibarr_syslog("FacturationCalcul Erreur ".$error); + dol_syslog("FacturationCalcul Erreur ".$error); } } @@ -170,12 +170,12 @@ class FacturationCalcul { { $batch_id = $this->db->last_insert_id(MAIN_DB_PREFIX."telephonie_facturation_batch"); - dolibarr_syslog("FacturationCalcul Batch ID ".$batch_id); + dol_syslog("FacturationCalcul Batch ID ".$batch_id); } else { $error = 20; - dolibarr_syslog("FacturationCalcul Erreur ".$error); + dol_syslog("FacturationCalcul Erreur ".$error); } } @@ -200,14 +200,14 @@ class FacturationCalcul { if ($ligne->socid == 0) { $error = 4; - dolibarr_syslog("FacturationCalcul Error ($error)"); + dol_syslog("FacturationCalcul Error ($error)"); } } else { $error = 5; - dolibarr_syslog("FacturationCalcul Error ($error): Aucune societe rattachee a la ligne : $line_key"); + dol_syslog("FacturationCalcul Error ($error): Aucune societe rattachee a la ligne : $line_key"); } @@ -225,7 +225,7 @@ class FacturationCalcul { else { $error = 6; - dolibarr_syslog("FacturationCalcul FacturationCalcul Error ($error)"); + dol_syslog("FacturationCalcul FacturationCalcul Error ($error)"); } } @@ -260,9 +260,9 @@ class FacturationCalcul { else { $error++; - dolibarr_syslog("FacturationCalcul Erreur d'insertion dans llx_telephonie_facture"); - dolibarr_syslog($this->db->error()); - dolibarr_syslog($sql); + dol_syslog("FacturationCalcul Erreur d'insertion dans llx_telephonie_facture"); + dol_syslog($this->db->error()); + dol_syslog($sql); } } /* @@ -279,7 +279,7 @@ class FacturationCalcul { if ($this->CalculateBill($this->db, $ligne, $facid, $total_achat, $total_vente, $total_fourn) <> 0) { $error++; - dolibarr_syslog("FacturationCalcul Erreur de calcul de la facture pour la ligne $line_key $ligne->numero"); + dol_syslog("FacturationCalcul Erreur de calcul de la facture pour la ligne $line_key $ligne->numero"); array_push($this->messages, array('error',"Erreur de calcul de la facture pour la ligne $ligne->numero (id=$line_key)")); } } @@ -323,9 +323,9 @@ class FacturationCalcul { else { $error++; - dolibarr_syslog("FacturationCalcul Erreur de mise a jour dans llx_telephonie_facture"); - dolibarr_syslog($this->db->error()); - dolibarr_syslog($sql); + dol_syslog("FacturationCalcul Erreur de mise a jour dans llx_telephonie_facture"); + dol_syslog($this->db->error()); + dol_syslog($sql); } } @@ -342,7 +342,7 @@ class FacturationCalcul { if (! $this->db->query($sql)) { $error++; - dolibarr_syslog("FacturationCalcul Erreur de suppression dans llx_telephonie_import_cdr"); + dol_syslog("FacturationCalcul Erreur de suppression dans llx_telephonie_import_cdr"); } } @@ -355,18 +355,18 @@ class FacturationCalcul { { $this->db->query("COMMIT"); $nbcommit++; - dolibarr_syslog("FacturationCalcul Ligne $ligne->numero - COMMIT"); + dol_syslog("FacturationCalcul Ligne $ligne->numero - COMMIT"); array_push($this->messages, "Facturation ligne ".$ligne->numero." reussie"); } else { $this->db->query("ROLLBACK"); - dolibarr_syslog("FacturationCalcul Ligne $ligne->numero - ROLLBACK de la transaction"); + dol_syslog("FacturationCalcul Ligne $ligne->numero - ROLLBACK de la transaction"); } } else { - dolibarr_syslog("FacturationCalcul Erreur ouverture Transaction SQL"); + dol_syslog("FacturationCalcul Erreur ouverture Transaction SQL"); } } /* fin de la boucle */ @@ -389,7 +389,7 @@ class FacturationCalcul { { $row = $this->db->fetch_row($resql); - dolibarr_syslog("FacturationCalcul Max rowid apr�s facture ".$row[0]); + dol_syslog("FacturationCalcul Max rowid apr�s facture ".$row[0]); $this->db->free($resql); } else @@ -403,7 +403,7 @@ class FacturationCalcul { * ***********************************************************/ - dolibarr_syslog($nbcommit." facture emises"); + dol_syslog($nbcommit." facture emises"); /********************************************************** * @@ -418,7 +418,7 @@ class FacturationCalcul { { $row = $this->db->fetch_row($resql); - dolibarr_syslog($row[0]. " communications restantes dans la table d'import"); + dol_syslog($row[0]. " communications restantes dans la table d'import"); $this->db->free($resql); } else @@ -426,7 +426,7 @@ class FacturationCalcul { $error++; } - dolibarr_syslog("FacturationCalcul Fin Batch ID ".$batch_id); + dol_syslog("FacturationCalcul Fin Batch ID ".$batch_id); } /****************************************************************************** * @@ -471,7 +471,7 @@ class FacturationCalcul { $fournisseur_id = $ligne->fournisseur_id; - dolibarr_syslog("FacturationCalcul::CalculateBill Utilisation du tarif ".$tarif_spec." pour la ligne ".$ligne->id); + dol_syslog("FacturationCalcul::CalculateBill Utilisation du tarif ".$tarif_spec." pour la ligne ".$ligne->id); $tarif_achat = new TelephonieTarif($db, $tarif_spec, "achat", $fournisseur_id); $tarif_vente = new TelephonieTarif($db, $tarif_spec, "vente", $tarif_spec, $ligne->client_comm_id); @@ -519,7 +519,7 @@ class FacturationCalcul { else { $error++; - dolibarr_syslog("FacturationCalcul::CalculateBill Erreur dans Calcul() Probleme SQL"); + dol_syslog("FacturationCalcul::CalculateBill Erreur dans Calcul() Probleme SQL"); } for ($ii = 0 ; $ii < $num_sql ; $ii++) @@ -542,7 +542,7 @@ class FacturationCalcul { - dolibarr_syslog("FacturationCalcul::CalculateBill return $error", LOG_DEBUG); + dol_syslog("FacturationCalcul::CalculateBill return $error", LOG_DEBUG); return $error; } diff --git a/htdocs/telephonie/facturation/FacturationEmission.class.php b/htdocs/telephonie/facturation/FacturationEmission.class.php index 4206b50259773c1f25980f886d14dbba6592daac..0b0eb73c678c6b00a9f15d955c5bbedc107408f5 100644 --- a/htdocs/telephonie/facturation/FacturationEmission.class.php +++ b/htdocs/telephonie/facturation/FacturationEmission.class.php @@ -71,7 +71,7 @@ class FacturationEmission { else { $this->error = 1; - dolibarr_syslog("Erreur ".$error); + dol_syslog("Erreur ".$error); } return $this->error; } @@ -113,13 +113,13 @@ class FacturationEmission { $batch_id = $row[0]; - dolibarr_syslog("FacturationEmission::Emission Traitement du batch ".$batch_id); + dol_syslog("FacturationEmission::Emission Traitement du batch ".$batch_id); $this->db->free($resql); } else { $error = 1; - dolibarr_syslog("FacturationEmission::Emission Erreur ".$error); + dol_syslog("FacturationEmission::Emission Erreur ".$error); } /* @@ -136,7 +136,7 @@ class FacturationEmission { * ***************************************************************/ - dolibarr_syslog("FacturationEmission::Emission Lecture des contrats",LOG_DEBUG); + dol_syslog("FacturationEmission::Emission Lecture des contrats",LOG_DEBUG); $sql = "SELECT distinct(c.rowid)"; $sql .= " FROM ".MAIN_DB_PREFIX."telephonie_facture as f"; @@ -152,7 +152,7 @@ class FacturationEmission { if (strlen($optcontrat) > 0) { $sql .= " AND c.rowid=".$optcontrat; - dolibarr_syslog("Limite sur le contrat : ".$optcontrat); + dol_syslog("Limite sur le contrat : ".$optcontrat); } $contrats = array(); @@ -172,7 +172,7 @@ class FacturationEmission { else { $error = 2; - dolibarr_syslog("FacturationEmission::Emission Erreur $error",LOG_ERR); + dol_syslog("FacturationEmission::Emission Erreur $error",LOG_ERR); } } /* @@ -181,7 +181,7 @@ class FacturationEmission { */ if (!$error) { - dolibarr_syslog("FacturationEmission::Emission Nombre de contrats � facturer ".sizeof($contrats),LOG_DEBUG); + dol_syslog("FacturationEmission::Emission Nombre de contrats � facturer ".sizeof($contrats),LOG_DEBUG); array_push($this->messages, "Nombre de contrats � facturer : ".sizeof($contrats)); $xcli = 0; $xclis = sizeof($contrats); @@ -191,7 +191,7 @@ class FacturationEmission { $xcli++; /* Lecture des factures t�l�phoniques du contrat */ - dolibarr_syslog("FacturationEmission::Emission ".$xcli."/".$xclis." Contrat � facturer id=".$contrat." (".memory_get_usage() .")",LOG_DEBUG); + dol_syslog("FacturationEmission::Emission ".$xcli."/".$xclis." Contrat � facturer id=".$contrat." (".memory_get_usage() .")",LOG_DEBUG); array_push($this->messages, $xcli."/".$xclis." Contrat � facturer id=".$contrat.",batch=".$batch_id); $sql = "SELECT f.rowid FROM "; $sql .= MAIN_DB_PREFIX."telephonie_facture as f"; @@ -219,7 +219,7 @@ class FacturationEmission { } $this->db->free($resql); - dolibarr_syslog("FacturationEmission::Emission Contrat $contrat, $i factures trouv�es � g�n�rer", LOG_DEBUG); + dol_syslog("FacturationEmission::Emission Contrat $contrat, $i factures trouv�es � g�n�rer", LOG_DEBUG); array_push($this->messages, "Contrat $contrat, $i factures trouv�es � g�n�rer"); $factures_prev = array(); @@ -243,7 +243,7 @@ class FacturationEmission { else { $error = 1; - dolibarr_syslog("FacturationEmission::Emission Error ".$error, LOG_ERR); + dol_syslog("FacturationEmission::Emission Error ".$error, LOG_ERR); array_push($this->messages, "Erreur base de donnees"); } } @@ -279,7 +279,7 @@ class FacturationEmission { else { $error++; - dolibarr_syslog("FacturationEmission::facture_contrat Impossible de lire le contrat"); + dol_syslog("FacturationEmission::facture_contrat Impossible de lire le contrat"); array_push($this->messages, array('error',"Impossible de lire le contrat : $contrat_id")); } } @@ -292,7 +292,7 @@ class FacturationEmission { if ($soc->fetch($contrat->client_facture_id) ) { - if ($verbose) dolibarr_syslog($soc->nom); + if ($verbose) dol_syslog($soc->nom); } else { @@ -307,7 +307,7 @@ class FacturationEmission { */ if (!$error) { - if ($verbose) dolibarr_syslog("FacturationEmission::facture_contrat Cr�ation facture pour $soc->nom", LOG_DEBUG); + if ($verbose) dol_syslog("FacturationEmission::facture_contrat Cr�ation facture pour $soc->nom", LOG_DEBUG); $fac = new Facture($db, $soc->id); $cancel_facture = 1; @@ -323,7 +323,7 @@ class FacturationEmission { } else { - dolibarr_syslog("FacturationEmission::facture_contrat Erreur cr�ation objet facture erreur : $facid",LOG_ERR); + dol_syslog("FacturationEmission::facture_contrat Erreur cr�ation objet facture erreur : $facid",LOG_ERR); array_push($this->messages, array('error',"Erreur cr�ation objet facture erreur : $facid")); $error = 16; } @@ -346,7 +346,7 @@ class FacturationEmission { } else { - dolibarr_syslog("FacturationEmission::facture_contrat Erreur lecture facture t�l�phonique $factel_id"); + dol_syslog("FacturationEmission::facture_contrat Erreur lecture facture t�l�phonique $factel_id"); array_push($this->messages, array('error',"Erreur lecture facture t�l�phonique (id=$factel_id)")); $error = 17; } @@ -360,7 +360,7 @@ class FacturationEmission { } else { - dolibarr_syslog("ERREUR lecture ligne $factel->ligne"); + dol_syslog("ERREUR lecture ligne $factel->ligne"); $error = 18; } @@ -465,7 +465,7 @@ class FacturationEmission { else { $error = 20; - dolibarr_syslog("FacturationEmission Erreur $error", LOG_ERR); + dol_syslog("FacturationEmission Erreur $error", LOG_ERR); } } @@ -511,8 +511,8 @@ class FacturationEmission { else { $error = 21; - dolibarr_syslog($db->error()); - dolibarr_syslog("Erreur rejet prelevement"); + dol_syslog($db->error()); + dol_syslog("Erreur rejet prelevement"); } } @@ -543,8 +543,8 @@ class FacturationEmission { else { $error = 32; - dolibarr_syslog("Erreur remise exceptionnelle"); - dolibarr_syslog($sql); + dol_syslog("Erreur remise exceptionnelle"); + dol_syslog($sql); } //print "remise $remise_exceptionnelle \n"; @@ -673,7 +673,7 @@ class FacturationEmission { { if (!$error && !$cancel_facture) { - if ($verbose) dolibarr_syslog("Validation de la facture : $facid"); + if ($verbose) dol_syslog("Validation de la facture : $facid"); $y = substr($year, -1); $m = substr("00".$month, -2); @@ -713,7 +713,7 @@ class FacturationEmission { } else { - dolibarr_syslog("ERREUR lecture facture t�l�phonique $factel_id"); + dol_syslog("ERREUR lecture facture t�l�phonique $factel_id"); $error = 17; } @@ -726,7 +726,7 @@ class FacturationEmission { } else { - dolibarr_syslog("ERREUR lecture ligne $factel->ligne"); + dol_syslog("ERREUR lecture ligne $factel->ligne"); $error = 18; } @@ -755,7 +755,7 @@ class FacturationEmission { } else { - dolibarr_syslog("FacturationEmission::facture_contrat ERREUR lors de G�n�ration du pdf d�taill� ($modele)"); + dol_syslog("FacturationEmission::facture_contrat ERREUR lors de G�n�ration du pdf d�taill� ($modele)"); $error = 19; } } @@ -798,7 +798,7 @@ class FacturationEmission { if (!$error && !$cancel_facture && $valid_ok == 1) { - if ($verbose) dolibarr_syslog("G�n�ration du pdf facture : $facid"); + if ($verbose) dol_syslog("G�n�ration du pdf facture : $facid"); $fac->fetch($facid); $fac->fetch_client(); @@ -812,7 +812,7 @@ class FacturationEmission { $message .= $fac->client->bank_account->number."\n"; } - if ($verbose) dolibarr_syslog("Cr�ation du pdf facture : $facid"); + if ($verbose) dol_syslog("Cr�ation du pdf facture : $facid"); if (! facture_pdf_create($db, $facid, $message)) { @@ -838,16 +838,16 @@ class FacturationEmission { } else { - dolibarr_syslog("facture $facid non preleve, RIB incorrect"); + dol_syslog("facture $facid non preleve, RIB incorrect"); } } - if ($verbose) dolibarr_syslog("Commit de la transaction");; + if ($verbose) dol_syslog("Commit de la transaction");; } else { $db->query("ROLLBACK"); - dolibarr_syslog("ROLLBACK de la transaction $error"); + dol_syslog("ROLLBACK de la transaction $error"); } } /** @@ -858,8 +858,8 @@ class FacturationEmission { */ function _prelevements($db, $user, $factures_prev) { - dolibarr_syslog("FacturationEmission::_prelevements Debut demande de prelevement", LOG_DEBUG); - dolibarr_syslog("FacturationEmission::_prelevements Nombre de factures ".sizeof($factures_prev),LOG_DEBUG); + dol_syslog("FacturationEmission::_prelevements Debut demande de prelevement", LOG_DEBUG); + dol_syslog("FacturationEmission::_prelevements Nombre de factures ".sizeof($factures_prev),LOG_DEBUG); if (sizeof($factures_prev) > 0) { foreach ($factures_prev as $fac) @@ -870,7 +870,7 @@ class FacturationEmission { $fact->demande_prelevement($user); } } - dolibarr_syslog("FacturationEmission::_prelevements Fin demande de prelevement", LOG_DEBUG); + dol_syslog("FacturationEmission::_prelevements Fin demande de prelevement", LOG_DEBUG); } @@ -909,7 +909,7 @@ class FacturationEmission { } $sendto = substr($sendto,0,strlen($sendto) - 1); - dolibarr_syslog("[EM] Envoi email � ".html_entity_decode($sendto) ); + dol_syslog("[EM] Envoi email � ".html_entity_decode($sendto) ); $subject = ereg_replace("#FACREF#",$fact->ref,TELEPHONIE_MAIL_FACTURATION_SUJET); $subject = ereg_replace("#CONTRAT#",$contrat->ref, $subject); @@ -999,7 +999,7 @@ class FacturationEmission { } else { - dolibarr_syslog("Aucun email trouv�"); + dol_syslog("Aucun email trouv�"); } } } diff --git a/htdocs/telephonie/facturation/FacturationImportCdr.class.php b/htdocs/telephonie/facturation/FacturationImportCdr.class.php index fb6c62103650435b59bafefd8dd72c9e09621096..d06f1f1a73f32496c057039aa11ac1510258d9f0 100644 --- a/htdocs/telephonie/facturation/FacturationImportCdr.class.php +++ b/htdocs/telephonie/facturation/FacturationImportCdr.class.php @@ -71,12 +71,12 @@ class FacturationImportCdr { if (is_file($dir.$xfile) && substr($xfile, -4) == ".csv") { $files[$i] = $dir.$xfile; - dolibarr_syslog("FacturationImportCdr::Import ".$xfile." ajoute"); + dol_syslog("FacturationImportCdr::Import ".$xfile." ajoute"); $i++; } else { - dolibarr_syslog("FacturationImportCdr::Import ".$xfile." ignore"); + dol_syslog("FacturationImportCdr::Import ".$xfile." ignore"); } } @@ -84,13 +84,13 @@ class FacturationImportCdr { } else { - dolibarr_syslog("FacturationImportCdr::Import Impossible de lire $dir"); + dol_syslog("FacturationImportCdr::Import Impossible de lire $dir"); exit ; } } else { - dolibarr_syslog("FacturationImportCdr::Import Impossible de lire $file"); + dol_syslog("FacturationImportCdr::Import Impossible de lire $file"); exit ; } @@ -102,7 +102,7 @@ class FacturationImportCdr { if ($fourn->fetch($id_fourn) <> 0) { - dolibarr_syslog("FacturationImportCdr::Import Erreur recherche fournisseur", LOG_ERR); + dol_syslog("FacturationImportCdr::Import Erreur recherche fournisseur", LOG_ERR); } /* @@ -122,7 +122,7 @@ class FacturationImportCdr { } else { - dolibarr_syslog("FacturationImportCdr::Import Erreur recherche si fichiers deja charges"); + dol_syslog("FacturationImportCdr::Import Erreur recherche si fichiers deja charges"); } /* @@ -141,7 +141,7 @@ class FacturationImportCdr { } else { - dolibarr_syslog("FacturationImportCdr::Import Erreur recherche si fichiers deja traites"); + dol_syslog("FacturationImportCdr::Import Erreur recherche si fichiers deja traites"); } /* @@ -166,7 +166,7 @@ class FacturationImportCdr { } else { - dolibarr_syslog("FacturationImportCdr::Import Erreur chargement des lignes", LOG_DEBUG); + dol_syslog("FacturationImportCdr::Import Erreur chargement des lignes", LOG_DEBUG); exit ; } @@ -187,7 +187,7 @@ class FacturationImportCdr { if ( $this->_verif($this->db, $xfile, $fichiers) == 0) { $error = 0; - dolibarr_syslog("FacturationImportCdr::Import Lecture du fichier $xfile", LOG_DEBUG); + dol_syslog("FacturationImportCdr::Import Lecture du fichier $xfile", LOG_DEBUG); array_push($this->messages,array('info',"Fichier ".basename($xfile)." : utilisation format ".$cdrformat->nom)); $error = $cdrformat->ReadFile($xfile); @@ -238,27 +238,27 @@ class FacturationImportCdr { } else { - dolibarr_syslog("FacturationImportCdr::Import Erreur de traitement de ligne $index", LOG_ERR); - dolibarr_syslog("FacturationImportCdr::Import $sql", LOG_DEBUG); + dol_syslog("FacturationImportCdr::Import Erreur de traitement de ligne $index", LOG_ERR); + dol_syslog("FacturationImportCdr::Import $sql", LOG_DEBUG); $error++; } } else { - dolibarr_syslog("FacturationImportCdr::Import Ligne : $cont ignoree", LOG_INFO); + dol_syslog("FacturationImportCdr::Import Ligne : $cont ignoree", LOG_INFO); $error++; } } else { - dolibarr_syslog("FacturationImportCdr::Import Duree nulle Ligne : $cont ignoree", LOG_INFO); + dol_syslog("FacturationImportCdr::Import Duree nulle Ligne : $cont ignoree", LOG_INFO); } } else { if (!in_array($ligne, $unknown_lines)) { - dolibarr_syslog("FacturationImportCdr::Import Ligne $ligne inconnue Ligne : $cont ignoree", LOG_INFO); + dol_syslog("FacturationImportCdr::Import Ligne $ligne inconnue Ligne : $cont ignoree", LOG_INFO); array_push($this->messages,array('warning',"Ligne $ligne inconnue")); } array_push($unknown_lines, $ligne); @@ -266,10 +266,10 @@ class FacturationImportCdr { $line++; } - dolibarr_syslog("FacturationImportCdr::Import $line lignes traitees dans le fichier", LOG_INFO); + dol_syslog("FacturationImportCdr::Import $line lignes traitees dans le fichier", LOG_INFO); $level = ($line > 0) ? 'info':'warning'; array_push($this->messages,array($level,"$line lignes traitees dans le fichier")); - dolibarr_syslog("FacturationImportCdr::Import $line_inserted insert effectues", LOG_INFO); + dol_syslog("FacturationImportCdr::Import $line_inserted insert effectues", LOG_INFO); $level = ($line_inserted > 0) ? 'info':'warning'; array_push($this->messages,array($level,"$line_inserted ajout dans la table des CDR a traiter")); @@ -289,7 +289,7 @@ class FacturationImportCdr { else { $this->db->query("ROLLBACK"); - dolibarr_syslog("ROLLBACK"); + dol_syslog("ROLLBACK"); array_push($this->messages, array('error',"Fichier ".basename($xfile)." : echec de l'importation")); } } @@ -302,7 +302,7 @@ class FacturationImportCdr { else { print "Erreur lecture : $xfile"; - dolibarr_syslog($xfile . " not readable"); + dol_syslog($xfile . " not readable"); array_push($this->messages, "Fichier ".basename($xfile)." not readable"); } } @@ -319,7 +319,7 @@ class FacturationImportCdr { if (in_array (basename($file), $fichiers)) { - dolibarr_syslog ("Fichier ".basename($file)." deja charge/traite"); + dol_syslog ("Fichier ".basename($file)." deja charge/traite"); array_push($this->messages, array('warning',"Fichier ".basename($file)." deja charge/traite")); $result = -1; } diff --git a/htdocs/telephonie/facturation/FacturationVerifCdr.class.php b/htdocs/telephonie/facturation/FacturationVerifCdr.class.php index dc942d880fb836464bcd3c3fb41ffcdd5710a2a3..c9536b8cd5c2842ddd0ccac61d54f5fc24b84c19 100644 --- a/htdocs/telephonie/facturation/FacturationVerifCdr.class.php +++ b/htdocs/telephonie/facturation/FacturationVerifCdr.class.php @@ -40,7 +40,7 @@ class FacturationVerifCdr { if ( $this->db->query($sql) ) { $row = $this->db->fetch_row(); - dolibarr_syslog("facturation-verif.php ".$row[0]." lignes de communications a verifier"); + dol_syslog("facturation-verif.php ".$row[0]." lignes de communications a verifier"); } /******************************************************************************* @@ -52,7 +52,7 @@ class FacturationVerifCdr { $tarif_vente = new TelephonieTarif($this->db, $grille_vente, "vente"); - dolibarr_syslog("facturation-verif.php Grille : $grille contient ".$tarif_vente->num_tarifs." tarifs"); + dol_syslog("facturation-verif.php Grille : $grille contient ".$tarif_vente->num_tarifs." tarifs"); $sql = "SELECT distinct(num) FROM ".MAIN_DB_PREFIX."telephonie_import_cdr"; diff --git a/htdocs/telephonie/facture/liste.php b/htdocs/telephonie/facture/liste.php index 9bcb6efadc2afeec5de0f73f803ea65e56240add..62d1975a77d22fec320e7dadabc3df76f07570eb 100644 --- a/htdocs/telephonie/facture/liste.php +++ b/htdocs/telephonie/facture/liste.php @@ -156,7 +156,7 @@ if ($result) print '</a> '; print '<a href="'.DOL_URL_ROOT.'/telephonie/client/fiche.php?id='.$obj->socid.'">'.$obj->nom."</a></td>\n"; - print '<td><a href="'.DOL_URL_ROOT.'/telephonie/ligne/fiche.php?numero='.$obj->ligne.'">'.dolibarr_print_phone($obj->ligne,0,0,true)."</a></td>\n"; + print '<td><a href="'.DOL_URL_ROOT.'/telephonie/ligne/fiche.php?numero='.$obj->ligne.'">'.dol_print_phone($obj->ligne,0,0,true)."</a></td>\n"; print '<td align="center">'.$obj->date."</td>\n"; print '<td align="right">'.sprintf("%01.4f",$obj->cout_vente)."</td>\n"; diff --git a/htdocs/telephonie/facturetel.class.php b/htdocs/telephonie/facturetel.class.php index c59766809a9b8a9f21dd2fe7cd837ccaeb8f5398..2350e26c9153f451311ff91e15401bdbf559240c 100644 --- a/htdocs/telephonie/facturetel.class.php +++ b/htdocs/telephonie/facturetel.class.php @@ -58,7 +58,7 @@ class FactureTel { } else { - dolibarr_syslog("FactureTel::Fetch() Error aucune facture avec cet id=$id", LOG_ERR); + dol_syslog("FactureTel::Fetch() Error aucune facture avec cet id=$id", LOG_ERR); $result = -2; } @@ -67,7 +67,7 @@ class FactureTel { else { /* Erreur select SQL */ - dolibarr_syslog("FactureTel::Fetch() Error SQL id=$id", LOG_ERR); + dol_syslog("FactureTel::Fetch() Error SQL id=$id", LOG_ERR); $result = -1; } @@ -94,7 +94,7 @@ class FactureTel { else { /* Erreur select SQL */ - dolibarr_syslog("FactureTel::affect_num_facture_compta() Error SQL id=$facid", LOG_ERR); + dol_syslog("FactureTel::affect_num_facture_compta() Error SQL id=$facid", LOG_ERR); $result = -1; return 1; } diff --git a/htdocs/telephonie/fournisseur/cdrformat/cdrformat.fructidor.class.php b/htdocs/telephonie/fournisseur/cdrformat/cdrformat.fructidor.class.php index 468d4f37e07a84aec4f0895afb13256050ea11ba..e3f871c1dd1af3127af52c0dd307ebe7ab5f3b03 100644 --- a/htdocs/telephonie/fournisseur/cdrformat/cdrformat.fructidor.class.php +++ b/htdocs/telephonie/fournisseur/cdrformat/cdrformat.fructidor.class.php @@ -50,7 +50,7 @@ class CdrFormatFructidor function ReadFile($file) { $this->messages = array(); - dolibarr_syslog("CdrFormatFructidor::ReadFile($file)", LOG_DEBUG); + dol_syslog("CdrFormatFructidor::ReadFile($file)", LOG_DEBUG); $badformat = 0; $error = 0; $i = 0; @@ -85,7 +85,7 @@ class CdrFormatFructidor } else { - dolibarr_syslog("CdrFormatFructidor::ReadFile Mauvais format de fichier ligne $line", LOG_ERR); + dol_syslog("CdrFormatFructidor::ReadFile Mauvais format de fichier ligne $line", LOG_ERR); $badformat++; } $line++; @@ -99,7 +99,7 @@ class CdrFormatFructidor array_push($this->messages,array('error',"$badformat lignes ont un mauvais format dans le fichier")); } - dolibarr_syslog("CdrFormatFructidor::ReadFile read $i lines", LOG_DEBUG); + dol_syslog("CdrFormatFructidor::ReadFile read $i lines", LOG_DEBUG); return $error; } diff --git a/htdocs/telephonie/fournisseur/cdrformat/cdrformat.messidor.class.php b/htdocs/telephonie/fournisseur/cdrformat/cdrformat.messidor.class.php index bdb17181eacadeb8f17a5d95a20b85a80ef5c9be..d20126674d2583663caf5bac282dd0f17e379597 100644 --- a/htdocs/telephonie/fournisseur/cdrformat/cdrformat.messidor.class.php +++ b/htdocs/telephonie/fournisseur/cdrformat/cdrformat.messidor.class.php @@ -48,7 +48,7 @@ class CdrFormatMessidor function ReadFile($file) { - dolibarr_syslog("CdrFormatMessidor::ReadFile($file)", LOG_DEBUG); + dol_syslog("CdrFormatMessidor::ReadFile($file)", LOG_DEBUG); $error = 0; $i = 0; @@ -77,13 +77,13 @@ class CdrFormatMessidor } else { - dolibarr_syslog("CdrFormatMessidor::ReadFile Mauvais format de fichier ligne $line"); + dol_syslog("CdrFormatMessidor::ReadFile Mauvais format de fichier ligne $line"); } } $line++; } fclose($hf); array_push($this->messages,array('info',"Fichier ".basename($file)." : $line lignes lues dans le fichier")); - dolibarr_syslog("CdrFormatMessidor::ReadFile read $i lines", LOG_DEBUG); + dol_syslog("CdrFormatMessidor::ReadFile read $i lines", LOG_DEBUG); } } diff --git a/htdocs/telephonie/fournisseur/commande/commande.tableur.class.php b/htdocs/telephonie/fournisseur/commande/commande.tableur.class.php index 85bdc03bfbed4f8ceff3b7fb64c3ba772239a4f9..5d2187064b4ddf4cafe21c3f64ac370c549eb252 100644 --- a/htdocs/telephonie/fournisseur/commande/commande.tableur.class.php +++ b/htdocs/telephonie/fournisseur/commande/commande.tableur.class.php @@ -32,7 +32,7 @@ class CommandeMethodeTableur extends CommandeMethode function CommandeMethodeTableur ($DB, $USER=0, $fourn=0) { - dolibarr_syslog("CommandeMethodeTableur::CommandeMethodeTableur"); + dol_syslog("CommandeMethodeTableur::CommandeMethodeTableur"); $this->nom = "M�thode Tableur joint"; @@ -48,8 +48,8 @@ class CommandeMethodeTableur extends CommandeMethode function Create() { - dolibarr_syslog("CommandeMethodeTableur::Create Fournisseur id : ".$this->fourn->id); - dolibarr_syslog("CommandeMethodeTableur::Create Fournisseur email : ".$this->fourn->email_commande); + dol_syslog("CommandeMethodeTableur::Create Fournisseur id : ".$this->fourn->id); + dol_syslog("CommandeMethodeTableur::Create Fournisseur email : ".$this->fourn->email_commande); $this->date = time(); @@ -75,7 +75,7 @@ class CommandeMethodeTableur extends CommandeMethode $res = $res + $this->MailFile($fname); } - dolibarr_syslog("CommandeMethodeTableur::CommandeMethodeTableur Return $res"); + dol_syslog("CommandeMethodeTableur::CommandeMethodeTableur Return $res"); return $res; } @@ -133,7 +133,7 @@ class CommandeMethodeTableur extends CommandeMethode } else { - dolibarr_syslog("CommandeMethodeTableur::MailFile Erreur send"); + dol_syslog("CommandeMethodeTableur::MailFile Erreur send"); } } @@ -275,7 +275,7 @@ class CommandeMethodeTableur extends CommandeMethode } else { - dolibarr_syslog("CommandeMethodeTableur::CreateFile Erreur SQL 1"); + dol_syslog("CommandeMethodeTableur::CreateFile Erreur SQL 1"); } /* @@ -324,7 +324,7 @@ class CommandeMethodeTableur extends CommandeMethode } else { - dolibarr_syslog("CommandeMethodeTableur::CreateFile Erreur SQL 2"); + dol_syslog("CommandeMethodeTableur::CreateFile Erreur SQL 2"); } $workbook->close(); diff --git a/htdocs/telephonie/fournisseur/commande/methode.commande.class.php b/htdocs/telephonie/fournisseur/commande/methode.commande.class.php index 7851816a4e0389c25e2a5f0c5fcbc45ab10f7a33..714d3e95205fa6b51f5a8a6ba67d9cd9ea0d496a 100644 --- a/htdocs/telephonie/fournisseur/commande/methode.commande.class.php +++ b/htdocs/telephonie/fournisseur/commande/methode.commande.class.php @@ -50,14 +50,14 @@ class CommandeMethode if (! $this->db->query($sql) ) { $error++; - dolibarr_syslog($sql); + dol_syslog($sql); } } } else { $error++; - dolibarr_syslog($sql); + dol_syslog($sql); } return $error; diff --git a/htdocs/telephonie/fournisseur/fiche.php b/htdocs/telephonie/fournisseur/fiche.php index 7e088771146c0e75e502b645de2dc39ffae4049f..d2ab01125c718720bfab8b2505d56d4eef8ca9b8 100644 --- a/htdocs/telephonie/fournisseur/fiche.php +++ b/htdocs/telephonie/fournisseur/fiche.php @@ -232,7 +232,7 @@ if ($_GET["id"] > 0) $head[$h][1] = $langs->trans("CDR"); $h++; */ - dolibarr_fiche_head($head, $hselected, 'Fournisseur : '.$fourn->nom); + dol_fiche_head($head, $hselected, 'Fournisseur : '.$fourn->nom); print '<table class="border" width="100%" cellspacing="0" cellpadding="4">'; diff --git a/htdocs/telephonie/fournisseurtel.class.php b/htdocs/telephonie/fournisseurtel.class.php index 20a0fa0de124da39a84e1953aa5b6334e7251485..44edd61bf57cf2cd9e4561fcf542a09df8af2781 100644 --- a/htdocs/telephonie/fournisseurtel.class.php +++ b/htdocs/telephonie/fournisseurtel.class.php @@ -140,13 +140,13 @@ class FournisseurTelephonie { } else { - dolibarr_syslog("FournisseurTelephonie::Fetch Erreur id=".$this->id); + dol_syslog("FournisseurTelephonie::Fetch Erreur id=".$this->id); return -1; } } else { - dolibarr_syslog("FournisseurTelephonie::Fetch Erreur SQL id=".$this->id); + dol_syslog("FournisseurTelephonie::Fetch Erreur SQL id=".$this->id); return -2; } } @@ -255,7 +255,7 @@ class FournisseurTelephonie { */ function CreateCommande($user) { - dolibarr_syslog("FournisseurTelephonie::CreateCommande User:$user->id"); + dol_syslog("FournisseurTelephonie::CreateCommande User:$user->id"); $fileclass = $this->classdir.'commande.'.$this->class_commande.'.class.php'; @@ -263,7 +263,7 @@ class FournisseurTelephonie { $classname = "CommandeMethode".ucfirst($this->class_commande); - dolibarr_syslog("FournisseurTelephonie::CreateCommande user $classname"); + dol_syslog("FournisseurTelephonie::CreateCommande user $classname"); $ct = new $classname($this->db, $user, $this); diff --git a/htdocs/telephonie/ligne/commande.php b/htdocs/telephonie/ligne/commande.php index 4f5a569fdbe478c809c6e8d723a4e6df4594ee6b..07584908cd511672bece2f0fcf0dcdc98eec5a01 100644 --- a/htdocs/telephonie/ligne/commande.php +++ b/htdocs/telephonie/ligne/commande.php @@ -70,13 +70,13 @@ if ($_GET["id"] or $_GET["numero"]) $head[$h][1] = $langs->trans('Stats'); $h++; - dolibarr_fiche_head($head, $hselected, 'Ligne : '.$ligne->numero); + dol_fiche_head($head, $hselected, 'Ligne : '.$ligne->numero); print_fiche_titre('Factures Ligne', $mesg); print '<table class="border" width="100%" cellspacing="0" cellpadding="4">'; - print '<tr><td width="25%">Num�ro</td><td>'.dolibarr_print_phone($ligne->numero,0,0,true).'</td></tr>'; + print '<tr><td width="25%">Num�ro</td><td>'.dol_print_phone($ligne->numero,0,0,true).'</td></tr>'; $client = new Societe($db, $ligne->client_id); $client->fetch($ligne->client_id); diff --git a/htdocs/telephonie/ligne/commande/archives.php b/htdocs/telephonie/ligne/commande/archives.php index 83445d9cb0ef6325355e78d82d47f032905b0c60..2204aa7f9d0fa8fe2aa631ecd5c5c625f3f4b488 100644 --- a/htdocs/telephonie/ligne/commande/archives.php +++ b/htdocs/telephonie/ligne/commande/archives.php @@ -104,7 +104,7 @@ if ($result) } else { - dolibarr_print_error($db); + dol_print_error($db); } $db->close(); diff --git a/htdocs/telephonie/ligne/commande/fiche.php b/htdocs/telephonie/ligne/commande/fiche.php index 565fea0666ac72d0f157779953b6a9dd2e59aa65..9f4dd46a0d40a9f94c791be007a350b42412cb49 100644 --- a/htdocs/telephonie/ligne/commande/fiche.php +++ b/htdocs/telephonie/ligne/commande/fiche.php @@ -162,7 +162,7 @@ if ($db->query($sql)) $socf->fetch($obj->sfidp); print "<tr $bc[$var]>"; - print '<td><a href="../fiche.php?id='.$obj->rowid.'">'.dolibarr_print_phone($obj->ligne,0,0,true)."</a></td>\n"; + print '<td><a href="../fiche.php?id='.$obj->rowid.'">'.dol_print_phone($obj->ligne,0,0,true)."</a></td>\n"; print '<td align="center">'.$ligne->statuts[$obj->statut]."</td>\n"; print '<td><a href="'.DOL_URL_ROOT.'/soc.php?socid='.$obj->socid.'">'.$obj->nom.'</a></td>'; print '<td><a href="'.DOL_URL_ROOT.'/soc.php?socid='.$obj->sfidp.'">'.$obj->sfnom.'</a></td>'; diff --git a/htdocs/telephonie/ligne/commande/historique.php b/htdocs/telephonie/ligne/commande/historique.php index 4bfec7f77cbd86e230c52ac76981047a8497d6b4..98a65ba59cffbf402dc51440d86e32b4d9fdfc8f 100644 --- a/htdocs/telephonie/ligne/commande/historique.php +++ b/htdocs/telephonie/ligne/commande/historique.php @@ -142,7 +142,7 @@ if ($result) print img_file(); print '</a> '; - print '<a href="'.DOL_URL_ROOT.'/telephonie/ligne/fiche.php?id='.$obj->rowid.'">'.dolibarr_print_phone($obj->ligne,0,0,true)."</a></td>\n"; + print '<a href="'.DOL_URL_ROOT.'/telephonie/ligne/fiche.php?id='.$obj->rowid.'">'.dol_print_phone($obj->ligne,0,0,true)."</a></td>\n"; print '<td><a href="'.DOL_URL_ROOT.'/telephonie/client/fiche.php?id='.$obj->socid.'">'.$obj->nom.'</a></td>'; diff --git a/htdocs/telephonie/ligne/commande/liste.php b/htdocs/telephonie/ligne/commande/liste.php index 94436697889549edd664d6e6475c46e12955a7e6..c36aeadd8cb0da5b69dfa18d3c1dce8e0b7ce988 100644 --- a/htdocs/telephonie/ligne/commande/liste.php +++ b/htdocs/telephonie/ligne/commande/liste.php @@ -139,7 +139,7 @@ if ($result) } else { - print dolibarr_print_phone($obj->ligne,0,0,true); + print dol_print_phone($obj->ligne,0,0,true); $ok_commande = 1; } diff --git a/htdocs/telephonie/ligne/commande/retour/atraiter.php b/htdocs/telephonie/ligne/commande/retour/atraiter.php index 27278ead54d3f957ea1db6ada04422dd8088eeca..93bf80ef63ba7da6ca7f4f2e90a999432f210db9 100644 --- a/htdocs/telephonie/ligne/commande/retour/atraiter.php +++ b/htdocs/telephonie/ligne/commande/retour/atraiter.php @@ -78,7 +78,7 @@ if ($resql) print "<tr $bc[$var]><td>"; print '<img src="'.DOL_URL_ROOT.'/telephonie/ligne/graph'.$ligne->statut.'.png"> '; print '<a href="'.DOL_URL_ROOT.'/telephonie/ligne/fiche.php?numero='.$obj->cli.'">'; - print dolibarr_print_phone($obj->cli,0,0,true)."</a></td>\n"; + print dol_print_phone($obj->cli,0,0,true)."</a></td>\n"; print '<td>'.$obj->mode."</td>\n"; print '<td align="center">'.$obj->situation."</td>\n"; print '<td align="center">'.$obj->date_mise_service."</td>\n"; diff --git a/htdocs/telephonie/ligne/commande/retour/liste.php b/htdocs/telephonie/ligne/commande/retour/liste.php index 3b754334e56d6976c735a8f5e994e83f07f73092..88666c1fef4cf6dc3d94f1731abc6226f856f525 100644 --- a/htdocs/telephonie/ligne/commande/retour/liste.php +++ b/htdocs/telephonie/ligne/commande/retour/liste.php @@ -75,7 +75,7 @@ if ($db->query($sql)) print "<tr $bc[$var]><td>"; print '<img src="'.DOL_URL_ROOT.'/telephonie/ligne/graph'.$ligne->statut.'.png"> '; print '<a href="'.DOL_URL_ROOT.'/telephonie/ligne/fiche.php?numero='.$obj->cli.'">'; - print dolibarr_print_phone($obj->cli,0,0,true)."</a></td>\n"; + print dol_print_phone($obj->cli,0,0,true)."</a></td>\n"; print '<td>'.$obj->mode."</td>\n"; print '<td align="center">'.$obj->situation."</td>\n"; print '<td align="center">'.$obj->date_mise_service."</td>\n"; diff --git a/htdocs/telephonie/ligne/commentaires.php b/htdocs/telephonie/ligne/commentaires.php index fffabdff746fa35994d2e29dccb40b887dea5476..1d58c616994caf555a919635709fe094f46a9ad5 100644 --- a/htdocs/telephonie/ligne/commentaires.php +++ b/htdocs/telephonie/ligne/commentaires.php @@ -126,7 +126,7 @@ if ($_GET["id"]) $head[$h][1] = $langs->trans('Stats'); $h++; - dolibarr_fiche_head($head, $hselected, 'Ligne : '.$ligne->numero); + dol_fiche_head($head, $hselected, 'Ligne : '.$ligne->numero); print '<table class="border" width="100%" cellspacing="0" cellpadding="4">'; @@ -148,7 +148,7 @@ if ($_GET["id"]) print $client_comm->nom.'</a></td><td>'.$client_comm->code_client; print '</td></tr>'; - print '<tr><td width="20%">Num�ro</td><td>'.dolibarr_print_phone($ligne->numero,0,0,true).'</td>'; + print '<tr><td width="20%">Num�ro</td><td>'.dol_print_phone($ligne->numero,0,0,true).'</td>'; print '<td>Factur�e : '.$ligne->facturable.'</td></tr>'; $client = new Societe($db, $ligne->client_id); diff --git a/htdocs/telephonie/ligne/conso.php b/htdocs/telephonie/ligne/conso.php index 513c9c2d39b435de9b7b5ad9772ab15c55fa3129..ee5add5e9793699788e5452811581a38a6efa1bc 100644 --- a/htdocs/telephonie/ligne/conso.php +++ b/htdocs/telephonie/ligne/conso.php @@ -93,13 +93,13 @@ if ($_GET["id"] or $_GET["numero"]) $head[$h][1] = $langs->trans('Stats'); $h++; - dolibarr_fiche_head($head, $hselected, 'Ligne : '.$ligne->numero); + dol_fiche_head($head, $hselected, 'Ligne : '.$ligne->numero); print_fiche_titre('Fiche Ligne', $mesg); print '<table class="border" width="100%" cellspacing="0" cellpadding="4">'; - print '<tr><td width="25%">Num�ro</td><td>'.dolibarr_print_phone($ligne->numero,0,0,true).'</td>'; + print '<tr><td width="25%">Num�ro</td><td>'.dol_print_phone($ligne->numero,0,0,true).'</td>'; print '<td>Factur�e : '.$ligne->facturable.'</td><td> </td></tr>'; $client = new Societe($db, $ligne->client_id); diff --git a/htdocs/telephonie/ligne/factures.php b/htdocs/telephonie/ligne/factures.php index bf3075ce9770f574f1236dad06c07e0aaaaa1ecd..ba20ddc29d70b08c0cba112225ed59125a406d3a 100644 --- a/htdocs/telephonie/ligne/factures.php +++ b/htdocs/telephonie/ligne/factures.php @@ -132,13 +132,13 @@ if ($_GET["id"] or $_GET["numero"]) $facnum = 1; } - dolibarr_fiche_head($head, $hselected, 'Ligne : '.$ligne->numero); + dol_fiche_head($head, $hselected, 'Ligne : '.$ligne->numero); print_fiche_titre('Factures Ligne', $mesg); print '<table class="border" width="100%" cellspacing="0" cellpadding="4">'; - print '<tr><td width="25%">Num�ro</td><td>'.dolibarr_print_phone($ligne->numero,0,0,true).'</td>'; + print '<tr><td width="25%">Num�ro</td><td>'.dol_print_phone($ligne->numero,0,0,true).'</td>'; print '<td>'; if ($facnum > 1) diff --git a/htdocs/telephonie/ligne/fiche.php b/htdocs/telephonie/ligne/fiche.php index b5466bef404c9216e6df4fc42a250868b998214a..55a64ab9961efa54fdda44d9f8cb2b0f1d3f9567 100644 --- a/htdocs/telephonie/ligne/fiche.php +++ b/htdocs/telephonie/ligne/fiche.php @@ -578,7 +578,7 @@ else $previous_ref = $ligne->ref_previous?'<a href="'.$_SERVER["PHP_SELF"].'?id='.$ligne->ref_previous.'">'.img_previous().'</a>':''; $next_ref = $ligne->ref_next?'<a href="'.$_SERVER["PHP_SELF"].'?id='.$ligne->ref_next.'">'.img_next().'</a>':''; - dolibarr_fiche_head($head, $hselected, 'Ligne : '.$ligne->numero); + dol_fiche_head($head, $hselected, 'Ligne : '.$ligne->numero); print '<table class="nobordernopadding" width="100%"><tr class="nobordernopadding"><td class="nobordernopadding">Fiche Ligne '.$mesg.'</td>'; print '<td class="nobordernopadding"><a href="'.$_SERVER["PHP_SELF"].'?id='.$product->id.'">'.$product->ref.'</a>'; @@ -591,7 +591,7 @@ else { $html = new Form($db); - $html->form_confirm("fiche.php"."?id=".$_GET["id"],"Suppression de ligne","Etes-vous s�r de vouloir supprimer la ligne : ".dolibarr_print_phone($ligne->numero,0,0,true)." ?","confirm_delete"); + $html->form_confirm("fiche.php"."?id=".$_GET["id"],"Suppression de ligne","Etes-vous s�r de vouloir supprimer la ligne : ".dol_print_phone($ligne->numero,0,0,true)." ?","confirm_delete"); print '<br />'; } @@ -618,7 +618,7 @@ else print $client_comm->nom.'</a></td><td>'.$client_comm->code_client; print '</td></tr>'; - print '<tr><td width="20%">Num�ro</td><td>'.dolibarr_print_phone($ligne->numero).'</td>'; + print '<tr><td width="20%">Num�ro</td><td>'.dol_print_phone($ligne->numero).'</td>'; //print " ".$ligne->support. print '<td>Factur�e : '.$ligne->facturable.'</td></tr>'; @@ -940,7 +940,7 @@ else $head[$h][1] = $langs->trans('Conso'); $h++; - dolibarr_fiche_head($head, $hselected, 'Ligne : '.$ligne->numero); + dol_fiche_head($head, $hselected, 'Ligne : '.$ligne->numero); print_fiche_titre('Edition de la ligne', $mesg); @@ -965,7 +965,7 @@ else else { print '<input type="hidden" name="numero" value="'.$ligne->numero.'">'; - print dolibarr_print_phone($ligne->numero); + print dol_print_phone($ligne->numero); } print '</td></tr>'; diff --git a/htdocs/telephonie/ligne/groupe.php b/htdocs/telephonie/ligne/groupe.php index 92e45e2ec5e715f4441da256c18fa12ce7d48cd8..a03854952894db187f4ca1aa75b4c011800bc489 100644 --- a/htdocs/telephonie/ligne/groupe.php +++ b/htdocs/telephonie/ligne/groupe.php @@ -162,7 +162,7 @@ if ($result) print img_file(); print '</a> '; - print '<a href="fiche.php?id='.$obj->rowid.'">'.dolibarr_print_phone($obj->ligne,0,0,true)."</a></td>\n"; + print '<a href="fiche.php?id='.$obj->rowid.'">'.dol_print_phone($obj->ligne,0,0,true)."</a></td>\n"; print '<td>'.$obj->nom.'</td>'; print '<td>'.$obj->nom_facture.'</td>'; diff --git a/htdocs/telephonie/ligne/history.php b/htdocs/telephonie/ligne/history.php index 1c5c943264bfe35d6dc08b414ddb123c8d44ba50..aea2d00b2b153f272237fe7d973fcf24f4080709 100644 --- a/htdocs/telephonie/ligne/history.php +++ b/htdocs/telephonie/ligne/history.php @@ -93,13 +93,13 @@ llxHeader("","","Historique Ligne"); $head[$h][1] = $langs->trans('Stats'); $h++; - dolibarr_fiche_head($head, $hselected, 'Ligne : '.$ligne->numero); + dol_fiche_head($head, $hselected, 'Ligne : '.$ligne->numero); print_fiche_titre('Fiche Ligne', $mesg); print '<table class="border" width="100%" cellspacing="0" cellpadding="4">'; - print '<tr><td width="20%">Num�ro</td><td colspan="3">'.dolibarr_print_phone($ligne->numero,0,0,true).'</td></tr>'; + print '<tr><td width="20%">Num�ro</td><td colspan="3">'.dol_print_phone($ligne->numero,0,0,true).'</td></tr>'; $client = new Societe($db, $ligne->client_id); $client->fetch($ligne->client_id); diff --git a/htdocs/telephonie/ligne/index.php b/htdocs/telephonie/ligne/index.php index 26023a4fb783c326992047ad91e5493e05a84dc2..904d60e69ec867e9a5f949365935070a5bed422c 100644 --- a/htdocs/telephonie/ligne/index.php +++ b/htdocs/telephonie/ligne/index.php @@ -204,7 +204,7 @@ if ($resql) print img_file(); print '</a> '; - print '<a href="fiche.php?id='.$obj->rowid.'">'.dolibarr_print_phone($obj->ligne,0,0,true)."</a></td>\n"; + print '<a href="fiche.php?id='.$obj->rowid.'">'.dol_print_phone($obj->ligne,0,0,true)."</a></td>\n"; $nom = stripslashes($obj->nom); if (strlen(stripslashes($obj->nom)) > 20) diff --git a/htdocs/telephonie/ligne/infoc.php b/htdocs/telephonie/ligne/infoc.php index c86e094e2c29f36cdc442f8f1b08aaee4476b2f0..2c1ade503ee885ac2b06f46bc477bb965bb2c2c6 100644 --- a/htdocs/telephonie/ligne/infoc.php +++ b/htdocs/telephonie/ligne/infoc.php @@ -125,13 +125,13 @@ if ($_GET["id"] or $_GET["numero"]) $head[$h][1] = $langs->trans('Stats'); $h++; - dolibarr_fiche_head($head, $hselected, 'Ligne : '.$ligne->numero); + dol_fiche_head($head, $hselected, 'Ligne : '.$ligne->numero); print_fiche_titre('Informations compl�mentaires', $mesg); print '<table class="border" width="100%" cellspacing="0" cellpadding="4">'; - print '<tr><td width="20%">Num�ro</td><td>'.dolibarr_print_phone($ligne->numero,0,0,true).'</td>'; + print '<tr><td width="20%">Num�ro</td><td>'.dol_print_phone($ligne->numero,0,0,true).'</td>'; print '<td>Factur�e : '.$ligne->facturable.'</td></tr>'; $client = new Societe($db, $ligne->client_id); diff --git a/htdocs/telephonie/ligne/liste.php b/htdocs/telephonie/ligne/liste.php index bb1c5c96e93971f79dde5a4a6a7a1998f4aabd1a..a1e3142304fccee2d2d04f550da56c69627ea63e 100644 --- a/htdocs/telephonie/ligne/liste.php +++ b/htdocs/telephonie/ligne/liste.php @@ -193,7 +193,7 @@ if ($result) print img_file(); print '</a> '; - print '<a href="fiche.php?id='.$obj->rowid.'">'.dolibarr_print_phone($obj->ligne,0,0,true)."</a></td>\n"; + print '<a href="fiche.php?id='.$obj->rowid.'">'.dol_print_phone($obj->ligne,0,0,true)."</a></td>\n"; print '<td><a href="'.DOL_URL_ROOT.'/telephonie/client/fiche.php?id='.$obj->socid.'">'.stripslashes($obj->nom).'</a></td>'; //print '<td><a href="'.DOL_URL_ROOT.'/soc.php?socid='.$obj->sfidp.'">'.stripslashes($obj->nom_facture).'</a></td>'; diff --git a/htdocs/telephonie/ligne/listecommande.php b/htdocs/telephonie/ligne/listecommande.php index 3d1111440abb5228e8293091e787347cb2587bc0..9c954c11715373eaaccc5520a620f0d2c640cf4c 100644 --- a/htdocs/telephonie/ligne/listecommande.php +++ b/htdocs/telephonie/ligne/listecommande.php @@ -134,7 +134,7 @@ if ($resql) print '</a> '; - print '<a href="fiche.php?id='.$obj->rowid.'">'.dolibarr_print_phone($obj->ligne,0,0,true)."</a></td>\n"; + print '<a href="fiche.php?id='.$obj->rowid.'">'.dol_print_phone($obj->ligne,0,0,true)."</a></td>\n"; print '<td><a href="'.DOL_URL_ROOT.'/soc.php?socid='.$obj->socid.'">'.$obj->nom.'</a></td>'; print '<td align="center">'.$obj->date_commande_last."</td>\n"; diff --git a/htdocs/telephonie/ligne/numdata.php b/htdocs/telephonie/ligne/numdata.php index 4b21ab58700c3af49efc6ad16f50aef43c86ab84..c87c47a9bff26975d32a05e55643080adc01a10b 100644 --- a/htdocs/telephonie/ligne/numdata.php +++ b/htdocs/telephonie/ligne/numdata.php @@ -185,7 +185,7 @@ if ($result) print "<tr $bc[$var]><td>"; - print dolibarr_print_phone($obj->numero,0,0,true)."</td>\n"; + print dol_print_phone($obj->numero,0,0,true)."</td>\n"; print '<td><a href="'.DOL_URL_ROOT.'/soc.php?socid='.$obj->socid.'">'.$obj->nom.'</a></td>'; print '<td align="center"><a href="'.DOL_URL_ROOT.'/telephonie/ligne/numdata.php?action=delete&id='.$obj->rowid.'">'; diff --git a/htdocs/telephonie/ligne/remises.php b/htdocs/telephonie/ligne/remises.php index 6ba934d55167046a3fb94f4b3ff696730e1f6c13..60af17d5bf37e8a9e9e7e42b69465ad9a5f17840 100644 --- a/htdocs/telephonie/ligne/remises.php +++ b/htdocs/telephonie/ligne/remises.php @@ -66,13 +66,13 @@ if ($result == 1 && $client_comm->perm_read) $hselected=$h; $h++; - dolibarr_fiche_head($head, $hselected, 'Ligne : '.$ligne->numero); + dol_fiche_head($head, $hselected, 'Ligne : '.$ligne->numero); print_fiche_titre('Fiche Ligne', $mesg); print '<table class="border" width="100%">'; - print '<tr><td width="20%">Num�ro</td><td colspan="2">'.dolibarr_print_phone($ligne->numero,0,0,true).'</td></tr>'; + print '<tr><td width="20%">Num�ro</td><td colspan="2">'.dol_print_phone($ligne->numero,0,0,true).'</td></tr>'; $client = new Societe($db, $ligne->client_id); $client->fetch($ligne->client_id); diff --git a/htdocs/telephonie/ligne/stat.php b/htdocs/telephonie/ligne/stat.php index de47681f701f5fe1b71f20ab75331ed80f0ed9a5..30d2130ddd21d3d6f2964e8f0c4a9ccda8faaf76 100644 --- a/htdocs/telephonie/ligne/stat.php +++ b/htdocs/telephonie/ligne/stat.php @@ -87,7 +87,7 @@ if ($_GET["id"] or $_GET["numero"]) $previous_ref = $ligne->ref_previous?'<a href="'.$_SERVER["PHP_SELF"].'?id='.$ligne->ref_previous.'">'.img_previous().'</a>':''; $next_ref = $ligne->ref_next?'<a href="'.$_SERVER["PHP_SELF"].'?id='.$ligne->ref_next.'">'.img_next().'</a>':''; - dolibarr_fiche_head($head, $hselected, 'Statistiques ligne'); + dol_fiche_head($head, $hselected, 'Statistiques ligne'); print '<table class="nobordernopadding" width="100%"><tr class="nobordernopadding"><td class="nobordernopadding">Statistiques '.$mesg.'</td>'; print '<td class="nobordernopadding"><a href="'.$_SERVER["PHP_SELF"].'?id='.$product->id.'">'.$product->ref.'</a>'; @@ -95,7 +95,7 @@ if ($_GET["id"] or $_GET["numero"]) print '<table class="border" width="100%" cellspacing="0" cellpadding="4">'; - print '<tr><td width="25%">Num�ro</td><td>'.dolibarr_print_phone($ligne->numero,0,0,true).'</td>'; + print '<tr><td width="25%">Num�ro</td><td>'.dol_print_phone($ligne->numero,0,0,true).'</td>'; print '<td>Factur�e : '.$ligne->facturable.'</td><td> </td></tr>'; $client = new Societe($db, $ligne->client_id); diff --git a/htdocs/telephonie/lignetel.class.php b/htdocs/telephonie/lignetel.class.php index 657f4615f6b4bdbddad6642329ecff756b361def..7cf09cba5919f541439c25131ef51eb7b553ec2e 100644 --- a/htdocs/telephonie/lignetel.class.php +++ b/htdocs/telephonie/lignetel.class.php @@ -180,7 +180,7 @@ class LigneTel { if (!$this->db->begin()) { - dolibarr_syslog("LigneTel::SetRemise Error -5"); + dol_syslog("LigneTel::SetRemise Error -5"); $error++; } @@ -194,7 +194,7 @@ class LigneTel { if (! $this->db->query($sql) ) { - dolibarr_syslog("LigneTel::SetRemise Error -3"); + dol_syslog("LigneTel::SetRemise Error -3"); $error++; } } @@ -207,7 +207,7 @@ class LigneTel { if (! $this->db->query($sql) ) { - dolibarr_syslog("LigneTel::SetRemise Error -4"); + dol_syslog("LigneTel::SetRemise Error -4"); $error++; } } @@ -225,7 +225,7 @@ class LigneTel { } else { - dolibarr_syslog("LigneTel::SetRemise Error -2"); + dol_syslog("LigneTel::SetRemise Error -2"); return -2; } } @@ -274,15 +274,15 @@ class LigneTel { if ($lex->fetch($this->numero) == 1) { $this->error_message = "Echec de la cr�ation de la ligne, cette ligne existe d�j� !"; - dolibarr_syslog("LigneTel::Create Error -3"); + dol_syslog("LigneTel::Create Error -3"); return -3; } else { $this->error_message = "Echec de la cr�ation de la ligne"; - dolibarr_syslog("LigneTel::Create Error -1"); - dolibarr_syslog("LigneTel::Create ".$this->db->error()); - dolibarr_syslog("LigneTel::Create $sql"); + dol_syslog("LigneTel::Create Error -1"); + dol_syslog("LigneTel::Create ".$this->db->error()); + dol_syslog("LigneTel::Create $sql"); return -1; } } @@ -290,7 +290,7 @@ class LigneTel { else { $this->error_message = "Echec de la cr�ation de la ligne, le num�ro de la ligne est incorrect !"; - dolibarr_syslog("LigneTel::Create Error -2 ($this->numero)"); + dol_syslog("LigneTel::Create Error -2 ($this->numero)"); return -2; } } @@ -325,8 +325,8 @@ class LigneTel { if (!$resqlu) { - dolibarr_syslog("LigneTel::DefineClientOption Error"); - dolibarr_syslog("LigneTel::DefineClientOption $sqlu"); + dol_syslog("LigneTel::DefineClientOption Error"); + dol_syslog("LigneTel::DefineClientOption $sqlu"); } @@ -335,7 +335,7 @@ class LigneTel { } else { - dolibarr_syslog("LigneTel::DefineClientOption Error"); + dol_syslog("LigneTel::DefineClientOption Error"); } } /* @@ -564,9 +564,9 @@ class LigneTel { if (!$this->db->query($sql)) { - dolibarr_syslog("LigneTel::set_statut Error -5"); - dolibarr_syslog($this->db->error()); - dolibarr_syslog($sql); + dol_syslog("LigneTel::set_statut Error -5"); + dol_syslog($this->db->error()); + dol_syslog($sql); } /* * Mise � jour des logs @@ -594,9 +594,9 @@ class LigneTel { if (!$this->db->query($sql)) { - dolibarr_syslog("LigneTel::set_statut Error -6"); - dolibarr_syslog($this->db->error()); - dolibarr_syslog($sql); + dol_syslog("LigneTel::set_statut Error -6"); + dol_syslog($this->db->error()); + dol_syslog($sql); } } @@ -760,7 +760,7 @@ class LigneTel { if (!$this->db->query($sql)) { - dolibarr_syslog("LigneTel::Delete Error -5"); + dol_syslog("LigneTel::Delete Error -5"); $error++; } @@ -769,7 +769,7 @@ class LigneTel { if (!$this->db->query($sql)) { - dolibarr_syslog("LigneTel::Delete Error -4"); + dol_syslog("LigneTel::Delete Error -4"); $error++; } @@ -778,7 +778,7 @@ class LigneTel { if (!$this->db->query($sql)) { - dolibarr_syslog("LigneTel::Delete Error -3"); + dol_syslog("LigneTel::Delete Error -3"); $error++; } @@ -787,7 +787,7 @@ class LigneTel { if (!$this->db->query($sql)) { - dolibarr_syslog("LigneTel::Delete Error -2"); + dol_syslog("LigneTel::Delete Error -2"); $error++; } @@ -924,7 +924,7 @@ class LigneTel { } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); $this->error=$this->db->error(); return -1; } diff --git a/htdocs/telephonie/pdf/pdfdetail_nodet.modules.php b/htdocs/telephonie/pdf/pdfdetail_nodet.modules.php index 3afbc6b6365f72b46b9c31b23038f20085da6b48..52caafa9e0b90627970f3c278a640fb0da258966 100644 --- a/htdocs/telephonie/pdf/pdfdetail_nodet.modules.php +++ b/htdocs/telephonie/pdf/pdfdetail_nodet.modules.php @@ -243,8 +243,8 @@ class pdfdetail_nodet { } else { - dolibarr_syslog("Erreur SQl"); - dolibarr_syslog($this->db->error()); + dol_syslog("Erreur SQl"); + dol_syslog($this->db->error()); } $h = floor($total_duree / 3600); @@ -413,7 +413,7 @@ class pdfdetail_nodet { { $pdf->Close(); $pdf->Output($file); - dolibarr_syslog("Write $file"); + dol_syslog("Write $file"); } $this->filename = $file; diff --git a/htdocs/telephonie/pdf/pdfdetail_papier.modules.php b/htdocs/telephonie/pdf/pdfdetail_papier.modules.php index a2dc82f8abb9bc6aa8c87806fbd382fecff0578f..d16c067e66fd90760e726636b528cd3ac1989578 100644 --- a/htdocs/telephonie/pdf/pdfdetail_papier.modules.php +++ b/htdocs/telephonie/pdf/pdfdetail_papier.modules.php @@ -266,7 +266,7 @@ class pdfdetail_papier { } else { - dolibarr_syslog("Erreur lecture des communications"); + dol_syslog("Erreur lecture des communications"); } /* diff --git a/htdocs/telephonie/pdf/pdfdetail_papier1.modules.php b/htdocs/telephonie/pdf/pdfdetail_papier1.modules.php index c1e5d5cf7b1c1eaedc64a518549d87b3ec5673fb..cd817d5d5ad66670bc5f0f0a8c1a32f3adb00c5e 100644 --- a/htdocs/telephonie/pdf/pdfdetail_papier1.modules.php +++ b/htdocs/telephonie/pdf/pdfdetail_papier1.modules.php @@ -233,7 +233,7 @@ class pdfdetail_papier { } else { - dolibarr_syslog("Erreur lecture des communications"); + dol_syslog("Erreur lecture des communications"); } /* diff --git a/htdocs/telephonie/pdf/pdfdetail_standard.modules.php b/htdocs/telephonie/pdf/pdfdetail_standard.modules.php index 466c282c12ed948af8d7ae029e2620e0033bcfb0..964d06fc83a1c11a98cbcb61f87d677449df0fbe 100644 --- a/htdocs/telephonie/pdf/pdfdetail_standard.modules.php +++ b/htdocs/telephonie/pdf/pdfdetail_standard.modules.php @@ -223,8 +223,8 @@ class pdfdetail_standard { } else { - dolibarr_syslog("Erreur SQl"); - dolibarr_syslog($this->db->error()); + dol_syslog("Erreur SQl"); + dol_syslog($this->db->error()); } /* * Appels les plus important @@ -459,7 +459,7 @@ class pdfdetail_standard { } else { - dolibarr_syslog("Erreur lecture des communications"); + dol_syslog("Erreur lecture des communications"); } /* @@ -471,7 +471,7 @@ class pdfdetail_standard { $this->filename = $file; - dolibarr_syslog("Write $file"); + dol_syslog("Write $file"); if(file_exists($file_graph)) { diff --git a/htdocs/telephonie/pdf/xlsdetail_nodet.modules.php b/htdocs/telephonie/pdf/xlsdetail_nodet.modules.php index bd22cf7ab99625c9e719f4e042ed1a196d62766a..40d2028cd738f81d8183ec0e422f568ac5327ebe 100644 --- a/htdocs/telephonie/pdf/xlsdetail_nodet.modules.php +++ b/htdocs/telephonie/pdf/xlsdetail_nodet.modules.php @@ -38,7 +38,7 @@ class xlsdetail_nodet { $dir = FAC_OUTPUTDIR . "/" . $fac->ref . "/" ; $fname = $dir . $fac->ref . "-".$ligne->numero."-".$ligne->code_analytique."-detail.xls"; - //dolibarr_syslog("Open file : $fname"); + //dol_syslog("Open file : $fname"); $workbook = &new writeexcel_workbook($fname); @@ -83,7 +83,7 @@ class xlsdetail_nodet { $i = 0; $numsql = $this->db->num_rows($resql); - //dolibarr_syslog($this->ligne->numero . " : ".$numsql); + //dol_syslog($this->ligne->numero . " : ".$numsql); while ($i < $numsql) { @@ -104,11 +104,11 @@ class xlsdetail_nodet { } else { - dolibarr_syslog($this->db->error()); + dol_syslog($this->db->error()); } $workbook->close(); - //dolibarr_syslog("Close $fname"); + //dol_syslog("Close $fname"); return $error; } diff --git a/htdocs/telephonie/script/analyse-traffic.php b/htdocs/telephonie/script/analyse-traffic.php index f4bb02387d9d89636dbb069a31cdfa4658fe5287..d4df5080dbbfc6343e5caff7fd9bc187e6ed6afa 100644 --- a/htdocs/telephonie/script/analyse-traffic.php +++ b/htdocs/telephonie/script/analyse-traffic.php @@ -69,7 +69,7 @@ if ($resql) } $db->free($resql); } -dolibarr_syslog(sizeof($lignes)." lignes actives"); +dol_syslog(sizeof($lignes)." lignes actives"); /* * Lecture des comms * @@ -90,7 +90,7 @@ if ($resql) } $db->free($resql); } -dolibarr_syslog(sizeof($lignes_traffic)." lignes avec traffic"); +dol_syslog(sizeof($lignes_traffic)." lignes avec traffic"); /* * Croisement des donn�es diff --git a/htdocs/telephonie/script/api/presel-activation-manuelle.php b/htdocs/telephonie/script/api/presel-activation-manuelle.php index d746f46ec725814eac129068d0af7d863a3ec6a4..0e574526ea14b778e887eb17195271d1fb85c07e 100644 --- a/htdocs/telephonie/script/api/presel-activation-manuelle.php +++ b/htdocs/telephonie/script/api/presel-activation-manuelle.php @@ -86,7 +86,7 @@ function ActivationPreselection($host, $user_login, $user_passwd, $ligne, $id_pe $fp = fsockopen($host, 80, $errno, $errstr, 30); if (!$fp) { - dolibarr_syslog("$errstr ($errno)"); + dol_syslog("$errstr ($errno)"); } else { @@ -97,7 +97,7 @@ function ActivationPreselection($host, $user_login, $user_passwd, $ligne, $id_pe fwrite($fp, $out); if ($verbose > 2) - dolibarr_syslog("Data sent, waiting for response"); + dol_syslog("Data sent, waiting for response"); $parse = 0; $result = "error"; @@ -109,7 +109,7 @@ function ActivationPreselection($host, $user_login, $user_passwd, $ligne, $id_pe $line = fgets($fp, 1024); if ($verbose > 2) - dolibarr_syslog($line); + dol_syslog($line); if ($parse == 1) { @@ -132,12 +132,12 @@ function ActivationPreselection($host, $user_login, $user_passwd, $ligne, $id_pe if (substr($result,0,2) == "OK") { - dolibarr_syslog("Activation r贳sie ligne ".$ligne." id client ".$id_person." $result\n"); + dol_syslog("Activation r贳sie ligne ".$ligne." id client ".$id_person." $result\n"); return 0; } else { - dolibarr_syslog("Activation 袨ou裠ligne ".$ligne." id client ".$id_person." $result\n"); + dol_syslog("Activation 袨ou裠ligne ".$ligne." id client ".$id_person." $result\n"); return -1; } diff --git a/htdocs/telephonie/script/api/presel-resiliation-manuelle.php b/htdocs/telephonie/script/api/presel-resiliation-manuelle.php index 996ca694a685d404e362105213ebc5f066c852a9..81273abea3719765d04c48a89056a1b7d810d742 100644 --- a/htdocs/telephonie/script/api/presel-resiliation-manuelle.php +++ b/htdocs/telephonie/script/api/presel-resiliation-manuelle.php @@ -86,7 +86,7 @@ function ActivationPreselection($host, $user_login, $user_passwd, $ligne, $id_pe $fp = fsockopen($host, 80, $errno, $errstr, 30); if (!$fp) { - dolibarr_syslog("$errstr ($errno)"); + dol_syslog("$errstr ($errno)"); } else { @@ -97,7 +97,7 @@ function ActivationPreselection($host, $user_login, $user_passwd, $ligne, $id_pe fwrite($fp, $out); if ($verbose > 2) - dolibarr_syslog("Data sent, waiting for response"); + dol_syslog("Data sent, waiting for response"); $parse = 0; $result = "error"; @@ -109,7 +109,7 @@ function ActivationPreselection($host, $user_login, $user_passwd, $ligne, $id_pe $line = fgets($fp, 1024); if ($verbose > 2) - dolibarr_syslog($line); + dol_syslog($line); if ($parse == 1) { @@ -132,12 +132,12 @@ function ActivationPreselection($host, $user_login, $user_passwd, $ligne, $id_pe if (substr($result,0,2) == "OK") { - dolibarr_syslog("Resiliation r贳sie ligne ".$ligne." id client ".$id_person." $result\n"); + dol_syslog("Resiliation r贳sie ligne ".$ligne." id client ".$id_person." $result\n"); return 0; } else { - dolibarr_syslog("Resiliation 袨ou裠ligne ".$ligne." id client ".$id_person." $result\n"); + dol_syslog("Resiliation 袨ou裠ligne ".$ligne." id client ".$id_person." $result\n"); return -1; } diff --git a/htdocs/telephonie/script/api/presel-resiliation.php b/htdocs/telephonie/script/api/presel-resiliation.php index 6ace132c09fb310b40a9aa047b20e952feb68120..e807e4f9f64e2e8058e6e46d6ff78c4a19cdec75 100644 --- a/htdocs/telephonie/script/api/presel-resiliation.php +++ b/htdocs/telephonie/script/api/presel-resiliation.php @@ -95,7 +95,7 @@ if ($resql) function ResiliationPreselection($host, $user_login, $user_passwd, $ligne, $id_person) { global $verbose; - //dolibarr_syslog("Appel de DeletePreselection($host, $user_login, ****, $ligne, $id_person)"); + //dol_syslog("Appel de DeletePreselection($host, $user_login, ****, $ligne, $id_person)"); $url = "/AzurApp_websvc_b3gdb/account.asmx/UpdatePreselection?"; @@ -106,20 +106,20 @@ function ResiliationPreselection($host, $user_login, $user_passwd, $ligne, $id_p $url .= "&okPreselection=false"; if ($verbose > 2) - dolibarr_syslog("$host"); + dol_syslog("$host"); if ($verbose > 2) - dolibarr_syslog("$url"); + dol_syslog("$url"); $fp = fsockopen($host, 80, $errno, $errstr, 30); if (!$fp) { - dolibarr_syslog("$errstr ($errno)"); + dol_syslog("$errstr ($errno)"); } else { if ($verbose > 2) - dolibarr_syslog("Socket Opened send data"); + dol_syslog("Socket Opened send data"); $out = "GET $url HTTP/1.1\r\n"; $out .= "Host: $host\r\n"; @@ -128,7 +128,7 @@ function ResiliationPreselection($host, $user_login, $user_passwd, $ligne, $id_p fwrite($fp, $out); if ($verbose > 2) - dolibarr_syslog("Data sent, waiting for response"); + dol_syslog("Data sent, waiting for response"); $parse = 0; $result = "error"; @@ -140,14 +140,14 @@ function ResiliationPreselection($host, $user_login, $user_passwd, $ligne, $id_p $line = fgets($fp, 1024); if ($verbose > 2) - dolibarr_syslog($line); + dol_syslog($line); if ($parse == 1) { preg_match('/^<string xmlns=".*">(.*)<\/string>$/', $line, $results); $result = $results[1]; - //dolibarr_syslog($line); + //dol_syslog($line); $parse = 0; } @@ -163,16 +163,16 @@ function ResiliationPreselection($host, $user_login, $user_passwd, $ligne, $id_p } if ($verbose > 1) - dolibarr_syslog("result = ".$result); + dol_syslog("result = ".$result); if (substr($result,0,2) == "OK") { - dolibarr_syslog("Resiliation r贳sie ligne ".$ligne." id client ".$id_person." $result\n"); + dol_syslog("Resiliation r贳sie ligne ".$ligne." id client ".$id_person." $result\n"); return 0; } else { - dolibarr_syslog("Resiliation 袨ou裠ligne ".$ligne." id client ".$id_person." $result\n"); + dol_syslog("Resiliation 袨ou裠ligne ".$ligne." id client ".$id_person." $result\n"); $fp = fopen("/tmp/$ligne.delete","w"); if ($fp) diff --git a/htdocs/telephonie/script/bascule.php b/htdocs/telephonie/script/bascule.php index 9ae759ead575935999c13c9820da1ac8fcf634fd..3da65d45609f2c87427c485376cf7e0afab6c849 100644 --- a/htdocs/telephonie/script/bascule.php +++ b/htdocs/telephonie/script/bascule.php @@ -92,7 +92,7 @@ if ( $resql ) else { $error = 1; - dolibarr_syslog("Verification Erreur ".$error); + dol_syslog("Verification Erreur ".$error); } print "lignes : $lignes\n"; diff --git a/htdocs/telephonie/script/commande_presel.php b/htdocs/telephonie/script/commande_presel.php index 2958910151b19e0e793675e125c6d896554c2757..36a0698be341fa2b4bdb33d4fe8aac61c44245d5 100644 --- a/htdocs/telephonie/script/commande_presel.php +++ b/htdocs/telephonie/script/commande_presel.php @@ -163,20 +163,20 @@ function CreatePreselection($host, $user_login, $user_passwd, $lint, $id_person) } if ($verbose > 2) - dolibarr_syslog("$host"); + dol_syslog("$host"); if ($verbose > 2) - dolibarr_syslog("$url"); + dol_syslog("$url"); $fp = fsockopen($host, 80, $errno, $errstr, 30); if (!$fp) { - dolibarr_syslog("$errstr ($errno)"); + dol_syslog("$errstr ($errno)"); } else { if ($verbose > 2) - dolibarr_syslog("Socket Opened send data"); + dol_syslog("Socket Opened send data"); $out = "GET $url HTTP/1.1\r\n"; $out .= "Host: $host\r\n"; @@ -185,7 +185,7 @@ function CreatePreselection($host, $user_login, $user_passwd, $lint, $id_person) fwrite($fp, $out); if ($verbose > 2) - dolibarr_syslog("Data sent, waiting for response"); + dol_syslog("Data sent, waiting for response"); $parse = 0; $result = "error"; @@ -197,14 +197,14 @@ function CreatePreselection($host, $user_login, $user_passwd, $lint, $id_person) $line = fgets($fp, 1024); if ($verbose > 2) - dolibarr_syslog($line); + dol_syslog($line); if ($parse == 1) { preg_match('/^<string xmlns=".*">(.*)<\/string>$/', $line, $results); $result = $results[1]; - //dolibarr_syslog($line); + //dol_syslog($line); $parse = 0; } @@ -220,18 +220,18 @@ function CreatePreselection($host, $user_login, $user_passwd, $lint, $id_person) } if ($verbose > 1) - dolibarr_syslog("result = ".$result); + dol_syslog("result = ".$result); if (substr($result,0,2) == "OK") { if ($verbose > 1) - dolibarr_syslog("Presel OK ".$lint->numero." ".$lint->support." id client ".$id_person." $result\n"); + dol_syslog("Presel OK ".$lint->numero." ".$lint->support." id client ".$id_person." $result\n"); return 0; } else { if ($verbose > 1) - dolibarr_syslog("Presel ERR ".$lint->numero." ".$lint->support." id client ".$id_person." $result\n"); + dol_syslog("Presel ERR ".$lint->numero." ".$lint->support." id client ".$id_person." $result\n"); $fp = fopen("/tmp/".$lint->numero.".presel","w"); if ($fp) @@ -246,7 +246,7 @@ function CreatePreselection($host, $user_login, $user_passwd, $lint, $id_person) function GetNumAbonne($db, $socid, $fournid) { - //dolibarr_syslog("Appel de GetNumAbonne($socid, $fournid)"); + //dol_syslog("Appel de GetNumAbonne($socid, $fournid)"); $sql = "SELECT fourn_id"; $sql .= " FROM ".MAIN_DB_PREFIX."telephonie_societe_fournid"; @@ -269,7 +269,7 @@ function GetNumAbonne($db, $socid, $fournid) } else { - dolibarr_syslog("Erreur dans GetNumAbonne($socid, $fournid)"); + dol_syslog("Erreur dans GetNumAbonne($socid, $fournid)"); return -1; } } @@ -288,7 +288,7 @@ function SetNumAbonne($db, $socid, $soc_fourn_id, $fournid) } else { - dolibarr_syslog("Erreur dans SetNumAbonne($socid, $soc_fourn_id, $fournid)"); + dol_syslog("Erreur dans SetNumAbonne($socid, $soc_fourn_id, $fournid)"); return -1; } } @@ -316,7 +316,7 @@ function CreateAbonne($host, $user_login, $user_passwd, $user_contract, $societe $fp = fsockopen($host, 80, $errno, $errstr, 30); if (!$fp) { - dolibarr_syslog("$errstr ($errno)"); + dol_syslog("$errstr ($errno)"); } else { @@ -341,7 +341,7 @@ function CreateAbonne($host, $user_login, $user_passwd, $user_contract, $societe $result = $results[1]; $client_id = $results[2]; if ($verbose > 1) - dolibarr_syslog($line); + dol_syslog($line); } if (substr($line,0,38) == '<?xml version="1.0" encoding="utf-8"?>') @@ -353,12 +353,12 @@ function CreateAbonne($host, $user_login, $user_passwd, $user_contract, $societe } if ($verbose > 1) - dolibarr_syslog("$result:$client_id"); + dol_syslog("$result:$client_id"); if ($result == "OK") { if ($verbose > 1) - dolibarr_syslog("Commande r贳sie id client ".$client_id); + dol_syslog("Commande r贳sie id client ".$client_id); return $client_id; } else diff --git a/htdocs/telephonie/script/commission.php b/htdocs/telephonie/script/commission.php index 4495f7dd72c07d9de3e5f8de96431e7e4b20ef1d..3ad1143d52e17c92cdb10268c6d12b7ab353924b 100644 --- a/htdocs/telephonie/script/commission.php +++ b/htdocs/telephonie/script/commission.php @@ -111,7 +111,7 @@ if ( $resql ) else { $error = 1; - dolibarr_syslog("Verification Erreur ".$error); + dol_syslog("Verification Erreur ".$error); } /******************************************************** @@ -120,7 +120,7 @@ else * * ********************************************************/ -dolibarr_syslog("Calcul avance"); +dol_syslog("Calcul avance"); $sql = "SELECT rowid, fk_distributeur, fk_contrat, datepo, montant"; $sql .= " , avance_pourcent, rem_pour_prev, rem_pour_autr, mode_paiement"; $sql .= " FROM ".MAIN_DB_PREFIX."telephonie_contrat_priseordre"; @@ -167,9 +167,9 @@ if ( $resql ) if (! $db->query($sqli)) { $error = 2; - dolibarr_syslog("Calcul avance Erreur "); - dolibarr_syslog($db->error()); - dolibarr_syslog("$sqli"); + dol_syslog("Calcul avance Erreur "); + dol_syslog($db->error()); + dol_syslog("$sqli"); } $i++; @@ -179,7 +179,7 @@ if ( $resql ) else { $error = 3; - dolibarr_syslog("Erreur ".$db->error()); + dol_syslog("Erreur ".$db->error()); } @@ -255,12 +255,12 @@ if ( $resql ) if (! $db->query($sqli)) { $error = 4; - dolibarr_syslog("Calcul conso Erreur"); - dolibarr_syslog($db->error()); - dolibarr_syslog("$sqli"); + dol_syslog("Calcul conso Erreur"); + dol_syslog($db->error()); + dol_syslog("$sqli"); } - //dolibarr_syslog("Conso po : ".$obj->rowid . " ".$comm); + //dol_syslog("Conso po : ".$obj->rowid . " ".$comm); $i++; } @@ -269,7 +269,7 @@ if ( $resql ) else { $error = 5; - dolibarr_syslog("Erreur ".$db->error()); + dol_syslog("Erreur ".$db->error()); } /******************************************************** @@ -305,7 +305,7 @@ if ( $resql ) else { $error = 6; - dolibarr_syslog("Erreur regul avances ".$error); + dol_syslog("Erreur regul avances ".$error); } $avan_regul = array(); @@ -331,7 +331,7 @@ foreach ($distri_av as $distributeur_id) while ($ia < $numa) { $rowa = $db->fetch_row($resqla); - dolibarr_syslog("* Regul des avances de la po " .$rowa[0] . " ".strftime("%Y%m",$rowa[1])); + dol_syslog("* Regul des avances de la po " .$rowa[0] . " ".strftime("%Y%m",$rowa[1])); $ia++; /* Calcul des sommes avanc�es */ @@ -347,7 +347,7 @@ foreach ($distri_av as $distributeur_id) if ( $resql ) { $num = $db->num_rows($resql); - dolibarr_syslog("* Regul des avances de la po ".$rowa[0]." ".strftime("%Y%m",$rowa[1]).", $num avances"); + dol_syslog("* Regul des avances de la po ".$rowa[0]." ".strftime("%Y%m",$rowa[1]).", $num avances"); $i = 0; while ($i < $num) { @@ -369,18 +369,18 @@ foreach ($distri_av as $distributeur_id) if (!$resqlir) { $error = 32; - dolibarr_syslog("Erreur insertion regul avances (error $error)"); - dolibarr_syslog($sqlir); + dol_syslog("Erreur insertion regul avances (error $error)"); + dol_syslog($sqlir); } - dolibarr_syslog("* Avance ".$row[0] . " statut : ".$row[2]); + dol_syslog("* Avance ".$row[0] . " statut : ".$row[2]); /* Communications relatives */ $datup = $year_prev.$month_prev; $datdo = strftime("%Y%m",$rowa[1]); if ($row[2] <> 6) { - dolibarr_syslog("* Communications <= $datup >= $datdo "); + dol_syslog("* Communications <= $datup >= $datdo "); $sqlc = "SELECT sum(montant)"; $sqlc .= " FROM ".MAIN_DB_PREFIX."telephonie_commission_conso"; $sqlc .= " WHERE fk_contrat = ". $row[1]; @@ -393,7 +393,7 @@ foreach ($distri_av as $distributeur_id) while ($rowc = $db->fetch_row($resqlc)) { $comm_regul[$distributeur_id] = $comm_regul[$distributeur_id] + $rowc[0]; - dolibarr_syslog("* Conso g�n�r�e ".$rowc[0]); + dol_syslog("* Conso g�n�r�e ".$rowc[0]); $sqlir = "INSERT INTO ".MAIN_DB_PREFIX."telephonie_commission_regul"; $sqlir .= " (date, fk_distributeur, fk_contrat, montant, type)"; @@ -405,8 +405,8 @@ foreach ($distri_av as $distributeur_id) if (!$resqlir) { $error = 31; - dolibarr_syslog("Erreur insertion regul avances conso (error $error)"); - dolibarr_syslog($sqlir); + dol_syslog("Erreur insertion regul avances conso (error $error)"); + dol_syslog($sqlir); } } $db->free($resqlc); @@ -414,7 +414,7 @@ foreach ($distri_av as $distributeur_id) else { $error = 10; - dolibarr_syslog("Erreur regul avances conso ".$error); + dol_syslog("Erreur regul avances conso ".$error); } } else @@ -436,7 +436,7 @@ foreach ($distri_av as $distributeur_id) if (! $resqlc ) { $error = 11; - dolibarr_syslog("Erreur regul avances conso ".$error); + dol_syslog("Erreur regul avances conso ".$error); } } @@ -447,15 +447,15 @@ foreach ($distri_av as $distributeur_id) else { $error = 12; - dolibarr_syslog("Erreur regul avances ".$db->error()); + dol_syslog("Erreur regul avances ".$db->error()); } } } else { $error = 13; - dolibarr_syslog("Erreur regul avances aaaa".$db->error()); - dolibarr_syslog($sqla); + dol_syslog("Erreur regul avances aaaa".$db->error()); + dol_syslog($sqla); } } @@ -484,7 +484,7 @@ if ( $resql ) else { $error = 14; - dolibarr_syslog("Erreur calcul des commission sur conso ".$error); + dol_syslog("Erreur calcul des commission sur conso ".$error); } $comm_conso = array(); @@ -508,14 +508,14 @@ foreach ($distri_co as $distributeur_id) while ($ia < $numa) { $rowa = $db->fetch_row($resqla); - dolibarr_syslog("** Calcul des consos po " .$rowa[0] . " ".strftime("%Y%m",$rowa[1])); + dol_syslog("** Calcul des consos po " .$rowa[0] . " ".strftime("%Y%m",$rowa[1])); $ia++; /* Communications relatives */ $datup = $year_prev.$month_prev; - dolibarr_syslog("** Communications $datup"); + dol_syslog("** Communications $datup"); $sqlc = "SELECT sum(montant)"; $sqlc .= " FROM ".MAIN_DB_PREFIX."telephonie_commission_conso"; @@ -529,27 +529,27 @@ foreach ($distri_co as $distributeur_id) if ( $rowc = $db->fetch_row($resqlc) ) { $comm_conso[$distributeur_id] = $comm_conso[$distributeur_id] + $rowc[0]; - dolibarr_syslog("** Conso g�n�r�e ".$rowc[0]); + dol_syslog("** Conso g�n�r�e ".$rowc[0]); } else { $error = 151; - dolibarr_syslog("Erreur regul conso"); + dol_syslog("Erreur regul conso"); } $db->free($resqlc); } else { $error = 15; - dolibarr_syslog("Erreur regul conso"); + dol_syslog("Erreur regul conso"); } } } else { $error = 16; - dolibarr_syslog("Erreur regul conso".$db->error()); - dolibarr_syslog($sqla); + dol_syslog("Erreur regul conso".$db->error()); + dol_syslog($sqla); } } @@ -564,7 +564,7 @@ foreach ($distributeurs as $distributeur_id) $distributeur = new DistributeurTelephonie($db); $distributeur->fetch($distributeur_id); - dolibarr_syslog($distributeur->nom . " : ".$month_prev."-".$year_prev); + dol_syslog($distributeur->nom . " : ".$month_prev."-".$year_prev); $amount = 0; @@ -616,10 +616,10 @@ foreach ($distributeurs as $distributeur_id) if (! $db->query($sqli)) { $error = 17; - dolibarr_syslog("Erreur insertion Commission finale"); + dol_syslog("Erreur insertion Commission finale"); } - dolibarr_syslog("Commission finale ".$amount); + dol_syslog("Commission finale ".$amount); fputs($fp, "DIS : ".$distributeur_id); fputs($fp, " Comm final : ".substr($space.$amount,-15)."\n"); @@ -627,27 +627,27 @@ foreach ($distributeurs as $distributeur_id) else { $error = 18; - dolibarr_syslog("Erreur lecture avances"); + dol_syslog("Erreur lecture avances"); } $db->free($resql); } else { $error = 19; - dolibarr_syslog("Erreur ".$error); + dol_syslog("Erreur ".$error); } } if ($error == 0) { $db->commit(); - dolibarr_syslog("Commit"); + dol_syslog("Commit"); } else { $db->rollback(); - dolibarr_syslog("Rollback", LOG_ERR); + dol_syslog("Rollback", LOG_ERR); } -dolibarr_syslog("----------------"); +dol_syslog("----------------"); fclose($fp); ?> diff --git a/htdocs/telephonie/script/cron/presel-resiliation.php b/htdocs/telephonie/script/cron/presel-resiliation.php index b2ba8b3a4b68cae64ee215f1cb1b8503a94a0d2a..a28a78ab6b126d34de768791775d9d41119706ba 100644 --- a/htdocs/telephonie/script/cron/presel-resiliation.php +++ b/htdocs/telephonie/script/cron/presel-resiliation.php @@ -95,7 +95,7 @@ if ($resql) function ResiliationPreselection($db, $user, $host, $user_login, $user_passwd, $ligne_num, $id_person, $verbose) { if ($verbose) - dolibarr_syslog("Appel de DeletePreselection($host, $user_login, ****, $ligne_num, $id_person)"); + dol_syslog("Appel de DeletePreselection($host, $user_login, ****, $ligne_num, $id_person)"); $url = "/AzurApp_websvc_b3gdb/account.asmx/UpdatePreselection?"; @@ -106,20 +106,20 @@ function ResiliationPreselection($db, $user, $host, $user_login, $user_passwd, $ $url .= "&okPreselection=false"; if ($verbose > 2) - dolibarr_syslog("$host"); + dol_syslog("$host"); if ($verbose > 2) - dolibarr_syslog("$url"); + dol_syslog("$url"); $fp = fsockopen($host, 80, $errno, $errstr, 30); if (!$fp) { - dolibarr_syslog("$errstr ($errno)"); + dol_syslog("$errstr ($errno)"); } else { if ($verbose > 2) - dolibarr_syslog("Socket Opened send data"); + dol_syslog("Socket Opened send data"); $out = "GET $url HTTP/1.1\r\n"; $out .= "Host: $host\r\n"; @@ -128,7 +128,7 @@ function ResiliationPreselection($db, $user, $host, $user_login, $user_passwd, $ fwrite($fp, $out); if ($verbose > 2) - dolibarr_syslog("Data sent, waiting for response"); + dol_syslog("Data sent, waiting for response"); $parse = 0; $result = "error"; @@ -140,14 +140,14 @@ function ResiliationPreselection($db, $user, $host, $user_login, $user_passwd, $ $line = fgets($fp, 1024); if ($verbose > 2) - dolibarr_syslog($line); + dol_syslog($line); if ($parse == 1) { preg_match('/^<string xmlns=".*">(.*)<\/string>$/', $line, $results); $result = $results[1]; - //dolibarr_syslog($line); + //dol_syslog($line); $parse = 0; } @@ -163,12 +163,12 @@ function ResiliationPreselection($db, $user, $host, $user_login, $user_passwd, $ } if ($verbose > 1) - dolibarr_syslog("result = ".$result); + dol_syslog("result = ".$result); if (substr($result,0,2) == "OK") { if ($verbose) - dolibarr_syslog("Resiliation r贳sie ligne ".$ligne_num." id client ".$id_person." $result\n"); + dol_syslog("Resiliation r贳sie ligne ".$ligne_num." id client ".$id_person." $result\n"); $ligne = new LigneTel($db); $ligne->fetch($ligne_num); @@ -178,7 +178,7 @@ function ResiliationPreselection($db, $user, $host, $user_login, $user_passwd, $ } else { - dolibarr_syslog("Resiliation 袨ou裠ligne ".$ligne_num." id client ".$id_person." $result\n"); + dol_syslog("Resiliation 袨ou裠ligne ".$ligne_num." id client ".$id_person." $result\n"); $fp = fopen("/tmp/$ligne.delete","w"); if ($fp) diff --git a/htdocs/telephonie/script/delete_presel.php b/htdocs/telephonie/script/delete_presel.php index 709d2ebd8b01c6fd7d85b4207fca442c7bbd7928..493053df0675bcdd3d213a210ed8518aec8aac6b 100644 --- a/htdocs/telephonie/script/delete_presel.php +++ b/htdocs/telephonie/script/delete_presel.php @@ -95,7 +95,7 @@ if ($resql) function DeletePreselection($host, $user_login, $user_passwd, $ligne, $id_person) { global $verbose; - //dolibarr_syslog("Appel de DeletePreselection($host, $user_login, ****, $ligne, $id_person)"); + //dol_syslog("Appel de DeletePreselection($host, $user_login, ****, $ligne, $id_person)"); $url = "/AzurApp_websvc_b3gdb/account.asmx/DeletePreselection?"; @@ -104,20 +104,20 @@ function DeletePreselection($host, $user_login, $user_passwd, $ligne, $id_person $url .= "&telnum=".$ligne; if ($verbose > 2) - dolibarr_syslog("$host"); + dol_syslog("$host"); if ($verbose > 2) - dolibarr_syslog("$url"); + dol_syslog("$url"); $fp = fsockopen($host, 80, $errno, $errstr, 30); if (!$fp) { - dolibarr_syslog("$errstr ($errno)"); + dol_syslog("$errstr ($errno)"); } else { if ($verbose > 2) - dolibarr_syslog("Socket Opened send data"); + dol_syslog("Socket Opened send data"); $out = "GET $url HTTP/1.1\r\n"; $out .= "Host: $host\r\n"; @@ -126,7 +126,7 @@ function DeletePreselection($host, $user_login, $user_passwd, $ligne, $id_person fwrite($fp, $out); if ($verbose > 2) - dolibarr_syslog("Data sent, waiting for response"); + dol_syslog("Data sent, waiting for response"); $parse = 0; $result = "error"; @@ -138,14 +138,14 @@ function DeletePreselection($host, $user_login, $user_passwd, $ligne, $id_person $line = fgets($fp, 1024); if ($verbose > 2) - dolibarr_syslog($line); + dol_syslog($line); if ($parse == 1) { preg_match('/^<string xmlns=".*">(.*)<\/string>$/', $line, $results); $result = $results[1]; - //dolibarr_syslog($line); + //dol_syslog($line); $parse = 0; } @@ -161,16 +161,16 @@ function DeletePreselection($host, $user_login, $user_passwd, $ligne, $id_person } if ($verbose > 1) - dolibarr_syslog("result = ".$result); + dol_syslog("result = ".$result); if (substr($result,0,2) == "OK") { - dolibarr_syslog("Delete r贳si ligne ".$ligne." id client ".$id_person." $result\n"); + dol_syslog("Delete r贳si ligne ".$ligne." id client ".$id_person." $result\n"); return 0; } else { - dolibarr_syslog("Delete 袨ou矬igne ".$ligne." id client ".$id_person." $result\n"); + dol_syslog("Delete 袨ou矬igne ".$ligne." id client ".$id_person." $result\n"); $fp = fopen("/tmp/$ligne.delete","w"); if ($fp) diff --git a/htdocs/telephonie/script/envoi-emails-speciaux.php b/htdocs/telephonie/script/envoi-emails-speciaux.php index 1bbd13b3d61cd838219ac377fa4cd45ab038e9c2..f2414ed23702e567a0723c70fd171f80a9413def 100644 --- a/htdocs/telephonie/script/envoi-emails-speciaux.php +++ b/htdocs/telephonie/script/envoi-emails-speciaux.php @@ -38,7 +38,7 @@ require_once (DOL_DOCUMENT_ROOT."/contrat/contrat.class.php"); require_once (DOL_DOCUMENT_ROOT."/telephonie/pdfdetail_ibreizh.modules.php"); require_once (DOL_DOCUMENT_ROOT."/telephonie/dolibarrmail.class.php"); -dolibarr_syslog("Debut envoie de mail"); +dol_syslog("Debut envoie de mail"); $clientid = 52; $contactid = 151; @@ -62,7 +62,7 @@ $resql = $db->query($sql); if ($resql) { $row = $db->fetch_row($resql); - dolibarr_syslog($row[0]); + dol_syslog($row[0]); array_push($emails, $row[0]); @@ -94,7 +94,7 @@ if ($resql) { $num = $db->num_rows($resql); $i = 0; - dolibarr_syslog($num . " Factures"); + dol_syslog($num . " Factures"); while ($i < $num) { @@ -133,7 +133,7 @@ if ($resql) { $num = $db->num_rows($resql); $i = 0; - dolibarr_syslog($num . " Factures"); + dol_syslog($num . " Factures"); while ($i < $num) { @@ -160,8 +160,8 @@ if (sizeof($factures_a_mailer) > 0) { $fact = new Facture($db); - dolibarr_syslog("Facture ".$factures_a_mailer[$i]); - dolibarr_syslog("ligne ".$factures_lignes[$factures_a_mailer[$i]]); + dol_syslog("Facture ".$factures_a_mailer[$i]); + dol_syslog("ligne ".$factures_lignes[$factures_a_mailer[$i]]); if ($fact->fetch($factures_a_mailer[$i]) == 1) { @@ -178,7 +178,7 @@ if (sizeof($factures_a_mailer) > 0) } $sendto = substr($sendto,0,strlen($sendto) - 1); - dolibarr_syslog("Envoi email � ".html_entity_decode($sendto) ); + dol_syslog("Envoi email � ".html_entity_decode($sendto) ); $subject = "Facture ibreizh "; @@ -273,7 +273,7 @@ if (sizeof($factures_a_mailer) > 0) else { print "Aucun email trouv�\n"; - dolibarr_syslog("import.php aucun email trouv�"); + dol_syslog("import.php aucun email trouv�"); } } } diff --git a/htdocs/telephonie/script/facturation-alerte.php b/htdocs/telephonie/script/facturation-alerte.php index 24aa43d97a1f9ed3c661a0d24b77fc9dee9dfef2..d787f7c79f6443af4833f0ebd0650f68f99d2734 100644 --- a/htdocs/telephonie/script/facturation-alerte.php +++ b/htdocs/telephonie/script/facturation-alerte.php @@ -70,7 +70,7 @@ if ( $resql ) else { $error = 1; - dolibarr_syslog("Erreur ".$error); + dol_syslog("Erreur ".$error); } /* @@ -85,7 +85,7 @@ $error = 0; $fname = $dir . "alertes-factures.xls"; -dolibarr_syslog("Open $fname"); +dol_syslog("Open $fname"); $workbook = &new writeexcel_workbook($fname); @@ -184,7 +184,7 @@ if (!$error) else { $error = 2; - dolibarr_syslog("Erreur $error ".$db->error()); + dol_syslog("Erreur $error ".$db->error()); } } /* @@ -306,7 +306,7 @@ if (!$error) else { $error = 2; - dolibarr_syslog("Erreur $error ".$db->error()); + dol_syslog("Erreur $error ".$db->error()); } } diff --git a/htdocs/telephonie/script/facturation-analyse.php b/htdocs/telephonie/script/facturation-analyse.php index 237f88ea1c4294deaee15867ac391b08f5fa21a5..22de45153bb01bd26f6a239b7175c125ae748f94 100644 --- a/htdocs/telephonie/script/facturation-analyse.php +++ b/htdocs/telephonie/script/facturation-analyse.php @@ -163,7 +163,7 @@ $dir = "/tmp/"; $fname = $dir . "facturation-analyse.xls"; if ($verbose > 0) - dolibarr_syslog("Open $fname"); + dol_syslog("Open $fname"); $workbook = &new writeexcel_workbook($fname); diff --git a/htdocs/telephonie/script/facturation-calcul.php b/htdocs/telephonie/script/facturation-calcul.php index 3f3dae3a80618fb8b5a0967c2ec2f5846fa3b4a9..61937f356a6b4f9ae054fd82669dea9634afafce 100644 --- a/htdocs/telephonie/script/facturation-calcul.php +++ b/htdocs/telephonie/script/facturation-calcul.php @@ -82,13 +82,13 @@ if ( $resql ) $num = $db->num_rows($resql); $row = $db->fetch_row($resql); - dolibarr_syslog("Communications � traiter ".$row[0]); + dol_syslog("Communications � traiter ".$row[0]); $db->free($resql); } else { $error = 1; - dolibarr_syslog("Erreur ".$error); + dol_syslog("Erreur ".$error); } /********************************************************** @@ -105,13 +105,13 @@ if ( $resql ) { $row = $db->fetch_row($resql); - dolibarr_syslog("Max rowid avant facture ".$row[0]); + dol_syslog("Max rowid avant facture ".$row[0]); $db->free($resql); } else { $error = 2; - dolibarr_syslog("Erreur ".$error); + dol_syslog("Erreur ".$error); } /** @@ -145,12 +145,12 @@ if (!$error) $i++; } $db->free(); - dolibarr_syslog(sizeof($lines_keys)." lignes trouv�es"); + dol_syslog(sizeof($lines_keys)." lignes trouv�es"); } else { $error = 3; - dolibarr_syslog("Erreur ".$error); + dol_syslog("Erreur ".$error); } } @@ -173,12 +173,12 @@ if (sizeof($lines_keys) > 0) { $batch_id = $db->last_insert_id(MAIN_DB_PREFIX."telephonie_facturation_batch"); - dolibarr_syslog("Batch ID ".$batch_id); + dol_syslog("Batch ID ".$batch_id); } else { $error = 20; - dolibarr_syslog("Erreur ".$error); + dol_syslog("Erreur ".$error); } } @@ -204,14 +204,14 @@ if (!$error) if ($ligne->socid == 0) { $error = 4; - dolibarr_syslog("Error ($error)"); + dol_syslog("Error ($error)"); } } else { $error = 5; - dolibarr_syslog("Error ($error): Aucune soci�t� rattach�e � la ligne : $line_key"); + dol_syslog("Error ($error): Aucune soci�t� rattach�e � la ligne : $line_key"); } @@ -229,7 +229,7 @@ if (!$error) else { $error = 6; - dolibarr_syslog("Error ($error)"); + dol_syslog("Error ($error)"); } } @@ -264,9 +264,9 @@ if (!$error) else { $error++; - dolibarr_syslog("Erreur d'insertion dans llx_telephonie_facture"); - dolibarr_syslog($db->error()); - dolibarr_syslog($sql); + dol_syslog("Erreur d'insertion dans llx_telephonie_facture"); + dol_syslog($db->error()); + dol_syslog($sql); } } /* @@ -283,7 +283,7 @@ if (!$error) if (calcul($db, $ligne, $facid, $total_achat, $total_vente, $total_fourn) <> 0) { $error++; - dolibarr_syslog("Erreur de calcul de la facture pour la ligne $line_key $ligne->numero"); + dol_syslog("Erreur de calcul de la facture pour la ligne $line_key $ligne->numero"); } } @@ -326,9 +326,9 @@ if (!$error) else { $error++; - dolibarr_syslog("Erreur de mise � jour dans llx_telephonie_facture"); - dolibarr_syslog($db->error()); - dolibarr_syslog($sql); + dol_syslog("Erreur de mise � jour dans llx_telephonie_facture"); + dol_syslog($db->error()); + dol_syslog($sql); } } @@ -345,7 +345,7 @@ if (!$error) if (! $db->query($sql)) { $error++; - dolibarr_syslog("Erreur de suppression dans llx_telephonie_import_cdr"); + dol_syslog("Erreur de suppression dans llx_telephonie_import_cdr"); } } @@ -358,17 +358,17 @@ if (!$error) { $db->query("COMMIT"); $nbcommit++; - dolibarr_syslog("Ligne $ligne->numero - COMMIT"); + dol_syslog("Ligne $ligne->numero - COMMIT"); } else { $db->query("ROLLBACK"); - dolibarr_syslog("Ligne $ligne->numero - ROLLBACK de la transaction"); + dol_syslog("Ligne $ligne->numero - ROLLBACK de la transaction"); } } else { - dolibarr_syslog("Erreur ouverture Transaction SQL"); + dol_syslog("Erreur ouverture Transaction SQL"); } } /* fin de la boucle */ @@ -391,7 +391,7 @@ if ( $resql ) { $row = $db->fetch_row($resql); - dolibarr_syslog("Max rowid apr�s facture ".$row[0]); + dol_syslog("Max rowid apr�s facture ".$row[0]); $db->free($resql); } else @@ -405,7 +405,7 @@ else * ***********************************************************/ -dolibarr_syslog($nbcommit." facture �mises"); +dol_syslog($nbcommit." facture �mises"); /********************************************************** * @@ -420,7 +420,7 @@ if ( $resql ) { $row = $db->fetch_row($resql); - dolibarr_syslog($row[0]. " communications restantes dans la table d'import"); + dol_syslog($row[0]. " communications restantes dans la table d'import"); $db->free($resql); } else @@ -431,7 +431,7 @@ else $db->close(); -dolibarr_syslog("Fin Batch ID ".$batch_id); +dol_syslog("Fin Batch ID ".$batch_id); // FIN @@ -479,7 +479,7 @@ function calcul($db, $ligne, $facture_id, &$total_cout_achat, &$total_cout_vente $db->free($resql); } - dolibarr_syslog("Utilisation du tarif ".$tarif_spec." pour la ligne ".$ligne->id); + dol_syslog("Utilisation du tarif ".$tarif_spec." pour la ligne ".$ligne->id); $tarif_achat = new TelephonieTarif($db, $tarif_spec, "achat", $fournisseur_id); $tarif_vente = new TelephonieTarif($db, $tarif_spec, "vente", $tarif_spec, $ligne->client_comm_id); @@ -527,7 +527,7 @@ function calcul($db, $ligne, $facture_id, &$total_cout_achat, &$total_cout_vente else { $error++; - dolibarr_syslog("Erreur dans Calcul() Probl�me SQL"); + dol_syslog("Erreur dans Calcul() Probl�me SQL"); } for ($ii = 0 ; $ii < $num_sql ; $ii++) diff --git a/htdocs/telephonie/script/facturation-correction-import.php b/htdocs/telephonie/script/facturation-correction-import.php index 0d32549cd5e18699191bc19bf1b5858acef272ca..71c0d559d22144c244641388a71cac0c98f6f05c 100644 --- a/htdocs/telephonie/script/facturation-correction-import.php +++ b/htdocs/telephonie/script/facturation-correction-import.php @@ -52,7 +52,7 @@ if ( $resql ) } else { - dolibarr_syslog("Erreur SQL"); + dol_syslog("Erreur SQL"); } ?> diff --git a/htdocs/telephonie/script/facturation-details-tableur.php b/htdocs/telephonie/script/facturation-details-tableur.php index 5ecf676cd8efd00201cb9668033ad94a4cae8db6..591ae7f290eb09ca9eab25d8470946fd7da574d2 100644 --- a/htdocs/telephonie/script/facturation-details-tableur.php +++ b/htdocs/telephonie/script/facturation-details-tableur.php @@ -72,7 +72,7 @@ for ($i = 1; $i < sizeof($GLOBALS["argv"]); $i++) } -dolibarr_syslog("Mois $month Ann�e $year"); +dol_syslog("Mois $month Ann�e $year"); /* * Lectures de diff�rentes lignes @@ -105,7 +105,7 @@ if (!$error) else { $error = 1; - dolibarr_syslog($db->error()); + dol_syslog($db->error()); } } @@ -123,7 +123,7 @@ if (!$error) if ($resg <> 0) { - dolibarr_syslog("ERREUR lors de G�n�ration du d�tail tableur two"); + dol_syslog("ERREUR lors de G�n�ration du d�tail tableur two"); $error = 19; } @@ -150,7 +150,7 @@ if (!$error) if ($resg <> 0) { - dolibarr_syslog("ERREUR lors de G�n�ration du d�tail tableur one"); + dol_syslog("ERREUR lors de G�n�ration du d�tail tableur one"); $error = 19; } @@ -161,12 +161,12 @@ if (!$error) else { $error = 1; - dolibarr_syslog($db->error()); + dol_syslog($db->error()); } } } $db->close(); -dolibarr_syslog("Conso m�moire ".memory_get_usage() ); +dol_syslog("Conso m�moire ".memory_get_usage() ); ?> diff --git a/htdocs/telephonie/script/facturation-details.php b/htdocs/telephonie/script/facturation-details.php index 43b816f518b916f6b7735a7bb387425859d93164..b7181d13d341d41d4894cf1260c9da65fb48bad3 100644 --- a/htdocs/telephonie/script/facturation-details.php +++ b/htdocs/telephonie/script/facturation-details.php @@ -59,7 +59,7 @@ else $error++; } -dolibarr_syslog("G�n�re les factures d�taill�es pour : ".$date); +dol_syslog("G�n�re les factures d�taill�es pour : ".$date); /* * Lectures de diff�rentes factures @@ -91,12 +91,12 @@ if (!$error) $i++; } $db->free($resql); - dolibarr_syslog("$i lignes trouv�es"); + dol_syslog("$i lignes trouv�es"); } else { $error = 1; - dolibarr_syslog($db->error()); + dol_syslog($db->error()); } } @@ -137,15 +137,15 @@ if (!$error && sizeof($factures)) } else { - dolibarr_syslog("ERREUR lors de G�n�ration du pdf d�taill�"); + dol_syslog("ERREUR lors de G�n�ration du pdf d�taill�"); $error = 19; } } } } - dolibarr_syslog(sizeof($factures)." factures trait�es"); - dolibarr_syslog($facok." factures g�n�r�es"); + dol_syslog(sizeof($factures)." factures trait�es"); + dol_syslog($facok." factures g�n�r�es"); } $db->close(); diff --git a/htdocs/telephonie/script/facturation-emission.php b/htdocs/telephonie/script/facturation-emission.php index b6ba051290a691db60ec141f71cdf66e7950ae63..8c238524db99a45ee955e96f27197e955cc5f292 100644 --- a/htdocs/telephonie/script/facturation-emission.php +++ b/htdocs/telephonie/script/facturation-emission.php @@ -91,13 +91,13 @@ if ( $resql ) $batch_id = $row[0]; - dolibarr_syslog("Traitement du batch ".$batch_id); + dol_syslog("Traitement du batch ".$batch_id); $db->free($resql); } else { $error = 1; - dolibarr_syslog("Erreur ".$error); + dol_syslog("Erreur ".$error); } /* @@ -114,7 +114,7 @@ if (!$error) * ***************************************************************/ - dolibarr_syslog("Lecture des contrats"); + dol_syslog("Lecture des contrats"); $sql = "SELECT distinct(c.rowid)"; $sql .= " FROM ".MAIN_DB_PREFIX."telephonie_facture as f"; @@ -130,7 +130,7 @@ if (!$error) if (strlen($optcontrat) > 0) { $sql .= " AND c.rowid=".$optcontrat; - dolibarr_syslog("Limite sur le contrat : ".$optcontrat); + dol_syslog("Limite sur le contrat : ".$optcontrat); } else { @@ -157,7 +157,7 @@ if (!$error) else { $error = 2; - dolibarr_syslog("Erreur $error"); + dol_syslog("Erreur $error"); } } /* @@ -166,7 +166,7 @@ if (!$error) */ if (!$error) { - dolibarr_syslog("Nombre de contrats � facturer ".sizeof($contrats)); + dol_syslog("Nombre de contrats � facturer ".sizeof($contrats)); $xcli = 0; $xclis = sizeof($contrats); @@ -176,7 +176,7 @@ if (!$error) $xcli++; /* Lecture des factures t�l�phoniques du contrat */ - dolibarr_syslog($xcli."/".$xclis." Contrat � facturer id=".$contrat." (".memory_get_usage() .")"); + dol_syslog($xcli."/".$xclis." Contrat � facturer id=".$contrat." (".memory_get_usage() .")"); $sql = "SELECT f.rowid, s.rowid as socid"; $sql .= " FROM ".MAIN_DB_PREFIX."telephonie_facture as f"; @@ -212,7 +212,7 @@ if (!$error) } $db->free(); - dolibarr_syslog("Contrat $contrat : $i factures trouv�es � g�n�rer"); + dol_syslog("Contrat $contrat : $i factures trouv�es � g�n�rer"); $factures_prev = array(); $factures_a_mailer = array(); @@ -271,7 +271,7 @@ function facture_contrat($db, $user, $contrat_id, $factel_ids, $datetime, &$fact else { $error++; - dolibarr_syslog("Impossible de lire le contrat"); + dol_syslog("Impossible de lire le contrat"); } } @@ -283,7 +283,7 @@ function facture_contrat($db, $user, $contrat_id, $factel_ids, $datetime, &$fact if ($soc->fetch($contrat->client_facture_id) ) { - if ($verbose) dolibarr_syslog($soc->nom); + if ($verbose) dol_syslog($soc->nom); } else { @@ -297,7 +297,7 @@ function facture_contrat($db, $user, $contrat_id, $factel_ids, $datetime, &$fact */ if (!$error) { - if ($verbose) dolibarr_syslog("Cr�ation facture pour $soc->nom"); + if ($verbose) dol_syslog("Cr�ation facture pour $soc->nom"); $fac = new Facture($db, $soc->id); $cancel_facture = 1; @@ -313,7 +313,7 @@ function facture_contrat($db, $user, $contrat_id, $factel_ids, $datetime, &$fact } else { - dolibarr_syslog("Erreur cr�ation objet facture erreur : $facid"); + dol_syslog("Erreur cr�ation objet facture erreur : $facid"); $error = 16; } } @@ -335,7 +335,7 @@ function facture_contrat($db, $user, $contrat_id, $factel_ids, $datetime, &$fact } else { - dolibarr_syslog("ERREUR lecture facture t�l�phonique $factel_id"); + dol_syslog("ERREUR lecture facture t�l�phonique $factel_id"); $error = 17; } @@ -348,7 +348,7 @@ function facture_contrat($db, $user, $contrat_id, $factel_ids, $datetime, &$fact } else { - dolibarr_syslog("ERREUR lecture ligne $factel->ligne"); + dol_syslog("ERREUR lecture ligne $factel->ligne"); $error = 18; } @@ -457,7 +457,7 @@ function facture_contrat($db, $user, $contrat_id, $factel_ids, $datetime, &$fact else { $error = 20; - dolibarr_syslog("Erreur $error"); + dol_syslog("Erreur $error"); } } @@ -503,8 +503,8 @@ function facture_contrat($db, $user, $contrat_id, $factel_ids, $datetime, &$fact else { $error = 21; - dolibarr_syslog($db->error()); - dolibarr_syslog("Erreur rejet prelevement"); + dol_syslog($db->error()); + dol_syslog("Erreur rejet prelevement"); } } @@ -535,8 +535,8 @@ function facture_contrat($db, $user, $contrat_id, $factel_ids, $datetime, &$fact else { $error = 32; - dolibarr_syslog("Erreur remise exceptionnelle"); - dolibarr_syslog($sql); + dol_syslog("Erreur remise exceptionnelle"); + dol_syslog($sql); } print "remise $remise_exceptionnelle \n"; @@ -664,7 +664,7 @@ function facture_contrat($db, $user, $contrat_id, $factel_ids, $datetime, &$fact if (!$error && !$cancel_facture) { - if ($verbose) dolibarr_syslog("Validation de la facture : $fac->id"); + if ($verbose) dol_syslog("Validation de la facture : $fac->id"); $y = substr($year, -1); $m = substr("00".$month, -2); @@ -699,7 +699,7 @@ function facture_contrat($db, $user, $contrat_id, $factel_ids, $datetime, &$fact } else { - dolibarr_syslog("ERREUR lecture facture t�l�phonique $factel_id"); + dol_syslog("ERREUR lecture facture t�l�phonique $factel_id"); $error = 17; } @@ -712,7 +712,7 @@ function facture_contrat($db, $user, $contrat_id, $factel_ids, $datetime, &$fact } else { - dolibarr_syslog("ERREUR lecture ligne $factel->ligne"); + dol_syslog("ERREUR lecture ligne $factel->ligne"); $error = 18; } @@ -741,7 +741,7 @@ function facture_contrat($db, $user, $contrat_id, $factel_ids, $datetime, &$fact } else { - dolibarr_syslog("ERREUR lors de G�n�ration du pdf d�taill�"); + dol_syslog("ERREUR lors de G�n�ration du pdf d�taill�"); $error = 19; } } @@ -784,7 +784,7 @@ function facture_contrat($db, $user, $contrat_id, $factel_ids, $datetime, &$fact if (!$error && !$cancel_facture && $valid_ok == 1) { - if ($verbose) dolibarr_syslog("G�n�ration du pdf facture : $facid"); + if ($verbose) dol_syslog("G�n�ration du pdf facture : $facid"); $fac->fetch($facid); $fac->fetch_client(); @@ -798,7 +798,7 @@ function facture_contrat($db, $user, $contrat_id, $factel_ids, $datetime, &$fact $message .= $fac->client->bank_account->number."\n"; } - if ($verbose) dolibarr_syslog("Cr�ation du pdf facture : $facid"); + if ($verbose) dol_syslog("Cr�ation du pdf facture : $facid"); if (! facture_pdf_create($db, $facid, $message)) { @@ -825,11 +825,11 @@ function facture_contrat($db, $user, $contrat_id, $factel_ids, $datetime, &$fact } else { - dolibarr_syslog("facture $facid non preleve, RIB incorrect"); + dol_syslog("facture $facid non preleve, RIB incorrect"); } } - if ($verbose) dolibarr_syslog("Commit de la transaction");; + if ($verbose) dol_syslog("Commit de la transaction");; } else { @@ -846,8 +846,8 @@ function _prelevements($db, $user, $factures_prev) * * * * ********************************************************************/ - //dolibarr_syslog("[PR] Debut demande de prelevement"); - //dolibarr_syslog("[PR] Nombre de factures ".sizeof($factures_prev)); + //dol_syslog("[PR] Debut demande de prelevement"); + //dol_syslog("[PR] Nombre de factures ".sizeof($factures_prev)); if (sizeof($factures_prev) > 0) { foreach ($factures_prev as $fac) @@ -858,7 +858,7 @@ function _prelevements($db, $user, $factures_prev) $fact->demande_prelevement($user); } } - //dolibarr_syslog("[PR] Fin demande de prelevement"); + //dol_syslog("[PR] Fin demande de prelevement"); } @@ -901,7 +901,7 @@ function _emails($db, $user, $contrat_id, $factures_a_mailer) $sendto = substr($sendto,0,strlen($sendto) - 1); - dolibarr_syslog("[EM] Envoi email � ".html_entity_decode($sendto) ); + dol_syslog("[EM] Envoi email � ".html_entity_decode($sendto) ); $subject = ereg_replace("#FACREF#",$fact->ref,TELEPHONIE_MAIL_FACTURATION_SUJET); $subject = ereg_replace("#CONTRAT#",$contrat->ref, $subject); @@ -998,7 +998,7 @@ function _emails($db, $user, $contrat_id, $factures_a_mailer) } else { - dolibarr_syslog("Aucun email trouv�"); + dol_syslog("Aucun email trouv�"); } } } @@ -1010,6 +1010,6 @@ function _emails($db, $user, $contrat_id, $factures_a_mailer) $db->close(); -dolibarr_syslog("Conso m�moire ".memory_get_usage() ); +dol_syslog("Conso m�moire ".memory_get_usage() ); ?> diff --git a/htdocs/telephonie/script/facturation-import-cdr.php b/htdocs/telephonie/script/facturation-import-cdr.php index 85cb397663be4b29da2d296675c828dcb807541f..0668f920f832e8ad95b3d9b8f47df1d4a93182bf 100644 --- a/htdocs/telephonie/script/facturation-import-cdr.php +++ b/htdocs/telephonie/script/facturation-import-cdr.php @@ -50,18 +50,18 @@ if ($db->query($sql)) if ($num == 1) { $row = $db->fetch_row(); - dolibarr_syslog ("facturation-import-cdr.php Import fichier ".$file); - dolibarr_syslog("facturation-import-cdr.php Fournisseur [".$row[0]."] ".$row[1]); + dol_syslog ("facturation-import-cdr.php Import fichier ".$file); + dol_syslog("facturation-import-cdr.php Fournisseur [".$row[0]."] ".$row[1]); } else { - dolibarr_syslog("facturation-import-cdr.php Erreur Fournisseur inexistant : ".$id_fourn); + dol_syslog("facturation-import-cdr.php Erreur Fournisseur inexistant : ".$id_fourn); exit ; } } else { - dolibarr_syslog("facturation-import-cdr.php Erreur recherche fournisseur"); + dol_syslog("facturation-import-cdr.php Erreur recherche fournisseur"); exit ; } @@ -83,20 +83,20 @@ if ($db->query($sql)) $row = $db->fetch_row(); if ($row[0] > 0) { - dolibarr_syslog ("facturation-import-cdr.php Fichier ".$file." d�j� charg� dans import-log"); + dol_syslog ("facturation-import-cdr.php Fichier ".$file." d�j� charg� dans import-log"); exit ; } } else { - dolibarr_syslog("facturation-import-cdr.php Erreur v�rif du fichier"); + dol_syslog("facturation-import-cdr.php Erreur v�rif du fichier"); exit ; } } else { - dolibarr_syslog("facturation-import-cdr.php Erreur SQL v�rification du fichier"); + dol_syslog("facturation-import-cdr.php Erreur SQL v�rification du fichier"); exit ; } @@ -118,20 +118,20 @@ if ($db->query($sql)) $row = $db->fetch_row(); if ($row[0] > 0) { - dolibarr_syslog ("facturation-import-cdr.php Fichier ".$file." d�j� trait�"); + dol_syslog ("facturation-import-cdr.php Fichier ".$file." d�j� trait�"); exit ; } } else { - dolibarr_syslog("facturation-import-cdr.php Erreur v�rif du fichier dans les comm"); + dol_syslog("facturation-import-cdr.php Erreur v�rif du fichier dans les comm"); exit ; } } else { - dolibarr_syslog("facturation-import-cdr.php Erreur SQL v�rification du fichier dans les comm"); - dolibarr_syslog("facturation-import-cdr.php ".$sql); + dol_syslog("facturation-import-cdr.php Erreur SQL v�rification du fichier dans les comm"); + dol_syslog("facturation-import-cdr.php ".$sql); exit ; } @@ -148,7 +148,7 @@ $resql = $db->query($sql); if ($resql) { $num = $db->num_rows($resql); - dolibarr_syslog ("facturation-import-cdr.php ".$num." lignes charg�es"); + dol_syslog ("facturation-import-cdr.php ".$num." lignes charg�es"); $i = 0; $ligneids = array(); @@ -161,8 +161,8 @@ if ($resql) } else { - dolibarr_syslog("facturation-import-cdr.php Erreur chargement des lignes"); - dolibarr_syslog($sql); + dol_syslog("facturation-import-cdr.php Erreur chargement des lignes"); + dol_syslog($sql); exit ; } @@ -173,7 +173,7 @@ else if (is_readable($file)) { - dolibarr_syslog("facturation-import-cdr.php Lecture du fichier $file"); + dol_syslog("facturation-import-cdr.php Lecture du fichier $file"); $error = 0; $line = 0; @@ -233,9 +233,9 @@ if (is_readable($file)) } else { - dolibarr_syslog("facturation-import-cdr.php Erreur de traitement de ligne $index"); - dolibarr_syslog("facturation-import-cdr.php ".$db->error()); - dolibarr_syslog("facturation-import-cdr.php ".$sql); + dol_syslog("facturation-import-cdr.php Erreur de traitement de ligne $index"); + dol_syslog("facturation-import-cdr.php ".$db->error()); + dol_syslog("facturation-import-cdr.php ".$sql); $error++; } } @@ -247,32 +247,32 @@ if (is_readable($file)) } else { - dolibarr_syslog("facturation-import-cdr.php Ligne : $ligne ignor�e!"); + dol_syslog("facturation-import-cdr.php Ligne : $ligne ignor�e!"); $error++; } } else { - dolibarr_syslog("facturation-import-cdr.php Mauvais format de fichier ligne $line"); + dol_syslog("facturation-import-cdr.php Mauvais format de fichier ligne $line"); $error++; } } $line++; } - dolibarr_syslog("facturation-import-cdr.php ".($line -1 )." lignes trait�es dans le fichier"); - dolibarr_syslog("facturation-import-cdr.php ".$line_inserted." insert effectu�s"); + dol_syslog("facturation-import-cdr.php ".($line -1 )." lignes trait�es dans le fichier"); + dol_syslog("facturation-import-cdr.php ".$line_inserted." insert effectu�s"); if ($error == 0) { $db->query("COMMIT"); - dolibarr_syslog("facturation-import-cdr.php COMMIT"); + dol_syslog("facturation-import-cdr.php COMMIT"); } else { $db->query("ROLLBACK"); - dolibarr_syslog("facturation-import-cdr.php ROLLBACK"); + dol_syslog("facturation-import-cdr.php ROLLBACK"); } } @@ -282,7 +282,7 @@ if (is_readable($file)) else { print "Erreur lecture : $file"; - dolibarr_syslog("facturation-import-cdr.php ".$file." not readable"); + dol_syslog("facturation-import-cdr.php ".$file." not readable"); } diff --git a/htdocs/telephonie/script/facturation-impression.php b/htdocs/telephonie/script/facturation-impression.php index b400b4a4dd09a89d3a91f60641fbe4c886365aa6..db03a16833ff85d17d6e0ee87932820ebd2e883d 100644 --- a/htdocs/telephonie/script/facturation-impression.php +++ b/htdocs/telephonie/script/facturation-impression.php @@ -83,14 +83,14 @@ $sql .= " AND date_format(f.date,'%m%Y') = '".$month.$year."'"; $resql = $db->query($sql); -dolibarr_syslog("Impression des factures de ".$month.$year); +dol_syslog("Impression des factures de ".$month.$year); if ( $resql ) { $num = $db->num_rows($resql); $i = 0; - dolibarr_syslog("$num factures a imprimer"); + dol_syslog("$num factures a imprimer"); $pdf = new FPDI_Protection('P','mm','A4'); @@ -164,17 +164,17 @@ if ( $resql ) $pdf->Close(); $pdf->Output($file); - dolibarr_syslog("Generation de ".$pages_facture." envois"); - dolibarr_syslog("Generation de ".$pages." pages"); - dolibarr_syslog("Generation de ".$total_feuilles." feuilles"); - dolibarr_syslog("Ecriture de : ".$file); + dol_syslog("Generation de ".$pages_facture." envois"); + dol_syslog("Generation de ".$pages." pages"); + dol_syslog("Generation de ".$total_feuilles." feuilles"); + dol_syslog("Ecriture de : ".$file); $db->free($resql); } else { $error = 1; - dolibarr_syslog("Erreur ".$error); - dolibarr_syslog($db->error()); + dol_syslog("Erreur ".$error); + dol_syslog($db->error()); } $db->close(); @@ -198,14 +198,14 @@ $sql .= " AND date_format(f.date,'%m%Y') = '".$month.$year."'"; $resql = $db->query($sql); -dolibarr_syslog("Impression des factures de ".$month.$year); +dol_syslog("Impression des factures de ".$month.$year); if ( $resql ) { $num = $db->num_rows($resql); $i = 0; - dolibarr_syslog("$num factures a imprimer"); + dol_syslog("$num factures a imprimer"); while ($i < $num) { @@ -215,7 +215,7 @@ if ( $resql ) if (! copy($file,"/tmp/facture/".$row[1].".pdf")) { - dolibarr_syslog("Error copy $file"); + dol_syslog("Error copy $file"); } $i++; @@ -226,8 +226,8 @@ if ( $resql ) else { $error = 1; - dolibarr_syslog("Erreur ".$error); - dolibarr_syslog($db->error()); + dol_syslog("Erreur ".$error); + dol_syslog($db->error()); } $db->close(); diff --git a/htdocs/telephonie/script/facturation-pre-consolidation.php b/htdocs/telephonie/script/facturation-pre-consolidation.php index c834ebeccc842b530822c72910c64a953dffdd92..294e7ab1cf58e79c0dbdf2e479c67cb9e8a91151 100644 --- a/htdocs/telephonie/script/facturation-pre-consolidation.php +++ b/htdocs/telephonie/script/facturation-pre-consolidation.php @@ -39,8 +39,8 @@ $resql = $db->query($sql); if (! $resql ) { $error = 1; - dolibarr_syslog("Erreur ".$error); - dolibarr_syslog($db->error()); + dol_syslog("Erreur ".$error); + dol_syslog($db->error()); } $sql = "UPDATE "; @@ -52,8 +52,8 @@ $resql = $db->query($sql); if (! $resql ) { $error = 1; - dolibarr_syslog("Erreur ".$error); - dolibarr_syslog($db->error()); + dol_syslog("Erreur ".$error); + dol_syslog($db->error()); } $db->close(); diff --git a/htdocs/telephonie/script/facturation-verif.php b/htdocs/telephonie/script/facturation-verif.php index 35fcfd4314498d9e4478a917f5cbad1a76208318..addc771fb766c80db63a16b8ecf492491fa69ed3 100644 --- a/htdocs/telephonie/script/facturation-verif.php +++ b/htdocs/telephonie/script/facturation-verif.php @@ -24,7 +24,7 @@ require ("../../master.inc.php"); -dolibarr_syslog("facturation-verif.php BEGIN"); +dol_syslog("facturation-verif.php BEGIN"); require_once (DOL_DOCUMENT_ROOT."/societe.class.php"); require_once (DOL_DOCUMENT_ROOT."/telephonie/lignetel.class.php"); @@ -39,7 +39,7 @@ $sql = "SELECT count(*) FROM ".MAIN_DB_PREFIX."telephonie_import_cdr"; if ( $db->query($sql) ) { $row = $db->fetch_row(); - dolibarr_syslog("facturation-verif.php ".$row[0]." lignes de communications a verifier"); + dol_syslog("facturation-verif.php ".$row[0]." lignes de communications a verifier"); } /******************************************************************************* @@ -51,7 +51,7 @@ $grille_vente = TELEPHONIE_GRILLE_VENTE_DEFAUT_ID; $tarif_vente = new TelephonieTarif($db, $grille_vente, "vente"); -dolibarr_syslog("facturation-verif.php Grille : $grille contient ".$tarif_vente->num_tarifs." tarifs"); +dol_syslog("facturation-verif.php Grille : $grille contient ".$tarif_vente->num_tarifs." tarifs"); $sql = "SELECT distinct(num) FROM ".MAIN_DB_PREFIX."telephonie_import_cdr"; @@ -99,7 +99,7 @@ if ( $resql ) } $db->free($resql); } -dolibarr_syslog($error ." erreurs trouv�es"); +dol_syslog($error ." erreurs trouv�es"); -dolibarr_syslog("facturation-verif.php END"); +dol_syslog("facturation-verif.php END"); ?> diff --git a/htdocs/telephonie/script/facture-detail-tableur-one.class.php b/htdocs/telephonie/script/facture-detail-tableur-one.class.php index 506f09b153fc97e7ad5f98c86aa3c6a538f23cb4..b8b540836aed1c0e1f5887408df351f586660531 100644 --- a/htdocs/telephonie/script/facture-detail-tableur-one.class.php +++ b/htdocs/telephonie/script/facture-detail-tableur-one.class.php @@ -53,12 +53,12 @@ class FactureDetailTableurOne { } else { - //dolibarr_syslog("Pas de facture pour ".$this->ligne->id); + //dol_syslog("Pas de facture pour ".$this->ligne->id); } } else { - dolibarr_syslog("Error"); + dol_syslog("Error"); } @@ -76,7 +76,7 @@ class FactureDetailTableurOne { $fname = $dir . $facid . "-detail.xls"; - dolibarr_syslog("Open ".$facid."-detail.xls"); + dol_syslog("Open ".$facid."-detail.xls"); $workbook = &new writeexcel_workbook($fname); @@ -123,7 +123,7 @@ class FactureDetailTableurOne { $i = 0; $numsql = $this->db->num_rows($resql); - dolibarr_syslog("Ligne : ".$this->ligne->id . " : ".$numsql); + dol_syslog("Ligne : ".$this->ligne->id . " : ".$numsql); while ($i < $numsql) { @@ -144,11 +144,11 @@ class FactureDetailTableurOne { } else { - dolibarr_syslog($this->db->error()); + dol_syslog($this->db->error()); } $workbook->close(); - //dolibarr_syslog("Close $fname"); + //dol_syslog("Close $fname"); } return $error; diff --git a/htdocs/telephonie/script/facture-detail-tableur-two.class.php b/htdocs/telephonie/script/facture-detail-tableur-two.class.php index 5ebf4c688a033a378c0862b491702f3980633e01..2df9c9f96af3a1a1255c37420a2577482925935e 100644 --- a/htdocs/telephonie/script/facture-detail-tableur-two.class.php +++ b/htdocs/telephonie/script/facture-detail-tableur-two.class.php @@ -51,7 +51,7 @@ class FactureDetailTableurTwo { $fname = $dir . $contrat_id . "-$month-$year-detail.xls"; - dolibarr_syslog("Open ".$fname); + dol_syslog("Open ".$fname); $workbook = &new writeexcel_workbook($fname); @@ -98,7 +98,7 @@ class FactureDetailTableurTwo { { $num = $this->db->num_rows($resql); $total = 0; - dolibarr_syslog($num." lignes trouv�es"); + dol_syslog($num." lignes trouv�es"); $xx = 1; while ($row = $this->db->fetch_row($resql)) { @@ -115,7 +115,7 @@ class FactureDetailTableurTwo { $i = 0; $numsq = $this->db->num_rows($resq); $total = $total + $numsq; - dolibarr_syslog("Ligne : ".$row[1] . " : ".$numsq . " Total : ".$total); + dol_syslog("Ligne : ".$row[1] . " : ".$numsq . " Total : ".$total); while ($i < $numsq) { @@ -135,12 +135,12 @@ class FactureDetailTableurTwo { } else { - dolibarr_syslog($this->db->error()); + dol_syslog($this->db->error()); } } $workbook->close(); - //dolibarr_syslog("Close $fname"); + //dol_syslog("Close $fname"); } return $error; diff --git a/htdocs/telephonie/script/import-cdr-bt.php b/htdocs/telephonie/script/import-cdr-bt.php index 6665ed26d018b9c89c0b28586a554683755e3785..867762b5cbe82ae8225d9aad655c396fd56af0fc 100644 --- a/htdocs/telephonie/script/import-cdr-bt.php +++ b/htdocs/telephonie/script/import-cdr-bt.php @@ -57,12 +57,12 @@ if (is_dir($file)) if (substr($xfile, -4) == ".csv") { $files[$i] = $file.$xfile; - dolibarr_syslog($file.$xfile." ajout�"); + dol_syslog($file.$xfile." ajout�"); $i++; } else { - dolibarr_syslog($file.$xfile." ignor�"); + dol_syslog($file.$xfile." ignor�"); } } } @@ -71,7 +71,7 @@ if (is_dir($file)) } else { - dolibarr_syslog("Impossible de libre $file"); + dol_syslog("Impossible de libre $file"); exit ; } } @@ -81,7 +81,7 @@ elseif (is_file($file)) } else { - dolibarr_syslog("Impossible de libre $file"); + dol_syslog("Impossible de libre $file"); exit ; } @@ -108,13 +108,13 @@ foreach ($files as $xfile) { if (is_readable($xfile)) { - dolibarr_syslog("Traitement de ".basename($xfile)); + dol_syslog("Traitement de ".basename($xfile)); $newname = str_replace(".csv","-$month$year.csv",$xfile); if (substr($xfile,-9) <> "-$month$year.csv") { if (rename($xfile, $newname)) { - dolibarr_syslog("Renomme en ".$newname); + dol_syslog("Renomme en ".$newname); $newfiles[$j] = $newname; $j++; } @@ -148,18 +148,18 @@ if ($db->query($sql)) if ($num == 1) { $row = $db->fetch_row(); - dolibarr_syslog ("Import fichier ".$file); - dolibarr_syslog("Fournisseur [".$row[0]."] ".$row[1]); + dol_syslog ("Import fichier ".$file); + dol_syslog("Fournisseur [".$row[0]."] ".$row[1]); } else { - dolibarr_syslog("Erreur Fournisseur inexistant : ".$id_fourn); + dol_syslog("Erreur Fournisseur inexistant : ".$id_fourn); exit ; } } else { - dolibarr_syslog("Erreur recherche fournisseur"); + dol_syslog("Erreur recherche fournisseur"); exit ; } @@ -177,7 +177,7 @@ $resql = $db->query($sql); if ($resql) { $num = $db->num_rows($resql); - dolibarr_syslog ($num . " lignes charg�es"); + dol_syslog ($num . " lignes charg�es"); $i = 0; $ligneids = array(); @@ -190,8 +190,8 @@ if ($resql) } else { - dolibarr_syslog("Erreur chargement des lignes"); - dolibarr_syslog($sql); + dol_syslog("Erreur chargement des lignes"); + dol_syslog($sql); exit ; } @@ -203,7 +203,7 @@ foreach ($newfiles as $xfile) { if ( _verif($db, $xfile) == 0) { - dolibarr_syslog("Lecture du fichier $xfile"); + dol_syslog("Lecture du fichier $xfile"); $error = 0; $line = 0; @@ -295,9 +295,9 @@ foreach ($newfiles as $xfile) } else { - dolibarr_syslog("Erreur de traitement de ligne $index"); - dolibarr_syslog($db->error()); - dolibarr_syslog($sql); + dol_syslog("Erreur de traitement de ligne $index"); + dol_syslog($db->error()); + dol_syslog($sql); $error++; } } @@ -309,14 +309,14 @@ foreach ($newfiles as $xfile) } else { - dolibarr_syslog("Ligne : $ligne ignor�e!"); + dol_syslog("Ligne : $ligne ignor�e!"); $error++; } } else { - dolibarr_syslog("Mauvais format de fichier ligne $line ".sizeof($tabline)); - dolibarr_syslog($cont); + dol_syslog("Mauvais format de fichier ligne $line ".sizeof($tabline)); + dol_syslog($cont); $error++; } } @@ -324,7 +324,7 @@ foreach ($newfiles as $xfile) } if ($line <> $line_inserted) { - dolibarr_syslog($line."/".$line_inserted." lignes trait�es/insert effectu�s"); + dol_syslog($line."/".$line_inserted." lignes trait�es/insert effectu�s"); } if ($error == 0) @@ -334,7 +334,7 @@ foreach ($newfiles as $xfile) else { $db->query("ROLLBACK"); - dolibarr_syslog("ROLLBACK"); + dol_syslog("ROLLBACK"); } } fclose($hf); @@ -343,11 +343,11 @@ foreach ($newfiles as $xfile) else { print "Erreur lecture : $xfile"; - dolibarr_syslog($xfile . " not readable"); + dol_syslog($xfile . " not readable"); } } -dolibarr_syslog($line_inserted_total." insert effectu�s total"); +dol_syslog($line_inserted_total." insert effectu�s total"); /* * Fin @@ -375,19 +375,19 @@ function _verif($db, $file) $row = $db->fetch_row(); if ($row[0] > 0) { - dolibarr_syslog ("Fichier ".$file." d�j� charg� dans import-log"); + dol_syslog ("Fichier ".$file." d�j� charg� dans import-log"); $result = -1; } } else { - dolibarr_syslog("Erreur v�rif du fichier"); + dol_syslog("Erreur v�rif du fichier"); $result = -1; } } else { - dolibarr_syslog("Erreur SQL v�rification du fichier"); + dol_syslog("Erreur SQL v�rification du fichier"); $result = -1; } @@ -409,20 +409,20 @@ function _verif($db, $file) $row = $db->fetch_row(); if ($row[0] > 0) { - dolibarr_syslog ("Fichier ".$file." d�j� trait�"); + dol_syslog ("Fichier ".$file." d�j� trait�"); $result = -1; } } else { - dolibarr_syslog("Erreur v�rif du fichier dans les comm"); + dol_syslog("Erreur v�rif du fichier dans les comm"); $result = -1; } } else { - dolibarr_syslog("Erreur SQL v�rification du fichier dans les comm"); - dolibarr_syslog($sql); + dol_syslog("Erreur SQL v�rification du fichier dans les comm"); + dol_syslog($sql); $result = -1; } diff --git a/htdocs/telephonie/script/import-cdr-ftp.php b/htdocs/telephonie/script/import-cdr-ftp.php index adcad3a5c1f465529414bddd3f2c7654fbb1bd00..8499c92bbb2519642607cd7be3255e11662ddbf4 100644 --- a/htdocs/telephonie/script/import-cdr-ftp.php +++ b/htdocs/telephonie/script/import-cdr-ftp.php @@ -58,12 +58,12 @@ if (is_dir($file)) if (is_file($file.$xfile) && substr($xfile, -4) == ".csv") { $files[$i] = $file.$xfile; - dolibarr_syslog($xfile." ajout�"); + dol_syslog($xfile." ajout�"); $i++; } else { - dolibarr_syslog($xfile." ignor�"); + dol_syslog($xfile." ignor�"); } } @@ -71,7 +71,7 @@ if (is_dir($file)) } else { - dolibarr_syslog("Impossible de libre $file"); + dol_syslog("Impossible de libre $file"); exit ; } } @@ -81,7 +81,7 @@ elseif (is_file($file)) } else { - dolibarr_syslog("Impossible de libre $file"); + dol_syslog("Impossible de libre $file"); exit ; } @@ -101,18 +101,18 @@ if ($db->query($sql)) if ($num == 1) { $row = $db->fetch_row(); - dolibarr_syslog ("Import fichier ".$file); - dolibarr_syslog("Fournisseur [".$row[0]."] ".$row[1]); + dol_syslog ("Import fichier ".$file); + dol_syslog("Fournisseur [".$row[0]."] ".$row[1]); } else { - dolibarr_syslog("Erreur Fournisseur inexistant : ".$id_fourn); + dol_syslog("Erreur Fournisseur inexistant : ".$id_fourn); exit ; } } else { - dolibarr_syslog("Erreur recherche fournisseur"); + dol_syslog("Erreur recherche fournisseur"); exit ; } @@ -133,7 +133,7 @@ if ($db->query($sql)) } else { - dolibarr_syslog("Erreur recherche fournisseur"); + dol_syslog("Erreur recherche fournisseur"); } $sql = "SELECT distinct(fichier)"; $sql .= " FROM ".MAIN_DB_PREFIX."telephonie_import_cdr"; @@ -147,7 +147,7 @@ if ($db->query($sql)) } else { - dolibarr_syslog("Erreur recherche fournisseur"); + dol_syslog("Erreur recherche fournisseur"); exit ; } /* @@ -163,7 +163,7 @@ $resql = $db->query($sql); if ($resql) { $num = $db->num_rows($resql); - dolibarr_syslog ($num . " lignes charg�es"); + dol_syslog ($num . " lignes charg�es"); $i = 0; $ligneids = array(); @@ -176,8 +176,8 @@ if ($resql) } else { - dolibarr_syslog("Erreur chargement des lignes"); - dolibarr_syslog($sql); + dol_syslog("Erreur chargement des lignes"); + dol_syslog($sql); exit ; } @@ -187,7 +187,7 @@ foreach ($files as $xfile) { if ( _verif($db, $xfile, $fichiers) == 0) { - dolibarr_syslog("Lecture du fichier $xfile"); + dol_syslog("Lecture du fichier $xfile"); $error = 0; $line = 0; @@ -290,9 +290,9 @@ foreach ($files as $xfile) } else { - dolibarr_syslog("Erreur de traitement de ligne $index"); - dolibarr_syslog($db->error()); - dolibarr_syslog($sql); + dol_syslog("Erreur de traitement de ligne $index"); + dol_syslog($db->error()); + dol_syslog($sql); $error++; } } @@ -305,7 +305,7 @@ foreach ($files as $xfile) } else { - dolibarr_syslog("Ligne : $ligne ignor�e ! log write in /tmp/$ligne.import"); + dol_syslog("Ligne : $ligne ignor�e ! log write in /tmp/$ligne.import"); $fp = fopen("/tmp/$ligne.import","w"); if ($fp) { @@ -322,8 +322,8 @@ foreach ($files as $xfile) } else { - dolibarr_syslog("Mauvais format de fichier ligne $line ".sizeof($tabline)); - dolibarr_syslog($cont); + dol_syslog("Mauvais format de fichier ligne $line ".sizeof($tabline)); + dol_syslog($cont); $error++; } } @@ -331,8 +331,8 @@ foreach ($files as $xfile) $line++; } - dolibarr_syslog($line." lignes trait�es dans le fichier"); - dolibarr_syslog($line_inserted." insert effectu�s"); + dol_syslog($line." lignes trait�es dans le fichier"); + dol_syslog($line_inserted." insert effectu�s"); if ($error == 0) { @@ -341,7 +341,7 @@ foreach ($files as $xfile) else { $db->query("ROLLBACK"); - dolibarr_syslog("ROLLBACK"); + dol_syslog("ROLLBACK"); } } @@ -352,7 +352,7 @@ foreach ($files as $xfile) else { print "Erreur lecture : $xfile"; - dolibarr_syslog($xfile . " not readable"); + dol_syslog($xfile . " not readable"); } } @@ -366,7 +366,7 @@ function _verif($db, $file, $fichiers) */ if (in_array (basename($file), $fichiers)) { - dolibarr_syslog ("Fichier ".basename($file)." d�j� charg�/trait�"); + dol_syslog ("Fichier ".basename($file)." d�j� charg�/trait�"); $result = -1; } @@ -385,19 +385,19 @@ function _verif($db, $file, $fichiers) $row = $db->fetch_row(); if ($row[0] > 0) { - dolibarr_syslog ("Fichier ".$file." d�j� charg� dans import-log"); + dol_syslog ("Fichier ".$file." d�j� charg� dans import-log"); $result = -1; } } else { - dolibarr_syslog("Erreur v�rif du fichier"); + dol_syslog("Erreur v�rif du fichier"); $result = -1; } } else { - dolibarr_syslog("Erreur SQL v�rification du fichier"); + dol_syslog("Erreur SQL v�rification du fichier"); $result = -1; } @@ -414,20 +414,20 @@ function _verif($db, $file, $fichiers) $row = $db->fetch_row(); if ($row[0] > 0) { - dolibarr_syslog ("Fichier ".$file." d�j� trait�"); + dol_syslog ("Fichier ".$file." d�j� trait�"); $result = -1; } } else { - dolibarr_syslog("Erreur v�rif du fichier dans les comm"); + dol_syslog("Erreur v�rif du fichier dans les comm"); $result = -1; } } else { - dolibarr_syslog("Erreur SQL v�rification du fichier dans les comm"); - dolibarr_syslog($sql); + dol_syslog("Erreur SQL v�rification du fichier dans les comm"); + dol_syslog($sql); $result = -1; } */ diff --git a/htdocs/telephonie/script/import-cdr.php b/htdocs/telephonie/script/import-cdr.php index e3426aefe6da101a4af79314dddfedc11ebeef6e..9a605773d0675e9895f3c34823c96eb6899f3b89 100644 --- a/htdocs/telephonie/script/import-cdr.php +++ b/htdocs/telephonie/script/import-cdr.php @@ -50,18 +50,18 @@ if ($db->query($sql)) if ($num == 1) { $row = $db->fetch_row(); - dolibarr_syslog ("Import fichier ".$file); - dolibarr_syslog("Fournisseur [".$row[0]."] ".$row[1]); + dol_syslog ("Import fichier ".$file); + dol_syslog("Fournisseur [".$row[0]."] ".$row[1]); } else { - dolibarr_syslog("Erreur Fournisseur inexistant : ".$id_fourn); + dol_syslog("Erreur Fournisseur inexistant : ".$id_fourn); exit ; } } else { - dolibarr_syslog("Erreur recherche fournisseur"); + dol_syslog("Erreur recherche fournisseur"); exit ; } @@ -83,20 +83,20 @@ if ($db->query($sql)) $row = $db->fetch_row(); if ($row[0] > 0) { - dolibarr_syslog ("Fichier ".$file." d�j� charg� dans import-log"); + dol_syslog ("Fichier ".$file." d�j� charg� dans import-log"); exit ; } } else { - dolibarr_syslog("Erreur v�rif du fichier"); + dol_syslog("Erreur v�rif du fichier"); exit ; } } else { - dolibarr_syslog("Erreur SQL v�rification du fichier"); + dol_syslog("Erreur SQL v�rification du fichier"); exit ; } @@ -118,20 +118,20 @@ if ($db->query($sql)) $row = $db->fetch_row(); if ($row[0] > 0) { - dolibarr_syslog ("Fichier ".$file." d�j� trait�"); + dol_syslog ("Fichier ".$file." d�j� trait�"); exit ; } } else { - dolibarr_syslog("Erreur v�rif du fichier dans les comm"); + dol_syslog("Erreur v�rif du fichier dans les comm"); exit ; } } else { - dolibarr_syslog("Erreur SQL v�rification du fichier dans les comm"); - dolibarr_syslog($sql); + dol_syslog("Erreur SQL v�rification du fichier dans les comm"); + dol_syslog($sql); exit ; } @@ -148,7 +148,7 @@ $resql = $db->query($sql); if ($resql) { $num = $db->num_rows($resql); - dolibarr_syslog ($num . " lignes charg�es"); + dol_syslog ($num . " lignes charg�es"); $i = 0; $ligneids = array(); @@ -161,8 +161,8 @@ if ($resql) } else { - dolibarr_syslog("Erreur chargement des lignes"); - dolibarr_syslog($sql); + dol_syslog("Erreur chargement des lignes"); + dol_syslog($sql); exit ; } @@ -175,7 +175,7 @@ else if (is_readable($file)) { - dolibarr_syslog("Lecture du fichier $file"); + dol_syslog("Lecture du fichier $file"); $error = 0; $line = 0; @@ -235,9 +235,9 @@ if (is_readable($file)) } else { - dolibarr_syslog("Erreur de traitement de ligne $index"); - dolibarr_syslog($db->error()); - dolibarr_syslog($sql); + dol_syslog("Erreur de traitement de ligne $index"); + dol_syslog($db->error()); + dol_syslog($sql); $error++; } } @@ -249,32 +249,32 @@ if (is_readable($file)) } else { - dolibarr_syslog("Ligne : $ligne ignor�e!"); + dol_syslog("Ligne : $ligne ignor�e!"); $error++; } } else { - dolibarr_syslog("Mauvais format de fichier ligne $line"); + dol_syslog("Mauvais format de fichier ligne $line"); $error++; } } $line++; } - dolibarr_syslog(($line -1 )." lignes trait�es dans le fichier"); - dolibarr_syslog($line_inserted." insert effectu�s"); + dol_syslog(($line -1 )." lignes trait�es dans le fichier"); + dol_syslog($line_inserted." insert effectu�s"); if ($error == 0) { $db->query("COMMIT"); - dolibarr_syslog("COMMIT"); + dol_syslog("COMMIT"); } else { $db->query("ROLLBACK"); - dolibarr_syslog("ROLLBACK"); + dol_syslog("ROLLBACK"); } } @@ -284,7 +284,7 @@ if (is_readable($file)) else { print "Erreur lecture : $file"; - dolibarr_syslog($file . " not readable"); + dol_syslog($file . " not readable"); } diff --git a/htdocs/telephonie/script/import-rename-cdr.php b/htdocs/telephonie/script/import-rename-cdr.php index 2847f367506019d80aaa80354dfca45aecf1624f..80bace0e590e2595364519b38a17d924a0953643 100644 --- a/htdocs/telephonie/script/import-rename-cdr.php +++ b/htdocs/telephonie/script/import-rename-cdr.php @@ -55,12 +55,12 @@ if (is_dir($file)) if (is_file($file.$xfile) && substr($xfile, -4) == ".csv") { $files[$i] = $file.$xfile; - dolibarr_syslog($file.$xfile." ajout�"); + dol_syslog($file.$xfile." ajout�"); $i++; } else { - dolibarr_syslog($file.$xfile." ignor�"); + dol_syslog($file.$xfile." ignor�"); } } @@ -68,7 +68,7 @@ if (is_dir($file)) } else { - dolibarr_syslog("Impossible de libre $file"); + dol_syslog("Impossible de libre $file"); exit ; } } @@ -78,7 +78,7 @@ elseif (is_file($file)) } else { - dolibarr_syslog("Impossible de libre $file"); + dol_syslog("Impossible de libre $file"); exit ; } diff --git a/htdocs/telephonie/script/plan-facturation.php b/htdocs/telephonie/script/plan-facturation.php index aaf37d13a1a8a2606393787bf41bb51ceed6ea78..8a53ba550f90643094fe89b25d4415fc353fe425 100644 --- a/htdocs/telephonie/script/plan-facturation.php +++ b/htdocs/telephonie/script/plan-facturation.php @@ -179,7 +179,7 @@ if ($resql) } $workbook->close(); - dolibarr_syslog("Close $fname"); + dol_syslog("Close $fname"); } diff --git a/htdocs/telephonie/script/rapport.php b/htdocs/telephonie/script/rapport.php index f2729faeef452ac9ff6279c029dea57101c254b1..a77e87b1713d0d35d031c0b73eb1bcb068cfbd7f 100644 --- a/htdocs/telephonie/script/rapport.php +++ b/htdocs/telephonie/script/rapport.php @@ -1005,7 +1005,7 @@ foreach ($groupes as $keygroupe => $groupe) } $workbook->close(); - dolibarr_syslog("Close $fname"); + dol_syslog("Close $fname"); } diff --git a/htdocs/telephonie/script/retour-check.php b/htdocs/telephonie/script/retour-check.php index 0cc8072cd3ab8cb109b2b05cbdfc9907d915074c..64049347220418d02b44543c51a41bd319cdee12 100644 --- a/htdocs/telephonie/script/retour-check.php +++ b/htdocs/telephonie/script/retour-check.php @@ -44,14 +44,14 @@ if (! file_exists($dirback)) umask(0); if (! @mkdir($dirback, 0755)) { - dolibarr_syslog("Erreur: creation '$dir'"); + dol_syslog("Erreur: creation '$dir'"); } } $handle=opendir($dir); -if ($verbose) dolibarr_syslog("Lecture repertoire $dir"); +if ($verbose) dol_syslog("Lecture repertoire $dir"); while (($file = readdir($handle))!==false) { @@ -59,14 +59,14 @@ while (($file = readdir($handle))!==false) { if (is_readable($dir.$file)) { - if ($verbose) dolibarr_syslog("Lecture $file"); + if ($verbose) dol_syslog("Lecture $file"); if (! file_exists($dirdone)) { umask(0); if (! @mkdir($dirdone, 0755)) { - dolibarr_syslog("Erreur: creation '$dirdone'"); + dol_syslog("Erreur: creation '$dirdone'"); } } @@ -77,7 +77,7 @@ while (($file = readdir($handle))!==false) } else { - dolibarr_syslog("Erreur Lecture $file permissions insuffisante"); + dol_syslog("Erreur Lecture $file permissions insuffisante"); } } } diff --git a/htdocs/telephonie/script/retour-traitement.php b/htdocs/telephonie/script/retour-traitement.php index 6307f1980e873b70c9ecb97a2ec1f80628089be1..b1b3fef34dc9362f5408e8b6204ad1fd0fc212be 100644 --- a/htdocs/telephonie/script/retour-traitement.php +++ b/htdocs/telephonie/script/retour-traitement.php @@ -30,7 +30,7 @@ require_once (DOL_DOCUMENT_ROOT."/telephonie/communication.class.php"); require_once (DOL_DOCUMENT_ROOT."/societe.class.php"); require_once (DOL_DOCUMENT_ROOT."/telephonie/dolibarrmail.class.php"); -if ($verbose) dolibarr_syslog("retour-traitement"); +if ($verbose) dol_syslog("retour-traitement"); $user = new User($db, 1); @@ -57,7 +57,7 @@ if ($db->query($sql)) $n = sizeof($row); -if ($verbose) dolibarr_syslog($n . " lignes � traiter"); +if ($verbose) dol_syslog($n . " lignes � traiter"); for ($i = 0 ; $i < $n ; $i++) { @@ -107,7 +107,7 @@ for ($i = 0 ; $i < $n ; $i++) if (! $db->query($sql)) { - dolibarr_syslog("Erreur de traitement de ligne $numero"); + dol_syslog("Erreur de traitement de ligne $numero"); $error++; } } @@ -115,19 +115,19 @@ for ($i = 0 ; $i < $n ; $i++) if ($error == 0) { $db->query("COMMIT"); - dolibarr_syslog("COMMIT"); + dol_syslog("COMMIT"); } else { $db->query("ROLLBACK"); - dolibarr_syslog("ROLLBACK"); + dol_syslog("ROLLBACK"); } } } else { - dolibarr_syslog("Ligne $numero d�j� active"); + dol_syslog("Ligne $numero d�j� active"); } } /* @@ -163,7 +163,7 @@ for ($i = 0 ; $i < $n ; $i++) if (! $db->query($sql)) { - dolibarr_syslog("Erreur de traitement de ligne $numero"); + dol_syslog("Erreur de traitement de ligne $numero"); $error++; } } @@ -171,18 +171,18 @@ for ($i = 0 ; $i < $n ; $i++) if ($error == 0) { $db->query("COMMIT"); - dolibarr_syslog("COMMIT"); + dol_syslog("COMMIT"); } else { $db->query("ROLLBACK"); - dolibarr_syslog("ROLLBACK"); + dol_syslog("ROLLBACK"); } } } else { - dolibarr_syslog("Ligne $numero d�j� active"); + dol_syslog("Ligne $numero d�j� active"); } } @@ -210,7 +210,7 @@ for ($i = 0 ; $i < $n ; $i++) if (! $db->query($sql)) { - dolibarr_syslog("Erreur de traitement de ligne $numero"); + dol_syslog("Erreur de traitement de ligne $numero"); $error++; } } @@ -218,12 +218,12 @@ for ($i = 0 ; $i < $n ; $i++) if ($error == 0) { $db->query("COMMIT"); - dolibarr_syslog("COMMIT"); + dol_syslog("COMMIT"); } else { $db->query("ROLLBACK"); - dolibarr_syslog("ROLLBACK"); + dol_syslog("ROLLBACK"); } } diff --git a/htdocs/telephonie/script/retour.php b/htdocs/telephonie/script/retour.php index 9930594d4446eee32e6589b547bb98a3d72ca4df..6933f79dee9bb4d7ee1fd9b5aebd462ca3509018 100644 --- a/htdocs/telephonie/script/retour.php +++ b/htdocs/telephonie/script/retour.php @@ -30,57 +30,57 @@ $dirback = DOL_DATA_ROOT."/telephonie/ligne/commande/retour/backup/"; if (! file_exists($dirback)) { - umask(0); - if (! @mkdir($dirback, 0755)) - { - dolibarr_syslog("Erreur: creation '$dir'"); - } + umask(0); + if (! @mkdir($dirback, 0755)) + { + dol_syslog("Erreur: creation '$dir'", LOG_ERR); + } } $handle=opendir($dir); -if ($verbose) dolibarr_syslog("Lecture repertoire $dir"); +if ($verbose) dol_syslog("Lecture repertoire $dir"); while (($file = readdir($handle))!==false) { - if (is_file($dir.$file)) - { - - if (is_readable($dir.$file)) + if (is_file($dir.$file)) { - - if ($verbose) dolibarr_syslog("Lecture $file"); - - if (! file_exists($dirdone)) - { - umask(0); - if (! @mkdir($dirdone, 0755)) + + if (is_readable($dir.$file)) { - dolibarr_syslog("Erreur: creation '$dirdone'"); - } - } - - /* + + if ($verbose) dol_syslog("Lecture $file"); + + if (! file_exists($dirdone)) + { + umask(0); + if (! @mkdir($dirdone, 0755)) + { + dol_syslog("Erreur: creation '$dirdone'", LOG_ERR); + } + } + + /* * On verifie que le fichier n'a pas d�j� �t� trait� */ if (! file_exists($dirdone.$file)) - { - if ( import_file($db, $dir, $file) == 0) + { + if ( import_file($db, $dir, $file) == 0) + { + rename($dir.$file, $dirdone.$file); + } + } + else + { + dol_syslog("Le fichier $file a d�j� �t� trait�"); + } + } + else { - rename($dir.$file, $dirdone.$file); + dol_syslog("Erreur Lecture $file permissions insuffisante"); } - } - else - { - dolibarr_syslog("Le fichier $file a d�j� �t� trait�"); - } } - else - { - dolibarr_syslog("Erreur Lecture $file permissions insuffisante"); - } - } } closedir($handle); @@ -93,63 +93,63 @@ closedir($handle); Function import_file($db,$dir,$file) { - $error = 0; - $line = 0; - $hf = fopen ($dir.$file, "r"); - - if ($db->query("BEGIN")) - { + $error = 0; + $line = 0; + $hf = fopen ($dir.$file, "r"); - while (!feof($hf)) + if ($db->query("BEGIN")) { + + while (!feof($hf)) + { $cont = fgets($hf, 1024); - + $tabline = explode(";", $cont); - + if (substr($tabline, 0, 3) <> 'CLI') - { - if (sizeof($tabline) == 8) - { - $numero = $tabline[0]; - $mode = $tabline[1]; - $situation = $tabline[2]; - $date_mise_service = $tabline[3]; - $date_resiliation = $tabline[4]; - $motif_resiliation = $tabline[5]; - $commentaire = $tabline[6]; - $fichier = $file; - - $sql = "INSERT INTO ".MAIN_DB_PREFIX."telephonie_commande_retour "; - - $sql .= " (cli,mode,situation,date_mise_service,date_resiliation,motif_resiliation,commentaire,fichier,fk_fournisseur) "; - $sql .= " VALUES ("; - $sql .= "'$numero','$mode','$situation','$date_mise_service','$date_resiliation','$motif_resiliation','$commentaire','$fichier',1)"; - - if (! $db->query($sql)) - { - dolibarr_syslog("Erreur de traitement de ligne"); - dolibarr_syslog($db->error()); - $error++; - } - } - } + { + if (sizeof($tabline) == 8) + { + $numero = $tabline[0]; + $mode = $tabline[1]; + $situation = $tabline[2]; + $date_mise_service = $tabline[3]; + $date_resiliation = $tabline[4]; + $motif_resiliation = $tabline[5]; + $commentaire = $tabline[6]; + $fichier = $file; + + $sql = "INSERT INTO ".MAIN_DB_PREFIX."telephonie_commande_retour "; + + $sql .= " (cli,mode,situation,date_mise_service,date_resiliation,motif_resiliation,commentaire,fichier,fk_fournisseur) "; + $sql .= " VALUES ("; + $sql .= "'$numero','$mode','$situation','$date_mise_service','$date_resiliation','$motif_resiliation','$commentaire','$fichier',1)"; + + if (! $db->query($sql)) + { + dol_syslog("Erreur de traitement de ligne"); + dol_syslog($db->error()); + $error++; + } + } + } $line++; - } + } - if ($error == 0) - { + if ($error == 0) + { $db->query("COMMIT"); - dolibarr_syslog("COMMIT"); - } - else - { + dol_syslog("COMMIT"); + } + else + { $db->query("ROLLBACK"); - dolibarr_syslog("ROLLBACK"); + dol_syslog("ROLLBACK"); + } + } - - } - fclose($hf); + fclose($hf); - return $error; + return $error; } diff --git a/htdocs/telephonie/script/tools/update-contrat-contact.php b/htdocs/telephonie/script/tools/update-contrat-contact.php index 9e224ae2cf107635137895f494e26c1ab55fd174..4400957eccc3d948cfcc1bea965a3b58bc76ab39 100644 --- a/htdocs/telephonie/script/tools/update-contrat-contact.php +++ b/htdocs/telephonie/script/tools/update-contrat-contact.php @@ -48,7 +48,7 @@ else print "Errir"; } -dolibarr_syslog("Update contrats ".sizeof($contrats)); +dol_syslog("Update contrats ".sizeof($contrats)); for ($i = 0 ; $i < sizeof($contrats) ; $i++) { @@ -83,11 +83,11 @@ for ($i = 0 ; $i < sizeof($contrats) ; $i++) if (!$db->query($sql)) { - dolibarr_syslog("Erreur "); + dol_syslog("Erreur "); } else { - dolibarr_syslog("Update contrat ".$contrats[$i]); + dol_syslog("Update contrat ".$contrats[$i]); } } else diff --git a/htdocs/telephonie/script/update-contrat-statut.php b/htdocs/telephonie/script/update-contrat-statut.php index 1a6199d374502ba270857ccf756e18a1ea17e216..6f5f68180ce5fb95197987800780cf7e953fc561 100644 --- a/htdocs/telephonie/script/update-contrat-statut.php +++ b/htdocs/telephonie/script/update-contrat-statut.php @@ -49,7 +49,7 @@ else die ("Error $sql"); } -dolibarr_syslog("Update contrats ".sizeof($contrats)); +dol_syslog("Update contrats ".sizeof($contrats)); for ($i = 0 ; $i < sizeof($contrats) ; $i++) { diff --git a/htdocs/telephonie/script/update_presel.php b/htdocs/telephonie/script/update_presel.php index bdbcdce3cd4494e75a4ab316fed4e29e6c0926b8..93b1f515e3f9a1e4534550c92694a143e6f460ee 100644 --- a/htdocs/telephonie/script/update_presel.php +++ b/htdocs/telephonie/script/update_presel.php @@ -90,7 +90,7 @@ if ($resql) function UpdatePreselection($host, $user_login, $user_passwd, $lint, $id_person) { global $verbose; - dolibarr_syslog("UpdatePreselection($host, $user_login, ****, $ligne, $id_person)"); + dol_syslog("UpdatePreselection($host, $user_login, ****, $ligne, $id_person)"); $url = "/AzurApp_websvc_b3gdb/account.asmx/UpdatePreselection?"; @@ -101,20 +101,20 @@ function UpdatePreselection($host, $user_login, $user_passwd, $lint, $id_person) $url .= "&okPreselection=true"; if ($verbose > 2) - dolibarr_syslog("$host"); + dol_syslog("$host"); if ($verbose > 2) - dolibarr_syslog("$url"); + dol_syslog("$url"); $fp = fsockopen($host, 80, $errno, $errstr, 30); if (!$fp) { - dolibarr_syslog("$errstr ($errno)"); + dol_syslog("$errstr ($errno)"); } else { if ($verbose > 2) - dolibarr_syslog("Socket Opened send data"); + dol_syslog("Socket Opened send data"); $out = "GET $url HTTP/1.1\r\n"; $out .= "Host: $host\r\n"; @@ -123,7 +123,7 @@ function UpdatePreselection($host, $user_login, $user_passwd, $lint, $id_person) fwrite($fp, $out); if ($verbose > 2) - dolibarr_syslog("Data sent, waiting for response"); + dol_syslog("Data sent, waiting for response"); $parse = 0; $result = "error"; @@ -135,14 +135,14 @@ function UpdatePreselection($host, $user_login, $user_passwd, $lint, $id_person) $line = fgets($fp, 1024); if ($verbose > 2) - dolibarr_syslog($line); + dol_syslog($line); if ($parse == 1) { preg_match('/^<string xmlns=".*">(.*)<\/string>$/', $line, $results); $result = $results[1]; - dolibarr_syslog($line); + dol_syslog($line); $parse = 0; } @@ -158,16 +158,16 @@ function UpdatePreselection($host, $user_login, $user_passwd, $lint, $id_person) } if ($verbose > 1) - dolibarr_syslog("result = ".$result); + dol_syslog("result = ".$result); if (substr($result,0,2) == "OK") { - dolibarr_syslog("Presel OK ".$lint->numero." ".$lint->support." id client ".$id_person." $result\n"); + dol_syslog("Presel OK ".$lint->numero." ".$lint->support." id client ".$id_person." $result\n"); return 0; } else { - dolibarr_syslog("Presel ERR ".$lint->numero." ".$lint->support." id client ".$id_person." $result\n"); + dol_syslog("Presel ERR ".$lint->numero." ".$lint->support." id client ".$id_person." $result\n"); $fp = fopen("/tmp/".$lint->numero.".presel","w"); if ($fp) diff --git a/htdocs/telephonie/script/verif-import-cdr.php b/htdocs/telephonie/script/verif-import-cdr.php index b38e225bf125f498d3a6880b82d338a6b7b2a836..8c804c4e8f4bbdcd0e06c02c01da7a120c869ff1 100644 --- a/htdocs/telephonie/script/verif-import-cdr.php +++ b/htdocs/telephonie/script/verif-import-cdr.php @@ -57,7 +57,7 @@ if ($resql) } else { - dolibarr_syslog("Erreur recherche fournisseur"); + dol_syslog("Erreur recherche fournisseur"); exit ; } diff --git a/htdocs/telephonie/service/contrats.php b/htdocs/telephonie/service/contrats.php index 9940ece79a5d4128a2707c0f3dcd1a502617ecd4..bb8342553cf44749ada6a92fd68e55ec7ed21d15 100644 --- a/htdocs/telephonie/service/contrats.php +++ b/htdocs/telephonie/service/contrats.php @@ -83,7 +83,7 @@ if ($_GET["id"]) $hselected = $h; $h++; - dolibarr_fiche_head($head, $hselected, 'Service : '.$service->id); + dol_fiche_head($head, $hselected, 'Service : '.$service->id); $sql = "SELECT s.rowid as socid, s.nom as nom_facture"; diff --git a/htdocs/telephonie/service/fiche.php b/htdocs/telephonie/service/fiche.php index ae4fe6c8cf3438d67a1eef0d98e21c2b2078dc07..175adbb91989f55abac32e4027049b5b778ef925 100644 --- a/htdocs/telephonie/service/fiche.php +++ b/htdocs/telephonie/service/fiche.php @@ -147,7 +147,7 @@ else $head[$h][1] = "Contrats"; $h++; - dolibarr_fiche_head($head, $hselected, 'Service : '.$service->id); + dol_fiche_head($head, $hselected, 'Service : '.$service->id); print_fiche_titre('Fiche Service', $mesg); @@ -179,7 +179,7 @@ else $hselected = $h; $h++; - dolibarr_fiche_head($head, $hselected, 'Service : '.$service->numero); + dol_fiche_head($head, $hselected, 'Service : '.$service->numero); print_fiche_titre('Edition du service', $mesg); diff --git a/htdocs/telephonie/service/modules/ServiceFactureTableur.class.php b/htdocs/telephonie/service/modules/ServiceFactureTableur.class.php index 7e53e8afff5435b0ee9ba969e28d16558200f48e..e4195fd8170f5499e173f6932e4416366933009b 100644 --- a/htdocs/telephonie/service/modules/ServiceFactureTableur.class.php +++ b/htdocs/telephonie/service/modules/ServiceFactureTableur.class.php @@ -35,7 +35,7 @@ class ServiceFactureTableur Function Process($contrat) { - dolibarr_syslog("ServiceFactureTableur::Process Contrat ".$contrat->id); + dol_syslog("ServiceFactureTableur::Process Contrat ".$contrat->id); $facids = array(); @@ -56,7 +56,7 @@ class ServiceFactureTableur $j = 0; $num2 = $contrat->db->num_rows($resql2); - dolibarr_syslog("ServiceFactureTableur::Process Nb factures ".$num2); + dol_syslog("ServiceFactureTableur::Process Nb factures ".$num2); while ($j < $num2) { @@ -176,14 +176,14 @@ class ServiceFactureTableur } else { - dolibarr_syslog($contrat->db->error()); + dol_syslog($contrat->db->error()); } } $workbook->close(); - dolibarr_syslog("Close $fname"); + dol_syslog("Close $fname"); - dolibarr_syslog("Conso m�moire ".memory_get_usage() ); + dol_syslog("Conso m�moire ".memory_get_usage() ); } } } diff --git a/htdocs/telephonie/service/vendus.php b/htdocs/telephonie/service/vendus.php index 100111d48542364dd38afde5fcdcc598d7a3e9bb..091471bec9848fdd6484d1ab19cd21d7034d6c7d 100644 --- a/htdocs/telephonie/service/vendus.php +++ b/htdocs/telephonie/service/vendus.php @@ -156,7 +156,7 @@ if ($result) print img_file(); print '</a> '; - print '<a href="fiche.php?id='.$obj->rowid.'">'.dolibarr_print_phone($obj->ligne,0,0,true)."</a></td>\n"; + print '<a href="fiche.php?id='.$obj->rowid.'">'.dol_print_phone($obj->ligne,0,0,true)."</a></td>\n"; print '<td><a href="'.DOL_URL_ROOT.'/telephonie/client/fiche.php?id='.$obj->socid.'">'.stripslashes($obj->nom).'</a></td>'; print '<td><a href="'.DOL_URL_ROOT.'/soc.php?socid='.$obj->sfidp.'">'.stripslashes($obj->nom_facture).'</a></td>'; diff --git a/htdocs/telephonie/stats/ProcessGraphContrats.class.php b/htdocs/telephonie/stats/ProcessGraphContrats.class.php index 888930d51d1a712f043a4f8a07775457786c6fc9..2b45db485ce026d41838041834ba52160ac1cb2e 100644 --- a/htdocs/telephonie/stats/ProcessGraphContrats.class.php +++ b/htdocs/telephonie/stats/ProcessGraphContrats.class.php @@ -207,7 +207,7 @@ class ProcessGraphContrats } else { - dolibarr_syslog("Error"); + dol_syslog("Error"); } } diff --git a/htdocs/telephonie/stats/ProcessGraphLignes.class.php b/htdocs/telephonie/stats/ProcessGraphLignes.class.php index 222f53a2e77160c83bf0f63b8776259a6cbc44fb..e36fc97937652a0bd5a59178b459569c81de6e13 100644 --- a/htdocs/telephonie/stats/ProcessGraphLignes.class.php +++ b/htdocs/telephonie/stats/ProcessGraphLignes.class.php @@ -103,7 +103,7 @@ class ProcessGraphLignes function go($ligne) { - dolibarr_syslog("go $ligne"); + dol_syslog("go $ligne"); $this->ligne = $ligne; /* Lecture des donnees */ @@ -211,7 +211,7 @@ class ProcessGraphLignes } else { - dolibarr_syslog("Error"); + dol_syslog("Error"); } } } diff --git a/htdocs/telephonie/stats/clients/alerte.php b/htdocs/telephonie/stats/clients/alerte.php index f3764e7f7603e705e22d5353b93a167cee410dfc..d5083349066c2ddf3434390c534a9ba354bde466 100644 --- a/htdocs/telephonie/stats/clients/alerte.php +++ b/htdocs/telephonie/stats/clients/alerte.php @@ -43,7 +43,7 @@ $head[$h][1] = "Alerte"; $hselected = $h; $h++; -dolibarr_fiche_head($head, $hselected, "Clients"); +dol_fiche_head($head, $hselected, "Clients"); if ($_GET["marge"] > 0) { diff --git a/htdocs/telephonie/stats/clients/gain.php b/htdocs/telephonie/stats/clients/gain.php index b63d9304ccf2bc97672a5a8cc31102f7edc8dd55..550644faeb4a5aaa21b7eb41a001da5b0224e8e5 100644 --- a/htdocs/telephonie/stats/clients/gain.php +++ b/htdocs/telephonie/stats/clients/gain.php @@ -39,7 +39,7 @@ $head[$h][0] = DOL_URL_ROOT.'/telephonie/stats/clients/alerte.php'; $head[$h][1] = "Alerte"; $h++; -dolibarr_fiche_head($head, $hselected, "Clients"); +dol_fiche_head($head, $hselected, "Clients"); print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">'; diff --git a/htdocs/telephonie/stats/clients/index.php b/htdocs/telephonie/stats/clients/index.php index d9039e94eafe0b9e25861501589ed7e4b1108397..0af6ea0b9617029e407ddc628f29fa63e99e0e5a 100644 --- a/htdocs/telephonie/stats/clients/index.php +++ b/htdocs/telephonie/stats/clients/index.php @@ -42,7 +42,7 @@ $head[$h][0] = DOL_URL_ROOT.'/telephonie/stats/clients/alerte.php'; $head[$h][1] = "Alerte"; $h++; -dolibarr_fiche_head($head, $hselected, "Clients"); +dol_fiche_head($head, $hselected, "Clients"); print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">'; diff --git a/htdocs/telephonie/stats/commerciaux/ca.php b/htdocs/telephonie/stats/commerciaux/ca.php index 81a3dbb5b7ebb1acf3761ab8206c1c57b26d57b7..fe532f77c0d48b36b077b1b3702840208eaac33a 100644 --- a/htdocs/telephonie/stats/commerciaux/ca.php +++ b/htdocs/telephonie/stats/commerciaux/ca.php @@ -50,7 +50,7 @@ $head[$h][0] = DOL_URL_ROOT.'/telephonie/stats/commerciaux/contrats.php'; $head[$h][1] = "Contrats"; $h++; -dolibarr_fiche_head($head, $hselected, "Commerciaux"); +dol_fiche_head($head, $hselected, "Commerciaux"); print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">'; print '<tr><td width="30%" valign="top">'; diff --git a/htdocs/telephonie/stats/commerciaux/commercial.php b/htdocs/telephonie/stats/commerciaux/commercial.php index 5c944e94bdf14fc90c8c06439d1f03bba72eb1d1..07387cd6e9bb5731162edc60380af57091589a57 100644 --- a/htdocs/telephonie/stats/commerciaux/commercial.php +++ b/htdocs/telephonie/stats/commerciaux/commercial.php @@ -60,7 +60,7 @@ if ($_GET["commid"]) $head[$h][1] = "Prises d'ordres"; $h++; - dolibarr_fiche_head($head, $hselected, "Commerciaux"); + dol_fiche_head($head, $hselected, "Commerciaux"); print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">'; diff --git a/htdocs/telephonie/stats/commerciaux/commercialca.php b/htdocs/telephonie/stats/commerciaux/commercialca.php index cf8db766fba14f3ede5da6d79f8b9852bf9919e3..d3331f7f72533cf38ba3dcb09aef904c59831656 100644 --- a/htdocs/telephonie/stats/commerciaux/commercialca.php +++ b/htdocs/telephonie/stats/commerciaux/commercialca.php @@ -61,7 +61,7 @@ if ($_GET["commid"]) $head[$h][1] = "Lignes"; $h++; - dolibarr_fiche_head($head, $hselected, "Commerciaux"); + dol_fiche_head($head, $hselected, "Commerciaux"); stat_year_bar($year); print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">'; diff --git a/htdocs/telephonie/stats/commerciaux/commercialpo.php b/htdocs/telephonie/stats/commerciaux/commercialpo.php index ac064911f26df21c5b6d28af1f909210dab4fd96..ef3de89700d2d06923773d1c1bef652cec5dc169 100644 --- a/htdocs/telephonie/stats/commerciaux/commercialpo.php +++ b/htdocs/telephonie/stats/commerciaux/commercialpo.php @@ -67,7 +67,7 @@ if ($_GET["commid"]) $hselected = $h; $h++; - dolibarr_fiche_head($head, $hselected, "Commerciaux"); + dol_fiche_head($head, $hselected, "Commerciaux"); if ($page == -1) { $page = 0 ; } diff --git a/htdocs/telephonie/stats/commerciaux/contrats.php b/htdocs/telephonie/stats/commerciaux/contrats.php index 07a9b6c05a6d49ff5795fccb6f1d29cf01313745..ef4701b372026f663c676d42d0825c46738bb236 100644 --- a/htdocs/telephonie/stats/commerciaux/contrats.php +++ b/htdocs/telephonie/stats/commerciaux/contrats.php @@ -46,7 +46,7 @@ $head[$h][1] = "Contrats"; $hselected = $h; $h++; -dolibarr_fiche_head($head, $hselected, "Commerciaux"); +dol_fiche_head($head, $hselected, "Commerciaux"); print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">'; diff --git a/htdocs/telephonie/stats/commerciaux/groupes/groupe.php b/htdocs/telephonie/stats/commerciaux/groupes/groupe.php index 8b4283e457c8cad919ae229e4b973dc07e49d20e..5e4708a814982c7a68d375e8535a44054cc8e07b 100644 --- a/htdocs/telephonie/stats/commerciaux/groupes/groupe.php +++ b/htdocs/telephonie/stats/commerciaux/groupes/groupe.php @@ -46,7 +46,7 @@ $head[$h][0] = DOL_URL_ROOT.'/telephonie/stats/commerciaux/contrats.php'; $head[$h][1] = "Contrats"; $h++; -dolibarr_fiche_head($head, $hselected, "Commerciaux"); +dol_fiche_head($head, $hselected, "Commerciaux"); print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">'; diff --git a/htdocs/telephonie/stats/commerciaux/index.php b/htdocs/telephonie/stats/commerciaux/index.php index 4f425b6e1f9af4d2689b3735ccd11a1ad89d3658..5640781dbed46048103f68536b98d214de6b79fd 100644 --- a/htdocs/telephonie/stats/commerciaux/index.php +++ b/htdocs/telephonie/stats/commerciaux/index.php @@ -51,7 +51,7 @@ $head[$h][0] = DOL_URL_ROOT.'/telephonie/stats/commerciaux/contrats.php'; $head[$h][1] = "Contrats"; $h++; -dolibarr_fiche_head($head, $hselected, "Commerciaux"); +dol_fiche_head($head, $hselected, "Commerciaux"); print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">'; print '<tr><td width="30%" valign="top">'; diff --git a/htdocs/telephonie/stats/commerciaux/lignes.php b/htdocs/telephonie/stats/commerciaux/lignes.php index 02bee50add15fd82b776d1d6d0f987a808828959..e8c76c22c79f9cce9eec555d8cbc1461dc6e730b 100644 --- a/htdocs/telephonie/stats/commerciaux/lignes.php +++ b/htdocs/telephonie/stats/commerciaux/lignes.php @@ -56,7 +56,7 @@ if ($_GET["commid"]) $hselected = $h; $h++; - dolibarr_fiche_head($head, $hselected, "Commerciaux"); + dol_fiche_head($head, $hselected, "Commerciaux"); print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">'; diff --git a/htdocs/telephonie/stats/commerciaux/mensuel.php b/htdocs/telephonie/stats/commerciaux/mensuel.php index a3ce9ce2bb88dd75ade0916c042b9664e8d1f797..a33b7ef7e3f366e67d5f0269a9140985609cf48f 100644 --- a/htdocs/telephonie/stats/commerciaux/mensuel.php +++ b/htdocs/telephonie/stats/commerciaux/mensuel.php @@ -43,7 +43,7 @@ $head[$h][1] = "Mensuel"; $hselected = $h; $h++; -dolibarr_fiche_head($head, $hselected, "Commerciaux"); +dol_fiche_head($head, $hselected, "Commerciaux"); if (strlen($_GET["month"]) == 0) { diff --git a/htdocs/telephonie/stats/communications/analyse.php b/htdocs/telephonie/stats/communications/analyse.php index 1d7e579281b55cbec095b06a1b2e8b60d87d96d6..53d0c95d576874378af31f396d1f18fee2132f9f 100644 --- a/htdocs/telephonie/stats/communications/analyse.php +++ b/htdocs/telephonie/stats/communications/analyse.php @@ -62,7 +62,7 @@ $hselected = $h; $h++; -dolibarr_fiche_head($head, $hselected, "Communications"); +dol_fiche_head($head, $hselected, "Communications"); print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">'."\n"; diff --git a/htdocs/telephonie/stats/communications/destmonth.php b/htdocs/telephonie/stats/communications/destmonth.php index a34e01f433764522683f971e0f8f2ab3f3b5eebe..a60b4d7af0fe409efcda6e3ab98c4ff71e1ca621 100644 --- a/htdocs/telephonie/stats/communications/destmonth.php +++ b/htdocs/telephonie/stats/communications/destmonth.php @@ -60,7 +60,7 @@ $head[$h][0] = DOL_URL_ROOT.'/telephonie/stats/communications/analyse.php'; $head[$h][1] = "Analyse"; $h++; -dolibarr_fiche_head($head, $hselected, "Communications"); +dol_fiche_head($head, $hselected, "Communications"); print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">'; diff --git a/htdocs/telephonie/stats/communications/index.php b/htdocs/telephonie/stats/communications/index.php index 8176eef43f4cdc83c5eb9e052e98937368dbaaf9..6e1d21e19c5b675c2eaef22bd9a0f1dd94b2639f 100644 --- a/htdocs/telephonie/stats/communications/index.php +++ b/htdocs/telephonie/stats/communications/index.php @@ -54,7 +54,7 @@ $head[$h][1] = "Analyse"; $h++; -dolibarr_fiche_head($head, $hselected, "Communications"); +dol_fiche_head($head, $hselected, "Communications"); print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">'."\n"; diff --git a/htdocs/telephonie/stats/communications/lastmonth.php b/htdocs/telephonie/stats/communications/lastmonth.php index 5be894b55373d0f32545b32d6b8d967dcbf149cb..419739fbc35c4bc26f7b691c6434f486e2751989 100644 --- a/htdocs/telephonie/stats/communications/lastmonth.php +++ b/htdocs/telephonie/stats/communications/lastmonth.php @@ -58,7 +58,7 @@ $head[$h][0] = DOL_URL_ROOT.'/telephonie/stats/communications/analyse.php'; $head[$h][1] = "Analyse"; $h++; -dolibarr_fiche_head($head, $hselected, "Communications"); +dol_fiche_head($head, $hselected, "Communications"); print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">'; diff --git a/htdocs/telephonie/stats/communications/rentabilite.php b/htdocs/telephonie/stats/communications/rentabilite.php index a47329ec99ca018c98e7500d29e53787daa9d712..f7153b774b69b0aec64e080b79e5c1bd562ca819 100644 --- a/htdocs/telephonie/stats/communications/rentabilite.php +++ b/htdocs/telephonie/stats/communications/rentabilite.php @@ -60,7 +60,7 @@ $head[$h][0] = DOL_URL_ROOT.'/telephonie/stats/communications/analyse.php'; $head[$h][1] = "Analyse"; $h++; -dolibarr_fiche_head($head, $hselected, "Communications"); +dol_fiche_head($head, $hselected, "Communications"); print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">'; diff --git a/htdocs/telephonie/stats/consultation/index.php b/htdocs/telephonie/stats/consultation/index.php index e22a290a5fc82c8d20162c38eb0f2baecab68ee8..c96b79760c3dc291c36a51d61ee64c27e895747d 100644 --- a/htdocs/telephonie/stats/consultation/index.php +++ b/htdocs/telephonie/stats/consultation/index.php @@ -32,7 +32,7 @@ llxHeader('','Telephonie - Statistiques - Consultations'); */ include "./onglets.php"; -dolibarr_fiche_head($head, $hselected, "Consultations"); +dol_fiche_head($head, $hselected, "Consultations"); print '<br /><table class="noborder" width="100%" cellspacing="0" cellpadding="4">'; diff --git a/htdocs/telephonie/stats/contrats/index.php b/htdocs/telephonie/stats/contrats/index.php index 31e25802500b2790371f1e714e0bcafe89a455a9..57288ab2111227f10569980dc64ac34111699a3a 100644 --- a/htdocs/telephonie/stats/contrats/index.php +++ b/htdocs/telephonie/stats/contrats/index.php @@ -32,7 +32,7 @@ llxHeader('','Telephonie - Statistiques - Contrats'); */ include "./onglets.php"; -dolibarr_fiche_head($head, $hselected, "Contrats"); +dol_fiche_head($head, $hselected, "Contrats"); print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">'; diff --git a/htdocs/telephonie/stats/destinations/index.php b/htdocs/telephonie/stats/destinations/index.php index be5c94e192a6f9df959915b9b024443e38d2a758..2db47ba4c2927a5de8af4ea5bebca0152a649e1a 100644 --- a/htdocs/telephonie/stats/destinations/index.php +++ b/htdocs/telephonie/stats/destinations/index.php @@ -45,7 +45,7 @@ $head[$h][1] = "Destinations"; $hselected = $h; $h++; -dolibarr_fiche_head($head, $hselected, "Destinations"); +dol_fiche_head($head, $hselected, "Destinations"); print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">'; diff --git a/htdocs/telephonie/stats/distributeurs/commercial.php b/htdocs/telephonie/stats/distributeurs/commercial.php index 4175d2aaa761e808d12a75f29b1dc5407228b5d3..789f61bffdf915821871cc89ebed9a0a78587b13 100644 --- a/htdocs/telephonie/stats/distributeurs/commercial.php +++ b/htdocs/telephonie/stats/distributeurs/commercial.php @@ -51,7 +51,7 @@ if ($_GET["id"]) $head[$h][1] = "CA"; $h++; - dolibarr_fiche_head($head, $hselected, "Distributeurs"); + dol_fiche_head($head, $hselected, "Distributeurs"); print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">'; diff --git a/htdocs/telephonie/stats/distributeurs/commercialca.php b/htdocs/telephonie/stats/distributeurs/commercialca.php index 6d1f745312385a267d1d0bc54be08af9159caf82..23aebf4ef75fa9066289a27e2b3d9fe5b754b0c5 100644 --- a/htdocs/telephonie/stats/distributeurs/commercialca.php +++ b/htdocs/telephonie/stats/distributeurs/commercialca.php @@ -59,7 +59,7 @@ if ($_GET["id"]) $hselected = $h; $h++; - dolibarr_fiche_head($head, $hselected, "Distributeurs"); + dol_fiche_head($head, $hselected, "Distributeurs"); stat_year_bar($year); print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">'; diff --git a/htdocs/telephonie/stats/distributeurs/distributeur.php b/htdocs/telephonie/stats/distributeurs/distributeur.php index 2fb9ad03a9ead1f8765d8e70a9c6096a8b25ac2d..12c088999ad89d4840d0434ad6f4ee3929be7d07 100644 --- a/htdocs/telephonie/stats/distributeurs/distributeur.php +++ b/htdocs/telephonie/stats/distributeurs/distributeur.php @@ -49,7 +49,7 @@ if ($_GET["id"]) $hselected = $h; $h++; - dolibarr_fiche_head($head, $hselected, "Distributeur"); + dol_fiche_head($head, $hselected, "Distributeur"); print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">'; diff --git a/htdocs/telephonie/stats/distributeurs/distributeur.po.month.class.php b/htdocs/telephonie/stats/distributeurs/distributeur.po.month.class.php index 758ceeb353954d513a66dfa05cba0232320040f7..8be1d2d31128a00902e45e5e1ad314690d01dcb5 100644 --- a/htdocs/telephonie/stats/distributeurs/distributeur.po.month.class.php +++ b/htdocs/telephonie/stats/distributeurs/distributeur.po.month.class.php @@ -71,7 +71,7 @@ class GraphDistributeurPoMensuel extends GraphBar { } else { - dolibarr_syslog($this->db->error()); + dol_syslog($this->db->error()); } if (sizeof($datas) > 0) diff --git a/htdocs/telephonie/stats/distributeurs/index.php b/htdocs/telephonie/stats/distributeurs/index.php index 5245e4e3a20475ad4fd2e049093f2065242133b5..13e292208357aa6cf7a1c08b16d7f75f625caffd 100644 --- a/htdocs/telephonie/stats/distributeurs/index.php +++ b/htdocs/telephonie/stats/distributeurs/index.php @@ -41,7 +41,7 @@ $h++; $head[$h][0] = DOL_URL_ROOT.'/telephonie/stats/distributeurs/resultats.php'; $head[$h][1] = "R�sultats"; $h++; -dolibarr_fiche_head($head, $hselected, "Distributeurs"); +dol_fiche_head($head, $hselected, "Distributeurs"); print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">'; diff --git a/htdocs/telephonie/stats/distributeurs/lignes.php b/htdocs/telephonie/stats/distributeurs/lignes.php index a42c159019065bfe5955703233e0edea99a54e31..e0eddeba0bf0b6ea0192f17a89ce9d5fa185af19 100644 --- a/htdocs/telephonie/stats/distributeurs/lignes.php +++ b/htdocs/telephonie/stats/distributeurs/lignes.php @@ -56,7 +56,7 @@ if ($_GET["commid"]) $hselected = $h; $h++; - dolibarr_fiche_head($head, $hselected, "Distributeurs"); + dol_fiche_head($head, $hselected, "Distributeurs"); print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">'; diff --git a/htdocs/telephonie/stats/distributeurs/resultats.php b/htdocs/telephonie/stats/distributeurs/resultats.php index 9dfe54b79ad107b3c681ab6da15726988e17789a..7d6d5e1dd5e84bc6538de510375bc8752a4833d7 100644 --- a/htdocs/telephonie/stats/distributeurs/resultats.php +++ b/htdocs/telephonie/stats/distributeurs/resultats.php @@ -52,7 +52,7 @@ if ($_GET["year"] > 0) } $total = 0; $var = True; -dolibarr_fiche_head($head, $hselected, "Distributeurs"); +dol_fiche_head($head, $hselected, "Distributeurs"); stat_year_bar($year); print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">'; diff --git a/htdocs/telephonie/stats/factures/gain.php b/htdocs/telephonie/stats/factures/gain.php index 1c3a578dc353d46ae305f521e9e9e7f4c7f5e117..232b55ff1ab1a844bc380273826477f5798dc07a 100644 --- a/htdocs/telephonie/stats/factures/gain.php +++ b/htdocs/telephonie/stats/factures/gain.php @@ -52,7 +52,7 @@ $head[$h][0] = DOL_URL_ROOT.'/telephonie/stats/factures/type.php'; $head[$h][1] = "M�thode de paiement"; $h++; -dolibarr_fiche_head($head, $hselected, "Satistiques Factures"); +dol_fiche_head($head, $hselected, "Satistiques Factures"); print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">'; diff --git a/htdocs/telephonie/stats/factures/index.php b/htdocs/telephonie/stats/factures/index.php index b0484b39fe5ca0002ec00e4291dc4279a7f6dfa6..4c90a97810f0bbc2f50173ccea755e11a69153dc 100644 --- a/htdocs/telephonie/stats/factures/index.php +++ b/htdocs/telephonie/stats/factures/index.php @@ -60,7 +60,7 @@ $head[$h][0] = DOL_URL_ROOT.'/telephonie/stats/factures/type.php'; $head[$h][1] = "M�thode de paiement"; $h++; -dolibarr_fiche_head($head, $hselected, "Satistiques Factures"); +dol_fiche_head($head, $hselected, "Satistiques Factures"); stat_year_bar($year); print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">'; diff --git a/htdocs/telephonie/stats/factures/lastmonth.php b/htdocs/telephonie/stats/factures/lastmonth.php index 8ad76a148985300471ae86a773219a33bbe0dee7..fa31ad4b0e6665864ac58f0b27f847cfecf69ff2 100644 --- a/htdocs/telephonie/stats/factures/lastmonth.php +++ b/htdocs/telephonie/stats/factures/lastmonth.php @@ -49,7 +49,7 @@ $hselected = $h; $h++; -dolibarr_fiche_head($head, $hselected, "Satistiques Factures"); +dol_fiche_head($head, $hselected, "Satistiques Factures"); print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">'; diff --git a/htdocs/telephonie/stats/factures/marge.php b/htdocs/telephonie/stats/factures/marge.php index 3a45cd136af8b7aa1d87ade827353779c37d7d11..c199ac3bec2b7c38547bba59c4d729c58b05e0d9 100644 --- a/htdocs/telephonie/stats/factures/marge.php +++ b/htdocs/telephonie/stats/factures/marge.php @@ -54,7 +54,7 @@ $head[$h][0] = DOL_URL_ROOT.'/telephonie/stats/factures/type.php'; $head[$h][1] = "M�thode de paiement"; $h++; -dolibarr_fiche_head($head, $hselected, "Satistiques Factures $year"); +dol_fiche_head($head, $hselected, "Satistiques Factures $year"); print '<div class="onglet_inf">'; print '<a class="onglet_inf" href="marge.php?year=2004">2004</a>'; print '<a class="onglet_inf" href="marge.php?year=2005">2005</a>'; diff --git a/htdocs/telephonie/stats/factures/type.php b/htdocs/telephonie/stats/factures/type.php index a02e1f6617c6070940c358f0161a1f073beb3d0f..cbdafb7f5c588a75c5e2e4e2a043b2e3f06b5b9c 100644 --- a/htdocs/telephonie/stats/factures/type.php +++ b/htdocs/telephonie/stats/factures/type.php @@ -57,7 +57,7 @@ $h++; //$head[$h][1] = "3 derniers mois"; //$h++; -dolibarr_fiche_head($head, $hselected, "Satistiques Factures"); +dol_fiche_head($head, $hselected, "Satistiques Factures"); print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">'; diff --git a/htdocs/telephonie/stats/fournisseurs/index.php b/htdocs/telephonie/stats/fournisseurs/index.php index 0773633e6f1e02d7e7efa88560ad45c65c2b240e..9638dc100af7a7238df84562db2a02aa0738eb1f 100644 --- a/htdocs/telephonie/stats/fournisseurs/index.php +++ b/htdocs/telephonie/stats/fournisseurs/index.php @@ -43,7 +43,7 @@ $hselected = $h; $h++; -dolibarr_fiche_head($head, $hselected, "Fournisseurs"); +dol_fiche_head($head, $hselected, "Fournisseurs"); print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">'."\n"; diff --git a/htdocs/telephonie/stats/graph/comm.nbmensuel.class.php b/htdocs/telephonie/stats/graph/comm.nbmensuel.class.php index 820ca1d2ebd611c72463c8b4e1767e9ea67ca6ce..e360383cfbcf7c3751e688e375b05e2cff73edf8 100644 --- a/htdocs/telephonie/stats/graph/comm.nbmensuel.class.php +++ b/htdocs/telephonie/stats/graph/comm.nbmensuel.class.php @@ -111,7 +111,7 @@ class GraphCommNbMensuel extends GraphBar{ } else { - dolibarr_syslog("Error"); + dol_syslog("Error"); } } } diff --git a/htdocs/telephonie/stats/graph/comm.nbminutes.class.php b/htdocs/telephonie/stats/graph/comm.nbminutes.class.php index 327e65fa7fbc29dbeb0956902180076134808c32..ea7c807cfda4e4b27413e59b45b7e79d4a2e0a09 100644 --- a/htdocs/telephonie/stats/graph/comm.nbminutes.class.php +++ b/htdocs/telephonie/stats/graph/comm.nbminutes.class.php @@ -108,8 +108,8 @@ class GraphCommNbMinutes extends GraphBar{ } else { - dolibarr_syslog("Error in GraphCommNbMinutes"); - dolibarr_syslog($sql); + dol_syslog("Error in GraphCommNbMinutes"); + dol_syslog($sql); } } } diff --git a/htdocs/telephonie/stats/lignes/commande.php b/htdocs/telephonie/stats/lignes/commande.php index 015a9ad609b59427280b10946f0be8becaeda108..da93753b1ed26aa87cf533b369d00a5bfec048e0 100644 --- a/htdocs/telephonie/stats/lignes/commande.php +++ b/htdocs/telephonie/stats/lignes/commande.php @@ -36,7 +36,7 @@ llxHeader('','Telephonie - Statistiques - Lignes'); */ include "./onglets.php"; -dolibarr_fiche_head($head, $hselected, "Lignes"); +dol_fiche_head($head, $hselected, "Lignes"); print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">'; diff --git a/htdocs/telephonie/stats/lignes/commandes.week.class.php b/htdocs/telephonie/stats/lignes/commandes.week.class.php index 159d25d1674e2c31bfa0f9fbf19aafe063c7aebf..a59fca1752dd9a84ee4c66c2bc48954a46c4ab5f 100644 --- a/htdocs/telephonie/stats/lignes/commandes.week.class.php +++ b/htdocs/telephonie/stats/lignes/commandes.week.class.php @@ -73,7 +73,7 @@ class GraphLignesCommandesWeek extends GraphBarAcc { } else { - dolibarr_syslog($this->db->error()); + dol_syslog($this->db->error()); } /* Lignes rejet�es */ @@ -108,7 +108,7 @@ class GraphLignesCommandesWeek extends GraphBarAcc { } else { - dolibarr_syslog($this->db->error()); + dol_syslog($this->db->error()); } /* == */ diff --git a/htdocs/telephonie/stats/lignes/index.php b/htdocs/telephonie/stats/lignes/index.php index 42723d71661aa7e2e3c19bdf2e62fa153a20dbad..752e4bcaec75069a2983fcb8f127895d9da00477 100644 --- a/htdocs/telephonie/stats/lignes/index.php +++ b/htdocs/telephonie/stats/lignes/index.php @@ -32,7 +32,7 @@ llxHeader('','Telephonie - Statistiques - Lignes'); */ include "./onglets.php"; -dolibarr_fiche_head($head, $hselected, "Lignes"); +dol_fiche_head($head, $hselected, "Lignes"); print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">'; diff --git a/htdocs/telephonie/stats/lignes/resiliation.php b/htdocs/telephonie/stats/lignes/resiliation.php index 077227adffcbe329791b7f9626d8cfb3b77cb74f..2ea3ac83a6e57419ad257e9f6b685e826bfab769 100644 --- a/htdocs/telephonie/stats/lignes/resiliation.php +++ b/htdocs/telephonie/stats/lignes/resiliation.php @@ -36,7 +36,7 @@ llxHeader('','Telephonie - Statistiques - Lignes'); */ include "./onglets.php"; -dolibarr_fiche_head($head, $hselected, "Lignes"); +dol_fiche_head($head, $hselected, "Lignes"); print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">'; diff --git a/htdocs/telephonie/tarifs/config/grille.php b/htdocs/telephonie/tarifs/config/grille.php index 934702dcf0859cfff6acef6fae8d5184aa87c947..d846a24f826fa1074640313d684f4b9fb1be9e9e 100644 --- a/htdocs/telephonie/tarifs/config/grille.php +++ b/htdocs/telephonie/tarifs/config/grille.php @@ -45,7 +45,7 @@ $h++; require_once DOL_DOCUMENT_ROOT."/telephonie/telephonie.tarif.grille.class.php"; -dolibarr_fiche_head($head, $hselected, "Grille de tarif"); +dol_fiche_head($head, $hselected, "Grille de tarif"); $grille = new TelephonieTarifGrille($db); $grille->fetch($_GET["id"]); diff --git a/htdocs/telephonie/tarifs/fiche.php b/htdocs/telephonie/tarifs/fiche.php index 536b30a8f45b26645e6d31a1a6943bb3e0a46c32..2aa97b46a81836c8b3e38f18dd70b29c8c3a890f 100644 --- a/htdocs/telephonie/tarifs/fiche.php +++ b/htdocs/telephonie/tarifs/fiche.php @@ -50,15 +50,15 @@ if ($_GET["id"]) $hselected = $h; $h++; - dolibarr_fiche_head($head, $hselected, 'Tarif : '.$soc->nom); + dol_fiche_head($head, $hselected, 'Tarif : '.$soc->nom); print '<table class="border" cellpadding="3" cellspacing="0" width="100%">'; print '<tr><td width="20%">'.$langs->trans('Name').'</td><td>'.$soc->nom.'</td><td>'.$langs->trans('Prefix').'</td><td>'.$soc->prefix_comm.'</td></tr>'; print "<tr><td valign=\"top\">".$langs->trans('Address')."</td><td colspan=\"3\">".nl2br($soc->adresse)."<br>".$soc->cp." ".$soc->ville." ".$soc->pays."</td></tr>"; - print '<tr><td>'.$langs->trans('Phone').'</td><td>'.dolibarr_print_phone($soc->tel,$soc->pays_code,0,$soc->id).'</td>'; - print '<td>'.$langs->trans('Fax').'</td><td>'.dolibarr_print_phone($soc->fax,$soc->pays_code,0,$soc->id).'</td></tr>'; + print '<tr><td>'.$langs->trans('Phone').'</td><td>'.dol_print_phone($soc->tel,$soc->pays_code,0,$soc->id).'</td>'; + print '<td>'.$langs->trans('Fax').'</td><td>'.dol_print_phone($soc->fax,$soc->pays_code,0,$soc->id).'</td></tr>'; print '<tr><td>'.$langs->trans('Web').'</td><td colspan="3">'; if ($soc->url) { print '<a href="http://'.$soc->url.'">http://'.$soc->url.'</a>'; } print '</td></tr>'; @@ -72,7 +72,7 @@ if ($_GET["id"]) print '<table class="border" width="100%" cellspacing="0" cellpadding="4">'; - //print '<tr><td width="20%">Num�ro</td><td>'.dolibarr_print_phone($ligne->numero).'</td>'; + //print '<tr><td width="20%">Num�ro</td><td>'.dol_print_phone($ligne->numero).'</td>'; //print '<td>Factur�e : '.$ligne->facturable.'</td></tr>'; /* Lignes */ @@ -112,7 +112,7 @@ if ($_GET["id"]) print '</a> '; - print '<a href="'.DOL_URL_ROOT.'/telephonie/ligne/fiche.php?id='.$obj->rowid.'">'.dolibarr_print_phone($obj->ligne,0,0,true)."</a></td>\n"; + print '<a href="'.DOL_URL_ROOT.'/telephonie/ligne/fiche.php?id='.$obj->rowid.'">'.dol_print_phone($obj->ligne,0,0,true)."</a></td>\n"; print '<td align="center">'.$ligne->statuts[$obj->statut]."</td>\n"; diff --git a/htdocs/telephonie/tarifs/tarif-log.php b/htdocs/telephonie/tarifs/tarif-log.php index bdfeeb985f9264f415a5f4a766ff94b30e2bf030..ae30069bd472219eb65a051d2f85068b00fb10e9 100644 --- a/htdocs/telephonie/tarifs/tarif-log.php +++ b/htdocs/telephonie/tarifs/tarif-log.php @@ -41,7 +41,7 @@ $head[$h][1] = $langs->trans("Historique"); $head[$h][2] = 'history'; $h++; -dolibarr_fiche_head($head, 'history', $langs->trans("Tarif")); +dol_fiche_head($head, 'history', $langs->trans("Tarif")); /* * @@ -101,7 +101,7 @@ if ($resql) print "<td>".$obj->tarif."</td>\n"; print "<td>".sprintf("%01.4f",$obj->temporel)."</td>\n"; print "<td>".sprintf("%01.4f",$obj->fixe)."</td>\n"; - print "<td>".dolibarr_print_date($obj->date,'dayhour')."</td>\n"; + print "<td>".dol_print_date($obj->date,'dayhour')."</td>\n"; print "<td>".stripslashes($obj->firstname)." ".stripslashes($obj->name)."</td>\n"; print "</tr>\n"; $i++; @@ -167,7 +167,7 @@ if ($resql) print "<td>".$obj->tarif."</td>\n"; print "<td>".sprintf("%01.4f",$obj->temporel)."</td>\n"; print "<td>".sprintf("%01.4f",$obj->fixe)."</td>\n"; - print "<td>".dolibarr_print_date($obj->date,'dayhour')."</td>\n"; + print "<td>".dol_print_date($obj->date,'dayhour')."</td>\n"; print "<td>".stripslashes($obj->firstname)." ".stripslashes($obj->name)."</td>\n"; print "</tr>\n"; $i++; diff --git a/htdocs/telephonie/tarifs/tarif.php b/htdocs/telephonie/tarifs/tarif.php index 423d97f8636f6cef1cdab1301846c56e9a37ea49..717fe1839cf0e2ee533b15abf38cf70f143eff79 100644 --- a/htdocs/telephonie/tarifs/tarif.php +++ b/htdocs/telephonie/tarifs/tarif.php @@ -41,7 +41,7 @@ $head[$h][1] = $langs->trans("Historique"); $head[$h][2] = 'history'; $h++; -dolibarr_fiche_head($head, 'card', $langs->trans("Tarif")); +dol_fiche_head($head, 'card', $langs->trans("Tarif")); /* * diff --git a/htdocs/telephonie/telephonie-tarif.class.php b/htdocs/telephonie/telephonie-tarif.class.php index 06de3b6833244b1f588aa09a609600cb0b2fce40..5675bcec7dcd1de8cc9f9d771c77fd5c08a4683d 100644 --- a/htdocs/telephonie/telephonie-tarif.class.php +++ b/htdocs/telephonie/telephonie-tarif.class.php @@ -104,8 +104,8 @@ class TelephonieTarif { } else { - dolibarr_syslog("TelephonieTarif::_load_tarif Erreur 1"); - dolibarr_syslog($this->db->error()); + dol_syslog("TelephonieTarif::_load_tarif Erreur 1"); + dol_syslog($this->db->error()); } /* diff --git a/htdocs/telephonie/telephonie.commercial.class.php b/htdocs/telephonie/telephonie.commercial.class.php index 570d5422e1a02a22c36d53da88e8af51ae0e7af3..e058294774e4e365fd7c6aa68ab98564969d15cd 100644 --- a/htdocs/telephonie/telephonie.commercial.class.php +++ b/htdocs/telephonie/telephonie.commercial.class.php @@ -84,7 +84,7 @@ class CommercialTelephonie { } else { - dolibarr_syslog("DistributeurTelephonie::Create"); + dol_syslog("DistributeurTelephonie::Create"); $this->error_string["prenom"] = "Erreur SQL : $sql"; $this->error_string["nom"] = $this->db->error(); $error++; diff --git a/htdocs/telephonie/telephonie.contrat.class.php b/htdocs/telephonie/telephonie.contrat.class.php index 88fe9e4621c7ac245d0d3735606d1b554ae4e2ab..96df7a216f077e1ae910e29534cfd780f8998fb4 100644 --- a/htdocs/telephonie/telephonie.contrat.class.php +++ b/htdocs/telephonie/telephonie.contrat.class.php @@ -110,8 +110,8 @@ class TelephonieContrat { else { $this->error_message = "Echec de la cr�ation du contrat"; - dolibarr_syslog("TelephonieContrat::Create Error -1"); - dolibarr_syslog($this->db->error()); + dol_syslog("TelephonieContrat::Create Error -1"); + dol_syslog($this->db->error()); return -1; } } @@ -126,7 +126,7 @@ class TelephonieContrat { if (!$this->db->begin()) { $error++; - dolibarr_syslog("TelephonieContrat::Update Error -1"); + dol_syslog("TelephonieContrat::Update Error -1"); } if (!$error) @@ -146,7 +146,7 @@ class TelephonieContrat { if (! $this->db->query($sql) ) { $error++; - dolibarr_syslog("TelephonieContrat::Update Error -2"); + dol_syslog("TelephonieContrat::Update Error -2"); } } @@ -164,7 +164,7 @@ class TelephonieContrat { if (! $this->db->query($sql) ) { $error++; - dolibarr_syslog("TelephonieContrat::Update Error -3"); + dol_syslog("TelephonieContrat::Update Error -3"); } } @@ -238,7 +238,7 @@ class TelephonieContrat { } else { - dolibarr_syslog("TelephonieContrat::Fecth Erreur -2"); + dol_syslog("TelephonieContrat::Fecth Erreur -2"); $result = -2; } @@ -249,7 +249,7 @@ class TelephonieContrat { /* Erreur select SQL */ print $this->db->error(); $result = -1; - dolibarr_syslog("TelephonieContrat::Fecth Erreur -1"); + dol_syslog("TelephonieContrat::Fecth Erreur -1"); } $sql = "SELECT libelle"; @@ -485,7 +485,7 @@ class TelephonieContrat { } else { - dolibarr_syslog($sql); + dol_syslog($sql); } return $po; } @@ -555,7 +555,7 @@ class TelephonieContrat { } else { - dolibarr_syslog($sql); + dol_syslog($sql); } } else @@ -574,7 +574,7 @@ class TelephonieContrat { } else { - dolibarr_syslog($sql); + dol_syslog($sql); } } } @@ -635,7 +635,7 @@ class TelephonieContrat { } else { - dolibarr_syslog("Telephonie::Contrat Error". $sql); + dol_syslog("Telephonie::Contrat Error". $sql); } } /* diff --git a/htdocs/telephonie/telephonie.service.class.php b/htdocs/telephonie/telephonie.service.class.php index cb75049e87f4cfc083153d59ec4df6b946e19c83..90358ce2804d00342fe9dfb34e1aa98315184880 100644 --- a/htdocs/telephonie/telephonie.service.class.php +++ b/htdocs/telephonie/telephonie.service.class.php @@ -120,7 +120,7 @@ class TelephonieService { { $this->error_message = "Echec de la cr�ation du service !"; - dolibarr_syslog("TelephonieService::Create Error -1"); + dol_syslog("TelephonieService::Create Error -1"); return -1; } } diff --git a/htdocs/telephonie/telephonie.tarif.class.php b/htdocs/telephonie/telephonie.tarif.class.php index db9355abafc20f014dcaab0446e0f6c9e2b086dc..c7affdb4b7c6a4bad5577182c9b0fcddd9180e23 100644 --- a/htdocs/telephonie/telephonie.tarif.class.php +++ b/htdocs/telephonie/telephonie.tarif.class.php @@ -84,7 +84,7 @@ class TelephonieTarif { } else { - dolibarr_syslog($this->db->error()); + dol_syslog($this->db->error()); } return $result; @@ -181,8 +181,8 @@ class TelephonieTarif { } else { - dolibarr_syslog("TelephonieTarif::_load_tarif Erreur SQL 1 (type=$type)", LOG_ERR); - dolibarr_syslog($sql, LOG_DEBUG); + dol_syslog("TelephonieTarif::_load_tarif Erreur SQL 1 (type=$type)", LOG_ERR); + dol_syslog($sql, LOG_DEBUG); } /* * Tarif Sp�cifique @@ -219,8 +219,8 @@ class TelephonieTarif { } else { - dolibarr_syslog("TelephonieTarif::_load_tarif Erreur 59"); - dolibarr_syslog($this->db->error()); + dol_syslog("TelephonieTarif::_load_tarif Erreur 59"); + dol_syslog($this->db->error()); } } /* diff --git a/htdocs/telephonie/telephonie.tarif.grille.class.php b/htdocs/telephonie/telephonie.tarif.grille.class.php index b7cbb53ebb52a212fa82ec93eb7f5dc59ad154d9..cb27b48dd8645d9de9e8285a3914d718c3a1e0d2 100644 --- a/htdocs/telephonie/telephonie.tarif.grille.class.php +++ b/htdocs/telephonie/telephonie.tarif.grille.class.php @@ -114,7 +114,7 @@ class TelephonieTarifGrille { } else { - dolibarr_syslog($this->db->error()); + dol_syslog($this->db->error()); $result = -1; } @@ -152,7 +152,7 @@ class TelephonieTarifGrille { } else { - dolibarr_syslog($this->db->error()); + dol_syslog($this->db->error()); } if (sizeof($tarifs) > 0) @@ -185,8 +185,8 @@ class TelephonieTarifGrille { } else { - dolibarr_syslog($this->db->error()); - dolibarr_syslog($sql); + dol_syslog($this->db->error()); + dol_syslog($sql); $result = -1; } @@ -195,7 +195,7 @@ class TelephonieTarifGrille { if (! $this->db->query($sql) ) { - dolibarr_syslog($this->db->error()); + dol_syslog($this->db->error()); $result = -1; } @@ -204,7 +204,7 @@ class TelephonieTarifGrille { if (! $this->db->query($sql) ) { - dolibarr_syslog($this->db->error()); + dol_syslog($this->db->error()); $result = -1; } @@ -217,7 +217,7 @@ class TelephonieTarifGrille { } else { - dolibarr_syslog($this->db->error()); + dol_syslog($this->db->error()); $result = -1; } @@ -327,7 +327,7 @@ class TelephonieTarifGrille { } else { - dolibarr_syslog($this->db->error()); + dol_syslog($this->db->error()); } foreach($tarifs_linked as $tarif) @@ -359,7 +359,7 @@ class TelephonieTarifGrille { } else { - dolibarr_syslog($this->db->error()); + dol_syslog($this->db->error()); } $sql = "INSERT INTO ".MAIN_DB_PREFIX."telephonie_tarif_montant_log"; @@ -376,7 +376,7 @@ class TelephonieTarifGrille { } else { - dolibarr_syslog($this->db->error()); + dol_syslog($this->db->error()); } diff --git a/htdocs/telephonie/telephonie.tarif.prefix.class.php b/htdocs/telephonie/telephonie.tarif.prefix.class.php index 37db355a25e51a148e43e5c14574d6981e046ad2..21d1fa362f223e21ead688ca2ac0e9ccbc328b3d 100644 --- a/htdocs/telephonie/telephonie.tarif.prefix.class.php +++ b/htdocs/telephonie/telephonie.tarif.prefix.class.php @@ -61,7 +61,7 @@ class TelephonieTarifPrefix { } else { - dolibarr_syslog($this->db->error()); + dol_syslog($this->db->error()); } } else @@ -80,7 +80,7 @@ class TelephonieTarifPrefix { } else { - dolibarr_syslog($this->db->error()); + dol_syslog($this->db->error()); } } } diff --git a/htdocs/telephonie/workflowtel.class.php b/htdocs/telephonie/workflowtel.class.php index 783fdef1e0d95924a61c095c7dae40dca0fbc8bd..fe6455a6504fdab03ecf8cdb93f6d3fddfd2674a 100644 --- a/htdocs/telephonie/workflowtel.class.php +++ b/htdocs/telephonie/workflowtel.class.php @@ -53,7 +53,7 @@ class WorkflowTelephonie { } else { - dolibarr_syslog("WorkflowTelephonie::Create ".$this->db->error,LOG_ERR); + dol_syslog("WorkflowTelephonie::Create ".$this->db->error,LOG_ERR); $res = -1; } @@ -62,7 +62,7 @@ class WorkflowTelephonie { function Notify($module, $statut_id, $numero, $commentaire='') { - dolibarr_syslog("WorkflowTelephonie::Notify statut_id=$statut_id",LOG_DEBUG); + dol_syslog("WorkflowTelephonie::Notify statut_id=$statut_id",LOG_DEBUG); $sql = "SELECT u.rowid"; @@ -79,14 +79,14 @@ class WorkflowTelephonie { } else { - dolibarr_syslog("WorkflowTelephonie::SendMail ".$this->db->error,LOG_ERR); + dol_syslog("WorkflowTelephonie::SendMail ".$this->db->error,LOG_ERR); } } function SendMail($user_id, $statut_id, $numero, $commentaire='') { - dolibarr_syslog("WorkflowTelephonie::SendMail user_id=$user_id,statut_id=$statut_id",LOG_DEBUG); + dol_syslog("WorkflowTelephonie::SendMail user_id=$user_id,statut_id=$statut_id",LOG_DEBUG); $comm = new User($this->db,$user_id); $comm->fetch(); @@ -135,7 +135,7 @@ class WorkflowTelephonie { } else { - dolibarr_syslog("WorkflowTelephonie::Delete ".$this->db->error,LOG_ERR); + dol_syslog("WorkflowTelephonie::Delete ".$this->db->error,LOG_ERR); $res = -1; } diff --git a/htdocs/translate.class.php b/htdocs/translate.class.php index a6e7afc947406d10e211b0e91c6245be6ede0935..4425abcab77b7989cc6bbf8b0fe0a24414f8998f 100644 --- a/htdocs/translate.class.php +++ b/htdocs/translate.class.php @@ -351,7 +351,7 @@ class Translate { { // Translation is available $str=sprintf($this->tab_translate[$key],$param1,$param2,$param3,$param4); - if ($maxsize) $str=dolibarr_trunc($str,$maxsize); + if ($maxsize) $str=dol_trunc($str,$maxsize); // On remplace les tags HTML par __xx__ pour eviter traduction par htmlentities $newstr=ereg_replace('<','__lt__',$str); $newstr=ereg_replace('>','__gt__',$newstr); diff --git a/htdocs/user.class.php b/htdocs/user.class.php index 391b891c237703f777010c3b59f35f3ebe5b8151..9de63befaea7642ecd675e6d791707f50530fc7d 100644 --- a/htdocs/user.class.php +++ b/htdocs/user.class.php @@ -166,7 +166,7 @@ class User extends CommonObject $sql .= " WHERE u.rowid = ".$this->id; } - dolibarr_syslog("User::Fetch sql=".$sql, LOG_DEBUG); + dol_syslog("User::Fetch sql=".$sql, LOG_DEBUG); $result = $this->db->query($sql); if ($result) { @@ -214,7 +214,7 @@ class User extends CommonObject else { $this->error="USERNOTFOUND"; - dolibarr_syslog("User::fetch user not found", LOG_DEBUG); + dol_syslog("User::fetch user not found", LOG_DEBUG); $this->db->free($result); return 0; @@ -223,7 +223,7 @@ class User extends CommonObject else { $this->error=$this->db->error(); - dolibarr_syslog("User::fetch Error -1, fails to get user - ".$this->error." - sql=".$sql, LOG_ERR); + dol_syslog("User::fetch Error -1, fails to get user - ".$this->error." - sql=".$sql, LOG_ERR); return -1; } @@ -249,7 +249,7 @@ class User extends CommonObject else { $this->error=$this->db->error(); - dolibarr_syslog("User::fetch Error -2, fails to get setup user - ".$this->error." - sql=".$sql, LOG_ERR); + dol_syslog("User::fetch Error -2, fails to get setup user - ".$this->error." - sql=".$sql, LOG_ERR); return -2; } } @@ -266,7 +266,7 @@ class User extends CommonObject */ function addrights($rid,$allmodule='',$allperms='') { - dolibarr_syslog("User::addrights $rid, $allmodule, $allperms"); + dol_syslog("User::addrights $rid, $allmodule, $allperms"); $err=0; $whereforadd=''; @@ -290,7 +290,7 @@ class User extends CommonObject } else { $err++; - dolibarr_print_error($this->db); + dol_print_error($this->db); } // Where pour la liste des droits a ajouter @@ -336,7 +336,7 @@ class User extends CommonObject else { $err++; - dolibarr_print_error($this->db); + dol_print_error($this->db); } } @@ -384,7 +384,7 @@ class User extends CommonObject } else { $err++; - dolibarr_print_error($this->db); + dol_print_error($this->db); } // Where pour la liste des droits a supprimer @@ -427,7 +427,7 @@ class User extends CommonObject else { $err++; - dolibarr_print_error($this->db); + dol_print_error($this->db); } } @@ -480,7 +480,7 @@ class User extends CommonObject $sql.= " WHERE r.id = ur.fk_id AND ur.fk_user= ".$this->id." AND r.perms IS NOT NULL"; if ($moduletag) $sql.= " AND r.module = '".addslashes($moduletag)."'"; - dolibarr_syslog('User::getRights sql='.$sql, LOG_DEBUG); + dol_syslog('User::getRights sql='.$sql, LOG_DEBUG); $result = $this->db->query($sql); if ($result) { @@ -522,7 +522,7 @@ class User extends CommonObject $sql.= " WHERE r.id = gr.fk_id AND gr.fk_usergroup = gu.fk_usergroup AND gu.fk_user = ".$this->id." AND r.perms IS NOT NULL"; if ($moduletag) $sql.= " AND r.module = '".addslashes($moduletag)."'"; - dolibarr_syslog('User::getRights sql='.$sql, LOG_DEBUG); + dol_syslog('User::getRights sql='.$sql, LOG_DEBUG); $result = $this->db->query($sql); if ($result) { @@ -587,7 +587,7 @@ class User extends CommonObject $sql.= " WHERE rowid = ".$this->id; $result = $this->db->query($sql); - dolibarr_syslog("User::setstatus sql=".$sql); + dol_syslog("User::setstatus sql=".$sql); if ($result) { // Appel des triggers @@ -676,7 +676,7 @@ class User extends CommonObject // Nettoyage parametres $this->login = trim($this->login); - dolibarr_syslog("User::Create login=".$this->login.", user=".(is_object($user)?$user->id:''), LOG_DEBUG); + dol_syslog("User::Create login=".$this->login.", user=".(is_object($user)?$user->id:''), LOG_DEBUG); $error=0; $this->db->begin(); @@ -684,7 +684,7 @@ class User extends CommonObject $sql = "SELECT login FROM ".MAIN_DB_PREFIX."user"; $sql.= " WHERE login ='".addslashes($this->login)."'"; - dolibarr_syslog("User::Create sql=".$sql, LOG_DEBUG); + dol_syslog("User::Create sql=".$sql, LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -703,7 +703,7 @@ class User extends CommonObject $sql.= " VALUES(".$this->db->idate(mktime()).",'".addslashes($this->login)."','".$this->ldap_sid."')"; $result=$this->db->query($sql); - dolibarr_syslog("User::Create sql=".$sql, LOG_DEBUG); + dol_syslog("User::Create sql=".$sql, LOG_DEBUG); if ($result) { $table = "".MAIN_DB_PREFIX."user"; @@ -753,7 +753,7 @@ class User extends CommonObject else { $this->error=$interface->error; - dolibarr_syslog("User::Create ".$this->error, LOG_ERR); + dol_syslog("User::Create ".$this->error, LOG_ERR); $this->db->rollback(); return -3; } @@ -761,7 +761,7 @@ class User extends CommonObject else { $this->error=$this->db->lasterror(); - dolibarr_syslog("User::Create ".$this->error, LOG_ERR); + dol_syslog("User::Create ".$this->error, LOG_ERR); $this->db->rollback(); return -2; } @@ -770,7 +770,7 @@ class User extends CommonObject else { $this->error=$this->db->lasterror(); - dolibarr_syslog("User::Create ".$this->error, LOG_ERR); + dol_syslog("User::Create ".$this->error, LOG_ERR); $this->db->rollback(); return -1; } @@ -808,7 +808,7 @@ class User extends CommonObject $sql.= " WHERE rowid=".$this->id; $resql=$this->db->query($sql); - dolibarr_syslog("User::create_from_contact sql=".$sql, LOG_DEBUG); + dol_syslog("User::create_from_contact sql=".$sql, LOG_DEBUG); if ($resql) { $this->db->commit(); @@ -817,7 +817,7 @@ class User extends CommonObject else { $this->error=$this->db->error(); - dolibarr_syslog("User::create_from_contact ".$this->error, LOG_ERR); + dol_syslog("User::create_from_contact ".$this->error, LOG_ERR); $this->db->rollback(); return -1; @@ -826,7 +826,7 @@ class User extends CommonObject else { // $this->error deja positionne - dolibarr_syslog("User::create_from_contact - 0"); + dol_syslog("User::create_from_contact - 0"); $this->db->rollback(); return $result; @@ -866,7 +866,7 @@ class User extends CommonObject $sql.= " SET fk_member=".$member->id; $sql.= " WHERE rowid=".$this->id; - dolibarr_syslog("User::create_from_member sql=".$sql, LOG_DEBUG); + dol_syslog("User::create_from_member sql=".$sql, LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -876,7 +876,7 @@ class User extends CommonObject else { $this->error=$this->db->error(); - dolibarr_syslog("User::create_from_member - 1 - ".$this->error, LOG_ERR); + dol_syslog("User::create_from_member - 1 - ".$this->error, LOG_ERR); $this->db->rollback(); return -1; @@ -885,7 +885,7 @@ class User extends CommonObject else { // $this->error deja positionne - dolibarr_syslog("User::create_from_member - 2 - ".$this->error); + dol_syslog("User::create_from_member - 2 - ".$this->error); $this->db->rollback(); return $result; @@ -943,7 +943,7 @@ class User extends CommonObject $nbrowsaffected=0; $error=0; - dolibarr_syslog("User::update notrigger=".$notrigger.", nosyncmember=".$nosyncmember); + dol_syslog("User::update notrigger=".$notrigger.", nosyncmember=".$nosyncmember); // Nettoyage parametres $this->nom = trim($this->nom); @@ -982,7 +982,7 @@ class User extends CommonObject $sql.= ", note = '".addslashes($this->note)."'"; $sql.= " WHERE rowid = ".$this->id; - dolibarr_syslog("User::update sql=".$sql, LOG_DEBUG); + dol_syslog("User::update sql=".$sql, LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -1032,7 +1032,7 @@ class User extends CommonObject if ($result < 0) { $this->error=$luser->error; - dolibarr_syslog("User::update ".$this->error,LOG_ERR); + dol_syslog("User::update ".$this->error,LOG_ERR); $error++; } } @@ -1070,7 +1070,7 @@ class User extends CommonObject $this->db->rollback(); $this->error=$this->db->lasterror(); - dolibarr_syslog("User::update ".$this->error,LOG_ERR); + dol_syslog("User::update ".$this->error,LOG_ERR); return -1; } @@ -1091,7 +1091,7 @@ class User extends CommonObject $sql.= " tms = tms"; // La date de derniere modif doit changer sauf pour la mise a jour de date de derniere connexion $sql.= " WHERE rowid = ".$this->id; - dolibarr_syslog ("Update last login date for user->id=".$this->id." ".$sql, LOG_DEBUG); + dol_syslog ("Update last login date for user->id=".$this->id." ".$sql, LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -1122,7 +1122,7 @@ class User extends CommonObject $error=0; - dolibarr_syslog("User::setPassword user=".$user->id." password=".eregi_replace('.','*',$password)." changelater=".$changelater." notrigger=".$notrigger, LOG_DEBUG); + dol_syslog("User::setPassword user=".$user->id." password=".eregi_replace('.','*',$password)." changelater=".$changelater." notrigger=".$notrigger, LOG_DEBUG); // Si nouveau mot de passe non communique, on genere par module if (! $password) @@ -1151,8 +1151,8 @@ class User extends CommonObject } $sql.= " WHERE rowid = ".$this->id; - dolibarr_syslog("User::setPassword sql=hidden", LOG_DEBUG); - //dolibarr_syslog("User::Password sql=".$sql); + dol_syslog("User::setPassword sql=hidden", LOG_DEBUG); + //dol_syslog("User::Password sql=".$sql); $result = $this->db->query($sql); if ($result) { @@ -1177,7 +1177,7 @@ class User extends CommonObject if ($result < 0) { $this->error=$adh->error; - dolibarr_syslog("User::setPassword ".$this->error,LOG_ERR); + dol_syslog("User::setPassword ".$this->error,LOG_ERR); $error++; } } @@ -1207,7 +1207,7 @@ class User extends CommonObject } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); return -1; } } @@ -1219,7 +1219,7 @@ class User extends CommonObject $sql.= " SET pass_temp = '".addslashes($password)."'"; $sql.= " WHERE rowid = ".$this->id; - dolibarr_syslog("User::setPassword sql=hidden", LOG_DEBUG); // No log + dol_syslog("User::setPassword sql=hidden", LOG_DEBUG); // No log $result = $this->db->query($sql); if ($result) { @@ -1227,7 +1227,7 @@ class User extends CommonObject } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); return -3; } } @@ -1288,7 +1288,7 @@ class User extends CommonObject $url = "http://".$_SERVER["HTTP_HOST"].DOL_URL_ROOT.'/user/passwordforgotten.php?action=validatenewpassword&username='.$this->login."&passwordmd5=".md5($password); $mesg.= $url."\n\n"; $mesg.= "If you didn't ask anything, just forget this email\n\n"; - dolibarr_syslog("User::send_password url=".$url); + dol_syslog("User::send_password url=".$url); } $mailfile = new CMailFile($subject,$this->email,$conf->notification->email_from,$mesg, array(),array(),array(),'', '', 0, $msgishtml); @@ -1689,7 +1689,7 @@ class User extends CommonObject else { $err++; - dolibarr_print_error($this->db); + dol_print_error($this->db); } return $err; } @@ -1725,7 +1725,7 @@ class User extends CommonObject } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); } } diff --git a/htdocs/user/addon.php b/htdocs/user/addon.php index 162a068d92a02a64ac2a9ee1c76937782273e9ae..a6155452ed2be300c7fcad63c9353ba1f3a09f69 100644 --- a/htdocs/user/addon.php +++ b/htdocs/user/addon.php @@ -53,7 +53,7 @@ if ($_GET["id"]) */ $head = user_prepare_head($fuser); - dolibarr_fiche_head($head, 'other', $langs->trans("User")); + dol_fiche_head($head, 'other', $langs->trans("User")); /* diff --git a/htdocs/user/clicktodial.php b/htdocs/user/clicktodial.php index 1abffe631764f75a396361629faa76e0d3f7acd1..9c1dab4ca1d253b3f11a51f8505c3579121a7117 100644 --- a/htdocs/user/clicktodial.php +++ b/htdocs/user/clicktodial.php @@ -65,7 +65,7 @@ if ($_GET["id"]) */ $head = user_prepare_head($fuser); - dolibarr_fiche_head($head, 'clicktodial', $langs->trans("User")); + dol_fiche_head($head, 'clicktodial', $langs->trans("User")); /* * Fiche en mode visu diff --git a/htdocs/user/fiche.php b/htdocs/user/fiche.php index 94769741c53e255482a219aa852320bf0960e99b..24cef122f039980ecf98ea027903989729b5b9f7 100644 --- a/htdocs/user/fiche.php +++ b/htdocs/user/fiche.php @@ -750,7 +750,7 @@ else */ $head = user_prepare_head($fuser); - dolibarr_fiche_head($head, 'user', $langs->trans("User")); + dol_fiche_head($head, 'user', $langs->trans("User")); /* @@ -924,7 +924,7 @@ else $contact->fetch($fuser->contact_id); if ($fuser->societe_id > 0) print ' / '; else print '<br>'; - print '<a href="'.DOL_URL_ROOT.'/contact/fiche.php?id='.$fuser->contact_id.'">'.img_object($langs->trans("ShowContact"),'contact').' '.dolibarr_trunc($contact->getFullName($langs),32).'</a>'; + print '<a href="'.DOL_URL_ROOT.'/contact/fiche.php?id='.$fuser->contact_id.'">'.img_object($langs->trans("ShowContact"),'contact').' '.dol_trunc($contact->getFullName($langs),32).'</a>'; } print '</td>'; print "</tr>\n"; @@ -953,11 +953,11 @@ else print '</td></tr>'; print '<tr><td width="25%" valign="top">'.$langs->trans("LastConnexion").'</td>'; - print '<td>'.dolibarr_print_date($fuser->datelastlogin,"dayhour").'</td>'; + print '<td>'.dol_print_date($fuser->datelastlogin,"dayhour").'</td>'; print "</tr>\n"; print '<tr><td width="25%" valign="top">'.$langs->trans("PreviousConnexion").'</td>'; - print '<td>'.dolibarr_print_date($fuser->datepreviouslogin,"dayhour").'</td>'; + print '<td>'.dol_print_date($fuser->datepreviouslogin,"dayhour").'</td>'; print "</tr>\n"; // Autres caracteristiques issus des autres modules @@ -1092,7 +1092,7 @@ else } } else { - dolibarr_print_error($db); + dol_print_error($db); } $db->free($resql); @@ -1322,7 +1322,7 @@ else { $contact = new Contact($db); $contact->fetch($fuser->contact_id); - print ' / '.'<a href="'.DOL_URL_ROOT.'/contact/fiche.php?id='.$fuser->contact_id.'">'.img_object($langs->trans("ShowContact"),'contact').' '.dolibarr_trunc($contact->getFullName($langs),32).'</a>'; + print ' / '.'<a href="'.DOL_URL_ROOT.'/contact/fiche.php?id='.$fuser->contact_id.'">'.img_object($langs->trans("ShowContact"),'contact').' '.dol_trunc($contact->getFullName($langs),32).'</a>'; } } else diff --git a/htdocs/user/group/fiche.php b/htdocs/user/group/fiche.php index 7454e2c475099eba6dac0bbd520dbfa155f07a62..d395a1c06e105e167d477a1798764aa29ad5bd1c 100644 --- a/htdocs/user/group/fiche.php +++ b/htdocs/user/group/fiche.php @@ -212,7 +212,7 @@ else */ $head = group_prepare_head($group); - dolibarr_fiche_head($head, 'group', $langs->trans("Group").": ".$group->nom); + dol_fiche_head($head, 'group', $langs->trans("Group").": ".$group->nom); /* @@ -299,7 +299,7 @@ else } } else { - dolibarr_print_error($db); + dol_print_error($db); } if ($caneditperms) @@ -381,7 +381,7 @@ else $db->free($result); } else { - dolibarr_print_error($db); + dol_print_error($db); } } diff --git a/htdocs/user/group/index.php b/htdocs/user/group/index.php index 5bd57c85bc9206d0ee6e10f65f17564a6d4b6934..8ca5a4031ff6ec6f553b63588d11a5d215bc94c4 100644 --- a/htdocs/user/group/index.php +++ b/htdocs/user/group/index.php @@ -84,7 +84,7 @@ if ($resql) print "<tr $bc[$var]>"; print '<td><a href="fiche.php?id='.$obj->rowid.'">'.img_object($langs->trans("ShowGroup"),"group").' '.$obj->nom.'</a></td>'; - print '<td width="100" align="center">'.dolibarr_print_date($obj->datec,"day").'</td>'; + print '<td width="100" align="center">'.dol_print_date($obj->datec,"day").'</td>'; print "</tr>\n"; $i++; } @@ -93,7 +93,7 @@ if ($resql) } else { - dolibarr_print_error($db); + dol_print_error($db); } $db->close(); diff --git a/htdocs/user/group/ldap.php b/htdocs/user/group/ldap.php index 48c45690e6f6a2b6158e23ae9d4df712f3fd8a7d..7aa0ba774855c6e61c6d4ce540e3298b36490899 100644 --- a/htdocs/user/group/ldap.php +++ b/htdocs/user/group/ldap.php @@ -62,7 +62,7 @@ $fgroup->getrights(); */ $head = group_prepare_head($fgroup); -dolibarr_fiche_head($head, 'ldap', $langs->trans("Group").": ".$fgroup->nom); +dol_fiche_head($head, 'ldap', $langs->trans("Group").": ".$fgroup->nom); @@ -144,7 +144,7 @@ if ($result > 0) } else { - dolibarr_print_error('',$ldap->error); + dol_print_error('',$ldap->error); } print '</table>'; diff --git a/htdocs/user/group/perms.php b/htdocs/user/group/perms.php index ecfb83282ad808228ea0fb036787f605ec2a243b..96a18ff83b4559783a3df8973ac8281f49b0fbc8 100644 --- a/htdocs/user/group/perms.php +++ b/htdocs/user/group/perms.php @@ -74,7 +74,7 @@ if ($_GET["id"]) */ $head = group_prepare_head($fgroup); - dolibarr_fiche_head($head, 'rights', $langs->trans("Group").": ".$fgroup->nom); + dol_fiche_head($head, 'rights', $langs->trans("Group").": ".$fgroup->nom); $db->begin(); @@ -130,7 +130,7 @@ if ($_GET["id"]) } else { - dolibarr_print_error($db); + dol_print_error($db); } diff --git a/htdocs/user/home.php b/htdocs/user/home.php index 9bc3419906848c67fb22b4b18dea118780c9aa04..8c83d6f11cfe91d546b7d9a62856a0918cc2b34b 100644 --- a/htdocs/user/home.php +++ b/htdocs/user/home.php @@ -111,7 +111,7 @@ if ($resql) } else print $langs->trans("InternalUser"); print '</td>'; - print "<td align=\"right\">".dolibarr_print_date($obj->datec,'dayhour')."</td>"; + print "<td align=\"right\">".dol_print_date($obj->datec,'dayhour')."</td>"; print '</tr>'; $i++; } @@ -121,7 +121,7 @@ if ($resql) } else { - dolibarr_print_error($db); + dol_print_error($db); } @@ -150,7 +150,7 @@ if ( $db->query($sql) ) print "<tr $bc[$var]>"; print "<td><a href=\"".DOL_URL_ROOT."/user/group/fiche.php?id=$obj->rowid\">".img_object($langs->trans("ShowGroup"),"group")." ".$obj->nom."</a></td>"; - print "<td width=\"80\" align=\"center\">".dolibarr_print_date($obj->datec)."</td>"; + print "<td width=\"80\" align=\"center\">".dol_print_date($obj->datec)."</td>"; print '</tr>'; $i++; } @@ -160,7 +160,7 @@ if ( $db->query($sql) ) } else { - dolibarr_print_error($db); + dol_print_error($db); } diff --git a/htdocs/user/index.php b/htdocs/user/index.php index a184e07a23b1065e2c0b57c47e8ff5fd1adf7736..2790060c68285a1616928a5296928dfe84d44b82 100644 --- a/htdocs/user/index.php +++ b/htdocs/user/index.php @@ -117,10 +117,10 @@ if ($result) print '</td>'; // Date creation - print '<td nowrap="nowrap" align="center">'.dolibarr_print_date($obj->datec,"day").'</td>'; + print '<td nowrap="nowrap" align="center">'.dol_print_date($obj->datec,"day").'</td>'; // Date last login - print '<td nowrap="nowrap" align="center">'.dolibarr_print_date($obj->datelastlogin,"dayhour").'</td>'; + print '<td nowrap="nowrap" align="center">'.dol_print_date($obj->datelastlogin,"dayhour").'</td>'; // Statut $userstatic->statut=$obj->statut; @@ -133,7 +133,7 @@ if ($result) } else { - dolibarr_print_error($db); + dol_print_error($db); } $db->close(); diff --git a/htdocs/user/info.php b/htdocs/user/info.php index 0de745d22aab9c4228aa26629074cc145408c11b..6a6d1f8ecdc9fc9d460a335a9e575f78482081c4 100644 --- a/htdocs/user/info.php +++ b/htdocs/user/info.php @@ -51,7 +51,7 @@ $fuser->info($_GET["id"]); $head = user_prepare_head($fuser); -dolibarr_fiche_head($head, 'info', $langs->trans("User")); +dol_fiche_head($head, 'info', $langs->trans("User")); print '<table width="100%"><tr><td>'; diff --git a/htdocs/user/ldap.php b/htdocs/user/ldap.php index dcf70b75ac9ae0a89faa36185fcc1711d8d387bb..133f2a9e1df30df87b355bd123d297defb94d24d 100644 --- a/htdocs/user/ldap.php +++ b/htdocs/user/ldap.php @@ -92,7 +92,7 @@ $form = new Form($db); */ $head = user_prepare_head($fuser); -dolibarr_fiche_head($head, 'ldap', $langs->trans("User")); +dol_fiche_head($head, 'ldap', $langs->trans("User")); @@ -225,7 +225,7 @@ if ($result > 0) } else { - dolibarr_print_error('',$ldap->error); + dol_print_error('',$ldap->error); } print '</table>'; diff --git a/htdocs/user/logout.php b/htdocs/user/logout.php index a0ec668c8f4bdec793e9ff8d4f21bf33af39579d..63023a3c967d44502e188f83a6e1a31170702799 100644 --- a/htdocs/user/logout.php +++ b/htdocs/user/logout.php @@ -48,14 +48,14 @@ $sessionname="DOLSESSID_".$dolibarr_main_db_name; if (! empty($conf->global->MAIN_SESSION_TIMEOUT)) ini_set('session.gc_maxlifetime',$conf->global->MAIN_SESSION_TIMEOUT); session_name($sessionname); session_destroy(); -dolibarr_syslog("End session in DOLSESSID_".$dolibarr_main_db_name); +dol_syslog("End session in DOLSESSID_".$dolibarr_main_db_name); // Init session $sessionname="DOLSESSID_".$dolibarr_main_db_name; if (! empty($conf->global->MAIN_SESSION_TIMEOUT)) ini_set('session.gc_maxlifetime',$conf->global->MAIN_SESSION_TIMEOUT); session_name($sessionname); session_start(); -dolibarr_syslog("Start session name=".$sessionname." Session id()=".session_id().", _SESSION['dol_login']=".$_SESSION["dol_login"].", ".ini_get("session.gc_maxlifetime")); +dol_syslog("Start session name=".$sessionname." Session id()=".session_id().", _SESSION['dol_login']=".$_SESSION["dol_login"].", ".ini_get("session.gc_maxlifetime")); session_unregister("dol_login"); diff --git a/htdocs/user/note.php b/htdocs/user/note.php index b42781937c692d2a447bcc054db42221a3f41142..398a36a848651cb3499fe9599a0c00048bb85ab4 100644 --- a/htdocs/user/note.php +++ b/htdocs/user/note.php @@ -82,7 +82,7 @@ if ($id) { $head = user_prepare_head($fuser); - dolibarr_fiche_head($head, 'note', $langs->trans("User")); + dol_fiche_head($head, 'note', $langs->trans("User")); if ($msg) print '<div class="error">'.$msg.'</div>'; diff --git a/htdocs/user/param_ihm.php b/htdocs/user/param_ihm.php index cbd5802cfe24586f19855afef979c6f5422c7625..72b7ff3806cede005045bee314d4be6766f5889d 100644 --- a/htdocs/user/param_ihm.php +++ b/htdocs/user/param_ihm.php @@ -113,7 +113,7 @@ llxHeader(); */ $head = user_prepare_head($fuser); -dolibarr_fiche_head($head, 'guisetup', $langs->trans("User")); +dol_fiche_head($head, 'guisetup', $langs->trans("User")); print '<table class="border" width="100%">'; diff --git a/htdocs/user/passwordforgotten.php b/htdocs/user/passwordforgotten.php index 3244c988eea4e8c7435e38310b10c79966933e0a..784d85c96681f8b2c0ea68109ebe62afc8c64e8e 100644 --- a/htdocs/user/passwordforgotten.php +++ b/htdocs/user/passwordforgotten.php @@ -35,7 +35,7 @@ $sessionname="DOLSESSID_".$dolibarr_main_db_name; if (! empty($conf->global->MAIN_SESSION_TIMEOUT)) ini_set('session.gc_maxlifetime',$conf->global->MAIN_SESSION_TIMEOUT); session_name($sessionname); session_start(); -dolibarr_syslog("Start session name=".$sessionname." Session id()=".session_id().", _SESSION['dol_login']=".$_SESSION["dol_login"].", ".ini_get("session.gc_maxlifetime")); +dol_syslog("Start session name=".$sessionname." Session id()=".session_id().", _SESSION['dol_login']=".$_SESSION["dol_login"].", ".ini_get("session.gc_maxlifetime")); $user->getrights('user'); @@ -71,7 +71,7 @@ if ($_GET["action"] == 'validatenewpassword' && $_GET["username"] && $_GET["pass if (md5($edituser->pass_temp) == $_GET["passwordmd5"]) { $newpassword=$edituser->setPassword($user,$edituser->pass_temp,0); - dolibarr_syslog("passwordforgotten.php new password for user->id=".$edituser->id." validated in database"); + dol_syslog("passwordforgotten.php new password for user->id=".$edituser->id." validated in database"); //session_start(); //$_SESSION["loginmesg"]=$langs->trans("PasswordChanged"); header("Location: ".DOL_URL_ROOT.'/'); diff --git a/htdocs/user/perms.php b/htdocs/user/perms.php index e0a7bb791985c6bbbd02d79f0e689884fec620e3..80a3d865baf4a43bfcb10563f1a13fbe9772dfd4 100644 --- a/htdocs/user/perms.php +++ b/htdocs/user/perms.php @@ -93,7 +93,7 @@ $fuser->getrights(); */ $head = user_prepare_head($fuser); -dolibarr_fiche_head($head, 'rights', $langs->trans("User")); +dol_fiche_head($head, 'rights', $langs->trans("User")); $db->begin(); @@ -154,7 +154,7 @@ if ($result) } else { - dolibarr_print_error($db); + dol_print_error($db); } // Lecture des droits groupes @@ -181,7 +181,7 @@ if ($result) } else { - dolibarr_print_error($db); + dol_print_error($db); } diff --git a/htdocs/usergroup.class.php b/htdocs/usergroup.class.php index 2986e117d18e73c2e4445d250785e722b20a1c85..cc3bcd5a45bc84b22d6b5f35b6068fd477e29195 100644 --- a/htdocs/usergroup.class.php +++ b/htdocs/usergroup.class.php @@ -70,7 +70,7 @@ class UserGroup $sql.= " FROM ".MAIN_DB_PREFIX."usergroup as g"; $sql.= " WHERE g.rowid = ".$this->id; - dolibarr_syslog("Usergroup::fetch sql=".$sql); + dol_syslog("Usergroup::fetch sql=".$sql); $result = $this->db->query($sql); if ($result) { @@ -90,7 +90,7 @@ class UserGroup else { $this->error=$this->db->lasterror(); - dolibarr_syslog("UserGroup::Fetch ".$this->error, LOG_ERR); + dol_syslog("UserGroup::Fetch ".$this->error, LOG_ERR); return -1; } @@ -112,7 +112,7 @@ class UserGroup $sql.= " AND ug.fk_user = ".$usertosearch->id; $sql.= " ORDER BY g.nom"; - dolibarr_syslog("UserGroup::listGroupsForUser sql=".$sql,LOG_DEBUG); + dol_syslog("UserGroup::listGroupsForUser sql=".$sql,LOG_DEBUG); $result = $this->db->query($sql); if ($result) { @@ -132,7 +132,7 @@ class UserGroup else { $this->error=$this->db->lasterror(); - dolibarr_syslog("UserGroup::listGroupsForUser ".$this->error, LOG_ERR); + dol_syslog("UserGroup::listGroupsForUser ".$this->error, LOG_ERR); return -1; } return $ret; @@ -170,7 +170,7 @@ class UserGroup } else { $err++; - dolibarr_print_error($this->db); + dol_print_error($this->db); } // Where pour la liste des droits � ajouter @@ -218,7 +218,7 @@ class UserGroup else { $err++; - dolibarr_print_error($this->db); + dol_print_error($this->db); } } @@ -266,7 +266,7 @@ class UserGroup } else { $err++; - dolibarr_print_error($this->db); + dol_print_error($this->db); } // Where pour la liste des droits � supprimer @@ -312,7 +312,7 @@ class UserGroup else { $err++; - dolibarr_print_error($this->db); + dol_print_error($this->db); } } @@ -416,7 +416,7 @@ class UserGroup else { $this->db->rollback(); - dolibarr_print_error($this->db); + dol_print_error($this->db); return -1; } } @@ -451,7 +451,7 @@ class UserGroup } else { - dolibarr_syslog("UserGroup::Create"); + dol_syslog("UserGroup::Create"); return -1; } } @@ -494,7 +494,7 @@ class UserGroup } else { - dolibarr_print_error($this->db); + dol_print_error($this->db); return -2; } } diff --git a/htdocs/viewimage.php b/htdocs/viewimage.php index 2c5c7bb7e23685be87b491f7881330ba618d3c34..f64b2d941bb97d3caa858fc04e2f938467932adc 100644 --- a/htdocs/viewimage.php +++ b/htdocs/viewimage.php @@ -323,9 +323,9 @@ if (! $accessallowed) if (eregi('\.\.',$original_file) || eregi('[<>|]',$original_file)) { $langs->load("main"); - dolibarr_syslog("Refused to deliver file ".$original_file); + dol_syslog("Refused to deliver file ".$original_file); // Do no show plain path in shown error message - dolibarr_print_error(0,$langs->trans("ErrorFileNameInvalid",$_GET["file"])); + dol_print_error(0,$langs->trans("ErrorFileNameInvalid",$_GET["file"])); exit; } @@ -358,12 +358,12 @@ else // Output files on disk $filename = basename($original_file); - dolibarr_syslog("viewimage.php return file $original_file $filename content-type=$type"); + dol_syslog("viewimage.php return file $original_file $filename content-type=$type"); if (! file_exists($original_file)) { $langs->load("main"); - dolibarr_print_error(0,$langs->trans("ErrorFileDoesNotExists",$_GET["file"])); + dol_print_error(0,$langs->trans("ErrorFileDoesNotExists",$_GET["file"])); exit; } diff --git a/htdocs/webcal/webcal.class.php b/htdocs/webcal/webcal.class.php index 9b05e291704f4cc5f89fdb0b0ea06a28a9590a89..6e018df2587f1007c53d452b5378eaca53bdeab4 100644 --- a/htdocs/webcal/webcal.class.php +++ b/htdocs/webcal/webcal.class.php @@ -76,14 +76,14 @@ class Webcal { { global $langs; - dolibarr_syslog("Webcal::add user=".$user->id); + dol_syslog("Webcal::add user=".$user->id); // Test si login webcal d�fini pour le user if (! $user->webcal_login) { $langs->load("other"); $this->error=$langs->transnoentities("ErrorWebcalLoginNotDefined","<a href=\"".DOL_URL_ROOT."/user/fiche.php?id=".$user->id."\">".$user->login."</a>"); - dolibarr_syslog("Webcal::add ERROR ".$this->error); + dol_syslog("Webcal::add ERROR ".$this->error); return -4; } @@ -112,7 +112,7 @@ class Webcal { $sql = "INSERT INTO webcal_entry (cal_id, cal_create_by,cal_date,cal_time,cal_mod_date, cal_mod_time,cal_duration,cal_priority,cal_type, cal_access, cal_name,cal_description)"; $sql.= " VALUES ($cal_id, '$cal_create_by', '$cal_date', '$cal_time', '$cal_mod_date', '$cal_mod_time', $cal_duration, $cal_priority, '$cal_type', '$cal_access', '$cal_name','$cal_description')"; - dolibarr_syslog("Webcal::add sql=".$sql); + dol_syslog("Webcal::add sql=".$sql); $resql=$this->localdb->query($sql); if ($resql) { @@ -130,7 +130,7 @@ class Webcal { { $this->localdb->rollback(); $this->error = $this->localdb->error() . '<br>' .$sql; - dolibarr_syslog("Webcal::add ERROR ".$this->error); + dol_syslog("Webcal::add ERROR ".$this->error); return -1; } } @@ -138,7 +138,7 @@ class Webcal { { $this->localdb->rollback(); $this->error = $this->localdb->error() . '<br>' .$sql; - dolibarr_syslog("Webcal::add ERROR ".$this->error); + dol_syslog("Webcal::add ERROR ".$this->error); return -2; } } @@ -146,7 +146,7 @@ class Webcal { { $this->localdb->rollback(); $this->error = $this->localdb->error() . '<br>' .$sql; - dolibarr_syslog("Webcal::add ERROR ".$this->error); + dol_syslog("Webcal::add ERROR ".$this->error); return -3; } } @@ -189,7 +189,7 @@ class Webcal { require_once (DOL_DOCUMENT_ROOT ."/lib/xcal.lib.php"); - dolibarr_syslog("webcal::build_calfile Build cal file format=".$format.", type=".$type.", cachedelay=".$cachedelay.", filename=".$filename.", filters size=".sizeof($filters), LOG_DEBUG); + dol_syslog("webcal::build_calfile Build cal file format=".$format.", type=".$type.", cachedelay=".$cachedelay.", filename=".$filename.", filters size=".sizeof($filters), LOG_DEBUG); // Check parameters if (empty($format)) return -1; @@ -223,7 +223,7 @@ class Webcal { $sql.= " FROM webcal_entry"; $sql.= " order by cal_date"; - dolibarr_syslog("Webcal::build_vcal select events sql=".$sql); + dol_syslog("Webcal::build_vcal select events sql=".$sql); $resql=$this->localdb->query($sql); if ($resql) { @@ -252,7 +252,7 @@ class Webcal { $min=sprintf("%02d",$reg[2]); $sec=sprintf("%02d",$reg[3]); } - $datestart=dolibarr_mktime($hour,$min,$sec,$month,$day,$year); + $datestart=dol_mktime($hour,$min,$sec,$month,$day,$year); $event['startdate']=$datestart; //$event['duration']=$obj->cal_duration; // Not required with type 'journal' //$event['enddate']=''; // Not required with type 'journal' @@ -273,7 +273,7 @@ class Webcal { } else { - dolibarr_syslog("webcal::build_calfile ".$this->localdb->lasterror()); + dol_syslog("webcal::build_calfile ".$this->localdb->lasterror()); return -1; } diff --git a/htdocs/webservices/client.php b/htdocs/webservices/client.php index d06b6ca3c5a4b59bc454d9eaded619417668e71a..dd839367c790c0ae477d76f2deb9d80225c67fc0 100644 --- a/htdocs/webservices/client.php +++ b/htdocs/webservices/client.php @@ -35,7 +35,7 @@ $WS_METHOD = 'getVersions'; $parameters = array("param1"=>"value1"); // Set the WebService URL -dolibarr_syslog("Create soapclient_nusoap for URL=".$WS_DOL_URL); +dol_syslog("Create soapclient_nusoap for URL=".$WS_DOL_URL); $soapclient = new soapclient_nusoap($WS_DOL_URL); if ($soapclient) { @@ -43,7 +43,7 @@ if ($soapclient) } // Call the WebService method and store its result in $result. -dolibarr_syslog("Call method ".$WS_METHOD); +dol_syslog("Call method ".$WS_METHOD); $result = $soapclient->call($WS_METHOD,$parameters); // Show page with result diff --git a/htdocs/webservices/server.php b/htdocs/webservices/server.php index 4bf21de8a97986af58d4ad3fcd3baff86b025476..72b66ba73edee4e57f12feb1819c4d3968fba915 100644 --- a/htdocs/webservices/server.php +++ b/htdocs/webservices/server.php @@ -29,7 +29,7 @@ require_once("../master.inc.php"); require_once(NUSOAP_PATH.'/nusoap.php'); // Include SOAP -dolibarr_syslog("Call Dolibarr webservices interfaces"); +dol_syslog("Call Dolibarr webservices interfaces"); // Create the soap Object @@ -63,7 +63,7 @@ $server->service($HTTP_RAW_POST_DATA); // Full methods code function getVersions() { - dolibarr_syslog("Function: getVersions"); + dol_syslog("Function: getVersions"); $versions_array=array(); diff --git a/scripts/adherents/sync_member_dolibarr2ldap.php b/scripts/adherents/sync_member_dolibarr2ldap.php index 932f52f896d55481026ea6af6a372000029376aa..27212512556b6e2bc370fc5ca563fa709057e355 100644 --- a/scripts/adherents/sync_member_dolibarr2ldap.php +++ b/scripts/adherents/sync_member_dolibarr2ldap.php @@ -109,13 +109,13 @@ if ($resql) $result=$member->fetch($obj->rowid); if ($result < 0) { - dolibarr_print_error($db,$member->error); + dol_print_error($db,$member->error); exit; } $result=$member->fetch_subscriptions(); if ($result < 0) { - dolibarr_print_error($db,$member->error); + dol_print_error($db,$member->error); exit; } @@ -144,7 +144,7 @@ if ($resql) } else { - dolibarr_print_error($db); + dol_print_error($db); } return $error; diff --git a/scripts/adherents/sync_member_ldap2dolibarr.php b/scripts/adherents/sync_member_ldap2dolibarr.php index 930806cd0474d376d3195ff3ee81d63b200f7072..1da3508c4b577f3b5b8f5094b7e6d53d471ffb32 100644 --- a/scripts/adherents/sync_member_ldap2dolibarr.php +++ b/scripts/adherents/sync_member_ldap2dolibarr.php @@ -121,7 +121,7 @@ if ($resql) } else { - dolibarr_print_error($db); + dol_print_error($db); exit; } @@ -277,7 +277,7 @@ if ($result >= 0) if ($datelast) { // Cree derniere cotisation et met a jour datefin dans adherent - //print "yy".dolibarr_print_date($datelast)."\n"; + //print "yy".dol_print_date($datelast)."\n"; $crowid=$member->cotisation($datelast, $pricelast, 0); } @@ -296,13 +296,13 @@ if ($result >= 0) } else { - dolibarr_print_error('',$ldap->error); + dol_print_error('',$ldap->error); $error++; } } else { - dolibarr_print_error('',$ldap->error); + dol_print_error('',$ldap->error); $error++; } diff --git a/scripts/banque/graph-solde.php b/scripts/banque/graph-solde.php index 81f687b3d4d211a2cf48065b445e178d304c1852..d2466dc1f0d7aa864d8d5aea37763e89a7e6f575 100644 --- a/scripts/banque/graph-solde.php +++ b/scripts/banque/graph-solde.php @@ -146,7 +146,7 @@ foreach ($accounts as $account) } else { - dolibarr_print_error($db); + dol_print_error($db); } // print strftime("%Y%m%d",$max); @@ -173,7 +173,7 @@ foreach ($accounts as $account) } else { - dolibarr_print_error($db); + dol_print_error($db); } // Calcul de $solde avant le debut du graphe @@ -190,7 +190,7 @@ foreach ($accounts as $account) } else { - dolibarr_print_error($db); + dol_print_error($db); } // Chargement de labels et datas pour tableau 1 @@ -267,7 +267,7 @@ foreach ($accounts as $account) } else { - dolibarr_print_error($db); + dol_print_error($db); } // Calcul de $solde avant le debut du graphe @@ -284,7 +284,7 @@ foreach ($accounts as $account) } else { - dolibarr_print_error($db); + dol_print_error($db); } // Chargement de labels et datas pour tableau 2 @@ -360,7 +360,7 @@ foreach ($accounts as $account) } else { - dolibarr_print_error($db); + dol_print_error($db); } // Calcul de $solde avant le debut du graphe @@ -440,7 +440,7 @@ foreach ($accounts as $account) } else { - dolibarr_print_error($db); + dol_print_error($db); } $sql = "SELECT date_format(datev,'%m'), sum(amount)"; @@ -460,7 +460,7 @@ foreach ($accounts as $account) } else { - dolibarr_print_error($db); + dol_print_error($db); } // Chargement de labels et data_xxx pour tableau 4 diff --git a/scripts/books/droits-editeurs.php b/scripts/books/droits-editeurs.php index 4128341c4edfbda0d916e2917abb24cb24d35864..6a95bcf49ce377312b42661ffe19f9914ae0b6cf 100644 --- a/scripts/books/droits-editeurs.php +++ b/scripts/books/droits-editeurs.php @@ -48,7 +48,7 @@ if ($resql) { $id = $obj->socid; - dolibarr_syslog("droits-editeurs.php id:$id", LOG_DEBUG ); + dol_syslog("droits-editeurs.php id:$id", LOG_DEBUG ); $coupdf = new pdf_courrier_editeur($db, $langs); $coupdf->write($id, $year); @@ -301,7 +301,7 @@ class pdf_courrier_editeur $pdf->Close(); $pdf->Output($file); - dolibarr_syslog("droits-editeurs.php write $file", LOG_DEBUG ); + dol_syslog("droits-editeurs.php write $file", LOG_DEBUG ); return 0; } else diff --git a/scripts/company/sync_contacts_dolibarr2ldap.php b/scripts/company/sync_contacts_dolibarr2ldap.php index 78d353aed34c7d3d072f0468a2038bf65c2ca49a..f04dc802c6d5e6d1ccf4c061a41af2f4510c6cb0 100644 --- a/scripts/company/sync_contacts_dolibarr2ldap.php +++ b/scripts/company/sync_contacts_dolibarr2ldap.php @@ -110,7 +110,7 @@ if ($resql) } else { - dolibarr_print_error($db); + dol_print_error($db); } return $error; diff --git a/scripts/cron/stock-graph.php b/scripts/cron/stock-graph.php index 99a30c88e7fab6f7a689c4634a3a5cc3bc0dda6c..1fd2b8abd4d0f903dfe79a19c58184bb64c3a541 100644 --- a/scripts/cron/stock-graph.php +++ b/scripts/cron/stock-graph.php @@ -86,7 +86,7 @@ if ($resql) } else { - dolibarr_print_error($db,$sql); + dol_print_error($db,$sql); } $now = time(); @@ -99,7 +99,7 @@ for ($i = 0 ; $i < strftime('%j',$now) ; $i++) $values[$key][$i] = 0; } $values[0][$i] = 0; - $legends[$i] = strftime('%b',dolibarr_mktime(12,0,0,1,1,2006) + ($i * 3600 * 24)); + $legends[$i] = strftime('%b',dol_mktime(12,0,0,1,1,2006) + ($i * 3600 * 24)); //print $legends[$i].strftime('%j',$now); } @@ -144,7 +144,7 @@ if ($resql) } else { - dolibarr_print_error($db,$sql); + dol_print_error($db,$sql); } for ($i = $max_day + 1 ; $i < ($day + 1) ; $i++) diff --git a/scripts/energie/graph-line.php b/scripts/energie/graph-line.php index c3ebc371a8a3613aa1f64318b85e1c205d601405..a92e3fe43952956cdf5406458d1a5f2235c084a1 100644 --- a/scripts/energie/graph-line.php +++ b/scripts/energie/graph-line.php @@ -201,8 +201,8 @@ if ($resql_c) } else { - dolibarr_syslog("Erreur SQL"); - dolibarr_syslog("$sql"); + dol_syslog("Erreur SQL"); + dol_syslog("$sql"); } $i_c++; } @@ -210,7 +210,7 @@ if ($resql_c) } else { - dolibarr_syslog("Erreur SQL"); - dolibarr_syslog($db->error($resql_c)); + dol_syslog("Erreur SQL"); + dol_syslog($db->error($resql_c)); } ?> diff --git a/scripts/energie/graph.php b/scripts/energie/graph.php index 9e82529ccbcce1f772d71a89c8e30f49d8f8851b..cd606cd7725121bb1dea01ea51a600956fcbf70d 100644 --- a/scripts/energie/graph.php +++ b/scripts/energie/graph.php @@ -280,8 +280,8 @@ if ($resql_c) } else { - dolibarr_syslog("Erreur SQL"); - dolibarr_syslog("$sql"); + dol_syslog("Erreur SQL"); + dol_syslog("$sql"); } $i_c++; } @@ -289,8 +289,8 @@ if ($resql_c) } else { - dolibarr_syslog("Erreur SQL"); - dolibarr_syslog($db->error($resql_c)); + dol_syslog("Erreur SQL"); + dol_syslog($db->error($resql_c)); } /************************************************************* * Groupes @@ -469,7 +469,7 @@ if ($resql_g) } else { - dolibarr_syslog("Erreur SQL"); + dol_syslog("Erreur SQL"); print $sql_c; } $i_g++; @@ -477,7 +477,7 @@ if ($resql_g) } else { - dolibarr_syslog("Erreur SQL"); + dol_syslog("Erreur SQL"); print $sql; } ?> diff --git a/scripts/invoices/factures-impayees-commerciaux.php b/scripts/invoices/factures-impayees-commerciaux.php index 075d70e41532a9779d803e51ccdc489c9803f4c0..773589a5d229a6f1114e80bccffa83227b21f75d 100644 --- a/scripts/invoices/factures-impayees-commerciaux.php +++ b/scripts/invoices/factures-impayees-commerciaux.php @@ -62,7 +62,7 @@ if ( $db->query($sql) ) $oldemail = ''; $message = ''; $total = ''; - dolibarr_syslog("factures-impayees-commerciaux: "); + dol_syslog("factures-impayees-commerciaux: "); if ($num) { @@ -84,7 +84,7 @@ if ( $db->query($sql) ) $message .= "Facture ".$obj->facnumber." : ".price($obj->total_ttc)." : ".$obj->nom."\n"; $total += $obj->total_ttc; - dolibarr_syslog("factures-impayees-commerciaux: ".$obj->email); + dol_syslog("factures-impayees-commerciaux: ".$obj->email); $i++; } @@ -101,8 +101,8 @@ if ( $db->query($sql) ) } else { - dolibarr_print_error($db); - dolibarr_syslog("factures-impayees-commerciaux: Error"); + dol_print_error($db); + dol_syslog("factures-impayees-commerciaux: Error"); } @@ -116,7 +116,7 @@ function envoi_mail($oldemail,$message,$total) $msgishtml = 0; print "Envoi mail pour $oldemail, total: $total\n"; - dolibarr_syslog("factures-impayees-commerciaux: send mail to $oldemail"); + dol_syslog("factures-impayees-commerciaux: send mail to $oldemail"); $allmessage = "Liste des factures impay�es � ce jour\n"; $allmessage .= "Cette liste ne comporte que les factures des soci�t�s dont vous �tes r�f�renc�s comme commercial.\n"; diff --git a/scripts/mailing/mailing-prepare.php b/scripts/mailing/mailing-prepare.php index cd6f1b91820f73febb1e05e62fb9e25fa290d7ff..e9a72c59ec5b04074927fe381e03c1099fe7c55a 100644 --- a/scripts/mailing/mailing-prepare.php +++ b/scripts/mailing/mailing-prepare.php @@ -58,8 +58,8 @@ if ( $db->query($sql) ) { $row = $db->fetch_row(); - dolibarr_syslog("mailing-prepare: mailing $row[0]"); - dolibarr_syslog("mailing-prepare: mailing module $row[1]"); + dol_syslog("mailing-prepare: mailing $row[0]"); + dol_syslog("mailing-prepare: mailing module $row[1]"); require_once(DOL_DOCUMENT_ROOT.'/includes/modules/mailings/'.$row[1].'.modules.php'); diff --git a/scripts/mailing/mailing-send.php b/scripts/mailing/mailing-send.php index 7a7d5bd068cb56afc36e4b27e7e5b1134bd573ee..0e29242c79696475ff9ff4ed95a2b59408cb8ec9 100644 --- a/scripts/mailing/mailing-send.php +++ b/scripts/mailing/mailing-send.php @@ -87,7 +87,7 @@ if ($resql) { $obj = $db->fetch_object($resql); - dolibarr_syslog("mailing-send: mailing ".$id); + dol_syslog("mailing-send: mailing ".$id); $id = $obj->rowid; $subject = $obj->sujet; @@ -119,14 +119,14 @@ if ($resql) if ($num) { - dolibarr_syslog("mailing-send: nb of targets = ".$num, LOG_DEBUG); + dol_syslog("mailing-send: nb of targets = ".$num, LOG_DEBUG); // Positionne date debut envoi $sql="UPDATE ".MAIN_DB_PREFIX."mailing SET date_envoi=SYSDATE() WHERE rowid=".$id; $resql2=$db->query($sql); if (! $resql2) { - dolibarr_print_error($db); + dol_print_error($db); } // Boucle sur chaque adresse et envoie le mail @@ -191,14 +191,14 @@ if ($resql) // Mail envoye avec succes $nbok++; - dolibarr_syslog("mailing-send: ok for #".$i.($mail->error?' - '.$mail->error:''), LOG_DEBUG); + dol_syslog("mailing-send: ok for #".$i.($mail->error?' - '.$mail->error:''), LOG_DEBUG); $sql="UPDATE ".MAIN_DB_PREFIX."mailing_cibles"; $sql.=" SET statut=1, date_envoi=SYSDATE() WHERE rowid=".$obj->rowid; $resql2=$db->query($sql); if (! $resql2) { - dolibarr_print_error($db); + dol_print_error($db); } } else @@ -206,14 +206,14 @@ if ($resql) // Mail en echec $nbko++; - dolibarr_syslog("mailing-send: error for #".$i.($mail->error?' - '.$mail->error:''), LOG_DEBUG); + dol_syslog("mailing-send: error for #".$i.($mail->error?' - '.$mail->error:''), LOG_DEBUG); $sql="UPDATE ".MAIN_DB_PREFIX."mailing_cibles"; $sql.=" SET statut=-1, date_envoi=SYSDATE() WHERE rowid=".$obj->rowid; $resql2=$db->query($sql); if (! $resql2) { - dolibarr_print_error($db); + dol_print_error($db); } } @@ -226,17 +226,17 @@ if ($resql) if (! $nbko) $statut=3; $sql="UPDATE ".MAIN_DB_PREFIX."mailing SET statut=".$statut." WHERE rowid=".$id; - dolibarr_syslog("mailing-send: update global status sql=".$sql, LOG_DEBUG); + dol_syslog("mailing-send: update global status sql=".$sql, LOG_DEBUG); $resql2=$db->query($sql); if (! $resql2) { - dolibarr_print_error($db); + dol_print_error($db); } } else { - dolibarr_syslog($db->error()); - dolibarr_print_error($db); + dol_syslog($db->error()); + dol_print_error($db); } ?> diff --git a/scripts/prelevement/prelevement-verif.php b/scripts/prelevement/prelevement-verif.php index 06f10e02a5b75373c1b41cf7fb0899115af90de1..740a6ac897d9873cc2475166c70f2092e4f372a2 100644 --- a/scripts/prelevement/prelevement-verif.php +++ b/scripts/prelevement/prelevement-verif.php @@ -41,14 +41,14 @@ $error = 0; $puser = new user($db, PRELEVEMENT_USER); $puser->fetch(); -dolibarr_syslog("Pr�l�vements effectu�s par ".$puser->fullname." [".PRELEVEMENT_USER."]"); +dol_syslog("Pr�l�vements effectu�s par ".$puser->fullname." [".PRELEVEMENT_USER."]"); -dolibarr_syslog("Raison sociale : ".PRELEVEMENT_RAISON_SOCIALE); -dolibarr_syslog("Num�ro Nation Emetteur : ".PRELEVEMENT_NUMERO_NATIONAL_EMETTEUR); +dol_syslog("Raison sociale : ".PRELEVEMENT_RAISON_SOCIALE); +dol_syslog("Num�ro Nation Emetteur : ".PRELEVEMENT_NUMERO_NATIONAL_EMETTEUR); -dolibarr_syslog("Code etablissement : ".PRELEVEMENT_CODE_BANQUE); -dolibarr_syslog("Code guichet : ". PRELEVEMENT_CODE_GUICHET); -dolibarr_syslog("Numero compte : ".PRELEVEMENT_NUMERO_COMPTE); +dol_syslog("Code etablissement : ".PRELEVEMENT_CODE_BANQUE); +dol_syslog("Code guichet : ". PRELEVEMENT_CODE_GUICHET); +dol_syslog("Numero compte : ".PRELEVEMENT_NUMERO_COMPTE); /* * @@ -88,13 +88,13 @@ if (!$error) $i++; } $db->free(); - dolibarr_syslog("$i factures � pr�lever"); + dol_syslog("$i factures � pr�lever"); } else { $error = 1; - dolibarr_syslog("Erreur -1"); - dolibarr_syslog($db->error()); + dol_syslog("Erreur -1"); + dol_syslog($db->error()); } } @@ -111,7 +111,7 @@ if (!$error) * */ $i = 0; - dolibarr_syslog("D�but v�rification des RIB"); + dol_syslog("D�but v�rification des RIB"); if (sizeof($factures) > 0) { @@ -134,27 +134,27 @@ if (!$error) } else { - dolibarr_syslog("Erreur de RIB societe $fact->socid $soc->nom"); + dol_syslog("Erreur de RIB societe $fact->socid $soc->nom"); } } else { - dolibarr_syslog("Impossible de lire la soci�t�"); + dol_syslog("Impossible de lire la soci�t�"); } } else { - dolibarr_syslog("Impossible de lire la facture"); + dol_syslog("Impossible de lire la facture"); } } } else { - dolibarr_syslog("Aucune factures a traiter"); + dol_syslog("Aucune factures a traiter"); } } -dolibarr_syslog(sizeof($factures_prev)." factures sur ".sizeof($factures)." seront pr�lev�es"); +dol_syslog(sizeof($factures_prev)." factures sur ".sizeof($factures)." seront pr�lev�es"); $db->close(); diff --git a/scripts/prelevement/prelevement.php b/scripts/prelevement/prelevement.php index d5afd7494aa8814095dd8f2171dd3c63b201dabe..9fa70683e236b761d0406db6e51796017cdccc31 100644 --- a/scripts/prelevement/prelevement.php +++ b/scripts/prelevement/prelevement.php @@ -90,13 +90,13 @@ if (!$error) $i++; } $db->free(); - dolibarr_syslog("$i factures � pr�lever"); + dol_syslog("$i factures � pr�lever"); } else { $error = 1; - dolibarr_syslog("Erreur -1"); - dolibarr_syslog($db->error()); + dol_syslog("Erreur -1"); + dol_syslog($db->error()); } } @@ -113,7 +113,7 @@ if (!$error) * */ $i = 0; - dolibarr_syslog("D�but v�rification des RIB"); + dol_syslog("D�but v�rification des RIB"); if (sizeof($factures) > 0) { @@ -135,23 +135,23 @@ if (!$error) } else { - dolibarr_syslog("Erreur de RIB societe $fact->socid $soc->nom"); + dol_syslog("Erreur de RIB societe $fact->socid $soc->nom"); } } else { - dolibarr_syslog("Impossible de lire la soci�t�"); + dol_syslog("Impossible de lire la soci�t�"); } } else { - dolibarr_syslog("Impossible de lire la facture"); + dol_syslog("Impossible de lire la facture"); } } } else { - dolibarr_syslog("Aucune factures a traiter"); + dol_syslog("Aucune factures a traiter"); } } @@ -161,7 +161,7 @@ if (!$error) * */ -dolibarr_syslog(sizeof($factures_prev)." factures seront pr�lev�es"); +dol_syslog(sizeof($factures_prev)." factures seront pr�lev�es"); if (sizeof($factures_prev) > 0) { @@ -198,7 +198,7 @@ if (sizeof($factures_prev) > 0) else { $error++; - dolibarr_syslog("Erreur recherche reference"); + dol_syslog("Erreur recherche reference"); } $ref = $ref . substr("00".($row[0]+1), -2); @@ -223,7 +223,7 @@ if (sizeof($factures_prev) > 0) else { $error++; - dolibarr_syslog("Erreur cr�ation du bon de prelevement"); + dol_syslog("Erreur cr�ation du bon de prelevement"); } } @@ -235,8 +235,8 @@ if (sizeof($factures_prev) > 0) */ if (!$error) { - dolibarr_syslog("D�but g�n�ration des paiements"); - dolibarr_syslog("Nombre de factures ".sizeof($factures_prev)); + dol_syslog("D�but g�n�ration des paiements"); + dol_syslog("Nombre de factures ".sizeof($factures_prev)); if (sizeof($factures_prev) > 0) { @@ -256,7 +256,7 @@ if (sizeof($factures_prev) > 0) if ($pai->create($user, 1) == -1) // on appelle en no_commit { $error++; - dolibarr_syslog("Erreur creation paiement facture ".$fac[0]); + dol_syslog("Erreur creation paiement facture ".$fac[0]); } else { @@ -302,15 +302,15 @@ if (sizeof($factures_prev) > 0) else { $error++; - dolibarr_syslog("Erreur mise a jour des demandes"); - dolibarr_syslog($db->error()); + dol_syslog("Erreur mise a jour des demandes"); + dol_syslog($db->error()); } } } } - dolibarr_syslog("Fin des paiements"); + dol_syslog("Fin des paiements"); } if (!$error) @@ -321,8 +321,8 @@ if (sizeof($factures_prev) > 0) * */ - dolibarr_syslog("Debut prelevement"); - dolibarr_syslog("Nombre de factures ".sizeof($factures_prev)); + dol_syslog("Debut prelevement"); + dol_syslog("Nombre de factures ".sizeof($factures_prev)); if (sizeof($factures_prev) > 0) { @@ -342,8 +342,8 @@ if (sizeof($factures_prev) > 0) $bonprev->generate(); } - dolibarr_syslog( $filebonprev ) ; - dolibarr_syslog("Fin prelevement"); + dol_syslog( $filebonprev ) ; + dol_syslog("Fin prelevement"); } /* @@ -358,8 +358,8 @@ if (sizeof($factures_prev) > 0) if (!$db->query($sql)) { $error++; - dolibarr_syslog("Erreur mise � jour du total"); - dolibarr_syslog($sql); + dol_syslog("Erreur mise � jour du total"); + dol_syslog($sql); } /* @@ -369,12 +369,12 @@ if (sizeof($factures_prev) > 0) if (!$error) { $db->query("COMMIT"); - dolibarr_syslog("COMMIT"); + dol_syslog("COMMIT"); } else { $db->query("ROLLBAK"); - dolibarr_syslog("ROLLBACK"); + dol_syslog("ROLLBACK"); } } diff --git a/scripts/user/sync_group_dolibarr2ldap.php b/scripts/user/sync_group_dolibarr2ldap.php index 1342a50ec84b2b789a3bffe19c7ac9213b373675..e4b560924e87fcff228e634ca77e08394490569d 100644 --- a/scripts/user/sync_group_dolibarr2ldap.php +++ b/scripts/user/sync_group_dolibarr2ldap.php @@ -110,7 +110,7 @@ if ($resql) } else { - dolibarr_print_error($db); + dol_print_error($db); } return $error; diff --git a/scripts/user/sync_user_dolibarr2ldap.php b/scripts/user/sync_user_dolibarr2ldap.php index 4f18cffaa9fe9e9adfbc62f17071cf6036f59d47..6cdbd4737f526fbd1bc408cc869b6cf9036d2ada 100644 --- a/scripts/user/sync_user_dolibarr2ldap.php +++ b/scripts/user/sync_user_dolibarr2ldap.php @@ -110,7 +110,7 @@ if ($resql) } else { - dolibarr_print_error($db); + dol_print_error($db); } return $error;