Fixing style errors.

This commit is contained in:
stickler-ci 2020-12-24 14:06:55 +00:00
parent d3bdb72cc8
commit 7f1d0b9dc2

View File

@ -1292,14 +1292,13 @@ if (!$error && $massaction == 'generate_doc' && $permissiontoread)
} }
if (!$error && ($action == 'affecttag' && $confirm == 'yes') && $permissiontoadd) { if (!$error && ($action == 'affecttag' && $confirm == 'yes') && $permissiontoadd) {
$db->begin(); $db->begin();
$affecttag_type=GETPOST('affecttag_type','alpha'); $affecttag_type=GETPOST('affecttag_type', 'alpha');
if (!empty($affecttag_type)) { if (!empty($affecttag_type)) {
$affecttag_type_array=explode(',',$affecttag_type); $affecttag_type_array=explode(',', $affecttag_type);
} else { } else {
setEventMessage('CategTypeNotFound','errors'); setEventMessage('CategTypeNotFound', 'errors');
} }
if (!empty($affecttag_type_array)) { if (!empty($affecttag_type_array)) {
//check if tag type submited exists into Tag Map categorie class //check if tag type submited exists into Tag Map categorie class
@ -1307,7 +1306,7 @@ if (!$error && ($action == 'affecttag' && $confirm == 'yes') && $permissiontoadd
$categ = new Categorie($db); $categ = new Categorie($db);
$to_affecttag_type_array=array(); $to_affecttag_type_array=array();
$categ_type_array=$categ->getMapList(); $categ_type_array=$categ->getMapList();
foreach($categ_type_array as $categdef) { foreach ($categ_type_array as $categdef) {
if (in_array($categdef['code'], $affecttag_type_array)) { if (in_array($categdef['code'], $affecttag_type_array)) {
$to_affecttag_type_array[] = $categdef['code']; $to_affecttag_type_array[] = $categdef['code'];
} }
@ -1323,14 +1322,12 @@ if (!$error && ($action == 'affecttag' && $confirm == 'yes') && $permissiontoadd
$result = $object->fetch($toselectid); $result = $object->fetch($toselectid);
//var_dump($contcats);exit; //var_dump($contcats);exit;
if ($result > 0) { if ($result > 0) {
$result = $object->setCategoriesCommon($contcats, $categ_type, false); $result = $object->setCategoriesCommon($contcats, $categ_type, false);
if ($result > 0) { if ($result > 0) {
$nbok++; $nbok++;
} else { } else {
setEventMessages($object->error, $object->errors, 'errors'); setEventMessages($object->error, $object->errors, 'errors');
} }
} else { } else {
setEventMessages($object->error, $object->errors, 'errors'); setEventMessages($object->error, $object->errors, 'errors');
$error++; $error++;