Merge "Export revision IDs to JS config on diff pages"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Tue, 18 Jul 2017 15:40:00 +0000 (15:40 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Tue, 18 Jul 2017 15:40:00 +0000 (15:40 +0000)
RELEASE-NOTES-1.30
includes/diff/DifferenceEngine.php

index 87e6ce5..51f9764 100644 (file)
@@ -41,6 +41,7 @@ section).
   enabled by setting $wgUsePigLatinVariant to true.
 * Added RecentChangesPurgeRows hook to allow extensions to purge data that
   depends on the recentchanges table.
+* Added JS config values wgDiffOldId/wgDiffNewId to the output of diff pages.
 
 === Languages updated in 1.30 ===
 
index 5f6974e..95420d9 100644 (file)
@@ -377,6 +377,11 @@ class DifferenceEngine extends ContextSource {
                        }
                }
 
+               $out->addJsConfigVars( [
+                       'wgDiffOldId' => $this->mOldid,
+                       'wgDiffNewId' => $this->mNewid,
+               ] );
+
                # Make "next revision link"
                # Skip next link on the top revision
                if ( $samePage && !$this->mNewRev->isCurrent() ) {