Mr. Stradivarius has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/224630

Change subject: Remove undocumented parseQueryString parameters
......................................................................

Remove undocumented parseQueryString parameters

The i and j parameters to mw.uri.parseQueryString are not documented,
and aren't used anywhere else in Scribunto. They are also overwritten
by default values near the start of the function, so their use seems to
be limited. It's probably best just to remove them.

Change-Id: I11241e0f6be262d199f272381706e03c60dbf5f1
---
M engines/LuaCommon/lualib/mw.uri.lua
1 file changed, 4 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Scribunto 
refs/changes/30/224630/1

diff --git a/engines/LuaCommon/lualib/mw.uri.lua 
b/engines/LuaCommon/lualib/mw.uri.lua
index 184ec4a..6eef2f0 100644
--- a/engines/LuaCommon/lualib/mw.uri.lua
+++ b/engines/LuaCommon/lualib/mw.uri.lua
@@ -261,14 +261,12 @@
        return ret
 end
 
-function uri.parseQueryString( s, i, j )
+function uri.parseQueryString( s )
        checkType( 'parseQueryString', 1, s, 'string' )
-       checkType( 'parseQueryString', 2, i, 'number', true )
-       checkType( 'parseQueryString', 3, j, 'number', true )
 
-       s = string.gsub( string.sub( s, i or 1, j or -1 ), '%+', ' ' )
-       i = 1
-       j = string.len( s )
+       s = string.gsub( s, '%+', ' ' )
+       local i = 1
+       local j = string.len( s )
 
        local qs = makeQueryTable()
        if string.sub( s, i, 1 ) == '?' then

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I11241e0f6be262d199f272381706e03c60dbf5f1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Scribunto
Gerrit-Branch: master
Gerrit-Owner: Mr. Stradivarius <[email protected]>

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

Reply via email to