forked from Wavyzz/dolibarr
Modif mineures
This commit is contained in:
@@ -194,7 +194,7 @@ if ($_REQUEST["action"] == 'update' && ! $_POST["cancel"])
|
||||
{
|
||||
if (isset($_POST["password"]) && $_POST["password"] !='')
|
||||
{
|
||||
$ret=$edituser->password($user,$password,$conf->password_encrypted,1);
|
||||
$ret=$edituser->password($user,$password,$conf->password_encrypted,0);
|
||||
if ($ret < 0)
|
||||
{
|
||||
$message.='<div class="error">'.$edituser->error.'</div>';
|
||||
@@ -333,7 +333,7 @@ if ($_POST["action"] == 'add')
|
||||
{
|
||||
if (isset($_POST['password']) && trim($_POST['password']))
|
||||
{
|
||||
$adh->password($user,trim($_POST['password']),$conf->password_encrypted);
|
||||
$adh->password($user,trim($_POST['password']),0);
|
||||
}
|
||||
|
||||
if ($cotisation > 0)
|
||||
@@ -1023,7 +1023,7 @@ if ($rowid && $action != 'edit')
|
||||
}
|
||||
|
||||
// Envoi fiche par mail
|
||||
if ($adh->statut >= 1)
|
||||
if ($adh->statut >= 1 && $adh->email)
|
||||
{
|
||||
print "<a class=\"butAction\" href=\"fiche.php?rowid=$adh->id&action=sendinfo\">".$langs->trans("SendCardByMail")."</a>\n";
|
||||
}
|
||||
|
||||
@@ -165,65 +165,65 @@ function sanitize_string($str)
|
||||
*/
|
||||
function dolibarr_syslog($message, $level=LOG_INFO)
|
||||
{
|
||||
global $conf,$user,$langs;
|
||||
global $conf,$user,$langs;
|
||||
|
||||
if ($conf->syslog->enabled)
|
||||
{
|
||||
if ($level > SYSLOG_LEVEL) return;
|
||||
if ($conf->syslog->enabled)
|
||||
{
|
||||
if ($level > SYSLOG_LEVEL) return;
|
||||
|
||||
// Ajout user a la log
|
||||
$login='???';
|
||||
if (is_object($user) && $user->id) $login=$user->login;
|
||||
$message=sprintf("%-8s",$login)." ".$message;
|
||||
// Ajout user a la log
|
||||
$login='???';
|
||||
if (is_object($user) && $user->id) $login=$user->login;
|
||||
$message=sprintf("%-8s",$login)." ".$message;
|
||||
|
||||
if (defined("SYSLOG_FILE") && SYSLOG_FILE)
|
||||
{
|
||||
if (defined("SYSLOG_FILE_NO_ERROR")) $file=@fopen(SYSLOG_FILE,"a+");
|
||||
else $file=fopen(SYSLOG_FILE,"a+");
|
||||
if ($file)
|
||||
{
|
||||
fwrite($file,strftime("%Y-%m-%d %H:%M:%S",time())." ".$level." ".$message."\n");
|
||||
fclose($file);
|
||||
}
|
||||
elseif (! defined("SYSLOG_FILE_NO_ERROR"))
|
||||
{
|
||||
$langs->load("main");
|
||||
print $langs->trans("ErrorFailedToOpenFile",SYSLOG_FILE);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//define_syslog_variables(); d<>j<EFBFBD> d<>finit dans master.inc.php
|
||||
if (defined("SYSLOG_FILE") && SYSLOG_FILE)
|
||||
{
|
||||
if (defined("SYSLOG_FILE_NO_ERROR")) $file=@fopen(SYSLOG_FILE,"a+");
|
||||
else $file=fopen(SYSLOG_FILE,"a+");
|
||||
if ($file)
|
||||
{
|
||||
fwrite($file,strftime("%Y-%m-%d %H:%M:%S",time())." ".$level." ".$message."\n");
|
||||
fclose($file);
|
||||
}
|
||||
elseif (! defined("SYSLOG_FILE_NO_ERROR"))
|
||||
{
|
||||
$langs->load("main");
|
||||
print $langs->trans("ErrorFailedToOpenFile",SYSLOG_FILE);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//define_syslog_variables(); d<>j<EFBFBD> d<>finit dans master.inc.php
|
||||
if (defined("MAIN_SYSLOG_FACILITY") && MAIN_SYSLOG_FACILITY)
|
||||
{
|
||||
$facility = MAIN_SYSLOG_FACILITY;
|
||||
}
|
||||
elseif (defined("SYSLOG_FACILITY") && SYSLOG_FACILITY && defined(SYSLOG_FACILITY))
|
||||
{
|
||||
// Exemple: SYSLOG_FACILITY vaut LOG_USER qui vaut 8. On a besoin de 8 dans $facility.
|
||||
$facility = constant(SYSLOG_FACILITY);
|
||||
}
|
||||
else
|
||||
{
|
||||
$facility = LOG_USER;
|
||||
}
|
||||
|
||||
if (defined("MAIN_SYSLOG_FACILITY") && MAIN_SYSLOG_FACILITY)
|
||||
{
|
||||
$facility = MAIN_SYSLOG_FACILITY;
|
||||
}
|
||||
elseif (defined("SYSLOG_FACILITY") && SYSLOG_FACILITY && defined(SYSLOG_FACILITY))
|
||||
{
|
||||
// Exemple: SYSLOG_FACILITY vaut LOG_USER qui vaut 8. On a besoin de 8 dans $facility.
|
||||
$facility = constant(SYSLOG_FACILITY);
|
||||
}
|
||||
else
|
||||
{
|
||||
$facility = LOG_USER;
|
||||
}
|
||||
openlog("dolibarr", LOG_PID | LOG_PERROR, $facility);
|
||||
|
||||
openlog("dolibarr", LOG_PID | LOG_PERROR, $facility);
|
||||
if (! $level)
|
||||
{
|
||||
syslog(LOG_ERR, $message);
|
||||
}
|
||||
else
|
||||
{
|
||||
syslog($level, $message);
|
||||
}
|
||||
|
||||
if (! $level)
|
||||
{
|
||||
syslog(LOG_ERR, $message);
|
||||
}
|
||||
else
|
||||
{
|
||||
syslog($level, $message);
|
||||
}
|
||||
|
||||
closelog();
|
||||
}
|
||||
}
|
||||
closelog();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
\brief Affiche le header d'une fiche
|
||||
\param links Tableau de titre d'onglets
|
||||
|
||||
Reference in New Issue
Block a user