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:
rvelices
2007-02-14 01:37:38 +00:00
parent 711ebcbf2c
commit df3b43d356
8 changed files with 41 additions and 87 deletions
+6 -11
View File
@@ -2,10 +2,10 @@
// +-----------------------------------------------------------------------+
// | 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: 2006-03-22 02:01:47 +0100 (mer, 22 mar 2006) $
// | last modifier : $Author: rvelices $
// | revision : $Revision: 1092 $
@@ -33,15 +33,15 @@ function counter_compare($a, $b)
{
if ($a['counter'] == $b['counter'])
{
return tag_id_compare($a, $b);
return id_compare($a, $b);
}
return ($a['counter'] < $b['counter']) ? +1 : -1;
}
function tag_id_compare($a, $b)
function id_compare($a, $b)
{
return ($a['tag_id'] < $b['tag_id']) ? -1 : 1;
return ($a['id'] < $b['id']) ? -1 : 1;
}
// +-----------------------------------------------------------------------+
@@ -94,12 +94,7 @@ foreach ($tags as $tag)
array(
'URL' => make_index_url(
array(
'tags' => array(
array(
'id' => $tag['tag_id'],
'url_name' => $tag['url_name'],
),
),
'tags' => array($tag),
)
),