Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix & enable PhanPluginDuplicateConditionalUnnecessary "X ? Y : Y" #28800

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
3b0d19a
Fix unneed test 'X ? Y : Y' by assigning '' to note_private
mdeweerd Mar 12, 2024
c8a295d
Fix unneeded test 'X ? Y : Y' by using GETPOST value if it is set
mdeweerd Mar 12, 2024
1637ba5
Fix PhanPluginDuplicateConditionalUnnecessary "X ? Y : Y" (Simplify)
mdeweerd Mar 12, 2024
ac23e32
Fix PhanPluginDuplicateConditionalUnnecessary "X ? Y : Y" (Simplify)
mdeweerd Mar 12, 2024
8e664aa
Fix PhanPluginDuplicateConditionalUnnecessary "X ? Y : Y" (Simplify)
mdeweerd Mar 12, 2024
e64bf30
Fix PhanPluginDuplicateConditionalUnnecessary "X ? Y : Y" (Simplify)
mdeweerd Mar 12, 2024
f3eceb4
Fix PhanPluginDuplicateConditionalUnnecessary "X ? Y : Y" (Simplify)
mdeweerd Mar 12, 2024
47a4a3b
Fix PhanPluginDuplicateConditionalUnnecessary "X ? Y : Y" (Simplify)
mdeweerd Mar 12, 2024
8823cca
Fix PhanPluginDuplicateConditionalUnnecessary "X ? Y : Y" (Simplify)
mdeweerd Mar 12, 2024
0f6bddf
Fix PhanPluginDuplicateConditionalUnnecessary "X ? Y : Y" (Simplify)
mdeweerd Mar 12, 2024
3a2bed4
Fix PhanPluginDuplicateConditionalUnnecessary "X ? Y : Y" (Simplify)
mdeweerd Mar 12, 2024
22b7838
Fix PhanPluginDuplicateConditionalUnnecessary "X ? Y : Y" (Simplify)
mdeweerd Mar 12, 2024
ca6dcff
Fix PhanPluginDuplicateConditionalUnnecessary "X ? Y : Y" (Simplify)
mdeweerd Mar 12, 2024
c4be0d7
Fix PhanPluginDuplicateConditionalUnnecessary "X ? Y : Y" (Simplify)
mdeweerd Mar 12, 2024
22a9611
Fix PhanPluginDuplicateConditionalUnnecessary "X ? Y : Y" (Simplify)
mdeweerd Mar 12, 2024
aef661e
Fix PhanPluginDuplicateConditionalUnnecessary "X ? Y : Y" (Simplify)
mdeweerd Mar 12, 2024
f924a8c
Fix PhanPluginDuplicateConditionalUnnecessary "X ? Y : Y" (Simplify)
mdeweerd Mar 12, 2024
de10bcc
Fix PhanPluginDuplicateConditionalUnnecessary "X ? Y : Y" (Simplify)
mdeweerd Mar 12, 2024
b2cbf7f
Qual: Enable PhanPluginDuplicateConditionalUnnecessary notices (all f…
mdeweerd Mar 12, 2024
3fb6501
Update contact.class.php
eldy Mar 14, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dev/tools/phan/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@
'PhanTypeSuspiciousNonTraversableForeach',
'PhanEmptyForeach',
'PhanTypeInvalidRightOperandOfBitwiseOp',
'PhanPluginDuplicateConditionalUnnecessary',
// 'PhanPluginDuplicateConditionalUnnecessary',
// 'PhanTraitParentReference',
'PhanPluginBothLiteralsBinaryOp',
// 'PhanTypeMismatchDeclaredParam',
Expand Down
14 changes: 7 additions & 7 deletions htdocs/adherents/class/adherent.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -760,13 +760,13 @@ public function update($user, $notrigger = 0, $nosyncuser = 0, $nosyncuserpass =
$this->lastname = trim($this->lastname) ? trim($this->lastname) : trim($this->lastname);
$this->firstname = trim($this->firstname) ? trim($this->firstname) : trim($this->firstname);
$this->gender = trim($this->gender);
$this->address = ($this->address ? $this->address : $this->address);
$this->zip = ($this->zip ? $this->zip : $this->zip);
$this->town = ($this->town ? $this->town : $this->town);
$this->country_id = ($this->country_id > 0 ? $this->country_id : $this->country_id);
$this->state_id = ($this->state_id > 0 ? $this->state_id : $this->state_id);
$this->note_public = ($this->note_public ? $this->note_public : $this->note_public);
$this->note_private = ($this->note_private ? $this->note_private : $this->note_private);
// $this->address = ($this->address ? $this->address : $this->address);
// $this->zip = ($this->zip ? $this->zip : $this->zip);
// $this->town = ($this->town ? $this->town : $this->town);
// $this->country_id = ($this->country_id > 0 ? $this->country_id : $this->country_id);
// $this->state_id = ($this->state_id > 0 ? $this->state_id : $this->state_id);
// $this->note_public = ($this->note_public ? $this->note_public : $this->note_public);
// $this->note_private = ($this->note_private ? $this->note_private : $this->note_private);
$this->url = $this->url ? clean_url($this->url, 0) : '';
$this->setUpperOrLowerCase();
// Check parameters
Expand Down
3 changes: 2 additions & 1 deletion htdocs/asset/tpl/accountancy_codes_view.tpl.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php
/* Copyright (C) 2021 Open-Dsi <[email protected]>
* Copyright (C) 2024 MDW <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -58,7 +59,7 @@
if (empty($assetdepreciationoptions->deprecation_options[$mode_key]) && $mode_key == "accelerated_depreciation") {
continue;
}
$width = ($mode_key == "economic")? "pull-left" : "pull-left";
$width = "pull-left";
print '<table class="liste centpercent '. $width .'" id="block_' . $mode_key . '">' . "\n";
print '<tr class="liste_titre"><td colspan="5">'.$langs->trans($mode_info['label']).'</td></tr>';
foreach ($mode_info['fields'] as $field_key => $field_info) {
Expand Down
3 changes: 2 additions & 1 deletion htdocs/asset/tpl/depreciation_options_view.tpl.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php
/* Copyright (C) 2021 Open-Dsi <[email protected]>
* Copyright (C) 2024 MDW <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -64,7 +65,7 @@

$assetdepreciationoptions->setInfosForMode($mode_key, $class_type, true);

$width = ($mode_key == "economic")? "pull-left" : "pull-left";
$width = "pull-left";
print '<table class="liste centpercent '. $width .'" id="block_' . $mode_key . '">' . "\n";
print '<tr class="liste_titre"><td colspan="5">'.$langs->trans($mode_info['label']).'</td></tr>';
$mode_info['fields'] = dol_sort_array($mode_info['fields'], 'position');
Expand Down
9 changes: 5 additions & 4 deletions htdocs/bom/bom_card.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/* Copyright (C) 2017-2023 Laurent Destailleur <[email protected]>
* Copyright (C) 2019 Frédéric France <[email protected]>
* Copyright (C) 2023 Charlene Benke <[email protected]>
* Copyright (C) 2024 MDW <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -199,7 +200,7 @@
}

// We check if we're allowed to add this bom
$TParentBom=array();
$TParentBom = array();
$object->getParentBomTreeRecursive($TParentBom);
if ($bom_child_id > 0 && !empty($TParentBom) && in_array($bom_child_id, $TParentBom)) {
$n_child = new BOM($db);
Expand Down Expand Up @@ -306,7 +307,7 @@


$title = $langs->trans('BOM');
$help_url ='EN:Module_BOM';
$help_url = 'EN:Module_BOM';
llxHeader('', $title, $help_url);

// Part to create
Expand Down Expand Up @@ -590,7 +591,7 @@

print ($res == 0 && $object->status >= $object::STATUS_VALIDATED) ? '' : load_fiche_titre($langs->trans('BOMProductsList'), '', 'product');

print ' <form name="addproduct" id="listbomproducts" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . (($action != 'editline') ? '' : '') . '" method="POST">
print ' <form name="addproduct" id="listbomproducts" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '" method="POST">
<input type="hidden" name="token" value="' . newToken() . '">
<input type="hidden" name="action" value="' . (($action != 'editline') ? 'addline' : 'updateline') . '">
<input type="hidden" name="mode" value="">
Expand Down Expand Up @@ -642,7 +643,7 @@

print ($res == 0 && $object->status >= $object::STATUS_VALIDATED) ? '' : load_fiche_titre($langs->trans('BOMServicesList'), '', 'service');

print ' <form name="addservice" id="listbomservices" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . (($action != 'editline') ? '' : '') . '" method="POST">
print ' <form name="addservice" id="listbomservices" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '" method="POST">
<input type="hidden" name="token" value="' . newToken() . '">
<input type="hidden" name="action" value="' . (($action != 'editline') ? 'addline' : 'updateline') . '">
<input type="hidden" name="mode" value="">
Expand Down
4 changes: 2 additions & 2 deletions htdocs/compta/facture/class/facture.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -459,8 +459,8 @@ public function create(User $user, $notrigger = 0, $forceduedate = 0)

$this->ref_client = trim($this->ref_client);

$this->note = (isset($this->note) ? trim($this->note) : trim($this->note_private)); // deprecated
$this->note_private = (isset($this->note_private) ? trim($this->note_private) : trim($this->note_private));
$this->note_private = (isset($this->note_private) ? trim($this->note_private) : '');
$this->note = (isset($this->note) ? trim($this->note) : $this->note_private); // deprecated
$this->note_public = trim($this->note_public);
if (!$this->cond_reglement_id) {
$this->cond_reglement_id = 0;
Expand Down
2 changes: 1 addition & 1 deletion htdocs/contact/class/contact.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ public function update($id, $user = null, $notrigger = 0, $action = 'update', $n
$this->fax = trim($this->fax);
$this->zip = (empty($this->zip) ? '' : trim($this->zip));
$this->town = (empty($this->town) ? '' : trim($this->town));
$this->country_id = ($this->country_id > 0 ? $this->country_id : $this->country_id);
$this->country_id = ($this->country_id > 0 ? 0 : $this->country_id);
if (empty($this->statut)) {
$this->statut = 0;
}
Expand Down
7 changes: 4 additions & 3 deletions htdocs/core/class/doleditor.class.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php
/* Copyright (C) 2006-2008 Laurent Destailleur <[email protected]>
* Copyright (C) 2021 Gaëtan MAISON <[email protected]>
* Copyright (C) 2024 MDW <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -200,7 +201,7 @@ public function Create($noprint = 0, $morejs = '', $disallowAnyContent = true, $
htmlEncodeOutput: '.dol_escape_js($htmlencode_force).',
allowedContent: '.($disallowAnyContent ? 'false' : 'true').', /* Advanced Content Filter (ACF) is own when allowedContent is false */
extraAllowedContent: \'a[target];div{float,display}\', /* Add the style float and display into div to default other allowed tags */
disallowedContent: '.($disallowAnyContent ? '\'\'' : '\'\'').', /* Tags that are not allowed */
disallowedContent: \'\', /* Tags that are not allowed */
fullPage: '.($fullpage ? 'true' : 'false').', /* if true, the html, header and body tags are kept */
toolbar: \''.dol_escape_js($this->toolbarname).'\',
toolbarStartupExpanded: '.($this->toolbarstartexpanded ? 'true' : 'false').',
Expand Down Expand Up @@ -280,8 +281,8 @@ public function Create($noprint = 0, $morejs = '', $disallowAnyContent = true, $
$out .= '<script nonce="'.getNonce().'" type="text/javascript">'."\n";
$out .= 'jQuery(document).ready(function() {'."\n";
$out .= ' var aceEditor = window.ace.edit("'.$this->htmlname.'aceeditorid");
aceEditor.moveCursorTo('.($this->posy+1).','.$this->posx.');
aceEditor.gotoLine('.($this->posy+1).','.$this->posx.');
aceEditor.moveCursorTo('.($this->posy + 1).','.$this->posx.');
aceEditor.gotoLine('.($this->posy + 1).','.$this->posx.');
var StatusBar = window.ace.require("ace/ext/statusbar").StatusBar; // Init status bar. Need lib ext-statusbar
var statusBar = new StatusBar(aceEditor, document.getElementById("statusBar'.$this->htmlname.'")); // Init status bar. Need lib ext-statusbar

Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/class/html.form.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -7060,7 +7060,7 @@ public function selectDate($set_time = '', $prefix = 're', $h = 0, $m = 0, $empt
if (strlen($min) < 2) {
$min = "0" . $min;
}
$retstring .= '<option value="' . $min . '"' . (($min == $smin) ? ' selected' : '') . '>' . $min . (empty($conf->dol_optimize_smallscreen) ? '' : '') . '</option>';
$retstring .= '<option value="' . $min . '"' . (($min == $smin) ? ' selected' : '') . '>' . $min . '</option>';
}
$retstring .= '</select>';

Expand Down
3 changes: 2 additions & 1 deletion htdocs/core/tpl/admin_extrafields_view.tpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/* Copyright (C) 2010-2018 Laurent Destailleur <[email protected]>
* Copyright (C) 2012-2021 Regis Houssin <[email protected]>
* Copyright (C) 2018-2023 Frédéric France <[email protected]>
* Copyright (C) 2024 MDW <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -46,7 +47,7 @@
$title = '<span class="opacitymedium">'.$langs->trans("DefineHereComplementaryAttributes", empty($textobject) ? '' : $textobject).'</span><br>'."\n";
//if ($action != 'create' && $action != 'edit') {
$newcardbutton = '';
$newcardbutton .= dolGetButtonTitle($langs->trans('NewAttribute'), '', 'fa fa-plus-circle', $_SERVER["PHP_SELF"].'?action=create', '', (($action != 'create' && $action != 'edit') ? 1 : 1));
$newcardbutton .= dolGetButtonTitle($langs->trans('NewAttribute'), '', 'fa fa-plus-circle', $_SERVER["PHP_SELF"].'?action=create', '', 1);
/*} else {
$newcardbutton = '';
}*/
Expand Down
13 changes: 7 additions & 6 deletions htdocs/cron/list.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* Copyright (C) 2013 Florian Henry <[email protected]>
* Copyright (C) 2013-2021 Laurent Destailleur <[email protected]>
* Copyright (C) 2019-2024 Frédéric France <[email protected]>
* Copyright (C) 2024 MDW <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -379,8 +380,8 @@
$arrayofmassactions = array(
//'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"),
//'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"),
'enable'=>img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("CronStatusActiveBtn"),
'disable'=>img_picto('', 'uncheck', 'class="pictofixedwidth"').$langs->trans("CronStatusInactiveBtn"),
'enable' => img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("CronStatusActiveBtn"),
'disable' => img_picto('', 'uncheck', 'class="pictofixedwidth"').$langs->trans("CronStatusInactiveBtn"),
);
if ($user->hasRight('cron', 'delete')) {
$arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete");
Expand Down Expand Up @@ -471,7 +472,7 @@
print '<td class="liste_titre">&nbsp;</td>';
print '<td class="liste_titre">&nbsp;</td>';
print '<td class="liste_titre center">';
print $form->selectarray('search_status', array('0'=>$langs->trans("Disabled"), '1'=>$langs->trans("Scheduled")), $search_status, 1, 0, 0, '', 0, 0, 0, '', 'search_status width100 onrightofpage');
print $form->selectarray('search_status', array('0' => $langs->trans("Disabled"), '1' => $langs->trans("Scheduled")), $search_status, 1, 0, 0, '', 0, 0, 0, '', 'search_status width100 onrightofpage');
print '</td>';
print '<td class="liste_titre">&nbsp;</td>';
// Action column
Expand Down Expand Up @@ -607,9 +608,9 @@

$s = '';
if ($obj->unitfrequency == "60") {
$s = ($obj->frequency)." ".($obj->frequency > 1 ? $langs->trans('MinuteShort') : $langs->trans('MinuteShort'));
$s = ($obj->frequency)." ".$langs->trans('MinuteShort');
} elseif ($obj->unitfrequency == "3600") {
$s = ($obj->frequency)." ".($obj->frequency > 1 ? $langs->trans('HourShort') : $langs->trans('HourShort'));
$s = ($obj->frequency)." ".$langs->trans('HourShort');
} elseif ($obj->unitfrequency == "86400") {
$s = ($obj->frequency)." ".($obj->frequency > 1 ? $langs->trans('DurationDays') : $langs->trans('DurationDay'));
} elseif ($obj->unitfrequency == "604800") {
Expand Down Expand Up @@ -659,7 +660,7 @@
print '<td class="center nowraponall" title="'.dol_escape_htmltag($datefromto).'">';
if (!empty($datelastresult) && ($datelastresult >= $datelastrun)) {
$nbseconds = max($datelastresult - $datelastrun, 1);
print $nbseconds.' '.($nbseconds > 1 ? $langs->trans("SecondShort") : $langs->trans("SecondShort"));
print $nbseconds.' '.$langs->trans("SecondShort");
}
print '</td>';

Expand Down
21 changes: 11 additions & 10 deletions htdocs/don/class/don.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
* Copyright (C) 2019 Thibault FOUCART <[email protected]>
* Copyright (C) 2019-2024 Frédéric France <[email protected]>
* Copyright (C) 2021 Maxime DEMAREST <[email protected]>
* Copyright (C) 2024 MDW <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -382,11 +383,11 @@ public function create($user, $notrigger = 0)
$now = dol_now();

// Clean parameters
$this->address = ($this->address > 0 ? $this->address : $this->address);
$this->zip = ($this->zip > 0 ? $this->zip : $this->zip);
$this->town = ($this->town > 0 ? $this->town : $this->town);
$this->country_id = ($this->country_id > 0 ? $this->country_id : $this->country_id);
$this->country = ($this->country ? $this->country : $this->country);
// $this->address = ($this->address > 0 ? $this->address : $this->address);
// $this->zip = ($this->zip > 0 ? $this->zip : $this->zip);
// $this->town = ($this->town > 0 ? $this->town : $this->town);
// $this->country_id = ($this->country_id > 0 ? $this->country_id : $this->country_id);
// $this->country = ($this->country ? $this->country : $this->country);
$this->amount = (float) price2num($this->amount);

// Check parameters
Expand Down Expand Up @@ -499,11 +500,11 @@ public function update($user, $notrigger = 0)
$error = 0;

// Clean parameters
$this->address = ($this->address > 0 ? $this->address : $this->address);
$this->zip = ($this->zip > 0 ? $this->zip : $this->zip);
$this->town = ($this->town > 0 ? $this->town : $this->town);
$this->country_id = ($this->country_id > 0 ? $this->country_id : $this->country_id);
$this->country = ($this->country ? $this->country : $this->country);
// $this->address = ($this->address > 0 ? $this->address : $this->address);
// $this->zip = ($this->zip > 0 ? $this->zip : $this->zip);
// $this->town = ($this->town > 0 ? $this->town : $this->town);
// $this->country_id = ($this->country_id > 0 ? $this->country_id : $this->country_id);
// $this->country = ($this->country ? $this->country : $this->country);
$this->amount = (float) price2num($this->amount);

// Check parameters
Expand Down
2 changes: 1 addition & 1 deletion htdocs/projet/activity/perday.php
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@
if (!$user->hasRight('user', 'user', 'lire')) {
$includeonly = array($user->id);
}
$moreforfilter .= img_picto($langs->trans('Filter').' '.$langs->trans('User'), 'user', 'class="paddingright pictofixedwidth"').$form->select_dolusers($search_usertoprocessid ? $search_usertoprocessid : $usertoprocess->id, 'search_usertoprocessid', $user->hasRight('user', 'user', 'lire') ? 0 : 0, null, 0, $includeonly, null, 0, 0, 0, '', 0, '', 'maxwidth200');
$moreforfilter .= img_picto($langs->trans('Filter').' '.$langs->trans('User'), 'user', 'class="paddingright pictofixedwidth"').$form->select_dolusers($search_usertoprocessid ? $search_usertoprocessid : $usertoprocess->id, 'search_usertoprocessid', 0, null, 0, $includeonly, null, 0, 0, 0, '', 0, '', 'maxwidth200');
$moreforfilter .= '</div>';

if (!getDolGlobalString('PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT')) {
Expand Down
2 changes: 1 addition & 1 deletion htdocs/projet/activity/permonth.php
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@
if (!$user->hasRight('user', 'user', 'lire')) {
$includeonly = array($user->id);
}
$moreforfilter .= img_picto($langs->trans('Filter').' '.$langs->trans('User'), 'user', 'class="paddingright pictofixedwidth"').$form->select_dolusers($search_usertoprocessid ? $search_usertoprocessid : $usertoprocess->id, 'search_usertoprocessid', $user->hasRight('user', 'user', 'lire') ? 0 : 0, null, 0, $includeonly, null, 0, 0, 0, '', 0, '', 'maxwidth200');
$moreforfilter .= img_picto($langs->trans('Filter').' '.$langs->trans('User'), 'user', 'class="paddingright pictofixedwidth"').$form->select_dolusers($search_usertoprocessid ? $search_usertoprocessid : $usertoprocess->id, 'search_usertoprocessid', 0, null, 0, $includeonly, null, 0, 0, 0, '', 0, '', 'maxwidth200');
$moreforfilter .= '</div>';

if (!getDolGlobalString('PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT')) {
Expand Down
2 changes: 1 addition & 1 deletion htdocs/projet/activity/perweek.php
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@
if (!$user->hasRight('user', 'user', 'lire')) {
$includeonly = array($user->id);
}
$moreforfilter .= img_picto($langs->trans('Filter').' '.$langs->trans('User'), 'user', 'class="paddingright pictofixedwidth"').$form->select_dolusers($search_usertoprocessid ? $search_usertoprocessid : $usertoprocess->id, 'search_usertoprocessid', $user->hasRight('user', 'user', 'lire') ? 0 : 0, null, 0, $includeonly, null, 0, 0, 0, '', 0, '', 'maxwidth200');
$moreforfilter .= img_picto($langs->trans('Filter').' '.$langs->trans('User'), 'user', 'class="paddingright pictofixedwidth"').$form->select_dolusers($search_usertoprocessid ? $search_usertoprocessid : $usertoprocess->id, 'search_usertoprocessid', 0, null, 0, $includeonly, null, 0, 0, 0, '', 0, '', 'maxwidth200');
$moreforfilter .= '</div>';

if (!getDolGlobalString('PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT')) {
Expand Down
3 changes: 2 additions & 1 deletion htdocs/societe/card.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* Copyright (C) 2022-2023 George Gkantinas <[email protected]>
* Copyright (C) 2023 Nick Fragoulis
* Copyright (C) 2023 Alexandre Janniaux <[email protected]>
* Copyright (C) 2024 MDW <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -1568,7 +1569,7 @@ function formatCustomerSelection (selection) {
// Vat is used
print '<tr><td>'.$form->editfieldkey('VATIsUsed', 'assujtva_value', '', $object, 0).'</td>';
print '<td>';
print '<input id="assujtva_value" name="assujtva_value" type="checkbox" ' . (GETPOSTISSET('assujtva_value') ? 'checked="checked"' : 'checked="checked"') . ' value="1">'; // Assujeti par default en creation
print '<input id="assujtva_value" name="assujtva_value" type="checkbox" ' . (GETPOSTISSET('assujtva_value') ? (GETPOST('assujtva', 'alpha') != '' ? ' checked="checked"' : '') : 'checked="checked"') . ' value="1">'; // Assujeti par default en creation
print '</td>';
if ($conf->browser->layout == 'phone') {
print '</tr><tr>';
Expand Down
Loading
Loading