Commit 388af20e authored by Dries's avatar Dries
Browse files

- Patch #354133 by NancyDru, AlexisWilke, yoroy: sort disabled blocks by title, not by weight.

parent 97b7f029
......@@ -170,10 +170,12 @@ function _block_compare($a, $b) {
if ((!empty($a['region']) && !empty($b['region'])) && ($place = ($regions[$a['region']] - $regions[$b['region']]))) {
return $place;
}
// Sort by weight.
$weight = $a['weight'] - $b['weight'];
if ($weight) {
return $weight;
// Sort by weight, unless disabled.
if ($a['region'] != BLOCK_REGION_NONE) {
$weight = $a['weight'] - $b['weight'];
if ($weight) {
return $weight;
}
}
// Sort by title.
return strcmp($a['info'], $b['info']);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment