Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into develop

Conflicts:
	htdocs/comm/action/class/actioncomm.class.php
	htdocs/expedition/class/expedition.class.php
	htdocs/product/class/product.class.php
This commit is contained in:
Laurent Destailleur 2020-11-22 02:32:47 +01:00
commit fe0764be6e
5 changed files with 7 additions and 5 deletions

View File

@ -503,7 +503,6 @@ if (empty($reshook) && $action == 'update')
$object->note_private = trim(GETPOST("note", "restricthtml"));
$object->fk_element = GETPOST("fk_element", "int");
$object->elementtype = GETPOST("elementtype", "alphanohtml");
if (!$datef && $percentage == 100)
{
$error++; $donotclearsession = 1;

View File

@ -1000,7 +1000,7 @@ class ActionComm extends CommonObject
// Clean parameters
$this->label = trim($this->label);
$this->note_private = dol_htmlcleanlastbr(trim(empty($this->note_private) ? $this->note : $this->note_private));
$this->note_private = dol_htmlcleanlastbr(trim(!isset($this->note_private) ? $this->note : $this->note_private));
if (empty($this->percentage)) $this->percentage = 0;
if (empty($this->priority) || !is_numeric($this->priority)) $this->priority = 0;
if (empty($this->transparency)) $this->transparency = 0;

View File

@ -1052,7 +1052,10 @@ class Cronjob extends CommonObject
$object = new $this->objectname($this->db);
if ($this->entity > 0) $object->entity = $this->entity; // We work on a dedicated entity
$params_arr = array_map('trim', explode(",", $this->params));
$params_arr = array();
if (!empty($this->params) || $this->params === '0') {
$params_arr = array_map('trim', explode(",", $this->params));
}
if (!is_array($params_arr))
{

View File

@ -957,6 +957,7 @@ class Expedition extends CommonObject
$langs->load("errors");
$this->error = $langs->trans('ErrorStockIsNotEnoughToAddProductOnShipment', $product->ref);
$this->errorhidden = 'ErrorStockIsNotEnoughToAddProductOnShipment';
$this->db->rollback();
return -3;
}

View File

@ -4245,8 +4245,7 @@ class Product extends CommonObject
$resql = $this->db->query($sql);
if ($resql) {
$obj = $this->db->fetch_object($resql);
if ($obj) { $nb = $obj->nb;
}
if ($obj) { $nb = $obj->nb; }
} else {
return -1;
}