aboutsummaryrefslogtreecommitdiffstats
path: root/admin/include
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2010-12-23 05:22:19 +0000
committerrvelices <rv-github@modusoptimus.com>2010-12-23 05:22:19 +0000
commit732eb6bfba05cd1969fb5898e5bc50c978b2ff0b (patch)
treeb22ddf13d45e1515f81c7406f7248d68b62df238 /admin/include
parent2a49b76ae10cb7bcef5145f3a96151e0d62848a9 (diff)
removed unused files / code / css; shorter code
git-svn-id: http://piwigo.org/svn/trunk@8247 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin/include')
-rw-r--r--admin/include/functions.php19
1 files changed, 18 insertions, 1 deletions
diff --git a/admin/include/functions.php b/admin/include/functions.php
index a82cf5265..44d32f5dd 100644
--- a/admin/include/functions.php
+++ b/admin/include/functions.php
@@ -2054,4 +2054,21 @@ function get_fckb_tag_ids($raw_tags)
return $tag_ids;
}
-?>
+
+/** 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;
+}
+
+?> \ No newline at end of file