diff --git a/htdocs/api/class/api_access.class.php b/htdocs/api/class/api_access.class.php index 6402bdcb72e..31693bfec9a 100644 --- a/htdocs/api/class/api_access.class.php +++ b/htdocs/api/class/api_access.class.php @@ -30,11 +30,11 @@ require_once DOL_DOCUMENT_ROOT.'/includes/restler/framework/Luracast/Restler/iUs require_once DOL_DOCUMENT_ROOT.'/includes/restler/framework/Luracast/Restler/Resources.php'; require_once DOL_DOCUMENT_ROOT.'/includes/restler/framework/Luracast/Restler/Defaults.php'; require_once DOL_DOCUMENT_ROOT.'/includes/restler/framework/Luracast/Restler/RestException.php'; -use \Luracast\Restler\iAuthenticate; -use \Luracast\Restler\iUseAuthentication; -use \Luracast\Restler\Resources; -use \Luracast\Restler\Defaults; -use \Luracast\Restler\RestException; +use Luracast\Restler\iAuthenticate; +use Luracast\Restler\iUseAuthentication; +use Luracast\Restler\Resources; +use Luracast\Restler\Defaults; +use Luracast\Restler\RestException; /** * Dolibarr API access class diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php index eef112a00e2..0fbf95bfe50 100644 --- a/htdocs/core/class/CMailFile.class.php +++ b/htdocs/core/class/CMailFile.class.php @@ -1350,7 +1350,7 @@ class CMailFile /** * Build a css style (mode = all) into this->styleCSS and this->bodyCSS * - * @return string + * @return void */ public function buildCSS() { diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php index 9400d1f1ebe..fadbc1dc62b 100644 --- a/htdocs/core/class/commondocgenerator.class.php +++ b/htdocs/core/class/commondocgenerator.class.php @@ -1535,8 +1535,8 @@ abstract class CommonDocGenerator /** * get column status from column key * - * @param string $colKey the column key - * @return float width in mm + * @param string $colKey the column key + * @return boolean true if column on */ public function getColumnStatus($colKey) { diff --git a/htdocs/core/class/hookmanager.class.php b/htdocs/core/class/hookmanager.class.php index 1070bb105a6..e25f970fad2 100644 --- a/htdocs/core/class/hookmanager.class.php +++ b/htdocs/core/class/hookmanager.class.php @@ -148,7 +148,7 @@ class HookManager * @param array $parameters Array of parameters * @param Object $object Object to use hooks on * @param string $action Action code on calling page ('create', 'edit', 'view', 'add', 'update', 'delete'...) - * @return mixed For 'addreplace' hooks (doActions, formConfirm, formObjectOptions, pdf_xxx,...): Return 0 if we want to keep standard actions, >0 if we want to stop/replace standard actions, <0 if KO. Things to print are returned into ->resprints and set into ->resPrint. Things to return are returned into ->results by hook and set into ->resArray for caller. + * @return int For 'addreplace' hooks (doActions, formConfirm, formObjectOptions, pdf_xxx,...): Return 0 if we want to keep standard actions, >0 if we want to stop/replace standard actions, <0 if KO. Things to print are returned into ->resprints and set into ->resPrint. Things to return are returned into ->results by hook and set into ->resArray for caller. * For 'output' hooks (printLeftBlock, formAddObjectLine, formBuilddocOptions, ...): Return 0 if we want to keep standard actions, >0 uf we want to stop/replace standard actions (at least one > 0 and replacement will be done), <0 if KO. Things to print are returned into ->resprints and set into ->resPrint. Things to return are returned into ->results by hook and set into ->resArray for caller. * All types can also return some values into an array ->results that will be finaly merged into this->resArray for caller. * $this->error or this->errors are also defined by class called by this function if error. diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 470c7d7313c..db1265ab846 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -9987,14 +9987,14 @@ class Form /** * Return HTML to show the select of expense categories * - * @param string $selected preselected category - * @param string $htmlname name of HTML select list - * @param integer $useempty 1=Add empty line - * @param array $excludeid id to exclude - * @param string $target htmlname of target select to bind event - * @param int $default_selected default category to select if fk_c_type_fees change = EX_KME - * @param array $params param to give - * @param int $info_admin Show the tooltip help picto to setup list + * @param string $selected preselected category + * @param string $htmlname name of HTML select list + * @param integer $useempty 1=Add empty line + * @param array $excludeid id to exclude + * @param string $target htmlname of target select to bind event + * @param int $default_selected default category to select if fk_c_type_fees change = EX_KME + * @param array $params param to give + * @param int $info_admin Show the tooltip help picto to setup list * @return string */ public function selectExpenseCategories($selected = '', $htmlname = 'fk_c_exp_tax_cat', $useempty = 0, $excludeid = array(), $target = '', $default_selected = 0, $params = array(), $info_admin = 1) diff --git a/htdocs/core/class/lessc.class.php b/htdocs/core/class/lessc.class.php index 0452cab45aa..0e25b9892dd 100644 --- a/htdocs/core/class/lessc.class.php +++ b/htdocs/core/class/lessc.class.php @@ -53,6 +53,11 @@ class Lessc public $importDisabled = false; public $importDir = ''; + public $scope; + public $formatter; + public $env; + public $count; + protected $numberPrecision = null; protected $allParsedFiles = array(); diff --git a/htdocs/core/class/rssparser.class.php b/htdocs/core/class/rssparser.class.php index 6d83fd6d6da..32abb99df80 100644 --- a/htdocs/core/class/rssparser.class.php +++ b/htdocs/core/class/rssparser.class.php @@ -667,7 +667,7 @@ class RssParser /** - * To concat 2 string with no warning if an operand is not defined + * To concat 2 strings with no warning if an operand is not defined * * @param string $str1 Str1 * @param string $str2 Str2 diff --git a/htdocs/core/js/lib_notification.js.php b/htdocs/core/js/lib_notification.js.php index c2f7096432f..d60a0874e57 100644 --- a/htdocs/core/js/lib_notification.js.php +++ b/htdocs/core/js/lib_notification.js.php @@ -75,7 +75,7 @@ if ("Notification" in window) { /* Check if permission ok */ if (Notification.permission !== "granted") { console.log("Ask Notification.permission"); - Notification.requestPermission() + Notification.requestPermission(); } /* Launch timer */ diff --git a/htdocs/core/js/timesheet.js b/htdocs/core/js/timesheet.js index e9e66787aa0..63c395a953b 100644 --- a/htdocs/core/js/timesheet.js +++ b/htdocs/core/js/timesheet.js @@ -72,12 +72,9 @@ function regexEvent(objet,evt,type) // ((charCode>=96) && (charCode<=105)) || //numpad return true; - }else - { + } else { return false; } - - break; default: break; } diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 7bf81f84e2c..eece0b1005f 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -735,7 +735,7 @@ function GETPOST($paramname, $check = 'alphanohtml', $method = 0, $filter = null $qualified = 1; } - if ($qualified) { + if ($qualified && isset($user->default_values[$relativepathstring]['filters'][$defkey][$paramname])) { // We must keep $_POST and $_GET here if (isset($_POST['sall']) || isset($_POST['search_all']) || isset($_GET['sall']) || isset($_GET['search_all'])) { // We made a search from quick search menu, do we still use default filter ? @@ -1390,7 +1390,7 @@ function dol_string_unaccent($str) if (utf8_check($str)) { if (extension_loaded('intl') && !empty($conf->global->MAIN_UNACCENT_USE_TRANSLITERATOR)) { - $transliterator = \Transliterator::createFromRules(':: Any-Latin; :: Latin-ASCII; :: NFD; :: [:Nonspacing Mark:] Remove; :: NFC;', \Transliterator::FORWARD); + $transliterator = Transliterator::createFromRules(':: Any-Latin; :: Latin-ASCII; :: NFD; :: [:Nonspacing Mark:] Remove; :: NFC;', Transliterator::FORWARD); return $transliterator->transliterate($str); } // See http://www.utf8-chartable.de/ diff --git a/htdocs/core/lib/images.lib.php b/htdocs/core/lib/images.lib.php index 71e1d765de7..67b9f7e15b2 100644 --- a/htdocs/core/lib/images.lib.php +++ b/htdocs/core/lib/images.lib.php @@ -621,7 +621,7 @@ function vignette($file, $maxWidth = 160, $maxHeight = 120, $extName = '_small', } // Before PHP8, img was a resource, With PHP8, it is a GdImage - if (!is_resource($img) && !($img instanceof \GdImage)) { + if (!is_resource($img) && !($img instanceof GdImage)) { dol_syslog('Failed to detect type of image. We found infoImg[2]='.$infoImg[2], LOG_WARNING); return 0; } diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index 3b893e39256..bd735f7d033 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -241,7 +241,7 @@ function pdf_getEncryption($pathoffile) $content = file_get_contents($pathoffile); //ob_start(); - @($parser = new \TCPDF_PARSER(ltrim($content))); + @($parser = new TCPDF_PARSER(ltrim($content))); list($xref, $data) = $parser->getParsedData(); unset($parser); //ob_end_clean(); diff --git a/htdocs/core/modules/import/import_csv.modules.php b/htdocs/core/modules/import/import_csv.modules.php index affeb8ee827..37452cd5a61 100644 --- a/htdocs/core/modules/import/import_csv.modules.php +++ b/htdocs/core/modules/import/import_csv.modules.php @@ -51,7 +51,7 @@ class ImportCsv extends ModeleImports public $errors = array(); /** - * @var int ID + * @var string Code of driver */ public $id; diff --git a/htdocs/core/modules/import/import_xlsx.modules.php b/htdocs/core/modules/import/import_xlsx.modules.php index f9b41f185f1..72576e2d2e6 100644 --- a/htdocs/core/modules/import/import_xlsx.modules.php +++ b/htdocs/core/modules/import/import_xlsx.modules.php @@ -55,7 +55,7 @@ class ImportXlsx extends ModeleImports public $errors = array(); /** - * @var int ID + * @var string Code of driver */ public $id; diff --git a/htdocs/core/modules/import/modules_import.php b/htdocs/core/modules/import/modules_import.php index c57d42c8094..5b665c8e2cf 100644 --- a/htdocs/core/modules/import/modules_import.php +++ b/htdocs/core/modules/import/modules_import.php @@ -43,7 +43,7 @@ class ModeleImports public $error = ''; /** - * @var int id of driver + * @var string Code of driver */ public $id; @@ -129,7 +129,7 @@ class ModeleImports /** * getDriverId * - * @return string Id + * @return int Id */ public function getDriverId() { diff --git a/htdocs/debugbar/class/DataCollector/DolConfigCollector.php b/htdocs/debugbar/class/DataCollector/DolConfigCollector.php index 0920b140dbc..a4028bdc745 100644 --- a/htdocs/debugbar/class/DataCollector/DolConfigCollector.php +++ b/htdocs/debugbar/class/DataCollector/DolConfigCollector.php @@ -21,7 +21,7 @@ * \ingroup debugbar */ -use \DebugBar\DataCollector\ConfigCollector; +use DebugBar\DataCollector\ConfigCollector; /** * DolConfigCollector class diff --git a/htdocs/debugbar/class/DataCollector/DolExceptionsCollector.php b/htdocs/debugbar/class/DataCollector/DolExceptionsCollector.php index 38d2b971dde..5835bbde179 100644 --- a/htdocs/debugbar/class/DataCollector/DolExceptionsCollector.php +++ b/htdocs/debugbar/class/DataCollector/DolExceptionsCollector.php @@ -21,7 +21,7 @@ * \ingroup debugbar */ -use \DebugBar\DataCollector\ExceptionsCollector; +use DebugBar\DataCollector\ExceptionsCollector; /** * DolExceptionsCollector class diff --git a/htdocs/debugbar/class/DataCollector/DolMemoryCollector.php b/htdocs/debugbar/class/DataCollector/DolMemoryCollector.php index 3372e89c2b6..5d6e5310438 100644 --- a/htdocs/debugbar/class/DataCollector/DolMemoryCollector.php +++ b/htdocs/debugbar/class/DataCollector/DolMemoryCollector.php @@ -21,7 +21,7 @@ * \ingroup debugbar */ -use \DebugBar\DataCollector\MemoryCollector; +use DebugBar\DataCollector\MemoryCollector; /** * DolMemoryCollector class diff --git a/htdocs/debugbar/class/DataCollector/DolMessagesCollector.php b/htdocs/debugbar/class/DataCollector/DolMessagesCollector.php index 733009e77c6..3c605687b95 100644 --- a/htdocs/debugbar/class/DataCollector/DolMessagesCollector.php +++ b/htdocs/debugbar/class/DataCollector/DolMessagesCollector.php @@ -21,7 +21,7 @@ * \ingroup debugbar */ -use \DebugBar\DataCollector\MessagesCollector; +use DebugBar\DataCollector\MessagesCollector; /** * DolMessagesCollector class diff --git a/htdocs/debugbar/class/DataCollector/DolRequestDataCollector.php b/htdocs/debugbar/class/DataCollector/DolRequestDataCollector.php index d7e8f9a858a..0a19ca67f61 100644 --- a/htdocs/debugbar/class/DataCollector/DolRequestDataCollector.php +++ b/htdocs/debugbar/class/DataCollector/DolRequestDataCollector.php @@ -21,7 +21,7 @@ * \ingroup debugbar */ -use \DebugBar\DataCollector\RequestDataCollector; +use DebugBar\DataCollector\RequestDataCollector; /** * DolRequestDataCollector class diff --git a/htdocs/debugbar/class/DataCollector/DolTimeDataCollector.php b/htdocs/debugbar/class/DataCollector/DolTimeDataCollector.php index d16622d329f..4fdbb65c65c 100644 --- a/htdocs/debugbar/class/DataCollector/DolTimeDataCollector.php +++ b/htdocs/debugbar/class/DataCollector/DolTimeDataCollector.php @@ -21,7 +21,7 @@ * \ingroup debugbar */ -use \DebugBar\DataCollector\TimeDataCollector; +use DebugBar\DataCollector\TimeDataCollector; /** * DolTimeDataCollector class diff --git a/htdocs/debugbar/class/DebugBar.php b/htdocs/debugbar/class/DebugBar.php index bf293ea6e5f..fa7d4bd0e4f 100644 --- a/htdocs/debugbar/class/DebugBar.php +++ b/htdocs/debugbar/class/DebugBar.php @@ -23,7 +23,7 @@ dol_include_once('/debugbar/class/autoloader.php'); -use \DebugBar\DebugBar; +use DebugBar\DebugBar; dol_include_once('/debugbar/class/DataCollector/DolMessagesCollector.php'); dol_include_once('/debugbar/class/DataCollector/DolRequestDataCollector.php'); diff --git a/htdocs/don/class/don.class.php b/htdocs/don/class/don.class.php index 76ddd7e67de..1f7f29cbf92 100644 --- a/htdocs/don/class/don.class.php +++ b/htdocs/don/class/don.class.php @@ -74,6 +74,11 @@ class Don extends CommonObject */ public $amount; + /** + * @var integer Thirdparty ID + */ + public $socid; + /** * @var string Thirdparty name */ diff --git a/htdocs/expensereport/card.php b/htdocs/expensereport/card.php index 55ce88d66dc..4ec1d6d94d4 100644 --- a/htdocs/expensereport/card.php +++ b/htdocs/expensereport/card.php @@ -2337,7 +2337,7 @@ if ($action == 'create') { if (!empty($conf->global->MAIN_USE_EXPENSE_IK)) { print '