aboutsummaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
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
);