Fix doxygen and warnings

This commit is contained in:
Laurent Destailleur 2022-12-30 01:58:13 +01:00
parent 8d64f8617c
commit 6c223eafc9
10 changed files with 16 additions and 20 deletions

View File

@ -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 .= '<a class="valignmiddle" href="'.dol_buildpath('/'.$regs[2].'/admin/'.$regs[1], 1).'?save_lastsearch_values=1&backtopage='.urlencode($backtourl).'" title="'.$langs->trans("Setup").'">'.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 6px"', false, 0, 0, '', 'fa-15').'</a>';
} else {
$codetoconfig .= '<a class="valignmiddle" href="'.$objMod->config_page_url.'?save_lastsearch_values=1&backtopage='.urlencode($backtourl).'" title="'.$langs->trans("Setup").'">'.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 6px"', false, 0, 0, '', 'fa-15').'</a>';
$codetoconfig .= '<a class="valignmiddle" href="'.((string) $objMod->config_page_url).'?save_lastsearch_values=1&backtopage='.urlencode($backtourl).'" title="'.$langs->trans("Setup").'">'.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 6px"', false, 0, 0, '', 'fa-15').'</a>';
}
} else {
$codetoconfig .= img_picto($langs->trans("NothingToSetup"), "setup", 'class="opacitytransp" style="padding-right: 6px"', false, 0, 0, '', 'fa-15');

View File

@ -7755,7 +7755,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);
}
@ -9905,7 +9905,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") {

View File

@ -1239,10 +1239,10 @@ class Ldap
/**
* Load all attribute of a LDAP user
*
* @param User $user User to search for. Not used if a filter is provided.
* @param string $filter Filter for search. Must start with &.
* Examples: &(objectClass=inetOrgPerson) &(objectClass=user)(objectCategory=person) &(isMemberOf=cn=Sales,ou=Groups,dc=opencsi,dc=com)
* @return int >0 if OK, <0 if KO
* @param User|string $user Not used.
* @param string $filter Filter for search. Must start with &.
* Examples: &(objectClass=inetOrgPerson) &(objectClass=user)(objectCategory=person) &(isMemberOf=cn=Sales,ou=Groups,dc=opencsi,dc=com)
* @return int >0 if OK, <0 if KO
*/
public function fetch($user, $filter)
{

View File

@ -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

View File

@ -895,7 +895,7 @@ class pdf_eagle extends ModelePdfStockTransfer
/**
* Show top header of page.
*
* @param PDF $pdf Object PDF
* @param TCPDF $pdf Object PDF
* @param Object $object Object to show
* @param int $showaddress 0=no, 1=yes
* @param Translate $outputlangs Object lang for output

View File

@ -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') {

View File

@ -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;

View File

@ -879,7 +879,7 @@ class pdf_standard_myobject extends ModelePDFMyObject
/**
* Show top header of page.
*
* @param Tcpdf $pdf Object PDF
* @param TCPDF $pdf Object PDF
* @param Object $object Object to show
* @param int $showaddress 0=no, 1=yes
* @param Translate $outputlangs Object lang for output

View File

@ -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(

View File

@ -798,7 +798,7 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio
/**
* Show top header of page.
*
* @param Tcpdf $pdf Object PDF
* @param TCPDF $pdf Object PDF
* @param Object $object Object to show
* @param int $showaddress 0=no, 1=yes
* @param Translate $outputlangs Object lang for output