Merge "Don't use $wgContentNamespaces directly"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Tue, 12 Jul 2016 23:26:38 +0000 (23:26 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Tue, 12 Jul 2016 23:26:38 +0000 (23:26 +0000)
1  2 
includes/Title.php

diff --combined includes/Title.php
@@@ -4371,6 -4371,7 +4371,6 @@@ class Title implements LinkTarget 
                $conds = $this->pageCond();
                $dbw->onTransactionIdle( function () use ( $dbw, $conds, $method, $purgeTime ) {
                        $dbTimestamp = $dbw->timestamp( $purgeTime ?: time() );
 -
                        $dbw->update(
                                'page',
                                [ 'page_touched' => $dbTimestamp ],
         * @return bool
         */
        public function canUseNoindex() {
-               global $wgContentNamespaces, $wgExemptFromUserRobotsControl;
+               global $wgExemptFromUserRobotsControl;
  
                $bannedNamespaces = is_null( $wgExemptFromUserRobotsControl )
-                       ? $wgContentNamespaces
+                       ? MWNamespace::getContentNamespaces()
                        : $wgExemptFromUserRobotsControl;
  
                return !in_array( $this->mNamespace, $bannedNamespaces );