From df3b43d35601551c3344bf051cdef4ab67de505a Mon Sep 17 00:00:00 2001 From: rvelices Date: Wed, 14 Feb 2007 01:37:38 +0000 Subject: 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 --- tags.php | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'tags.php') diff --git a/tags.php b/tags.php index 34c214f25..47c65853c 100644 --- a/tags.php +++ b/tags.php @@ -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), ) ), -- cgit v1.2.3