fixed #1887 Added code section for album deletion in php file.

This commit is contained in:
MatthieuLP
2023-03-27 10:44:59 +02:00
parent f089512399
commit ede889104b
+28
View File
@@ -32,6 +32,34 @@ check_status(ACCESS_ADMINISTRATOR);
$page['tab'] = 'list';
include(PHPWG_ROOT_PATH.'admin/include/albums_tab.inc.php');
// +-----------------------------------------------------------------------+
// | virtual categories management |
// +-----------------------------------------------------------------------+
// This code section is meant to be deleted after we implement the new album editor
// request to delete a virtual category
if (isset($_GET['delete']) and is_numeric($_GET['delete']))
{
$photo_deletion_mode = 'no_delete';
if (isset($_GET['photo_deletion_mode']))
{
$photo_deletion_mode = $_GET['photo_deletion_mode'];
}
delete_categories(array($_GET['delete']), $photo_deletion_mode);
$_SESSION['page_infos'] = array(l10n('Virtual album deleted'));
update_global_rank();
invalidate_user_cache();
$redirect_url = get_root_url().'admin.php?page=albums';
if (isset($_GET['parent_id']))
{
$redirect_url.= '&parent_id='.$_GET['parent_id'];
}
redirect($redirect_url);
}
// +-----------------------------------------------------------------------+
// | categories auto order |
// +-----------------------------------------------------------------------+