From f1f4c2705e9a4dd83567067bd1a2156366b8d2c9 Mon Sep 17 00:00:00 2001 From: Jens Frank Date: Tue, 13 Jul 2004 22:06:17 +0000 Subject: [PATCH] Patch by Emmanuel Engelhart Fixes Bug 986736 - Adds a feature for sorting by name (size and date were existing) - Remembers the type of sort after a new search (new string pattern) - Remembers the string pattern if the user changes the limit --- includes/SpecialImagelist.php | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/includes/SpecialImagelist.php b/includes/SpecialImagelist.php index 370251153b..40e4dc946c 100644 --- a/includes/SpecialImagelist.php +++ b/includes/SpecialImagelist.php @@ -48,7 +48,7 @@ function wfSpecialImagelist() $cap = wfMsg( "ilshowmatch" ); $sub = wfMsg( "ilsubmit" ); $titleObj = Title::makeTitle( NS_SPECIAL, "Imagelist" ); - $action = $titleObj->escapeLocalURL( "sort=byname&limit={$limit}" ); + $action = $titleObj->escapeLocalURL( "sort={$sort}&limit={$limit}" ); $wgOut->addHTML( "
" . @@ -64,9 +64,9 @@ function wfSpecialImagelist() $first = false; $fill .= $sk->makeKnownLink( $here, $wgLang->formatNum( $num ), - "sort=bysize&limit={$num}" ); + "sort=byname&limit={$num}&wpIlMatch={$wpIlMatch}" ); } - $text = wfMsg( "showlast", $fill, $bysize ); + $text = wfMsg( "showlast", $fill, $byname ); $wgOut->addHTML( "

{$text}
\n" ); $fill = ""; @@ -76,7 +76,19 @@ function wfSpecialImagelist() $first = false; $fill .= $sk->makeKnownLink( $here, $wgLang->formatNum( $num ), - "sort=bydate&limit={$num}" ); + "sort=bysize&limit={$num}&wpIlMatch={$wpIlMatch}" ); + } + $text = wfMsg( "showlast", $fill, $bysize ); + $wgOut->addHTML( "{$text}
\n" ); + + $fill = ""; + $first = true; + foreach ( $nums as $num ) { + if ( ! $first ) { $fill .= " | "; } + $first = false; + + $fill .= $sk->makeKnownLink( $here, $wgLang->formatNum( $num ), + "sort=bydate&limit={$num}&wpIlMatch={$wpIlMatch}" ); } $text = wfMsg( "showlast", $fill, $bydate ); $wgOut->addHTML( "{$text}

\n

" ); -- 2.20.1