function biblio_form_sort in Bibliography Module 7
Same name and namespace in other branches
- 6.2 includes/biblio.admin.inc \biblio_form_sort()
- 6 biblio.admin.inc \biblio_form_sort()
- 7.2 includes/biblio.admin.inc \biblio_form_sort()
This function parses the module directory for 'style' files, loads them and calls the info fuction to get some basic information like the short and long names of the style.
1 string reference to 'biblio_form_sort'
- biblio_admin_types_edit_form in includes/
biblio.admin.inc - Form constructor for the Publication type edit form.
File
- includes/
biblio.admin.inc, line 1940 - biblio.admin.inc
Code
function biblio_form_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) {
return 0;
}
return $a_weight < $b_weight ? -1 : 1;
}