From: Jens Frank Date: Tue, 13 Jul 2004 22:06:17 +0000 (+0000) Subject: Patch by Emmanuel Engelhart X-Git-Tag: 1.5.0alpha1~2683 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22articles%22%2C%22id_article=%24id_article%22%29%20.%20%22?a=commitdiff_plain;h=f1f4c2705e9a4dd83567067bd1a2156366b8d2c9;p=lhc%2Fweb%2Fwiklou.git 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 --- 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

" );