From c1823bc59cd0e2263cc818783fb2c2c49be38b36 Mon Sep 17 00:00:00 2001 From: Alex Schroeder Date: Tue, 2 Aug 2016 11:43:08 +0200 Subject: [PATCH] sort.pl: Offer link to sort alphabetically Don't show the link to the current sort order. --- modules/sort.pl | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/sort.pl b/modules/sort.pl index 8eed781e..8afc5618 100644 --- a/modules/sort.pl +++ b/modules/sort.pl @@ -34,12 +34,17 @@ my %SortCreation; sub NewSortSearchMenu { my $html = OldSortSearchMenu(@_); + my $sort = GetParam('sort'); my $string = UrlEncode(shift); + $html .= ' ' . ScriptLink("search=$string", + T('Sort alphabetically')) + if $sort; $html .= ' ' . ScriptLink("search=$string;sort=update", - T('Sort by last update')); + T('Sort by last update')) + if $sort ne 'update'; $html .= ' ' . ScriptLink("search=$string;sort=creation", T('Sort by creation date')) - if defined(&CreationDateOpenPage); + if defined(&CreationDateOpenPage) and $sort ne 'creation'; return $html; }