forked from Wavyzz/dolibarr
Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
@@ -31,7 +31,8 @@ For developers:
|
|||||||
- Function plimit of databases drivers accept -1 as value (it means default value set
|
- Function plimit of databases drivers accept -1 as value (it means default value set
|
||||||
into conf->liste_limit).
|
into conf->liste_limit).
|
||||||
- New: Add option dol_hide_topmenu and dol_hide_leftmenu onto login page.
|
- New: Add option dol_hide_topmenu and dol_hide_leftmenu onto login page.
|
||||||
|
- New: dol_syslog method accept a suffix to use different log files for log.
|
||||||
|
|
||||||
For translators:
|
For translators:
|
||||||
- Update language files.
|
- Update language files.
|
||||||
|
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ class box_contacts extends ModeleBoxes
|
|||||||
'url' => DOL_URL_ROOT."/contact/fiche.php?id=".$objp->rowid);
|
'url' => DOL_URL_ROOT."/contact/fiche.php?id=".$objp->rowid);
|
||||||
|
|
||||||
$this->info_box_contents[$i][1] = array('td' => 'align="left"',
|
$this->info_box_contents[$i][1] = array('td' => 'align="left"',
|
||||||
'text' => $contactstatic->getFullName($langs,1),
|
'text' => $contactstatic->getFullName($langs,0),
|
||||||
'url' => DOL_URL_ROOT."/contact/fiche.php?id=".$objp->rowid);
|
'url' => DOL_URL_ROOT."/contact/fiche.php?id=".$objp->rowid);
|
||||||
|
|
||||||
$this->info_box_contents[$i][2] = array('td' => 'align="left" width="16"',
|
$this->info_box_contents[$i][2] = array('td' => 'align="left" width="16"',
|
||||||
|
|||||||
@@ -485,15 +485,16 @@ function dol_strtoupper($utf8_string)
|
|||||||
* This function works only if syslog module is enabled.
|
* This function works only if syslog module is enabled.
|
||||||
* This must not use any call to other function calling dol_syslog (avoid infinite loop).
|
* This must not use any call to other function calling dol_syslog (avoid infinite loop).
|
||||||
*
|
*
|
||||||
* @param string $message Line to log. Ne doit pas etre traduit si level = LOG_ERR
|
* @param string $message Line to log. Ne doit pas etre traduit si level = LOG_ERR
|
||||||
* @param int $level Log level
|
* @param int $level Log level
|
||||||
* 0=Show nothing
|
* 0=Show nothing
|
||||||
* On Windows LOG_ERR=4, LOG_WARNING=5, LOG_NOTICE=LOG_INFO=6, LOG_DEBUG=6 si define_syslog_variables ou PHP 5.3+, 7 si dolibarr
|
* On Windows LOG_ERR=4, LOG_WARNING=5, LOG_NOTICE=LOG_INFO=6, LOG_DEBUG=6 si define_syslog_variables ou PHP 5.3+, 7 si dolibarr
|
||||||
* On Linux LOG_ERR=3, LOG_WARNING=4, LOG_INFO=6, LOG_DEBUG=7
|
* On Linux LOG_ERR=3, LOG_WARNING=4, LOG_INFO=6, LOG_DEBUG=7
|
||||||
* @param int $ident 1=Increase ident of 1, -1=Decrease ident of 1
|
* @param int $ident 1=Increase ident of 1, -1=Decrease ident of 1
|
||||||
|
* @param string $suffixinfilename When output is a file, append this suffix into default log filename.
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function dol_syslog($message, $level = LOG_INFO, $ident = 0)
|
function dol_syslog($message, $level = LOG_INFO, $ident = 0, $suffixinfilename='')
|
||||||
{
|
{
|
||||||
global $conf, $user;
|
global $conf, $user;
|
||||||
|
|
||||||
@@ -543,7 +544,7 @@ function dol_syslog($message, $level = LOG_INFO, $ident = 0)
|
|||||||
// Loop on each log handler and send output
|
// Loop on each log handler and send output
|
||||||
foreach ($conf->loghandlers as $loghandlerinstance)
|
foreach ($conf->loghandlers as $loghandlerinstance)
|
||||||
{
|
{
|
||||||
$loghandlerinstance->export($data);
|
$loghandlerinstance->export($data,$suffixinfilename);
|
||||||
}
|
}
|
||||||
unset($data);
|
unset($data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,10 +36,12 @@ class MenuManager
|
|||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
* @param DoliDB $db Database handler
|
* @param DoliDB $db Database handler
|
||||||
|
* @param int $type_user Type of user
|
||||||
*/
|
*/
|
||||||
function __construct($db)
|
function __construct($db, $type_user)
|
||||||
{
|
{
|
||||||
|
$this->type_user=$type_user;
|
||||||
$this->db=$db;
|
$this->db=$db;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -96,22 +96,25 @@ class mod_syslog_file extends LogHandler implements LogHandlerInterface
|
|||||||
/**
|
/**
|
||||||
* Return the parsed logfile path
|
* Return the parsed logfile path
|
||||||
*
|
*
|
||||||
* @return string
|
* @param string $suffixinfilename When output is a file, append this suffix into default log filename.
|
||||||
|
* @return string
|
||||||
*/
|
*/
|
||||||
private function getFilename()
|
private function getFilename($suffixinfilename='')
|
||||||
{
|
{
|
||||||
return str_replace('DOL_DATA_ROOT', DOL_DATA_ROOT, SYSLOG_FILE);
|
$tmp=str_replace('DOL_DATA_ROOT', DOL_DATA_ROOT, SYSLOG_FILE);
|
||||||
|
return $suffixinfilename?preg_replace('/\.log$/i', $suffixinfilename.'.log', $tmp):$tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Export the message
|
* Export the message
|
||||||
*
|
*
|
||||||
* @param array $content Array containing the info about the message
|
* @param array $content Array containing the info about the message
|
||||||
|
* @param string $suffixinfilename When output is a file, append this suffix into default log filename.
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function export($content)
|
public function export($content, $suffixinfilename='')
|
||||||
{
|
{
|
||||||
$logfile = $this->getFilename();
|
$logfile = $this->getFilename($suffixinfilename);
|
||||||
|
|
||||||
if (defined("SYSLOG_FILE_NO_ERROR")) $filefd = @fopen($logfile, 'a+');
|
if (defined("SYSLOG_FILE_NO_ERROR")) $filefd = @fopen($logfile, 'a+');
|
||||||
else $filefd = fopen($logfile, 'a+');
|
else $filefd = fopen($logfile, 'a+');
|
||||||
|
|||||||
@@ -56,7 +56,11 @@ $langs->load("paypal");
|
|||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
dol_syslog("Callback url when a PayBox payment was canceled. query_string=".(empty($_SERVER["QUERY_STRING"])?'':$_SERVER["QUERY_STRING"])." script_uri=".(empty($_SERVER["SCRIPT_URI"])?'':$_SERVER["SCRIPT_URI"]));
|
dol_syslog("Callback url when a PayBox payment was canceled. query_string=".(empty($_SERVER["QUERY_STRING"])?'':$_SERVER["QUERY_STRING"])." script_uri=".(empty($_SERVER["SCRIPT_URI"])?'':$_SERVER["SCRIPT_URI"]), LOG_DEBUG, 0, '_paybox');
|
||||||
|
|
||||||
|
$tracepost = "";
|
||||||
|
foreach($_POST as $k => $v) $tracepost .= "{$k} - {$v}\n";
|
||||||
|
dol_syslog("POST=".$tracepost, LOG_DEBUG, 0, '_paybox');
|
||||||
|
|
||||||
llxHeaderPayBox($langs->trans("PaymentForm"));
|
llxHeaderPayBox($langs->trans("PaymentForm"));
|
||||||
|
|
||||||
|
|||||||
@@ -55,7 +55,11 @@ $langs->load("paypal");
|
|||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
dol_syslog("Callback url when a PayBox payment was done. query_string=".(empty($_SERVER["QUERY_STRING"])?'':$_SERVER["QUERY_STRING"])." script_uri=".(empty($_SERVER["SCRIPT_URI"])?'':$_SERVER["SCRIPT_URI"]));
|
dol_syslog("Callback url when a PayBox payment was done. query_string=".(empty($_SERVER["QUERY_STRING"])?'':$_SERVER["QUERY_STRING"])." script_uri=".(empty($_SERVER["SCRIPT_URI"])?'':$_SERVER["SCRIPT_URI"]), LOG_DEBUG, 0, '_paybox');
|
||||||
|
|
||||||
|
$tracepost = "";
|
||||||
|
foreach($_POST as $k => $v) $tracepost .= "{$k} - {$v}\n";
|
||||||
|
dol_syslog("POST=".$tracepost, LOG_DEBUG, 0, '_paybox');
|
||||||
|
|
||||||
llxHeaderPayBox($langs->trans("PaymentForm"));
|
llxHeaderPayBox($langs->trans("PaymentForm"));
|
||||||
|
|
||||||
|
|||||||
@@ -64,7 +64,12 @@ $langs->load("paypal");
|
|||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
dol_syslog("Callback url when a PayPal payment was canceled. query_string=".(empty($_SERVER["QUERY_STRING"])?'':$_SERVER["QUERY_STRING"])." script_uri=".(empty($_SERVER["SCRIPT_URI"])?'':$_SERVER["SCRIPT_URI"]));
|
dol_syslog("Callback url when a PayPal payment was canceled. query_string=".(empty($_SERVER["QUERY_STRING"])?'':$_SERVER["QUERY_STRING"])." script_uri=".(empty($_SERVER["SCRIPT_URI"])?'':$_SERVER["SCRIPT_URI"]), LOG_DEBUG, 0, '_paypal');
|
||||||
|
|
||||||
|
$tracepost = "";
|
||||||
|
foreach($_POST as $k => $v) $tracepost .= "{$k} - {$v}\n";
|
||||||
|
dol_syslog("POST=".$tracepost, LOG_DEBUG, 0, '_paypal');
|
||||||
|
|
||||||
|
|
||||||
llxHeaderPaypal($langs->trans("PaymentForm"));
|
llxHeaderPaypal($langs->trans("PaymentForm"));
|
||||||
|
|
||||||
|
|||||||
@@ -92,7 +92,12 @@ if (empty($PAYPAL_API_SIGNATURE))
|
|||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
dol_syslog("Callback url when a PayPal payment was done. query_string=".(empty($_SERVER["QUERY_STRING"])?'':$_SERVER["QUERY_STRING"])." script_uri=".(empty($_SERVER["SCRIPT_URI"])?'':$_SERVER["SCRIPT_URI"]));
|
dol_syslog("Callback url when a PayPal payment was done. query_string=".(empty($_SERVER["QUERY_STRING"])?'':$_SERVER["QUERY_STRING"])." script_uri=".(empty($_SERVER["SCRIPT_URI"])?'':$_SERVER["SCRIPT_URI"]), LOG_DEBUG, 0, '_paypal');
|
||||||
|
|
||||||
|
$tracepost = "";
|
||||||
|
foreach($_POST as $k => $v) $tracepost .= "{$k} - {$v}\n";
|
||||||
|
dol_syslog("POST=".$tracepost, LOG_DEBUG, 0, '_paypal');
|
||||||
|
|
||||||
|
|
||||||
llxHeaderPaypal($langs->trans("PaymentForm"));
|
llxHeaderPaypal($langs->trans("PaymentForm"));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user