Follow-up 6ce974f: also update the hook call in ApiMain
authorRoan Kattouw <roan.kattouw@gmail.com>
Fri, 13 May 2016 23:01:26 +0000 (16:01 -0700)
committerRoan Kattouw <roan.kattouw@gmail.com>
Fri, 13 May 2016 23:01:26 +0000 (16:01 -0700)
The fact that ApiMain invokes an OutputPage hook is terrible though.

Change-Id: I76bb9c36ccca365f77c9b7e2a481048da04bd909

includes/api/ApiMain.php

index 685a9ef..15cea44 100644 (file)
@@ -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 );
                                                }