X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/ea21db6b71f02ebf9b7105452326142f1e1b84b0..f5a1550441a9d58652d93deacc333f143a7ecfbd:/IkiWiki/Plugin/trail.pm

diff --git a/IkiWiki/Plugin/trail.pm b/IkiWiki/Plugin/trail.pm
index d5fb2b5d6..476db4dcb 100644
--- a/IkiWiki/Plugin/trail.pm
+++ b/IkiWiki/Plugin/trail.pm
@@ -319,10 +319,9 @@ sub prerender {
 		}
 
 		if (defined $pagestate{$trail}{trail}{sort}) {
-			# re-sort
-			@$members = pagespec_match_list($trail, 'internal(*)',
-				list => $members,
-				sort => $pagestate{$trail}{trail}{sort});
+			@$members = IkiWiki::sort_pages(
+				$pagestate{$trail}{trail}{sort},
+				$members);
 		}
 
 		if (IkiWiki::yesno $pagestate{$trail}{trail}{reverse}) {