From: Roan Kattouw Date: Fri, 13 May 2016 23:01:26 +0000 (-0700) Subject: Follow-up 6ce974f: also update the hook call in ApiMain X-Git-Tag: 1.31.0-rc.0~6975 X-Git-Url: https://git.cyclocoop.org/%28%28?a=commitdiff_plain;h=88657870bf6add4e564fad03aec271c3d201da97;p=lhc%2Fweb%2Fwiklou.git Follow-up 6ce974f: also update the hook call in ApiMain The fact that ApiMain invokes an OutputPage hook is terrible though. Change-Id: I76bb9c36ccca365f77c9b7e2a481048da04bd909 --- diff --git a/includes/api/ApiMain.php b/includes/api/ApiMain.php index 685a9ef6ac..15cea446fc 100644 --- a/includes/api/ApiMain.php +++ b/includes/api/ApiMain.php @@ -1135,7 +1135,7 @@ class ApiMain extends ApiBase { TS_MW, time() - $this->getConfig()->get( 'SquidMaxage' ) ); } - Hooks::run( 'OutputPageCheckLastModified', [ &$modifiedTimes ] ); + Hooks::run( 'OutputPageCheckLastModified', [ &$modifiedTimes, $this->getOutput() ] ); $lastMod = max( $modifiedTimes ); $return304 = wfTimestamp( TS_MW, $lastMod ) <= $ts->getTimestamp( TS_MW ); }