summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorGábor Hojtsy <gabor@hojtsy.hu>2007-10-25 10:30:40 +0000
committerGábor Hojtsy <gabor@hojtsy.hu>2007-10-25 10:30:40 +0000
commit13f9882979c3cef003fba656991f88b6cbe9f128 (patch)
tree37515aca7b850d95c2335637e891f812631fe065 /includes
parentb036bef620ce26db19bb1d47cec0abc2746d2f83 (diff)
downloadbrdo-13f9882979c3cef003fba656991f88b6cbe9f128.tar.gz
brdo-13f9882979c3cef003fba656991f88b6cbe9f128.tar.bz2
#179276 by JirkaRybka: (regression) fix profile field sections to order properly by weight.
Diffstat (limited to 'includes')
-rw-r--r--includes/common.inc6
1 files changed, 3 insertions, 3 deletions
diff --git a/includes/common.inc b/includes/common.inc
index bb7a020cd..d2a3b92a3 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -2612,7 +2612,7 @@ function drupal_render(&$elements) {
// Either the elements did not go through form_builder or one of the children
// has a #weight.
if (!isset($elements['#sorted'])) {
- uasort($elements, "_element_sort");
+ uasort($elements, "element_sort");
}
$elements += array('#title' => NULL, '#description' => NULL);
if (!isset($elements['#children'])) {
@@ -2676,9 +2676,9 @@ function drupal_render(&$elements) {
}
/**
- * Function used by uasort in drupal_render() to sort structured arrays by weight.
+ * Function used by uasort to sort structured arrays by weight.
*/
-function _element_sort($a, $b) {
+function element_sort($a, $b) {
$a_weight = (is_array($a) && isset($a['#weight'])) ? $a['#weight'] : 0;
$b_weight = (is_array($b) && isset($b['#weight'])) ? $b['#weight'] : 0;
if ($a_weight == $b_weight) {