From 88657870bf6add4e564fad03aec271c3d201da97 Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Fri, 13 May 2016 16:01:26 -0700 Subject: [PATCH] Follow-up 6ce974f: also update the hook call in ApiMain The fact that ApiMain invokes an OutputPage hook is terrible though. Change-Id: I76bb9c36ccca365f77c9b7e2a481048da04bd909 --- includes/api/ApiMain.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ); } -- 2.20.1