From 13f9882979c3cef003fba656991f88b6cbe9f128 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Hojtsy?= Date: Thu, 25 Oct 2007 10:30:40 +0000 Subject: #179276 by JirkaRybka: (regression) fix profile field sections to order properly by weight. --- modules/user/user.module | 2 +- modules/user/user.pages.inc | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'modules/user') diff --git a/modules/user/user.module b/modules/user/user.module index 193bec33b..b7bde6049 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -569,7 +569,7 @@ function user_user($type, &$edit, &$account, $category = NULL) { $account->content['summary'] += array( '#type' => 'user_profile_category', '#attributes' => array('class' => 'user-member'), - '#weight' => -5, + '#weight' => 5, '#title' => t('History'), ); $account->content['summary']['member_for'] = array( diff --git a/modules/user/user.pages.inc b/modules/user/user.pages.inc index 55f2663a9..1188b2518 100644 --- a/modules/user/user.pages.inc +++ b/modules/user/user.pages.inc @@ -170,6 +170,8 @@ function user_view($account) { */ function template_preprocess_user_profile(&$variables) { $variables['profile'] = array(); + // Sort sections by weight + uasort($variables['account']->content, 'element_sort'); // Provide keyed variables so themers can print each section independantly. foreach (element_children($variables['account']->content) as $key) { $variables['profile'][$key] = drupal_render($variables['account']->content[$key]); -- cgit v1.2.3