From: Daniel Werner Date: Thu, 14 Mar 2013 15:56:00 +0000 (+0100) Subject: Removed deprecated usage of 2nd param in Title::getLocalUrl in SpecialAllpages X-Git-Tag: 1.31.0-rc.0~20208 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=ff98b8986ca24ebc363733319f3d33ede2761906;p=lhc%2Fweb%2Fwiklou.git Removed deprecated usage of 2nd param in Title::getLocalUrl in SpecialAllpages Before this change-set, a deprecated warning has been thrown when SpecialAllpges::showline would be called with the last parameter ($hideredirect) set to false. Change-Id: I4072a4a19a8f6403f3979c731974baba88ab574a --- diff --git a/includes/specials/SpecialAllpages.php b/includes/specials/SpecialAllpages.php index a9491d0088..084d752cbe 100644 --- a/includes/specials/SpecialAllpages.php +++ b/includes/specials/SpecialAllpages.php @@ -297,10 +297,10 @@ class SpecialAllpages extends IncludableSpecialPage { * @param string $inpoint lower limit of pagenames * @param string $outpoint upper limit of pagenames * @param $namespace Integer (Default NS_MAIN) - * @param bool $hideredirects dont show redirects (default FALSE) + * @param bool $hideRedirects don't show redirects. Default: false * @return string */ - function showline( $inpoint, $outpoint, $namespace = NS_MAIN, $hideredirects ) { + function showline( $inpoint, $outpoint, $namespace = NS_MAIN, $hideRedirects = false ) { global $wgContLang; $inpointf = htmlspecialchars( str_replace( '_', ' ', $inpoint ) ); $outpointf = htmlspecialchars( str_replace( '_', ' ', $outpoint ) ); @@ -308,15 +308,20 @@ class SpecialAllpages extends IncludableSpecialPage { $inpointf = $wgContLang->truncate( $inpointf, $this->maxPageLength ); $outpointf = $wgContLang->truncate( $outpointf, $this->maxPageLength ); - $queryparams = $namespace ? "namespace=$namespace&" : ''; + $queryParams = array ( + 'from' => $inpoint, + 'to' => $outpoint, + ); - $queryhideredirects = array(); - if ( $hideredirects ) { - $queryhideredirects['hideredirects'] = 1; + if( $namespace ) { + $queryParams['namespace'] = $namespace; + } + if ( $hideRedirects ) { + $queryParams['hideredirects'] = 1; } - $special = $this->getTitle(); - $link = htmlspecialchars( $special->getLocalUrl( $queryparams . 'from=' . urlencode( $inpoint ) . '&to=' . urlencode( $outpoint ), $queryhideredirects ) ); + $link = htmlspecialchars( + $this->getTitle()->getLocalUrl( $queryParams ) ); $out = $this->msg( 'alphaindexline' )->rawParams( "$inpointf",