aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpatdenice <patdenice@piwigo.org>2011-04-03 09:58:56 +0000
committerpatdenice <patdenice@piwigo.org>2011-04-03 09:58:56 +0000
commite0d8b5893ce21d8ed7a89cc768e00f332b8110b8 (patch)
tree44fdb5f29745ddba61018327914632e52b2c29e1
parenteccc2dd4343cc2edca7f9fd6d82dcea3fe1db2c7 (diff)
Merge r10008 from trunk to branch 2.2
bug:2240 Notice is displayed if no tag entered in batch manager git-svn-id: http://piwigo.org/svn/branches/2.2@10009 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--admin/batch_manager_global.php17
1 files changed, 12 insertions, 5 deletions
diff --git a/admin/batch_manager_global.php b/admin/batch_manager_global.php
index a509202a1..93f8ffa6c 100644
--- a/admin/batch_manager_global.php
+++ b/admin/batch_manager_global.php
@@ -117,12 +117,19 @@ DELETE
if ('add_tags' == $action)
{
- $tag_ids = get_fckb_tag_ids($_POST['add_tags']);
- add_tags($tag_ids, $collection);
-
- if ('with no tag' == $page['prefilter'])
+ if (empty($_POST['add_tags']))
+ {
+ array_push($page['errors'], l10n('Select at least one tag'));
+ }
+ else
{
- redirect(get_root_url().'admin.php?page='.$_GET['page']);
+ $tag_ids = get_fckb_tag_ids($_POST['add_tags']);
+ add_tags($tag_ids, $collection);
+
+ if ('with no tag' == $page['prefilter'])
+ {
+ redirect(get_root_url().'admin.php?page='.$_GET['page']);
+ }
}
}