https://www.mediawiki.org/wiki/Special:Code/MediaWiki/113042
Revision: 113042
Author: reedy
Date: 2012-03-05 15:23:04 +0000 (Mon, 05 Mar 2012)
Log Message:
-----------
Documentation updates
Normalise method returns
Modified Paths:
--------------
trunk/phase3/includes/AjaxResponse.php
trunk/phase3/includes/api/ApiQueryLogEvents.php
trunk/phase3/includes/interwiki/Interwiki.php
Modified: trunk/phase3/includes/AjaxResponse.php
===================================================================
--- trunk/phase3/includes/AjaxResponse.php 2012-03-05 15:21:15 UTC (rev
113041)
+++ trunk/phase3/includes/AjaxResponse.php 2012-03-05 15:23:04 UTC (rev
113042)
@@ -34,6 +34,9 @@
/** Content of our HTTP response */
private $mText;
+ /**
+ * @param $text string|null
+ */
function __construct( $text = null ) {
$this->mCacheDuration = null;
$this->mVary = null;
@@ -69,21 +72,28 @@
$this->mDisabled = true;
}
- /** Add content to the response */
+ /**
+ * Add content to the response
+ * @param $text string
+ */
function addText( $text ) {
if ( ! $this->mDisabled && $text ) {
$this->mText .= $text;
}
}
- /** Output text */
+ /**
+ * Output text
+ */
function printText() {
if ( ! $this->mDisabled ) {
print $this->mText;
}
}
- /** Construct the header and output it */
+ /**
+ * Construct the header and output it
+ */
function sendHeaders() {
global $wgUseSquid, $wgUseESI;
@@ -139,9 +149,10 @@
/**
* checkLastModified tells the client to use the client-cached response
if
* possible. If sucessful, the AjaxResponse is disabled so that
- * any future call to AjaxResponse::printText() have no effect. The
method
- * returns true iff the response code was set to 304 Not Modified.
- * @return bool
+ * any future call to AjaxResponse::printText() have no effect.
+ *
+ * @param $timestamp string
+ * @return bool Returns true if the response code was set to 304 Not
Modified.
*/
function checkLastModified ( $timestamp ) {
global $wgCachePages, $wgCacheEpoch, $wgUser;
@@ -149,17 +160,17 @@
if ( !$timestamp || $timestamp == '19700101000000' ) {
wfDebug( "$fname: CACHE DISABLED, NO TIMESTAMP\n" );
- return;
+ return false;
}
if ( !$wgCachePages ) {
wfDebug( "$fname: CACHE DISABLED\n", false );
- return;
+ return false;
}
if ( $wgUser->getOption( 'nocache' ) ) {
wfDebug( "$fname: USER DISABLED CACHE\n", false );
- return;
+ return false;
}
$timestamp = wfTimestamp( TS_MW, $timestamp );
@@ -192,6 +203,7 @@
wfDebug( "$fname: client did not send If-Modified-Since
header\n", false );
$this->mLastModified = $lastmod;
}
+ return false;
}
/**
Modified: trunk/phase3/includes/api/ApiQueryLogEvents.php
===================================================================
--- trunk/phase3/includes/api/ApiQueryLogEvents.php 2012-03-05 15:21:15 UTC
(rev 113041)
+++ trunk/phase3/includes/api/ApiQueryLogEvents.php 2012-03-05 15:23:04 UTC
(rev 113042)
@@ -195,6 +195,7 @@
* @param $type string
* @param $action string
* @param $ts
+ * @param $legacy bool
* @return array
*/
public static function addLogParams( $result, &$vals, $params, $type,
$action, $ts, $legacy = false ) {
Modified: trunk/phase3/includes/interwiki/Interwiki.php
===================================================================
--- trunk/phase3/includes/interwiki/Interwiki.php 2012-03-05 15:21:15 UTC
(rev 113041)
+++ trunk/phase3/includes/interwiki/Interwiki.php 2012-03-05 15:23:04 UTC
(rev 113042)
@@ -130,6 +130,7 @@
$value = '';
}
+
return $value;
}
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs