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

Change subject: Use scriptpath instead of wgScriptPath
......................................................................

Use scriptpath instead of wgScriptPath

 * Also, get rid of this as a cli argument since its usecase seems
   long gone.

Change-Id: I2c8771d25c27581b8ef160f77fb206e254b8f1ef
---
M bin/parse.js
M bin/parserTests.js
M lib/wt2html/tt/ParserFunctions.js
3 files changed, 2 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid 
refs/changes/84/387684/1

diff --git a/bin/parse.js b/bin/parse.js
index 4988209..effdc81 100755
--- a/bin/parse.js
+++ b/bin/parse.js
@@ -259,11 +259,6 @@
                        env.bumpTimeUse("Init", initTime);
                }
 
-               // fetch templates from enwiki by default.
-               if (argv.wgScriptPath) {
-                       env.conf.wiki.wgScriptPath = argv.wgScriptPath;
-               }
-
                // Enable wikitext scrubbing
                env.scrubWikitext = argv.scrubWikitext;
 
diff --git a/bin/parserTests.js b/bin/parserTests.js
index 01e2ac5..e855292 100755
--- a/bin/parserTests.js
+++ b/bin/parserTests.js
@@ -1443,7 +1443,7 @@
                wikiConf.fakeTimestamp = 123;
                wikiConf.timezoneOffset = 0; // force utc for parsertests
                wikiConf.server = 'http://example.org';
-               wikiConf.wgScriptPath = '/';
+               wikiConf.scriptpath = '/';
                wikiConf.script = '/index.php';
                wikiConf.articlePath = '/wiki/$1';
                wikiConf.interwikiMap.clear();
diff --git a/lib/wt2html/tt/ParserFunctions.js 
b/lib/wt2html/tt/ParserFunctions.js
index ca86752..4304d2a 100644
--- a/lib/wt2html/tt/ParserFunctions.js
+++ b/lib/wt2html/tt/ParserFunctions.js
@@ -704,8 +704,6 @@
                        }
                        cb({
                                tokens: [
-                                       // FIXME! Figure out correct prefix to 
use
-                                       // this.env.conf.wiki.wgScriptPath +
                                        env.conf.wiki.script + '?title=' +
                                        env.normalizedTitleKey(target) + '&' +
                                        expandedArgs.join('&'),
@@ -845,7 +843,7 @@
        cb({ tokens: [this.env.page.name || ''] });
 };
 ParserFunctions.prototype.pf_scriptpath = function(token, frame, cb, args) {
-       cb({ tokens: [this.env.conf.wiki.wgScriptPath] });
+       cb({ tokens: [this.env.conf.wiki.scriptpath] });
 };
 ParserFunctions.prototype.pf_server = function(token, frame, cb, args) {
        var dataAttribs = Util.clone(token.dataAttribs);

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2c8771d25c27581b8ef160f77fb206e254b8f1ef
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Arlolra <[email protected]>

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

Reply via email to