/* die */ } // Control permission to edit destination blog: param('cat_coll_ID', 'integer', true); if (!$current_User->check_perm('blog_cats', '', false, $cat_coll_ID)) { // fp> TODO: prevent move in UI. $Messages->add('No permission to edit destination blog.', 'error'); // NO TRANS b/c temporary break; } if ($cat_coll_ID == $edited_Blog->ID) { $Messages->add(T_('Category has not been moved.'), 'note'); break; } // Do the actual move! (This WILL reset the cache!) $ChapterCache->move_Chapter_subtree($edited_Chapter->ID, $subset_ID, $cat_coll_ID); $dest_Blog =& $BlogCache->get_by_ID($cat_coll_ID); $Messages->add(sprintf(T_('The category «%s» has been moved (with children) to «%s»\'s root. You may want to nest it in another parent category below...'), $edited_Chapter->dget('name'), $dest_Blog->dget('shortname')), 'success'); header_redirect(url_add_param($admin_url, 'ctrl=chapters&action=edit&blog=' . $cat_coll_ID . '&cat_ID=' . $cat_ID, '&')); // will save $Messages /* EXIT */ // In case we changed the redirect someday: unset($edited_Chapter); $cat_ID = NULL; $action = 'list'; break; case 'delete': // Delete entry: param($ChapterCache->dbIDname, 'integer', true); if (param('confirm', 'integer', 0)) { // confirmed, Delete from DB:
/* die */ } // Control permission to edit destination blog: param('cat_coll_ID', 'integer', true); if (!$current_User->check_perm('blog_cats', '', false, $cat_coll_ID)) { // fp> TODO: prevent move in UI. $Messages->add('No permission to edit destination blog.', 'error'); // NO TRANS b/c temporary break; } if ($cat_coll_ID == $edited_Blog->ID) { $Messages->add(T_('Category has not been moved.'), 'note'); break; } // Do the actual move! (This WILL reset the cache!) $GenericCategoryCache->move_Chapter_subtree($edited_GenericCategory->ID, $subset_ID, $cat_coll_ID); $dest_Blog =& $BlogCache->get_by_ID($cat_coll_ID); $Messages->add(sprintf(T_('The category «%s» has been moved (with children) to «%s»\'s root. You may want to nest it in another parent category below...'), $edited_GenericCategory->dget('name'), $dest_Blog->dget('shortname')), 'success'); header_redirect(url_add_param($admin_url, 'ctrl=chapters&action=edit&blog=' . $cat_coll_ID . '&cat_ID=' . $cat_ID, '&')); // will save $Messages /* EXIT */ // In case we changed the redirect someday: unset($edited_GenericCategory); $cat_ID = NULL; $action = 'list'; break; case 'delete': // Delete entry: param($GenericCategoryCache->dbIDname, 'integer', true); if (param('confirm', 'integer', 0)) { // confirmed, Delete from DB: