Keep the "New Item" links at the top in the navigation
This commit is contained in:
parent
d5db9dfc30
commit
677b0f7738
@ -652,9 +652,21 @@ class CollapsibleTree {
|
||||
static public function sortNode($a, $b)
|
||||
{
|
||||
if ($GLOBALS['cfg']['NaturalOrder']) {
|
||||
return strnatcmp($a->name, $b->name);
|
||||
if (substr($a->classes, 0, 3) === 'new') {
|
||||
return -1;
|
||||
} else if (substr($b->classes, 0, 3) === 'new') {
|
||||
return 1;
|
||||
} else {
|
||||
return strnatcmp($a->name, $b->name);
|
||||
}
|
||||
} else {
|
||||
return strcmp($a->name, $b->name);
|
||||
if (substr($a->classes, 0, 3) === 'new') {
|
||||
return -1;
|
||||
} else if (substr($b->classes, 0, 3) === 'new') {
|
||||
return 1;
|
||||
} else {
|
||||
return strcmp($a->name, $b->name);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user