Skip to content

Commit

Permalink
Keep the "New Item" links at the top in the navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
roccivic committed Oct 30, 2012
1 parent d5db9df commit 677b0f7
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions libraries/navigation/CollapsibleTree.class.php
Expand Up @@ -652,9 +652,21 @@ private function fastFilterHtml()
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);
}
}
}
}
Expand Down

0 comments on commit 677b0f7

Please sign in to comment.