From: Tim Starling Date: Sat, 20 Sep 2008 05:44:29 +0000 (+0000) Subject: Fixed warning. QueryPage subclasses are required to allow construction with no constr... X-Git-Tag: 1.31.0-rc.0~45205 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/bilan.php?a=commitdiff_plain;h=3a61c79f4872a4b93d4f27968d0a15b9a3427a12;p=lhc%2Fweb%2Fwiklou.git Fixed warning. QueryPage subclasses are required to allow construction with no constructor parameters. This property is used by maintenance/updateSpecialPages.php. --- diff --git a/includes/specials/SpecialLinkSearch.php b/includes/specials/SpecialLinkSearch.php index b8ff4794ff..6cce00af83 100644 --- a/includes/specials/SpecialLinkSearch.php +++ b/includes/specials/SpecialLinkSearch.php @@ -64,17 +64,20 @@ function wfSpecialLinkSearch( $par ) { $wgOut->addHtml( $s ); if( $target != '' ) { - $searcher = new LinkSearchPage( $target2, $namespace, $protocol ); + $searcher = new LinkSearchPage; + $searcher->setParams( array( + 'query' => $target2, + 'namespace' => $namespace, + 'protocol' => $protocol ) ); $searcher->doQuery( $offset, $limit ); } } class LinkSearchPage extends QueryPage { - - function __construct( $query, $ns, $prot ) { - $this->mQuery = $query; - $this->mNs = $ns; - $this->mProt = $prot; + function setParams( $params ) { + $this->mQuery = $params['query']; + $this->mNs = $params['namespace']; + $this->mProt = $params['protocol']; } function getName() {