aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2006-05-15 21:21:11 +0000
committerplegall <plg@piwigo.org>2006-05-15 21:21:11 +0000
commit2b4be7da20d5c022768e721352fa211e66a2c1f6 (patch)
tree4b53f9587969215e2ca1cf1f9cc755ad1160fd96 /include
parentb593bf2fc485b04d6cc83a60e4111c243e3fbf3a (diff)
bug 367 fixed: tags are sorted in logic order (case insensitive)
git-svn-id: http://piwigo.org/svn/branches/branch-1_6@1309 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include')
-rw-r--r--include/functions_html.inc.php2
-rw-r--r--include/functions_tag.inc.php7
2 files changed, 6 insertions, 3 deletions
diff --git a/include/functions_html.inc.php b/include/functions_html.inc.php
index 7db40add4..993c46dea 100644
--- a/include/functions_html.inc.php
+++ b/include/functions_html.inc.php
@@ -563,7 +563,7 @@ function get_html_tag_selection(
function name_compare($a, $b)
{
- return strcmp($a['name'], $b['name']);
+ return strcmp(strtolower($a['name']), strtolower($b['name']));
}
/**
diff --git a/include/functions_tag.inc.php b/include/functions_tag.inc.php
index 3e3934669..046eb6bb1 100644
--- a/include/functions_tag.inc.php
+++ b/include/functions_tag.inc.php
@@ -91,9 +91,10 @@ SELECT DISTINCT image_id
function get_all_tags()
{
$query = '
-SELECT id AS tag_id, name, url_name
+SELECT id AS tag_id,
+ name,
+ url_name
FROM '.TAGS_TABLE.'
- ORDER BY name
;';
$result = pwg_query($query);
@@ -104,6 +105,8 @@ SELECT id AS tag_id, name, url_name
array_push($tags, $row);
}
+ usort($tags, 'name_compare');
+
return $tags;
}