mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-03-28 17:42:57 +01:00
feature 1078 added: ability to merge tags
git-svn-id: http://piwigo.org/svn/trunk@12032 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -1394,6 +1394,36 @@ DELETE
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
function delete_tags($tag_ids)
|
||||
{
|
||||
if (is_numeric($tag_ids))
|
||||
{
|
||||
$tag_ids = array($tag_ids);
|
||||
}
|
||||
|
||||
if (!is_array($tag_ids))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
$query = '
|
||||
DELETE
|
||||
FROM '.IMAGE_TAG_TABLE.'
|
||||
WHERE tag_id IN ('.implode(',', $tag_ids).')
|
||||
;';
|
||||
pwg_query($query);
|
||||
|
||||
$query = '
|
||||
DELETE
|
||||
FROM '.TAGS_TABLE.'
|
||||
WHERE id IN ('.implode(',', $tag_ids).')
|
||||
;';
|
||||
pwg_query($query);
|
||||
}
|
||||
|
||||
function tag_id_from_tag_name($tag_name)
|
||||
{
|
||||
global $page;
|
||||
|
||||
Reference in New Issue
Block a user