mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-07-06 18:01:31 +02:00
tags returned by get_all_tags, get_available_tags contain id key instead of tag_id
(as expected by make_index_url, as $page['tags'] was and as the database model is) git-svn-id: http://piwigo.org/svn/trunk@1815 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -2,10 +2,9 @@
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | PhpWebGallery - a PHP based picture gallery |
|
||||
// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
|
||||
// | Copyright (C) 2003-2005 PhpWebGallery Team - http://phpwebgallery.net |
|
||||
// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | branch : BSF (Best So Far)
|
||||
// | file : $RCSfile$
|
||||
// | file : $Id$
|
||||
// | last update : $Date$
|
||||
// | last modifier : $Author$
|
||||
// | revision : $Revision$
|
||||
@@ -289,7 +288,7 @@ if (count($all_tags) == 0)
|
||||
else
|
||||
{
|
||||
$add_tag_selection = get_html_tag_selection(
|
||||
get_all_tags(),
|
||||
$all_tags,
|
||||
'add_tags'
|
||||
);
|
||||
}
|
||||
@@ -304,21 +303,7 @@ $template->assign_vars(
|
||||
if (count($page['cat_elements_id']) > 0)
|
||||
{
|
||||
// remove tags
|
||||
$query = '
|
||||
SELECT tag_id, name, url_name, count(*) counter
|
||||
FROM '.IMAGE_TAG_TABLE.'
|
||||
INNER JOIN '.TAGS_TABLE.' ON tag_id = id
|
||||
WHERE image_id IN ('.implode(',', $page['cat_elements_id']).')
|
||||
GROUP BY tag_id
|
||||
;';
|
||||
$result = pwg_query($query);
|
||||
|
||||
$tags = array();
|
||||
while($row = mysql_fetch_array($result))
|
||||
{
|
||||
array_push($tags, $row);
|
||||
}
|
||||
|
||||
$tags = get_common_tags($page['cat_elements_id'], -1);
|
||||
usort($tags, 'name_compare');
|
||||
|
||||
$template->assign_vars(
|
||||
|
||||
@@ -2,10 +2,9 @@
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | PhpWebGallery - a PHP based picture gallery |
|
||||
// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
|
||||
// | Copyright (C) 2003-2005 PhpWebGallery Team - http://phpwebgallery.net |
|
||||
// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | branch : BSF (Best So Far)
|
||||
// | file : $RCSfile$
|
||||
// | file : $Id$
|
||||
// | last update : $Date$
|
||||
// | last modifier : $Author$
|
||||
// | revision : $Revision$
|
||||
@@ -211,7 +210,7 @@ $all_tags = get_all_tags();
|
||||
if (count($all_tags) > 0)
|
||||
{
|
||||
$tag_selection = get_html_tag_selection(
|
||||
get_all_tags(),
|
||||
$all_tags,
|
||||
'tags',
|
||||
$selected_tags
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user