mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-08-07 09:13:02 +02:00
fixes #2316 improve album selector validation and keyboard interaction
also add an error in the global batch manager when we perform an album association but without choosing an album
This commit is contained in:
@@ -164,28 +164,33 @@ DELETE
|
||||
|
||||
if ('associate' == $action)
|
||||
{
|
||||
associate_images_to_categories(
|
||||
$collection,
|
||||
$_POST['associate']
|
||||
);
|
||||
|
||||
$_SESSION['page_infos'] = array(
|
||||
l10n('Information data registered in database')
|
||||
);
|
||||
|
||||
// let's refresh the page because we the current set might be modified
|
||||
if ('no_album' == $page['prefilter'])
|
||||
if (empty($_POST['associate']))
|
||||
{
|
||||
$redirect = true;
|
||||
}
|
||||
|
||||
else if ('no_virtual_album' == $page['prefilter'])
|
||||
{
|
||||
$category_info = get_cat_info($_POST['associate']);
|
||||
if (empty($category_info['dir']))
|
||||
$page['errors'][] = l10n('Select at least one album');
|
||||
} else {
|
||||
associate_images_to_categories(
|
||||
$collection,
|
||||
$_POST['associate']
|
||||
);
|
||||
|
||||
$_SESSION['page_infos'] = array(
|
||||
l10n('Information data registered in database')
|
||||
);
|
||||
|
||||
// let's refresh the page because we the current set might be modified
|
||||
if ('no_album' == $page['prefilter'])
|
||||
{
|
||||
$redirect = true;
|
||||
}
|
||||
|
||||
else if ('no_virtual_album' == $page['prefilter'])
|
||||
{
|
||||
$category_info = get_cat_info($_POST['associate']);
|
||||
if (empty($category_info['dir']))
|
||||
{
|
||||
$redirect = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user