Skip to content

Commit

Permalink
Always sort namespaces but don't sort for links when listing orphans.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaller94 committed Jun 25, 2017
1 parent 0d2b65e commit 5085610
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion helper.php
Expand Up @@ -235,7 +235,14 @@ function orph_report_table($data, $page_exists, $has_links, $params_array, $call
. '</tr>'
. "\n" ;

arsort($data);
// Sort by namespace and name
ksort($data);

// Sort descending by existing links.
// This does not make sense for orphans since they don't have links.
if ($caller != "orphan") {
arsort($data);
}

foreach($data as $id=>$item) {
if( ! (($item['exists'] == $page_exists) and (($item['links'] <> 0)== $has_links)) ) continue ;
Expand Down

0 comments on commit 5085610

Please sign in to comment.