Brion VIBBER has submitted this change and it was merged.

Change subject: Bug 41995: variants fixage for action=mobileview
......................................................................


Bug 41995: variants fixage for action=mobileview

Change-Id: Id74f2107f49b520dadcffc849dc9698f2e6556fa
---
M includes/api/ApiMobileView.php
1 file changed, 4 insertions(+), 1 deletion(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved
  jenkins-bot: Checked



diff --git a/includes/api/ApiMobileView.php b/includes/api/ApiMobileView.php
index b764e19..95631c5 100644
--- a/includes/api/ApiMobileView.php
+++ b/includes/api/ApiMobileView.php
@@ -50,7 +50,7 @@
                }
                if ( isset( $prop['normalizedtitle'] ) && 
$title->getPrefixedText() != $params['page'] ) {
                        $this->getResult()->addValue( null, 
$this->getModuleName(),
-                               array( 'normalizedtitle' => 
$title->getPrefixedText() )
+                               array( 'normalizedtitle' => 
$title->getPageLanguage()->convert( $title->getPrefixedText() ) )
                        );
                }
                $data = $this->getData( $title, $params['noimages'] );
@@ -186,6 +186,9 @@
                        wfProfileIn( __METHOD__ . '-sections' );
                        $data = array();
                        $data['sections'] = $parserOutput->getSections();
+                       for ( $i = 0; $i < count( $data['sections'] ); $i++ ) {
+                               $data['sections'][$i]['line'] = 
$title->getPageLanguage()->convert( $data['sections'][$i]['line'] );
+                       }
                        $chunks = preg_split( '/<h(?=[1-6]\b)/i', $html );
                        if ( count( $chunks ) != count( $data['sections'] ) + 1 
) {
                                wfDebug( __METHOD__ . "(): mismatching number 
of sections from parser and split. oldid=$latest\n" );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id74f2107f49b520dadcffc849dc9698f2e6556fa
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: MaxSem <maxsem.w...@gmail.com>
Gerrit-Reviewer: Brion VIBBER <br...@wikimedia.org>
Gerrit-Reviewer: Jdlrobson <jrob...@wikimedia.org>
Gerrit-Reviewer: Liangent <liang...@gmail.com>
Gerrit-Reviewer: MaxSem <maxsem.w...@gmail.com>
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