Suppression des syslog si non verbose

This commit is contained in:
Rodolphe Quiedeville 2006-03-23 12:21:31 +00:00
parent 62aa64271a
commit cb1d8a0cb0

View File

@ -1,5 +1,5 @@
<?PHP <?PHP
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2005-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -140,7 +140,6 @@ if ($resql)
function CreatePreselection($host, $user_login, $user_passwd, $lint, $id_person) function CreatePreselection($host, $user_login, $user_passwd, $lint, $id_person)
{ {
global $verbose; global $verbose;
//dolibarr_syslog("Appel de CreatePreselection($host, $user_login, ****, $ligne, $id_person)");
$url = "/AzurApp_websvc_b3gdb/account.asmx/CreatePreselection?"; $url = "/AzurApp_websvc_b3gdb/account.asmx/CreatePreselection?";
@ -220,11 +219,13 @@ function CreatePreselection($host, $user_login, $user_passwd, $lint, $id_person)
if (substr($result,0,2) == "OK") if (substr($result,0,2) == "OK")
{ {
if ($verbose > 1)
dolibarr_syslog("Presel OK ".$lint->numero." ".$lint->support." id client ".$id_person." $result\n"); dolibarr_syslog("Presel OK ".$lint->numero." ".$lint->support." id client ".$id_person." $result\n");
return 0; return 0;
} }
else else
{ {
if ($verbose > 1)
dolibarr_syslog("Presel ERR ".$lint->numero." ".$lint->support." id client ".$id_person." $result\n"); dolibarr_syslog("Presel ERR ".$lint->numero." ".$lint->support." id client ".$id_person." $result\n");
$fp = fopen("/tmp/".$lint->numero.".presel","w"); $fp = fopen("/tmp/".$lint->numero.".presel","w");
@ -334,6 +335,7 @@ function CreateAbonne($host, $user_login, $user_passwd, $user_contract, $societe
$result = $results[1]; $result = $results[1];
$client_id = $results[2]; $client_id = $results[2];
if ($verbose > 1)
dolibarr_syslog($line); dolibarr_syslog($line);
} }
@ -345,10 +347,12 @@ function CreateAbonne($host, $user_login, $user_passwd, $user_contract, $societe
fclose($fp); fclose($fp);
} }
if ($verbose > 1)
dolibarr_syslog("$result:$client_id"); dolibarr_syslog("$result:$client_id");
if ($result == "OK") if ($result == "OK")
{ {
if ($verbose > 1)
dolibarr_syslog("Commande réussie id client ".$client_id); dolibarr_syslog("Commande réussie id client ".$client_id);
return $client_id; return $client_id;
} }