Florianschmidtwelzow has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/355434 )

Change subject: Run DiffViewHeader in mobile mode, too
......................................................................

Run DiffViewHeader in mobile mode, too

This change makes it possible for extension to add things to the diff
header in mobile using the (mediawiki core) hook DiffViewHeader, which
is called before the header is generated.

Bug: T165835
Change-Id: I00d858b970edeab41fadb386963d23cb22231e62
---
M includes/specials/SpecialMobileDiff.php
1 file changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend 
refs/changes/34/355434/1

diff --git a/includes/specials/SpecialMobileDiff.php 
b/includes/specials/SpecialMobileDiff.php
index dfefbf9..1933dd8 100644
--- a/includes/specials/SpecialMobileDiff.php
+++ b/includes/specials/SpecialMobileDiff.php
@@ -246,6 +246,11 @@
                                $comment
                        )
                );
+
+               if ( $this->mDiffEngine instanceof InlineDifferenceEngine ) {
+                       // TODO: The hook gets originally called in the 
DifferenceEngine::showDiffPage() method
+                       Hooks::run( 'DiffViewHeader', [ $this->mDiffEngine, 
$this->prevRev, $this->rev ] );
+               }
        }
 
        /**

-- 
To view, visit https://gerrit.wikimedia.org/r/355434
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I00d858b970edeab41fadb386963d23cb22231e62
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow <florian.schmidt.stargatewis...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to