Merge "Convert action=markpatrolled fallback interface to HTTP POST"
[lhc/web/wiklou.git] / includes / MediaWiki.php
index 8cf009f..f7e57fc 100644 (file)
@@ -676,14 +676,14 @@ class MediaWiki {
        /**
         * @param string $url
         * @param IContextSource $context
-        * @return string|bool Either "local" or "remote" if in the farm, false otherwise
+        * @return string Either "local", "remote" if in the farm, "external" otherwise
         */
-       private function getUrlDomainDistance( $url, IContextSource $context ) {
+       private static function getUrlDomainDistance( $url, IContextSource $context ) {
                static $relevantKeys = [ 'host' => true, 'port' => true ];
 
                $infoCandidate = wfParseUrl( $url );
                if ( $infoCandidate === false ) {
-                       return false;
+                       return 'external';
                }
 
                $infoCandidate = array_intersect_key( $infoCandidate, $relevantKeys );
@@ -705,7 +705,7 @@ class MediaWiki {
                        }
                }
 
-               return false;
+               return 'external';
        }
 
        /**
@@ -899,6 +899,7 @@ class MediaWiki {
 
                // Do any deferred jobs
                DeferredUpdates::doUpdates( 'enqueue' );
+               DeferredUpdates::setImmediateMode( true );
 
                // Make sure any lazy jobs are pushed
                JobQueueGroup::pushLazyJobs();