$limit = $parval;
$where = array();
+ $searchpar = '';
if ( $wpIlMatch != '' ) {
$nt = Title::newFromUrl( $wpIlMatch );
if($nt ) {
$m = str_replace( '%', "\\%", $m );
$m = str_replace( '_', "\\_", $m );
$where[] = "LCASE(img_name) LIKE '%{$m}%'";
+ $searchpar = '&wpIlMatch=' . urlencode( $wpIlMatch );
}
}
$sub = wfMsg( 'ilsubmit' );
$titleObj = Title::makeTitle( NS_SPECIAL, 'Newimages' );
- $action = $titleObj->escapeLocalURL( "limit={$limit}" );
+ $action = $titleObj->escapeLocalURL();
if(!$hidebots) {
$action.='&hidebots=0';
}
}
$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 = '<p>' . $botLink . ' '. wfMsg( 'viewprevnext', $prevLink, $nextLink, $dateLink ) .'</p>';