mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-07-03 00:12:14 +02:00
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
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user