r36525 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r36524‎ | r36525 | r36526 >
Date:15:06, 21 June 2008
Author:catrope
Status:old
Tags:
Comment:
Oops, gotta use $exp here
Modified paths:
  • /trunk/phase3/includes/api/ApiMain.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiMain.php
@@ -273,7 +273,7 @@
274274 // Set the cache expiration at the last moment, as any errors may change the expiration.
275275 // if $this->mSquidMaxage == 0, the expiry time is set to the first second of unix epoch
276276 $exp = min($smaxage, $maxage);
277 - $expires = $exp == 0 ? 1 : time() + $this->mSquidMaxage;
 277+ $expires = ($exp == 0 ? 1 : time() + $exp);
278278 header('Expires: ' . wfTimestamp(TS_RFC2822, $expires));
279279 header('Cache-Control: s-maxage=' . $smaxage . ', must-revalidate, max-age=' . $maxage);
280280

Status & tagging log