Merge "ResourceLoaderImage: Allow shorthand syntax"
[lhc/web/wiklou.git] / includes / MediaWiki.php
index c4af16d..68d03c8 100644 (file)
@@ -20,6 +20,8 @@
  * @file
  */
 
+use MediaWiki\Logger\LoggerFactory;
+
 /**
  * The MediaWiki class is the helper class for the index.php entry point.
  */
@@ -478,7 +480,7 @@ class MediaWiki {
                $wgTitle = $title;
 
                $trxProfiler = Profiler::instance()->getTransactionProfiler();
-               $trxProfiler->setLogger( MWLoggerFactory::getInstance( 'DBPerformance' ) );
+               $trxProfiler->setLogger( LoggerFactory::getInstance( 'DBPerformance' ) );
 
                // Aside from rollback, master queries should not happen on GET requests.
                // Periodic or "in passing" updates on GET should use the job queue.
@@ -618,7 +620,7 @@ class MediaWiki {
                        $n = intval( $jobRunRate );
                }
 
-               $runJobsLogger = MWLoggerFactory::getInstance( 'runJobs' );
+               $runJobsLogger = LoggerFactory::getInstance( 'runJobs' );
 
                if ( !$this->config->get( 'RunJobsAsync' ) ) {
                        // Fall back to running the job here while the user waits
@@ -663,7 +665,12 @@ class MediaWiki {
                }
 
                $url = wfAppendQuery( wfScript( 'index' ), $query );
-               $req = "POST $url HTTP/1.1\r\nHost: {$info['host']}\r\nConnection: Close\r\nContent-Length: 0\r\n\r\n";
+               $req = (
+                       "POST $url HTTP/1.1\r\n" .
+                       "Host: {$info['host']}\r\n" .
+                       "Connection: Close\r\n" .
+                       "Content-Length: 0\r\n\r\n"
+               );
 
                $runJobsLogger->info( "Running $n job(s) via '$url'" );
                // Send a cron API request to be performed in the background.