Fix scrutinizer

This commit is contained in:
Laurent Destailleur 2022-05-18 11:23:21 +02:00
parent ed2e1bda46
commit 177e8c17fb
14 changed files with 25 additions and 17 deletions

View File

@ -1621,7 +1621,7 @@ class ActionComm extends CommonObject
$label = $langs->trans("ShowAction");
$linkclose .= ' alt="'.dol_escape_htmltag($tooltip, 1).'"';
}
$linkclose .= ' title="'.dol_escape_htmltag($tooltip, 1, 0, 0, '', 1).'"';
$linkclose .= ' title="'.dol_escape_htmltag($tooltip, 1, 0, '', 1).'"';
$linkclose .= ' class="'.$classname.' classfortooltip"';
/*
$hookmanager->initHooks(array('actiondao'));

View File

@ -110,7 +110,7 @@ $week = GETPOST("week", "int") ?GETPOST("week", "int") : date("W");
$day = GETPOST("day", "int") ?GETPOST("day", "int") : date("d");
$pid = GETPOST("search_projectid", "int", 3) ? GETPOST("search_projectid", "int", 3) : GETPOST("projectid", "int", 3);
$status = GETPOSTISSET("search_status") ? GETPOST("search_status", 'aZ09') : GETPOST("status", 'aZ09'); // status may be 0, 50, 100, 'todo'
$type = GETPOSTISSET("search_type", 'aZ09') ? GETPOST("search_type", 'aZ09') : GETPOST("type", 'aZ09');
$type = GETPOSTISSET("search_type") ? GETPOST("search_type", 'aZ09') : GETPOST("type", 'aZ09');
$maxprint = GETPOSTISSET("maxprint") ? GETPOST("maxprint", 'int') : $conf->global->AGENDA_MAX_EVENTS_DAY_VIEW;
$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')

View File

@ -201,7 +201,7 @@ abstract class CommonObject
public $user;
/**
* @var string The type of originating object ('commande', 'facture', ...)
* @var string The type of originating object ('commande', 'facture', ...). Note: on some object this field is called $origin_type
* @see fetch_origin()
*/
public $origin;

View File

@ -7621,7 +7621,7 @@ class Form
if (!empty($objecttmp->fields)) { // For object that declare it, it is better to use declared fields (like societe, contact, ...)
$tmpfieldstoshow = '';
foreach ($objecttmp->fields as $key => $val) {
if (!dol_eval($val['enabled'], 1, 1, 1, '1')) {
if (!dol_eval($val['enabled'], 1, 1, '1')) {
continue;
}
if (!empty($val['showoncombobox'])) {

View File

@ -342,7 +342,7 @@ class Utils
$handle = '';
$lowmemorydump = GETPOSTISSET("lowmemorydump", "alpha") ? GETPOST("lowmemorydump") : getDolGlobalString('MAIN_LOW_MEMORY_DUMP');
$lowmemorydump = GETPOSTISSET("lowmemorydump") ? GETPOST("lowmemorydump") : getDolGlobalString('MAIN_LOW_MEMORY_DUMP');
// Start call method to execute dump
$fullcommandcrypted = $command." ".$paramcrypted." 2>&1";

View File

@ -120,7 +120,7 @@ class pdf_espadon extends ModelePdfExpedition
*
* @param DoliDB $db Database handler
*/
public function __construct($db)
public function __construct(DoliDB $db)
{
global $conf, $langs, $mysoc;

View File

@ -121,7 +121,7 @@ class pdf_merou extends ModelePdfExpedition
*
* @param DoliDB $db Database handler
*/
public function __construct($db = 0)
public function __construct(DoliDB $db)
{
global $conf, $langs, $mysoc;

View File

@ -121,7 +121,7 @@ class pdf_rouget extends ModelePdfExpedition
*
* @param DoliDB $db Database handler
*/
public function __construct($db = 0)
public function __construct(DoliDB $db)
{
global $conf, $langs, $mysoc;

View File

@ -44,7 +44,7 @@ class pdf_squille extends ModelePdfReception
*
* @param DoliDB $db Database handler
*/
public function __construct($db = 0)
public function __construct(DoliDB $db)
{
global $conf, $langs, $mysoc;

View File

@ -752,7 +752,7 @@ class Expedition extends CommonObject
//var_dump($this->lines[$i]);
$mouvS = new MouvementStock($this->db);
$mouvS->origin = dol_clone($this, 1);
//$mouvS->origin = dol_clone($this, 1);
$mouvS->setOrigin($this->element, $this->id);
if (empty($obj->edbrowid)) {

View File

@ -127,6 +127,13 @@ class FactureFournisseurRec extends CommonInvoice
public $model_pdf;
/**
* Invoice lines
* @var FactureFournisseurLigneRec[]
*/
public $lines = array();
/* Override fields in CommonObject
public $entity;
public $date_creation;

View File

@ -143,7 +143,7 @@ if (!empty($force_install_message)) {
<td class="label"><label for="main_dir"><b><?php print $langs->trans("WebPagesDirectory"); ?></b></label></td>
<?php
if (empty($dolibarr_main_document_root)) {
$dolibarr_main_document_root = GETPOSTISSET('main_dir', 'alpha') ? GETPOST('main_dir') : detect_dolibarr_main_document_root();
$dolibarr_main_document_root = GETPOSTISSET('main_dir') ? GETPOST('main_dir') : detect_dolibarr_main_document_root();
}
?>
<td class="label">
@ -178,7 +178,7 @@ if (!empty($force_install_noedit)) {
$dolibarr_main_data_root = @$force_install_main_data_root;
}
if (empty($dolibarr_main_data_root)) {
$dolibarr_main_data_root = GETPOSTISSET('main_data_dir', 'alpha') ? GETPOST('main_data_dir') : detect_dolibarr_main_data_root($dolibarr_main_document_root);
$dolibarr_main_data_root = GETPOSTISSET('main_data_dir') ? GETPOST('main_data_dir') : detect_dolibarr_main_data_root($dolibarr_main_document_root);
}
?>
<td class="label">
@ -207,7 +207,7 @@ if (!empty($force_install_noedit)) {
<!-- Root URL $dolibarr_main_url_root -->
<?php
if (empty($dolibarr_main_url_root)) {
$dolibarr_main_url_root = GETPOSTISSET('main_url', 'alpha') ? GETPOST('main_url') : detect_dolibarr_main_url_root();
$dolibarr_main_url_root = GETPOSTISSET('main_url') ? GETPOST('main_url') : detect_dolibarr_main_url_root();
}
?>
<tr>

View File

@ -1461,7 +1461,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
if ($type == 1) {
print '<tr><td>'.$langs->trans("Duration").'</td><td>';
print '<input name="duration_value" size="4" value="'.GETPOST('duration_value', 'int').'">';
print $formproduct->selectMeasuringUnits("duration_unit", "time", (GETPOSTISSET('duration_value') ? GETPOSTISSET('duration_value', 'alpha') : 'h'), 0, 1);
print $formproduct->selectMeasuringUnits("duration_unit", "time", (GETPOSTISSET('duration_value') ? GETPOST('duration_value', 'alpha') : 'h'), 0, 1);
// Mandatory period
print ' &nbsp; &nbsp; &nbsp; ';

View File

@ -504,18 +504,19 @@ class Societe extends CommonObject
/**
* Date of last update
* @var string
* @var integer|string
*/
public $date_modification;
/**
* User that made last update
* @var string
* @var User
*/
public $user_modification;
/**
* @var integer|string date_creation
* Date of creation
* @var integer|string
*/
public $date_creation;