Skip to content

Commit

Permalink
NEW Dolibarr#22848 Fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorentPoinsaut committed Aug 26, 2024
1 parent f2097fe commit 416c357
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 22 deletions.
1 change: 1 addition & 0 deletions htdocs/categories/viewcat.php
Original file line number Diff line number Diff line change
Expand Up @@ -1420,6 +1420,7 @@
print '<br>';
$param = '&limit='.$limit.'&id='.$id.'&type='.$type; $num = count($objects); $nbtotalofrecords = ''; $newcardbutton = '';

// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print_barre_liste($langs->trans("Orders"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'bill', 0, $newcardbutton, '', $limit);

print "<table class='noborder' width='100%'>\n";
Expand Down
6 changes: 3 additions & 3 deletions htdocs/commande/card.php
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@
$action = '';
}

if (isModEnabled('categorie')) {
if (isModEnabled('category')) {
$categories = GETPOST('categories', 'array');
if (method_exists($object, 'setCategories')) {
$object->setCategories($categories);
Expand Down Expand Up @@ -667,7 +667,7 @@
// $result = $object->setDiscount($user, price2num(GETPOST('remise_percent'), '', 2));
//} elseif ($action == 'setremiseabsolue' && $usercancreate) {
// $result = $object->set_remise_absolue($user, price2num(GETPOST('remise_absolue'), 'MU', 2));
} elseif ($action == 'settags' && isModEnabled('categorie') && $usercancreate) {
} elseif ($action == 'settags' && isModEnabled('category') && $usercancreate) {
$result = $object->setCategories(GETPOST('categories', 'array'));
if ($result < 0) {
setEventMessages($object->error, $object->errors, 'errors');
Expand Down Expand Up @@ -2811,7 +2811,7 @@
}

// Tags-Categories
if (isModEnabled('categorie')) {
if (isModEnabled('category')) {
print '<tr><td>';
print '<table class="nobordernopadding centpercent"><tr><td>';
print $langs->trans("Categories");
Expand Down
9 changes: 5 additions & 4 deletions htdocs/commande/class/commande.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -832,14 +832,15 @@ public function cloture($user, $notrigger = 0)
}

/**
* Sets object to supplied categories.
* Sets object to given categories.
*
* Deletes object from existing categories not supplied.
* Adds it to non existing supplied categories.
* Deletes object from existing categories not supplied.
* Existing categories are left untouch.
*
* @param int[]|int $categories Category or categories IDs
* @return void
* @param int[]|int $categories Category ID or array of Categories IDs
*
* @return int Return integer <0 if KO, >0 if OK
*/
public function setCategories($categories)
{
Expand Down
25 changes: 13 additions & 12 deletions htdocs/core/class/html.form.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -10920,18 +10920,19 @@ public function selectInvoiceRec($selected = '', $htmlname = 'facrecid', $maxlen


/**
* Output a combo list with orders qualified for a third party
* Output a combo list with orders qualified for a third party
*
* @param int $selected Id order preselected
* @param string $htmlname Name of HTML select
* @param int $maxlength Maximum length of label
* @param int $option_only Return only html options lines without the select tag
* @param string $show_empty Add an empty line ('1' or string to show for empty line)
* @param int $discard_closed Discard closed projects (0=Keep,1=hide completely,2=Disable)
* @param int $forcefocus Force focus on field (works with javascript only)
* @param int $disabled Disabled
* @param string $morecss More css added to the select component
* @return int Nbr of project if OK, <0 if KO
* @param string $selected Id order preselected
* @param string $htmlname Name of HTML select
* @param int $maxlength Maximum length of label
* @param int $option_only Return only html options lines without the select tag
* @param string $show_empty Add an empty line ('1' or string to show for empty line)
* @param int $discard_closed Discard closed projects (0=Keep,1=hide completely,2=Disable)
* @param int $forcefocus Force focus on field (works with javascript only)
* @param int $disabled Disabled
* @param string $morecss More css added to the select component
*
* @return int Nbr of project if OK, <0 if KO
*/
public function selectOrder($selected = '', $htmlname = 'orderid', $maxlength = 24, $option_only = 0, $show_empty = '1', $discard_closed = 0, $forcefocus = 0, $disabled = 0, $morecss = 'maxwidth500')
{
Expand All @@ -10954,7 +10955,7 @@ public function selectOrder($selected = '', $htmlname = 'orderid', $maxlength =
// Use select2 selector
if (!empty($conf->use_javascript_ajax)) {
include_once DOL_DOCUMENT_ROOT.'/core/lib/ajax.lib.php';
$comboenhancement = ajax_combobox($htmlname, '', 0, $forcefocus);
$comboenhancement = ajax_combobox($htmlname, array(), 0, $forcefocus);
$out .= $comboenhancement;
$morecss = 'minwidth200imp maxwidth500';
}
Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/menus/standard/eldy.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -1388,7 +1388,7 @@ function get_left_menu_commercial($mainmenu, &$newmenu, $usemenuhider = 1, $left
}

// Categories
if (isModEnabled('categorie')) {
if (isModEnabled('category')) {
$langs->load("categories");
$newmenu->add("/categories/index.php?leftmenu=cat&amp;type=16", $langs->trans("Categories"), 1, $user->hasRight('categorie', 'lire'), '', $mainmenu, 'cat');
}
Expand Down
4 changes: 2 additions & 2 deletions htdocs/core/modules/modCategorie.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,7 @@ public function __construct($db)
* @param int $cat_id Categorie id
* @param string $class Class of the linked object
* @param string $enabled Condition to enable this export
* @param string $permission Permission to export the linked object
* @param array $permission Permission to export the linked object
* @param array $fields_list Additional fields of the linked object to export
*
* @return void
Expand Down Expand Up @@ -751,7 +751,7 @@ protected function importTagLinks(
int $cat_id,
string $class_file,
string $class,
string $element,
string $element
) {
$cat_type = Categorie::$MAP_ID_TO_CODE[$cat_id];

Expand Down

0 comments on commit 416c357

Please sign in to comment.