From: Brion Vibber Date: Mon, 12 Dec 2005 03:23:01 +0000 (+0000) Subject: * (bug 3073) Keep search parameter on paging in Special:Newimages X-Git-Tag: 1.6.0~954 X-Git-Url: http://git.cyclocoop.org/%24action?a=commitdiff_plain;h=132ca4b356b9c8b5f5572cde94395eedffe12526;p=lhc%2Fweb%2Fwiklou.git * (bug 3073) Keep search parameter on paging in Special:Newimages --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 9aca0b87af..539513f9ab 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -312,6 +312,7 @@ fully support the editing toolbar, but was found to be too confusing. * (bug 1600) Trigger edit conflict on duplicate section=new submissions * (bug 4001) Use local variables properly in wikibits.js akeytt() * Fix regression: old version missing from edit links on CSS/JS pages +* (bug 3073) Keep search parameter on paging in Special:Newimages === Caveats === diff --git a/includes/SpecialNewimages.php b/includes/SpecialNewimages.php index 5d47ca947b..98c6c36059 100644 --- a/includes/SpecialNewimages.php +++ b/includes/SpecialNewimages.php @@ -72,6 +72,7 @@ function wfSpecialNewimages( $par, $specialPage ) { $limit = $parval; $where = array(); + $searchpar = ''; if ( $wpIlMatch != '' ) { $nt = Title::newFromUrl( $wpIlMatch ); if($nt ) { @@ -79,6 +80,7 @@ function wfSpecialNewimages( $par, $specialPage ) { $m = str_replace( '%', "\\%", $m ); $m = str_replace( '_', "\\_", $m ); $where[] = "LCASE(img_name) LIKE '%{$m}%'"; + $searchpar = '&wpIlMatch=' . urlencode( $wpIlMatch ); } } @@ -153,7 +155,7 @@ function wfSpecialNewimages( $par, $specialPage ) { $sub = wfMsg( 'ilsubmit' ); $titleObj = Title::makeTitle( NS_SPECIAL, 'Newimages' ); - $action = $titleObj->escapeLocalURL( "limit={$limit}" ); + $action = $titleObj->escapeLocalURL(); if(!$hidebots) { $action.='&hidebots=0'; } @@ -178,18 +180,18 @@ function wfSpecialNewimages( $par, $specialPage ) { } $now = wfTimestampNow(); $date = $wgLang->timeanddate( $now ); - $dateLink = $sk->makeKnownLinkObj( $titleObj, wfMsg( 'rclistfrom', $date ), 'from='.$now.$botpar ); + $dateLink = $sk->makeKnownLinkObj( $titleObj, wfMsg( 'rclistfrom', $date ), 'from='.$now.$botpar.$searchpar ); - $botLink = $sk->makeKnownLinkObj($titleObj, wfMsg( 'showhidebots', ($hidebots ? wfMsg('show') : wfMsg('hide'))),'hidebots='.($hidebots ? '0' : '1')); + $botLink = $sk->makeKnownLinkObj($titleObj, wfMsg( 'showhidebots', ($hidebots ? wfMsg('show') : wfMsg('hide'))),'hidebots='.($hidebots ? '0' : '1').$searchpar); $prevLink = wfMsg( 'prevn', $wgLang->formatNum( $limit ) ); if( $firstTimestamp && $firstTimestamp != $latestTimestamp ) { - $prevLink = $sk->makeKnownLinkObj( $titleObj, $prevLink, 'from=' . $firstTimestamp . $botpar ); + $prevLink = $sk->makeKnownLinkObj( $titleObj, $prevLink, 'from=' . $firstTimestamp . $botpar . $searchpar ); } $nextLink = wfMsg( 'nextn', $wgLang->formatNum( $limit ) ); if( $shownImages > $limit && $lastTimestamp ) { - $nextLink = $sk->makeKnownLinkObj( $titleObj, $nextLink, 'until=' . $lastTimestamp.$botpar ); + $nextLink = $sk->makeKnownLinkObj( $titleObj, $nextLink, 'until=' . $lastTimestamp.$botpar.$searchpar ); } $prevnext = '

' . $botLink . ' '. wfMsg( 'viewprevnext', $prevLink, $nextLink, $dateLink ) .'

';