[-] BO : BugFix : #PSFV-1020 : category reduction can be deleted now
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@14109 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
1 parent
69350b2631
commit
998ef4263e
2 files changed
+14
-1
No files matched your search
@@ -162,7 +162,8 @@ function getPath($urlBase, $id_category, $path = '', $highlight = '', $categoryT
|
|||||||
$nCategories = (int)sizeof($categories);
|
$nCategories = (int)sizeof($categories);
|
||||||
foreach ($categories AS $category)
|
foreach ($categories AS $category)
|
||||||
{
|
{
|
||||||
$edit = '<a href="'.$urlBase.'&id_category='.(int)$category['id_category'].'&'.(($category['id_category'] == 1 || $home) ? 'viewcategory' : 'updatecategory').'&token='.Tools::getAdminToken('AdminCategories'.(int)(Tab::getIdFromClassName('AdminCategories')).(int)$context->employee->id).'" title="'.($category['id_category'] == 1 ? 'Home' : 'Modify').'"><img src="../img/admin/'.(($category['id_category'] == 1 || $home) ? 'home' : 'edit').'.gif" alt="" /></a> ';
|
$link = Context::getContext()->link->getAdminLink('AdminCategories');
|
||||||
|
$edit = '<a href="'.$link.'&id_category='.(int)$category['id_category'].'&'.(($category['id_category'] == 1 || $home) ? 'viewcategory' : 'updatecategory').'" title="'.($category['id_category'] == 1 ? 'Home' : 'Modify').'"><img src="../img/admin/'.(($category['id_category'] == 1 || $home) ? 'home' : 'edit').'.gif" alt="" /></a> ';
|
||||||
$fullPath .= $edit.
|
$fullPath .= $edit.
|
||||||
($n < $nCategories ? '<a href="'.$urlBase.'&id_category='.(int)$category['id_category'].'&viewcategory&token='.Tools::getAdminToken('AdminCategories'.(int)(Tab::getIdFromClassName('AdminCategories')).(int)$context->employee->id).'" title="'.htmlentities($category['name'], ENT_NOQUOTES, 'UTF-8').'">' : '').
|
($n < $nCategories ? '<a href="'.$urlBase.'&id_category='.(int)$category['id_category'].'&viewcategory&token='.Tools::getAdminToken('AdminCategories'.(int)(Tab::getIdFromClassName('AdminCategories')).(int)$context->employee->id).'" title="'.htmlentities($category['name'], ENT_NOQUOTES, 'UTF-8').'">' : '').
|
||||||
(!empty($highlight) ? str_ireplace($highlight, '<span class="highlight">'.htmlentities($highlight, ENT_NOQUOTES, 'UTF-8').'</span>', $category['name']) : $category['name']).
|
(!empty($highlight) ? str_ireplace($highlight, '<span class="highlight">'.htmlentities($highlight, ENT_NOQUOTES, 'UTF-8').'</span>', $category['name']) : $category['name']).
|
||||||
|
|||||||
@@ -437,6 +437,18 @@ class AdminGroupsControllerCore extends AdminController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// if we have no category reduction anymore, we delete the existing ones
|
||||||
|
Db::getInstance()->execute('
|
||||||
|
DELETE FROM `'._DB_PREFIX_.'group_reduction`
|
||||||
|
WHERE `id_group` = '.(int)Tools::getValue('id_group')
|
||||||
|
);
|
||||||
|
Db::getInstance()->execute('
|
||||||
|
DELETE FROM `'._DB_PREFIX_.'product_group_reduction_cache`
|
||||||
|
WHERE `id_group` = '.(int)Tools::getValue('id_group')
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in new issue
Block a user