aboutsummaryrefslogtreecommitdiffstats
path: root/includes/AjaxResponse.php
diff options
context:
space:
mode:
authorSiebrand Mazeland <siebrand@kitano.nl>2014-03-23 02:28:57 +0100
committerSiebrand <siebrand@kitano.nl>2014-03-23 01:29:41 +0000
commit7a635c5dfda079f84370ca8d19fd6ab9fcfc7870 (patch)
treed5d7f440bf476ff1d76459de23b530737ec63e34 /includes/AjaxResponse.php
parentb0b32b9b7dde76d2214c872bf0b97ec77acd441d (diff)
downloadmediawikicore-7a635c5dfda079f84370ca8d19fd6ab9fcfc7870.tar.gz
mediawikicore-7a635c5dfda079f84370ca8d19fd6ab9fcfc7870.zip
Try to make a dent in CodeSniffer reports on includes/ (1)
Change-Id: Iaf3120b4e32cc5835ef9ed86236d98679e2b87fa
Diffstat (limited to 'includes/AjaxResponse.php')
-rw-r--r--includes/AjaxResponse.php16
1 files changed, 10 insertions, 6 deletions
diff --git a/includes/AjaxResponse.php b/includes/AjaxResponse.php
index 334cee37728c..4b5ca75eb0ca 100644
--- a/includes/AjaxResponse.php
+++ b/includes/AjaxResponse.php
@@ -28,7 +28,6 @@
* @ingroup Ajax
*/
class AjaxResponse {
-
/**
* Number of seconds to get the response cached by a proxy
* @var int $mCacheDuration
@@ -184,10 +183,10 @@ class AjaxResponse {
}
} else {
-
# Let the client do the caching. Cache is not purged.
header ( "Expires: " . gmdate( "D, d M Y H:i:s", time() + $this->mCacheDuration ) . " GMT" );
- header ( "Cache-Control: s-maxage={$this->mCacheDuration},public,max-age={$this->mCacheDuration}" );
+ header ( "Cache-Control: s-maxage={$this->mCacheDuration}," .
+ "public,max-age={$this->mCacheDuration}" );
}
} else {
@@ -237,17 +236,22 @@ class AjaxResponse {
wfDebug( "$fname: -- client send If-Modified-Since: " . $modsince . "\n", 'log' );
wfDebug( "$fname: -- we might send Last-Modified : $lastmod\n", 'log' );
- if ( ( $ismodsince >= $timestamp ) && $wgUser->validateCache( $ismodsince ) && $ismodsince >= $wgCacheEpoch ) {
+ if ( ( $ismodsince >= $timestamp )
+ && $wgUser->validateCache( $ismodsince ) &&
+ $ismodsince >= $wgCacheEpoch
+ ) {
ini_set( 'zlib.output_compression', 0 );
$this->setResponseCode( "304 Not Modified" );
$this->disable();
$this->mLastModified = $lastmod;
- wfDebug( "$fname: CACHED client: $ismodsince ; user: {$wgUser->getTouched()} ; page: $timestamp ; site $wgCacheEpoch\n", 'log' );
+ wfDebug( "$fname: CACHED client: $ismodsince ; user: {$wgUser->getTouched()} ; " .
+ "page: $timestamp ; site $wgCacheEpoch\n", 'log' );
return true;
} else {
- wfDebug( "$fname: READY client: $ismodsince ; user: {$wgUser->getTouched()} ; page: $timestamp ; site $wgCacheEpoch\n", 'log' );
+ wfDebug( "$fname: READY client: $ismodsince ; user: {$wgUser->getTouched()} ; " .
+ "page: $timestamp ; site $wgCacheEpoch\n", 'log' );
$this->mLastModified = $lastmod;
}
} else {