dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add array type hints to minor methods in the Html class
[lhc/web/wiklou.git]
/
includes
/
MediaWiki.php
diff --git
a/includes/MediaWiki.php
b/includes/MediaWiki.php
index
c4af16d
..
ec2f40f
100644
(file)
--- a/
includes/MediaWiki.php
+++ b/
includes/MediaWiki.php
@@
-20,6
+20,8
@@
* @file
*/
* @file
*/
+use MediaWiki\Logger\LoggerFactory;
+
/**
* The MediaWiki class is the helper class for the index.php entry point.
*/
/**
* The MediaWiki class is the helper class for the index.php entry point.
*/
@@
-462,7
+464,9
@@
class MediaWiki {
// Send Ajax requests to the Ajax dispatcher.
if ( $this->config->get( 'UseAjax' ) && $request->getVal( 'action' ) === 'ajax' ) {
// Set a dummy title, because $wgTitle == null might break things
// Send Ajax requests to the Ajax dispatcher.
if ( $this->config->get( 'UseAjax' ) && $request->getVal( 'action' ) === 'ajax' ) {
// Set a dummy title, because $wgTitle == null might break things
- $title = Title::makeTitle( NS_MAIN, 'AJAX' );
+ $title = Title::makeTitle( NS_SPECIAL, 'Badtitle/performing an AJAX call in '
+ . __METHOD__
+ );
$this->context->setTitle( $title );
$wgTitle = $title;
$this->context->setTitle( $title );
$wgTitle = $title;
@@
-478,7
+482,7
@@
class MediaWiki {
$wgTitle = $title;
$trxProfiler = Profiler::instance()->getTransactionProfiler();
$wgTitle = $title;
$trxProfiler = Profiler::instance()->getTransactionProfiler();
- $trxProfiler->setLogger(
MW
LoggerFactory::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.
// Aside from rollback, master queries should not happen on GET requests.
// Periodic or "in passing" updates on GET should use the job queue.
@@
-527,7
+531,7
@@
class MediaWiki {
wfDebugLog( 'RedirectedPosts', "Redirected from HTTP to HTTPS: $oldUrl" );
}
// Setup dummy Title, otherwise OutputPage::redirect will fail
wfDebugLog( 'RedirectedPosts', "Redirected from HTTP to HTTPS: $oldUrl" );
}
// Setup dummy Title, otherwise OutputPage::redirect will fail
- $title = Title::newFromText(
NS_MAIN, 'REDIR'
);
+ $title = Title::newFromText(
'REDIR', NS_MAIN
);
$this->context->setTitle( $title );
$output = $this->context->getOutput();
// Since we only do this redir to change proto, always send a vary header
$this->context->setTitle( $title );
$output = $this->context->getOutput();
// Since we only do this redir to change proto, always send a vary header
@@
-618,7
+622,7
@@
class MediaWiki {
$n = intval( $jobRunRate );
}
$n = intval( $jobRunRate );
}
- $runJobsLogger =
MW
LoggerFactory::getInstance( 'runJobs' );
+ $runJobsLogger = LoggerFactory::getInstance( 'runJobs' );
if ( !$this->config->get( 'RunJobsAsync' ) ) {
// Fall back to running the job here while the user waits
if ( !$this->config->get( 'RunJobsAsync' ) ) {
// Fall back to running the job here while the user waits
@@
-663,7
+667,12
@@
class MediaWiki {
}
$url = wfAppendQuery( wfScript( 'index' ), $query );
}
$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.
$runJobsLogger->info( "Running $n job(s) via '$url'" );
// Send a cron API request to be performed in the background.