diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php index 5c8954d6664..1555222cbd5 100644 --- a/htdocs/core/class/conf.class.php +++ b/htdocs/core/class/conf.class.php @@ -458,26 +458,26 @@ class Conf if (is_object($mc)) $mc->setValues($this); } - // We init log handlers - if (defined('SYSLOG_HANDLERS')) $handlers = json_decode(constant('SYSLOG_HANDLERS')); - else $handlers = array(); - foreach ($handlers as $handler) - { - $file = DOL_DOCUMENT_ROOT.'/core/modules/syslog/'.$handler.'.php'; - if (!file_exists($file)) - { - throw new Exception('Missing log handler file '.$handler.'.php'); - } - - require_once $file; - $loghandlerinstance = new $handler(); - if (!$loghandlerinstance instanceof LogHandlerInterface) - { - throw new Exception('Log handler does not extend LogHandlerInterface'); - } + // We init log handlers + if (defined('SYSLOG_HANDLERS')) $handlers = json_decode(constant('SYSLOG_HANDLERS')); + else $handlers = array(); + foreach ($handlers as $handler) + { + $file = DOL_DOCUMENT_ROOT.'/core/modules/syslog/'.$handler.'.php'; + if (!file_exists($file)) + { + throw new Exception('Missing log handler file '.$handler.'.php'); + } - $this->loghandlers[]=$loghandlerinstance; - } + require_once $file; + $loghandlerinstance = new $handler(); + if (!$loghandlerinstance instanceof LogHandlerInterface) + { + throw new Exception('Log handler does not extend LogHandlerInterface'); + } + + $this->loghandlers[]=$loghandlerinstance; + } } } diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 78d9b653b87..a897009d78b 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -547,10 +547,10 @@ function dol_syslog($message, $level = LOG_INFO, $ident = 0) if (! empty($ident)) { - foreach ($conf->loghandlers as $loghandlerinstance) - { - $loghandlerinstance->setIdent($ident); - } + foreach ($conf->loghandlers as $loghandlerinstance) + { + $loghandlerinstance->setIdent($ident); + } } } diff --git a/htdocs/core/modules/syslog/logHandler.php b/htdocs/core/modules/syslog/logHandler.php index 8bce8a0d2a1..d2fba9bd9d7 100644 --- a/htdocs/core/modules/syslog/logHandler.php +++ b/htdocs/core/modules/syslog/logHandler.php @@ -62,14 +62,14 @@ class LogHandler return array(); } - /** - * Set current ident. + /** + * Set current ident. * * @param int $ident 1=Increase ident of 1, -1=Decrease ident of 1 - * @return void - */ - public function setIdent($ident) + * @return void + */ + public function setIdent($ident) { $this->ident+=$ident; - } + } } \ No newline at end of file diff --git a/htdocs/install/fileconf.php b/htdocs/install/fileconf.php index 9044cb53d74..349de13771a 100644 --- a/htdocs/install/fileconf.php +++ b/htdocs/install/fileconf.php @@ -38,27 +38,27 @@ $langs->load("errors"); dolibarr_install_syslog("Fileconf: Entering fileconf.php page"); -// You can force preselected values of the config step of Dolibarr by adding a file -// install.forced.php into directory htdocs/install (This is the case with some wizard -// installer like DoliWamp, DoliMamp or DoliBuntu). -// We first init "forced values" to nothing. -if (! isset($force_install_noedit)) $force_install_noedit=''; // 1=To block var specific to distrib, 2 to block all technical parameters -if (! isset($force_install_type)) $force_install_type=''; -if (! isset($force_install_dbserver)) $force_install_dbserver=''; -if (! isset($force_install_port)) $force_install_port=''; -if (! isset($force_install_database)) $force_install_database=''; -if (! isset($force_install_prefix)) $force_install_prefix=''; -if (! isset($force_install_createdatabase)) $force_install_createdatabase=''; -if (! isset($force_install_databaselogin)) $force_install_databaselogin=''; -if (! isset($force_install_databasepass)) $force_install_databasepass=''; -if (! isset($force_install_databaserootlogin)) $force_install_databaserootlogin=''; -if (! isset($force_install_databaserootpass)) $force_install_databaserootpass=''; -// Now we load forced value from install.forced.php file. -$useforcedwizard=false; -$forcedfile="./install.forced.php"; -if ($conffile == "/etc/dolibarr/conf.php") $forcedfile="/etc/dolibarr/install.forced.php"; // Must be after inc.php -if (@file_exists($forcedfile)) { - $useforcedwizard=true; include_once $forcedfile; +// You can force preselected values of the config step of Dolibarr by adding a file +// install.forced.php into directory htdocs/install (This is the case with some wizard +// installer like DoliWamp, DoliMamp or DoliBuntu). +// We first init "forced values" to nothing. +if (! isset($force_install_noedit)) $force_install_noedit=''; // 1=To block var specific to distrib, 2 to block all technical parameters +if (! isset($force_install_type)) $force_install_type=''; +if (! isset($force_install_dbserver)) $force_install_dbserver=''; +if (! isset($force_install_port)) $force_install_port=''; +if (! isset($force_install_database)) $force_install_database=''; +if (! isset($force_install_prefix)) $force_install_prefix=''; +if (! isset($force_install_createdatabase)) $force_install_createdatabase=''; +if (! isset($force_install_databaselogin)) $force_install_databaselogin=''; +if (! isset($force_install_databasepass)) $force_install_databasepass=''; +if (! isset($force_install_databaserootlogin)) $force_install_databaserootlogin=''; +if (! isset($force_install_databaserootpass)) $force_install_databaserootpass=''; +// Now we load forced value from install.forced.php file. +$useforcedwizard=false; +$forcedfile="./install.forced.php"; +if ($conffile == "/etc/dolibarr/conf.php") $forcedfile="/etc/dolibarr/install.forced.php"; // Must be after inc.php +if (@file_exists($forcedfile)) { + $useforcedwizard=true; include_once $forcedfile; } //$force_install_message='This is the message'; diff --git a/htdocs/product/price.php b/htdocs/product/price.php index 390b09127e7..491c5aab681 100644 --- a/htdocs/product/price.php +++ b/htdocs/product/price.php @@ -432,7 +432,7 @@ else print ''; if($object->prices_by_qty[0] == 1) { - print ''; + print '
'; print ''; print ''; print ''; diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 6a43e5e4396..f59b123663c 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -1044,19 +1044,19 @@ class Societe extends CommonObject // Remove extrafields if (! $error) { - $sql = "DELETE FROM ".MAIN_DB_PREFIX."societe_extrafields WHERE fk_object = ".$id; - dol_syslog(get_class($this)."::delete sql=".$sql); - if (! $this->db->query($sql)) - { - $error++; - $this->error = $this->db->lasterror(); - dol_syslog(get_class($this)."::delete error -3 ".$this->error, LOG_ERR); - } + $sql = "DELETE FROM ".MAIN_DB_PREFIX."societe_extrafields WHERE fk_object = ".$id; + dol_syslog(get_class($this)."::delete sql=".$sql); + if (! $this->db->query($sql)) + { + $error++; + $this->error = $this->db->lasterror(); + dol_syslog(get_class($this)."::delete error -3 ".$this->error, LOG_ERR); + } } // Remove third party - if (! $error) - { + if (! $error) + { $sql = "DELETE FROM ".MAIN_DB_PREFIX."societe"; $sql.= " WHERE rowid = " . $id; dol_syslog(get_class($this)."::delete sql=".$sql, LOG_DEBUG); diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index 8276f4adaca..ed91ad5beeb 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -700,7 +700,7 @@ class User extends CommonObject $sql = "DELETE FROM ".MAIN_DB_PREFIX."usergroup_user WHERE fk_user = ".$this->id; if (! $error && ! $this->db->query($sql)) { - $error++; + $error++; $this->error = $this->db->lasterror(); dol_syslog(get_class($this)."::delete error -2 ".$this->error, LOG_ERR); }
'.$langs->trans("PriceByQuantityRange").''.$langs->trans("HT").'