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

Change subject: BSVisualEditor: Parser now is not required to create the config
......................................................................

BSVisualEditor: Parser now is not required to create the config

PatchSet2:
* A new instance of Parser is created when the given $oParser is null

PatchSet3:
* Fixed positioning of "TODO" text

Change-Id: I46014bf5bdf0d63210af39a6721c2b331af5342a
(cherry picked from commit cc0396fad5527bacb46e71a2fd5d4aae03988d01)
---
M VisualEditor/VisualEditor.class.php
1 file changed, 7 insertions(+), 2 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions 
refs/changes/54/344954/1

diff --git a/VisualEditor/VisualEditor.class.php 
b/VisualEditor/VisualEditor.class.php
index 341d67f..9b98662 100644
--- a/VisualEditor/VisualEditor.class.php
+++ b/VisualEditor/VisualEditor.class.php
@@ -407,7 +407,7 @@
         * @param string $sLangCode
         * @return array
         */
-       public function makeConfig( $oParser, $sLangCode = null ) {
+       public function makeConfig( Parser $oParser = null, $sLangCode = null ) 
{
                if( $sLangCode == null ) {
                        $sLangCode = $this->getLanguage()->getCode();
                }
@@ -431,7 +431,12 @@
                        unset( $aConfigs['overwrite']['auto_focus'] );
                }
 
-               $aExtensionTags = $oParser->getTags(); //TODO: Use, or at least 
fall back to API "action=query&meta=siteinfo&siprop=extensiontags"
+               if( !$oParser instanceof Parser ) {
+                       $oParser = new Parser();
+               }
+               //TODO: Use, or at least fall back to API
+               //"action=query&meta=siteinfo&siprop=extensiontags"
+               $aExtensionTags = $oParser->getTags();
                $sAllowedTags = '';
                $sSpecialTags = '';
                foreach ( $aExtensionTags as $sTagName ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I46014bf5bdf0d63210af39a6721c2b331af5342a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: REL1_27
Gerrit-Owner: Ljonka <l.verhovs...@gmail.com>
Gerrit-Reviewer: Pwirth <wi...@hallowelt.biz>

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

Reply via email to