Remove $wgUseLinkNamespaceDBFields
authorumherirrender <umherirrender_de.wp@web.de>
Tue, 29 Sep 2015 18:00:33 +0000 (20:00 +0200)
committerumherirrender <umherirrender_de.wp@web.de>
Tue, 29 Sep 2015 18:00:33 +0000 (20:00 +0200)
Marked as may removed with 1.25, 1.27 should be okay than.

Change-Id: I4ccd7dfe79fa555946cab64dd1eb179a3fc8291d

RELEASE-NOTES-1.27
includes/DefaultSettings.php
includes/specials/SpecialWhatlinkshere.php

index 71c3dcd..bf50a47 100644 (file)
@@ -9,6 +9,7 @@ MediaWiki 1.27 is an alpha-quality branch and is not recommended for use in
 production.
 
 === Configuration changes in 1.27 ===
+* Removed $wgUseLinkNamespaceDBFields
 
 === New features in 1.27 ===
 
index 5fd8574..50b664a 100644 (file)
@@ -7667,14 +7667,6 @@ $wgHKDFAlgorithm = 'sha256';
  */
 $wgPageLanguageUseDB = false;
 
-/**
- * Enable use of the *_namespace fields of the pagelinks, redirect, and templatelinks tables.
- * Set this only if the fields are fully populated. This may be removed in 1.25.
- * @var bool
- * @since 1.24
- */
-$wgUseLinkNamespaceDBFields = true;
-
 /**
  * Global configuration variable for Virtual REST Services.
  * Parameters for different services are to be declared inside
index 39980d2..0e5ffce 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' ),