X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialWithoutinterwiki.php;h=e2052b9fee6a26b07d360e6e9209a4444eb384b6;hb=7340ddc12e299943485f8c928124a0890533dd9c;hp=edb1558645252480a2decff8773d17c8a3c732cd;hpb=fb58d137a24a1451c268c2f2d1bfed5845c13e65;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialWithoutinterwiki.php b/includes/specials/SpecialWithoutinterwiki.php index edb1558645..e2052b9fee 100644 --- a/includes/specials/SpecialWithoutinterwiki.php +++ b/includes/specials/SpecialWithoutinterwiki.php @@ -41,8 +41,6 @@ class WithoutInterwikiPage extends PageQueryPage { } function getPageHeader() { - global $wgScript; - # Do not show useless input form if special page is cached if ( $this->isCached() ) { return ''; @@ -51,11 +49,17 @@ class WithoutInterwikiPage extends PageQueryPage { $prefix = $this->prefix; $t = $this->getPageTitle(); - return Html::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) ) . "\n" . + return Html::openElement( 'form', [ 'method' => 'get', 'action' => wfScript() ] ) . "\n" . Html::openElement( 'fieldset' ) . "\n" . Html::element( 'legend', null, $this->msg( 'withoutinterwiki-legend' )->text() ) . "\n" . Html::hidden( 'title', $t->getPrefixedText() ) . "\n" . - Xml::inputLabel( $this->msg( 'allpagesprefix' )->text(), 'prefix', 'wiprefix', 20, $prefix ) . "\n" . + Xml::inputLabel( + $this->msg( 'allpagesprefix' )->text(), + 'prefix', + 'wiprefix', + 20, + $prefix + ) . "\n" . Xml::submitButton( $this->msg( 'withoutinterwiki-submit' )->text() ) . "\n" . Html::closeElement( 'fieldset' ) . "\n" . Html::closeElement( 'form' ); @@ -66,7 +70,7 @@ class WithoutInterwikiPage extends PageQueryPage { } function getOrderFields() { - return array( 'page_namespace', 'page_title' ); + return [ 'page_namespace', 'page_title' ]; } function isExpensive() { @@ -78,20 +82,20 @@ class WithoutInterwikiPage extends PageQueryPage { } function getQueryInfo() { - $query = array( - 'tables' => array( 'page', 'langlinks' ), - 'fields' => array( + $query = [ + 'tables' => [ 'page', 'langlinks' ], + 'fields' => [ 'namespace' => 'page_namespace', 'title' => 'page_title', 'value' => 'page_title' - ), - 'conds' => array( + ], + 'conds' => [ 'll_title IS NULL', 'page_namespace' => MWNamespace::getContentNamespaces(), 'page_is_redirect' => 0 - ), - 'join_conds' => array( 'langlinks' => array( 'LEFT JOIN', 'll_from = page_id' ) ) - ); + ], + 'join_conds' => [ 'langlinks' => [ 'LEFT JOIN', 'll_from = page_id' ] ] + ]; if ( $this->prefix ) { $dbr = wfGetDB( DB_SLAVE ); $query['conds'][] = 'page_title ' . $dbr->buildLike( $this->prefix, $dbr->anyString() );