From 1e438b686ecf87ee4baa74f5314a94bdae0bb633 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Mon, 28 Dec 2020 21:32:46 +0100 Subject: [PATCH] fix stickler --- htdocs/core/class/commonobject.class.php | 2 +- htdocs/core/tpl/massactions_pre.tpl.php | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 95af26992cb..0a9b7838e97 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -8393,7 +8393,7 @@ abstract class CommonObject * @param boolean $remove_existing True: Remove existings categories from Object if not supplies by $categories, False: let them * @return int <0 if KO, >0 if OK */ - public function setCategoriesCommon($categories, $type_categ='', $remove_existing=true) + public function setCategoriesCommon($categories, $type_categ = '', $remove_existing = true) { dol_syslog(get_class($this)."::setCategoriesCommon Oject Id:".$this->id.' type_categ:'.$type_categ.' nb tag add:'.count($categories), LOG_DEBUG); diff --git a/htdocs/core/tpl/massactions_pre.tpl.php b/htdocs/core/tpl/massactions_pre.tpl.php index a5ce87ae932..f79abfe9c42 100644 --- a/htdocs/core/tpl/massactions_pre.tpl.php +++ b/htdocs/core/tpl/massactions_pre.tpl.php @@ -43,18 +43,18 @@ if ($massaction == 'preaffecttag') $categ = new Categorie($db); $categ_types=array(); $categ_type_array=$categ->getMapList(); - foreach($categ_type_array as $categdef) { + foreach ($categ_type_array as $categdef) { if (isset($object) && $categdef['obj_table']==$object->table_element) { - if (!array_key_exists($categdef['code'],$categ_types)) $categ_types[$categdef['code']] = array('code'=>$categdef['code'],'label'=>$langs->trans($categdef['obj_class'])); + if (!array_key_exists($categdef['code'], $categ_types)) $categ_types[$categdef['code']] = array('code'=>$categdef['code'],'label'=>$langs->trans($categdef['obj_class'])); } if (isset($objecttmp) && $categdef['obj_table']==$objecttmp->table_element) { - if (!array_key_exists($categdef['code'],$categ_types)) $categ_types[$categdef['code']] = array('code'=>$categdef['code'],'label'=>$langs->trans($categdef['obj_class'])); + if (!array_key_exists($categdef['code'], $categ_types)) $categ_types[$categdef['code']] = array('code'=>$categdef['code'],'label'=>$langs->trans($categdef['obj_class'])); } } $formquestion = array(); if (!empty($categ_types)) { - foreach($categ_types as $categ_type) { + foreach ($categ_types as $categ_type) { $cate_arbo = $form->select_all_categories($categ_type['code'], null, 'parent', null, null, 1); $formquestion[]= array('type' => 'other', @@ -66,7 +66,7 @@ if ($massaction == 'preaffecttag') array('type' => 'other', 'name' => 'affecttag_type', 'label' => '', - 'value' => ''); + 'value' => ''); print $form->formconfirm($_SERVER["PHP_SELF"], $langs->trans("ConfirmAffectTag"), $langs->trans("ConfirmAffectTagQuestion", count($toselect)), "affecttag", $formquestion, 1, 0, 200, 500, 1); } else { setEventMessage('CategTypeNotFound'); @@ -83,8 +83,7 @@ if ($massaction == 'presend') if (!GETPOST('cancel', 'alpha')) { - foreach ($arrayofselected as $toselectid) - { + foreach ($arrayofselected as $toselectid) { $result = $objecttmp->fetch($toselectid); if ($result > 0) {