jenkins-bot has submitted this change and it was merged.

Change subject: Special:Upload Fire wikipage.content hook
......................................................................


Special:Upload Fire wikipage.content hook

The warning here is a fragment of wikicode, and can include the video
player for instance.

Bug: T51751
Change-Id: I45e10f5f5700ea7c526a63b4f47a21d630c6d8ee
---
M resources/src/mediawiki.special/mediawiki.special.upload.js
1 file changed, 3 insertions(+), 1 deletion(-)

Approvals:
  Bartosz Dziewoński: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/resources/src/mediawiki.special/mediawiki.special.upload.js 
b/resources/src/mediawiki.special/mediawiki.special.upload.js
index 9fcec02..8c89ed9 100644
--- a/resources/src/mediawiki.special/mediawiki.special.upload.js
+++ b/resources/src/mediawiki.special/mediawiki.special.upload.js
@@ -85,7 +85,9 @@
                },
 
                setWarning: function ( warning ) {
-                       $( '#wpDestFile-warning' ).html( warning );
+                       var $warning = $( $.parseHTML( warning ) );
+                       mw.hook( 'wikipage.content' ).fire( $warning );
+                       $( '#wpDestFile-warning' ).empty().append( $warning );
 
                        // Set a value in the form indicating that the warning 
is acknowledged and
                        // doesn't need to be redisplayed post-upload

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I45e10f5f5700ea7c526a63b4f47a21d630c6d8ee
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: TheDJ <hartman.w...@gmail.com>
Gerrit-Reviewer: Bartosz Dziewoński <matma....@gmail.com>
Gerrit-Reviewer: Brion VIBBER <br...@wikimedia.org>
Gerrit-Reviewer: Edokter <er...@darcoury.nl>
Gerrit-Reviewer: Fomafix
Gerrit-Reviewer: Jack Phoenix <j...@countervandalism.net>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to