* fixed not working deleted of application-global categories via "admin >> global categories" in applications

This commit is contained in:
Ralf Becker 2011-02-15 12:51:21 +00:00
parent f3ba8e0a69
commit a26a899ea0

View File

@ -332,9 +332,9 @@ class admin_categories
} }
else else
{ {
if($content['delete']['delete']) if($content['delete']['delete'] && ($cat = categories::read($content['delete']['cat_id'])))
{ {
$cats = new categories(categories::GLOBAL_ACCOUNT,$content['nm']['appname']); $cats = new categories(categories::GLOBAL_ACCOUNT,$cat['appname']);
$cats->delete($content['delete']['cat_id'],$content['delete']['subs'],!$content['delete']['subs']); $cats->delete($content['delete']['cat_id'],$content['delete']['subs'],!$content['delete']['subs']);
$msg = lang('Category deleted.'); $msg = lang('Category deleted.');
} }