aboutsummaryrefslogtreecommitdiffstats
path: root/admin/include/functions.php
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2011-07-30 04:53:18 +0000
committerrvelices <rv-github@modusoptimus.com>2011-07-30 04:53:18 +0000
commit6e8e08f3b76efe0d32f5169187bfff03e70bfed5 (patch)
treeb77261d5c1a5e72d3a95ddd60eefcdf89676118f /admin/include/functions.php
parent79aea26230915261bf89fae07a5e277a410957de (diff)
feature 2387: addd a filter by tag in the batch manager (merge from trunk)
git-svn-id: http://piwigo.org/svn/branches/2.2@11854 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--admin/include/functions.php13
1 files changed, 5 insertions, 8 deletions
diff --git a/admin/include/functions.php b/admin/include/functions.php
index b7972ddc5..0eb13f1be 100644
--- a/admin/include/functions.php
+++ b/admin/include/functions.php
@@ -2115,8 +2115,8 @@ function get_taglist($query)
array_push(
$taglist,
array(
- 'name' => $row['tag_name'],
- 'id' => '~~'.$row['tag_id'].'~~',
+ 'name' => $row['name'],
+ 'id' => '~~'.$row['id'].'~~',
)
);
}
@@ -2127,7 +2127,7 @@ function get_taglist($query)
return $taglist;
}
-function get_tag_ids($raw_tags)
+function get_tag_ids($raw_tags, $allow_create=true)
{
// In $raw_tags we receive something like array('~~6~~', '~~59~~', 'New
// tag', 'Another new tag') The ~~34~~ means that it is an existing
@@ -2143,13 +2143,10 @@ function get_tag_ids($raw_tags)
{
array_push($tag_ids, $matches[1]);
}
- else
+ elseif ($allow_create)
{
// we have to create a new tag
- array_push(
- $tag_ids,
- tag_id_from_tag_name($raw_tag)
- );
+ $tag_ids[] = tag_id_from_tag_name($raw_tag);
}
}