Merge "Pass the OutputPage object to the OutputPageCheckLastModified hook"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 11 May 2016 04:37:22 +0000 (04:37 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 11 May 2016 04:37:22 +0000 (04:37 +0000)
docs/hooks.txt
includes/OutputPage.php

index 726500c..2d5f6bc 100644 (file)
@@ -2128,6 +2128,7 @@ $sk: The Skin that called OutputPage::headElement
 since the last visit.
 &$modifiedTimes: array of timestamps.
   The following keys are set: page, user, epoch
+$out: OutputPage object (since 1.28)
 
 'OutputPageMakeCategoryLinks': Links are about to be generated for the page's
 categories. Implementations should return false if they generate the category
index c724207..67e9a4f 100644 (file)
@@ -780,7 +780,7 @@ class OutputPage extends ContextSource {
                        // bug 44570: the core page itself may not change, but resources might
                        $modifiedTimes['sepoch'] = wfTimestamp( TS_MW, time() - $config->get( 'SquidMaxage' ) );
                }
-               Hooks::run( 'OutputPageCheckLastModified', [ &$modifiedTimes ] );
+               Hooks::run( 'OutputPageCheckLastModified', [ &$modifiedTimes, $this ] );
 
                $maxModified = max( $modifiedTimes );
                $this->mLastModified = wfTimestamp( TS_RFC2822, $maxModified );