Merge pull request #10127 from atm-florian/develop_scrunitizer

fix scrunitizer
This commit is contained in:
Laurent Destailleur 2018-12-14 17:28:34 +01:00 committed by GitHub
commit 9fb672d51b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 23 additions and 22 deletions

View File

@ -4023,9 +4023,9 @@ class OrderLine extends CommonOrderLine
* @param int $notrigger 0=launch triggers after, 1=disable triggers
* @return int <0 si ko, >0 si ok
*/
function delete($user=null, $notrigger=0)
function delete(User $user, $notrigger=0)
{
global $conf, $user, $langs;
global $conf, $langs;
$error=0;

View File

@ -357,7 +357,7 @@ class Comment extends CommonObject
}
$db->free($resql);
} else {
$error++; $this->errors[]="Error ".$this->db->lasterror();
$this->errors[]="Error ".$this->db->lasterror();
return -1;
}
}

View File

@ -6118,13 +6118,13 @@ abstract class CommonObject
{
$value_arr=explode(',',$value);
$value='';
if (is_array($value_arr))
if (is_array($value_arr) && count($value_arr)>0)
{
foreach ($value_arr as $keyval=>$valueval) {
$toprint[]='<li class="select2-search-choice-dolibarr noborderoncategories" style="background: #aaa">'.$param['options'][$valueval].'</li>';
}
$value='<div class="select2-container-multi-dolibarr" style="width: 90%;"><ul class="select2-choices-dolibarr">'.implode(' ', $toprint).'</ul></div>';
}
$value='<div class="select2-container-multi-dolibarr" style="width: 90%;"><ul class="select2-choices-dolibarr">'.implode(' ', $toprint).'</ul></div>';
}
elseif ($type == 'chkbxlst')
{

View File

@ -164,27 +164,27 @@ class doc_generic_project_odt extends ModelePDFProjects
* @param Translate $outputlangs Lang object to use for output
* @return array Return a substitution array
*/
function get_substitutionarray_tasks($task,$outputlangs)
function get_substitutionarray_tasks(Task $task,$outputlangs)
{
// phpcs:enable
global $conf;
$resarray = array(
'task_ref'=>$task->ref,
'task_fk_project'=>$task->fk_project,
'task_projectref'=>$task->projectref,
'task_projectlabel'=>$task->projectlabel,
'task_label'=>$task->label,
'task_description'=>$task->description,
'task_fk_parent'=>$task->fk_parent,
'task_duration'=>$task->duration,
'task_duration_hour'=>convertSecondToTime($task->duration,'all'),
'task_progress'=>$task->progress,
'task_public'=>$task->public,
'task_date_start'=>dol_print_date($task->date_start,'day'),
'task_date_end'=>dol_print_date($task->date_end,'day'),
'task_note_private'=>$task->note_private,
'task_note_public'=>$task->note_public
'task_ref'=>$task->ref,
'task_fk_project'=>$task->fk_project,
'task_projectref'=>$task->projectref,
'task_projectlabel'=>$task->projectlabel,
'task_label'=>$task->label,
'task_description'=>$task->description,
'task_fk_parent'=>$task->fk_parent,
'task_duration'=>$task->duration,
'task_duration_hour'=>convertSecondToTime($task->duration,'all'),
'task_progress'=>$task->progress,
'task_public'=>$task->public,
'task_date_start'=>dol_print_date($task->date_start,'day'),
'task_date_end'=>dol_print_date($task->date_end,'day'),
'task_note_private'=>$task->note_private,
'task_note_public'=>$task->note_public
);
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
@ -750,6 +750,7 @@ class doc_generic_project_odt extends ModelePDFProjects
$num = $this->db->num_rows($resql);
$i = 0;
$tasks = array();
$row=array();
$listlinestasktime = $listlines->__get('taskstimes');
if (empty($num)) {
$row['rowid']='';
@ -1064,7 +1065,7 @@ class doc_generic_project_odt extends ModelePDFProjects
'title' => "ListSocialContributionAssociatedProject",
'class' => 'ChargeSociales',
'table' => 'chargesociales',
'urlnew' => DOL_URL_ROOT . '/compta/sociales/card.php?action=create&projectid=' . $id,
'urlnew' => DOL_URL_ROOT . '/compta/sociales/card.php?action=create&projectid=' . $object->id,
'test' => $conf->tax->enabled && $user->rights->tax->charges->lire
),
'stock_mouvement' => array(