Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
project
drupal
Commits
14d65ce1
Commit
14d65ce1
authored
Sep 05, 2010
by
webchick
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#800502
by Damien Tournoud, sun: Fixed Module page is not ordered correctly.
parent
fb9c1df0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
0 deletions
+14
-0
includes/common.inc
includes/common.inc
+9
-0
modules/system/system.admin.inc
modules/system/system.admin.inc
+5
-0
No files found.
includes/common.inc
View file @
14d65ce1
...
...
@@ -5465,6 +5465,15 @@ function element_sort($a, $b) {
return
(
$a_weight
<
$b_weight
)
?
-
1
:
1
;
}
/**
* Array sorting callback; sorts elements by title.
*/
function
element_sort_by_title
(
$a
,
$b
)
{
$a_title
=
(
is_array
(
$a
)
&&
isset
(
$a
[
'#title'
]))
?
$a
[
'#title'
]
:
''
;
$b_title
=
(
is_array
(
$b
)
&&
isset
(
$b
[
'#title'
]))
?
$b
[
'#title'
]
:
''
;
return
strnatcasecmp
(
$a_title
,
$b_title
);
}
/**
* Retrieve the default properties for the defined element type.
*/
...
...
modules/system/system.admin.inc
View file @
14d65ce1
...
...
@@ -959,9 +959,14 @@ function system_modules($form, $form_state = array()) {
t
(
'Description'
),
array
(
'data'
=>
t
(
'Operations'
),
'colspan'
=>
3
),
),
// Ensure that the "Core" package fieldset comes first.
'#weight'
=>
$package
==
'Core'
?
-
10
:
NULL
,
);
}
// Lastly, sort all fieldsets by title.
uasort
(
$form
[
'modules'
],
'element_sort_by_title'
);
$form
[
'actions'
]
=
array
(
'#type'
=>
'actions'
);
$form
[
'actions'
][
'submit'
]
=
array
(
'#type'
=>
'submit'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment