mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-08-07 17:23:04 +02:00
fixed #1887 Added code section for album deletion in php file.
This commit is contained in:
@@ -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 |
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
||||
Reference in New Issue
Block a user