summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-07-18 02:41:05 +0000
committerDries Buytaert <dries@buytaert.net>2009-07-18 02:41:05 +0000
commit3ccd437530bac14be8bdc3e3a503930d77aedd96 (patch)
tree521a2059def2dfc31561a56646d5ba8400c51aab /includes
parentfec2710a44d69ed84e6fc0ec25f78d5c93d30125 (diff)
downloadbrdo-3ccd437530bac14be8bdc3e3a503930d77aedd96.tar.gz
brdo-3ccd437530bac14be8bdc3e3a503930d77aedd96.tar.bz2
- Patch #517318 by dmitrig01: tableselect needs to be able to give options weights.
Diffstat (limited to 'includes')
-rw-r--r--includes/form.inc2
1 files changed, 2 insertions, 0 deletions
diff --git a/includes/form.inc b/includes/form.inc
index 5cfbcfad2..e4831d88e 100644
--- a/includes/form.inc
+++ b/includes/form.inc
@@ -2225,6 +2225,8 @@ function form_process_tableselect($element) {
$element['#default_value'] = array();
}
+ // Sort the options by their #weight if they have a #weight.
+ uasort($element['#options'], 'element_sort');
// Create a checkbox or radio for each item in #options in such a way that
// the value of the tableselect element behaves as if it had been of type
// checkboxes or radios.