From b8092f1eae50f0bd987426564e6ad1930ca4ed77 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 30 Dec 2022 01:58:13 +0100 Subject: [PATCH] Fix doxygen and warnings --- htdocs/admin/modules.php | 4 ++-- htdocs/core/class/html.form.class.php | 4 ++-- htdocs/core/modules/modHoliday.class.php | 4 ---- htdocs/fourn/commande/list.php | 2 +- .../class/api_knowledgemanagement.class.php | 2 +- htdocs/product/class/api_products.class.php | 6 +++--- 6 files changed, 9 insertions(+), 13 deletions(-) diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php index 93eb5524a1d..46b711875b8 100644 --- a/htdocs/admin/modules.php +++ b/htdocs/admin/modules.php @@ -844,10 +844,10 @@ if ($mode == 'common' || $mode == 'commonkanban') { } } } - } elseif (preg_match('/^([^@]+)@([^@]+)$/i', $objMod->config_page_url, $regs)) { + } elseif (preg_match('/^([^@]+)@([^@]+)$/i', (string) $objMod->config_page_url, $regs)) { $codetoconfig .= ''.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 6px"', false, 0, 0, '', 'fa-15').''; } else { - $codetoconfig .= ''.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 6px"', false, 0, 0, '', 'fa-15').''; + $codetoconfig .= ''.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 6px"', false, 0, 0, '', 'fa-15').''; } } else { $codetoconfig .= img_picto($langs->trans("NothingToSetup"), "setup", 'class="opacitytransp" style="padding-right: 6px"', false, 0, 0, '', 'fa-15'); diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index a9c17a2edba..3f4579340d0 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -7720,7 +7720,7 @@ class Form } } if (!is_object($objecttmp)) { - dol_syslog('Error bad setup of type for field '.$InfoFieldList, LOG_WARNING); + dol_syslog('Error bad setup of type for field '.join(',', $InfoFieldList), LOG_WARNING); return 'Error bad setup of type for field '.join(',', $InfoFieldList); } @@ -9870,7 +9870,7 @@ class Form method: "POST", dataType: "json", data: { fk_c_exp_tax_cat: $(this).val(), token: \''.currentToken().'\' }, - url: "'.(DOL_URL_ROOT.'/expensereport/ajax/ajaxik.php?'.$params).'", + url: "'.(DOL_URL_ROOT.'/expensereport/ajax/ajaxik.php?'.join('&', $params)).'", }).done(function( data, textStatus, jqXHR ) { console.log(data); if (typeof data.up != "undefined") { diff --git a/htdocs/core/modules/modHoliday.class.php b/htdocs/core/modules/modHoliday.class.php index 61bdc0e8f98..57ffe62e005 100644 --- a/htdocs/core/modules/modHoliday.class.php +++ b/htdocs/core/modules/modHoliday.class.php @@ -78,10 +78,6 @@ class modHoliday extends DolibarrModules // Config pages $this->config_page_url = array("holiday.php"); - - // Config pages. Put here list of php page names stored in admmin directory used to setup module. - // $this->config_page_url = array("holiday.php?leftmenu=setup@holiday"); - // Dependencies $this->hidden = false; // A condition to hide module $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled diff --git a/htdocs/fourn/commande/list.php b/htdocs/fourn/commande/list.php index 3d458247bcf..3080a184abb 100644 --- a/htdocs/fourn/commande/list.php +++ b/htdocs/fourn/commande/list.php @@ -1208,7 +1208,7 @@ if ($resql) { include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php'; if ($massaction == 'prevalidate') { - print $form->formconfirm($_SERVER["PHP_SELF"].$fieldstosearchall, $langs->trans("ConfirmMassValidation"), $langs->trans("ConfirmMassValidationQuestion"), "validate", null, '', 0, 200, 500, 1); + print $form->formconfirm($_SERVER["PHP_SELF"], $langs->trans("ConfirmMassValidation"), $langs->trans("ConfirmMassValidationQuestion"), "validate", null, '', 0, 200, 500, 1); } if ($massaction == 'createbills') { diff --git a/htdocs/knowledgemanagement/class/api_knowledgemanagement.class.php b/htdocs/knowledgemanagement/class/api_knowledgemanagement.class.php index ccf54b1d6d9..8232287b23b 100644 --- a/htdocs/knowledgemanagement/class/api_knowledgemanagement.class.php +++ b/htdocs/knowledgemanagement/class/api_knowledgemanagement.class.php @@ -114,7 +114,7 @@ class KnowledgeManagement extends DolibarrApi } if ($result < 0) { - throw new RestException(503, 'Error when retrieve category list : '.array_merge(array($categories->error), $categories->errors)); + throw new RestException(503, 'Error when retrieve category list : '.join(',', array_merge(array($categories->error), $categories->errors))); } return $result; diff --git a/htdocs/product/class/api_products.class.php b/htdocs/product/class/api_products.class.php index 76ee11f727e..7a10293d7e4 100644 --- a/htdocs/product/class/api_products.class.php +++ b/htdocs/product/class/api_products.class.php @@ -595,7 +595,7 @@ class Products extends DolibarrApi } if ($result < 0) { - throw new RestException(503, 'Error when retrieve category list : '.array_merge(array($categories->error), $categories->errors)); + throw new RestException(503, 'Error when retrieve category list : '.join(',', array_merge(array($categories->error), $categories->errors))); } return $result; @@ -628,7 +628,7 @@ class Products extends DolibarrApi } if ($result < 0) { - throw new RestException(503, 'Error when retrieve prices list : '.array_merge(array($this->product->error), $this->product->errors)); + throw new RestException(503, 'Error when retrieve prices list : '.join(',', array_merge(array($this->product->error), $this->product->errors))); } return array( @@ -719,7 +719,7 @@ class Products extends DolibarrApi } if ($result < 0) { - throw new RestException(503, 'Error when retrieve prices list : '.array_merge(array($this->product->error), $this->product->errors)); + throw new RestException(503, 'Error when retrieve prices list : '.join(',', array_merge(array($this->product->error), $this->product->errors))); } return array(