Fix PhanPluginDuplicateConditionalUnnecessary "X ? Y : Y" (Simplify)
This commit is contained in:
parent
8e664aa0e1
commit
e64bf30bf6
1 changed files with 5 additions and 4 deletions
|
|
@ -2,6 +2,7 @@
|
|||
/* Copyright (C) 2017-2023 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2023 Charlene Benke <charlene@patas-monkey.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -199,7 +200,7 @@ if (empty($reshook)) {
|
|||
}
|
||||
|
||||
// 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);
|
||||
|
|
@ -306,7 +307,7 @@ $formfile = new FormFile($db);
|
|||
|
||||
|
||||
$title = $langs->trans('BOM');
|
||||
$help_url ='EN:Module_BOM';
|
||||
$help_url = 'EN:Module_BOM';
|
||||
llxHeader('', $title, $help_url);
|
||||
|
||||
// Part to create
|
||||
|
|
@ -590,7 +591,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||
|
||||
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="">
|
||||
|
|
@ -642,7 +643,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||
|
||||
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="">
|
||||
|
|
|
|||
Loading…
Reference in a new issue