aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorvdigital <vdigital@piwigo.org>2008-05-17 20:40:27 +0000
committervdigital <vdigital@piwigo.org>2008-05-17 20:40:27 +0000
commit069748aa9106c1a2a583e4ab295157c7a33ad33b (patch)
treea94b5a1979dd1ef891accdd92e71c89019d17f01 /include
parent6ee69cf39cfb621ef72bc96e20d720d47c253fd6 (diff)
Bug 703: Authorization system in Cat management works now with well ordered lists
(Minor: Admin theme changes) git-svn-id: http://piwigo.org/svn/trunk@2349 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include')
-rw-r--r--include/functions_html.inc.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/functions_html.inc.php b/include/functions_html.inc.php
index c2e34bef6..4c24ad17f 100644
--- a/include/functions_html.inc.php
+++ b/include/functions_html.inc.php
@@ -731,4 +731,21 @@ function render_category_literal_description($desc)
{
return strip_tags($desc, '<span><p><a><br><b><i><small><big><strong><em>');
}
+
+/** returns the argument_ids array with new sequenced keys based on related
+ * names. Sequence is not case sensitive.
+ * Warning: By definition, this function breaks original keys
+ */
+function order_by_name($element_ids,$name)
+{
+ $ordered_element_ids = array();
+ foreach ($element_ids as $k_id => $element_id)
+ {
+ $key = strtolower($name[$element_id]) .'-'. $name[$element_id] .'-'. $k_id;
+ $ordered_element_ids[$key] = $element_id;
+ }
+ ksort($ordered_element_ids);
+ return $ordered_element_ids;
+}
+
?>