Fix for ArticleRevisionViewCustom hook in DifferenceEngine.php
authorYaron Koren <yaron57@gmail.com>
Mon, 28 Oct 2019 13:30:43 +0000 (13:30 +0000)
committerJforrester <jforrester@wikimedia.org>
Fri, 1 Nov 2019 02:30:12 +0000 (02:30 +0000)
Was missing a parameter, which actually made this hook unusable.

Bug: T236628
Change-Id: I6e260cd49f7083f34d4218712edf7d91d2f11ee9
(cherry picked from commit b10d0fa09d52fc6bd3d645fb39175b45973bb54b)

includes/diff/DifferenceEngine.php

index 6fb37c1..4235488 100644 (file)
@@ -869,7 +869,7 @@ class DifferenceEngine extends ContextSource {
                        $out->setArticleFlag( true );
 
                        if ( !Hooks::run( 'ArticleRevisionViewCustom',
-                               [ $this->mNewRev->getRevisionRecord(), $this->mNewPage, $out ] )
+                               [ $this->mNewRev->getRevisionRecord(), $this->mNewPage, $this->mOldid, $out ] )
                        ) {
                                // Handled by extension
                                // NOTE: sync with hooks called in Article::view()