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

Change subject: Use outputMode to determine imgCaption text
......................................................................


Use outputMode to determine imgCaption text

Also use invoked mParser (ImageGallery object) instead
of $GLOBALS['wgParser']

Change-Id: I119b62216d01b64ddecb1f45938d0afd3353712f
---
M formats/gallery/Gallery.php
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Mwjames: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/formats/gallery/Gallery.php b/formats/gallery/Gallery.php
index bce550c..a782041 100644
--- a/formats/gallery/Gallery.php
+++ b/formats/gallery/Gallery.php
@@ -291,7 +291,7 @@
                                        if ( isset( $row[1] ) ) {
                                                $imgCaption = 
$row[1]->getNextDataValue();
                                                if ( is_object( $imgCaption ) ) 
{
-                                                       $imgCaption = 
$imgCaption->getShortText( SMW_OUTPUT_HTML, $this->getLinker( true ) );
+                                                       $imgCaption = 
$imgCaption->getShortText( $this->outputMode, $this->getLinker( true ) );
                                                }
                                        }
 
@@ -325,7 +325,7 @@
                        }
                } else {
                        if ( $imgTitle instanceof Title && 
$imgTitle->getNamespace() == NS_FILE && 
!$this->getContext()->getTitle()->isSpecialPage() ) {
-                               $imgCaption = 
$GLOBALS['wgParser']->recursivePreprocess( $imgCaption );
+                               $imgCaption = $ig->mParser->recursiveTagParse( 
$imgCaption );
                        }
                }
                // Use image alt as helper for either text

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I119b62216d01b64ddecb1f45938d0afd3353712f
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/SemanticResultFormats
Gerrit-Branch: master
Gerrit-Owner: Mwjames <[email protected]>
Gerrit-Reviewer: Mwjames <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to