mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-08 00:52:01 +01:00
Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
@@ -21,7 +21,6 @@
|
||||
*/
|
||||
class FormSetup
|
||||
{
|
||||
|
||||
/**
|
||||
* @var DoliDB Database handler.
|
||||
*/
|
||||
@@ -1082,16 +1081,18 @@ class FormSetupItem
|
||||
}
|
||||
}
|
||||
} elseif (preg_match('/emailtemplate:/', $this->type)) {
|
||||
include_once DOL_DOCUMENT_ROOT . '/core/class/html.formmail.class.php';
|
||||
$formmail = new FormMail($this->db);
|
||||
if ($this->fieldValue > 0) {
|
||||
include_once DOL_DOCUMENT_ROOT . '/core/class/html.formmail.class.php';
|
||||
$formmail = new FormMail($this->db);
|
||||
|
||||
$tmp = explode(':', $this->type);
|
||||
$tmp = explode(':', $this->type);
|
||||
|
||||
$template = $formmail->getEMailTemplate($this->db, $tmp[1], $user, $this->langs, $this->fieldValue);
|
||||
if (is_numeric($template) && $template < 0) {
|
||||
$this->setErrors($formmail->errors);
|
||||
$template = $formmail->getEMailTemplate($this->db, $tmp[1], $user, $this->langs, $this->fieldValue);
|
||||
if (is_numeric($template) && $template < 0) {
|
||||
$this->setErrors($formmail->errors);
|
||||
}
|
||||
$out.= $this->langs->trans($template->label);
|
||||
}
|
||||
$out.= $this->langs->trans($template->label);
|
||||
} elseif (preg_match('/category:/', $this->type)) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||
$c = new Categorie($this->db);
|
||||
@@ -1117,6 +1118,7 @@ class FormSetupItem
|
||||
}
|
||||
} elseif ($this->type == 'product') {
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||
|
||||
$product = new Product($this->db);
|
||||
$resprod = $product->fetch($this->fieldValue);
|
||||
if ($resprod > 0) {
|
||||
|
||||
Reference in New Issue
Block a user