aboutsummaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2007-02-14 01:37:38 +0000
committerrvelices <rv-github@modusoptimus.com>2007-02-14 01:37:38 +0000
commitdf3b43d35601551c3344bf051cdef4ab67de505a (patch)
treef6b9efcb3fb2ba3c2df375fd15e4a2b116b6adce /admin
parent711ebcbf2c1906b6496711eb6973954ecb113d72 (diff)
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
Diffstat (limited to '')
-rw-r--r--admin/element_set_global.php23
-rw-r--r--admin/picture_modify.php7
2 files changed, 7 insertions, 23 deletions
diff --git a/admin/element_set_global.php b/admin/element_set_global.php
index fc4f7c172..cb55282e2 100644
--- a/admin/element_set_global.php
+++ b/admin/element_set_global.php
@@ -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(
diff --git a/admin/picture_modify.php b/admin/picture_modify.php
index 664503281..9f6877167 100644
--- a/admin/picture_modify.php
+++ b/admin/picture_modify.php
@@ -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
);