diff --git a/htdocs/blockedlog/class/blockedlog.class.php b/htdocs/blockedlog/class/blockedlog.class.php
index 77bf90e2717..20dda286dbd 100644
--- a/htdocs/blockedlog/class/blockedlog.class.php
+++ b/htdocs/blockedlog/class/blockedlog.class.php
@@ -313,12 +313,15 @@ class BlockedLog
* @param Object $object object to store
* @param string $action action
* @param string $amounts amounts
+ * @param User $fuser User object (forced)
* @return int >0 if OK, <0 if KO
*/
- public function setObjectData(&$object, $action, $amounts)
+ public function setObjectData(&$object, $action, $amounts, $fuser = null)
{
global $langs, $user, $mysoc;
+ if (is_object($fuser)) $user = $fuser;
+
// Generic fields
// action
diff --git a/htdocs/categories/viewcat.php b/htdocs/categories/viewcat.php
index daa5ade05b5..c613190588a 100644
--- a/htdocs/categories/viewcat.php
+++ b/htdocs/categories/viewcat.php
@@ -674,7 +674,7 @@ if ($type == Categorie::TYPE_PROJECT)
{
print "\t".'
'."\n";
print '| ';
- print $project->getNomUrl(1,0);
+ print $project->getNomUrl(1);
print " | \n";
print ''.$project->ref." | \n";
print ''.$project->title." | \n";
diff --git a/htdocs/core/triggers/interface_50_modBlockedlog_ActionsBlockedLog.class.php b/htdocs/core/triggers/interface_50_modBlockedlog_ActionsBlockedLog.class.php
index f97d1400018..6666cdec47b 100644
--- a/htdocs/core/triggers/interface_50_modBlockedlog_ActionsBlockedLog.class.php
+++ b/htdocs/core/triggers/interface_50_modBlockedlog_ActionsBlockedLog.class.php
@@ -111,7 +111,7 @@ class InterfaceActionsBlockedLog extends DolibarrTriggers
return 0; // not implemented action log
}
- $result = $b->setObjectData($object, $action, $amounts); // Set field date_object, ref_object, fk_object, element, object_data
+ $result = $b->setObjectData($object, $action, $amounts, $user); // Set field date_object, ref_object, fk_object, element, object_data
if ($result < 0)
{
diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php
index ad27a496672..294f1da7f62 100644
--- a/htdocs/fourn/commande/card.php
+++ b/htdocs/fourn/commande/card.php
@@ -1356,6 +1356,8 @@ if ($action=='create')
dol_htmloutput_events();
+ $currency_code = $conf->currency;
+
$societe='';
if ($socid>0)
{
diff --git a/htdocs/install/upgrade.php b/htdocs/install/upgrade.php
index fce91f7925d..5132168c076 100644
--- a/htdocs/install/upgrade.php
+++ b/htdocs/install/upgrade.php
@@ -183,7 +183,7 @@ if (! GETPOST('action','aZ09') || preg_match('/upgrade/i',GETPOST('action','aZ09
print '
| '.$langs->trans("ServerVersion").' | ';
print ''.$version.' |
';
dolibarr_install_syslog("upgrade: " . $langs->transnoentities("ServerVersion") . ": " .$version);
- if ($db->type == 'mysqli')
+ if ($db->type == 'mysqli' && function_exists('mysqli_get_charset'))
{
$tmparray = $db->db->get_charset();
print '| '.$langs->trans("ClientCharset").' | ';
diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php
index e36caf49a3e..9dcd4c67035 100644
--- a/htdocs/societe/class/societe.class.php
+++ b/htdocs/societe/class/societe.class.php
@@ -942,7 +942,7 @@ class Societe extends CommonObject
$sql .= ",fk_effectif = ".(! empty($this->effectif_id)?"'".$this->db->escape($this->effectif_id)."'":"null");
if (isset($this->stcomm_id))
{
- $sql .= ",fk_stcomm=".($this->stcomm_id > 0 ? $this->stcomm_id : "0");
+ $sql .= ",fk_stcomm=".(!empty($this->stcomm_id) ? $this->stcomm_id : "0");
}
$sql .= ",fk_typent = ".(! empty($this->typent_id)?"'".$this->db->escape($this->typent_id)."'":"0");