summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2010-11-07 18:33:53 +0000
committerDries Buytaert <dries@buytaert.net>2010-11-07 18:33:53 +0000
commitd3852cd3f5b45e0c50c2b2ee29015d5a9d04f9a2 (patch)
tree5220f73b7cf851f2ec86151d7a34c22f908540eb /includes
parent0447e92bf3f6e60cf308b3041ea1c685d8cecca6 (diff)
downloadbrdo-d3852cd3f5b45e0c50c2b2ee29015d5a9d04f9a2.tar.gz
brdo-d3852cd3f5b45e0c50c2b2ee29015d5a9d04f9a2.tar.bz2
- Patch #961136 by sun: move system_sort_by_title() into common.inc.
Diffstat (limited to 'includes')
-rw-r--r--includes/common.inc13
1 files changed, 13 insertions, 0 deletions
diff --git a/includes/common.inc b/includes/common.inc
index 86fb23ae9..6018eb549 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -5788,6 +5788,19 @@ function drupal_sort_weight($a, $b) {
}
/**
+ * Array sorting callback; sorts elements by 'title' key.
+ */
+function drupal_sort_title($a, $b) {
+ if (!isset($b['title'])) {
+ return -1;
+ }
+ if (!isset($a['title'])) {
+ return 1;
+ }
+ return strcasecmp($a['title'], $b['title']);
+}
+
+/**
* Check if the key is a property.
*/
function element_property($key) {