Localisation: Gave each special page its own message
[lhc/web/wiklou.git] / includes / specials / SpecialWhatlinkshere.php
index a6f92d6..25f01ee 100644 (file)
@@ -127,20 +127,13 @@ class SpecialWhatLinksHere extends IncludableSpecialPage {
                        'il_to' => $target->getDBkey(),
                );
 
-               $useLinkNamespaceDBFields = $this->getConfig()->get( 'UseLinkNamespaceDBFields' );
                $namespace = $this->opts->getValue( 'namespace' );
                $invert = $this->opts->getValue( 'invert' );
                $nsComparison = ( $invert ? '!= ' : '= ' ) . $dbr->addQuotes( $namespace );
                if ( is_int( $namespace ) ) {
-                       if ( $useLinkNamespaceDBFields ) {
-                               $conds['pagelinks'][] = "pl_from_namespace $nsComparison";
-                               $conds['templatelinks'][] = "tl_from_namespace $nsComparison";
-                               $conds['imagelinks'][] = "il_from_namespace $nsComparison";
-                       } else {
-                               $conds['pagelinks'][] = "page_namespace $nsComparison";
-                               $conds['templatelinks'][] = "page_namespace $nsComparison";
-                               $conds['imagelinks'][] = "page_namespace $nsComparison";
-                       }
+                       $conds['pagelinks'][] = "pl_from_namespace $nsComparison";
+                       $conds['templatelinks'][] = "tl_from_namespace $nsComparison";
+                       $conds['imagelinks'][] = "il_from_namespace $nsComparison";
                }
 
                if ( $from ) {
@@ -156,7 +149,7 @@ class SpecialWhatLinksHere extends IncludableSpecialPage {
                }
 
                $queryFunc = function ( IDatabase $dbr, $table, $fromCol ) use (
-                       $conds, $target, $limit, $useLinkNamespaceDBFields
+                       $conds, $target, $limit
                ) {
                        // Read an extra row as an at-end check
                        $queryLimit = $limit + 1;
@@ -165,9 +158,7 @@ class SpecialWhatLinksHere extends IncludableSpecialPage {
                                'rd_title' => $target->getDBkey(),
                                'rd_interwiki = ' . $dbr->addQuotes( '' ) . ' OR rd_interwiki IS NULL'
                        );
-                       if ( $useLinkNamespaceDBFields ) { // migration check
-                               $on['rd_namespace'] = $target->getNamespace();
-                       }
+                       $on['rd_namespace'] = $target->getNamespace();
                        // Inner LIMIT is 2X in case of stale backlinks with wrong namespaces
                        $subQuery = $dbr->selectSqlText(
                                array( $table, 'redirect', 'page' ),
@@ -323,7 +314,7 @@ class SpecialWhatLinksHere extends IncludableSpecialPage {
                static $msgcache = null;
                if ( $msgcache === null ) {
                        static $msgs = array( 'isredirect', 'istemplate', 'semicolon-separator',
-                               'whatlinkshere-links', 'isimage', 'edit' );
+                               'whatlinkshere-links', 'isimage', 'editlink' );
                        $msgcache = array();
                        foreach ( $msgs as $msg ) {
                                $msgcache[$msg] = $this->msg( $msg )->escaped();
@@ -364,7 +355,7 @@ class SpecialWhatLinksHere extends IncludableSpecialPage {
                }
 
                # Space for utilities links, with a what-links-here link provided
-               $wlhLink = $this->wlhLink( $nt, $msgcache['whatlinkshere-links'], $msgcache['edit'] );
+               $wlhLink = $this->wlhLink( $nt, $msgcache['whatlinkshere-links'], $msgcache['editlink'] );
                $wlh = Xml::wrapClass(
                        $this->msg( 'parentheses' )->rawParams( $wlhLink )->escaped(),
                        'mw-whatlinkshere-tools'
@@ -505,7 +496,7 @@ class SpecialWhatLinksHere extends IncludableSpecialPage {
                $f .= ' ';
 
                # Submit
-               $f .= Xml::submitButton( $this->msg( 'allpagessubmit' )->text() );
+               $f .= Xml::submitButton( $this->msg( 'whatlinkshere-submit' )->text() );
 
                # Close
                $f .= Xml::closeElement( 'fieldset' ) . Xml::closeElement( 'form' ) . "\n";