Merge "Title::getLinkURL(): Allow expanding PROTO_RELATIVE too"
[lhc/web/wiklou.git] / includes / Title.php
index bae3a76..62f4060 100644 (file)
@@ -4372,7 +4372,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 ],
@@ -4555,10 +4554,10 @@ class Title implements LinkTarget {
         * @return bool
         */
        public function canUseNoindex() {
-               global $wgContentNamespaces, $wgExemptFromUserRobotsControl;
+               global $wgExemptFromUserRobotsControl;
 
                $bannedNamespaces = is_null( $wgExemptFromUserRobotsControl )
-                       ? $wgContentNamespaces
+                       ? MWNamespace::getContentNamespaces()
                        : $wgExemptFromUserRobotsControl;
 
                return !in_array( $this->mNamespace, $bannedNamespaces );