diff options
author | Callum Macrae <callum@lynxphp.com> | 2011-08-24 11:31:17 +0100 |
---|---|---|
committer | Igor Wiedler <igor@wiedler.ch> | 2012-03-31 02:09:14 +0200 |
commit | fa2c06e2ca0b4010c6f6bc85110987c3a6e8a017 (patch) | |
tree | 0ea8b5df780d7a663956bf746ed5f7b858918734 | |
parent | 082c5c5b328e10e3fa99beaff31c4bc28f73bbd0 (diff) | |
download | forums-fa2c06e2ca0b4010c6f6bc85110987c3a6e8a017.tar forums-fa2c06e2ca0b4010c6f6bc85110987c3a6e8a017.tar.gz forums-fa2c06e2ca0b4010c6f6bc85110987c3a6e8a017.tar.bz2 forums-fa2c06e2ca0b4010c6f6bc85110987c3a6e8a017.tar.xz forums-fa2c06e2ca0b4010c6f6bc85110987c3a6e8a017.zip |
[ticket/10271] Moved $.querystring to phpbb.parse_querystring.
PHPBB3-10271
-rw-r--r-- | phpBB/styles/script.js | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/phpBB/styles/script.js b/phpBB/styles/script.js index f1fe2b9a10..ceaf92672c 100644 --- a/phpBB/styles/script.js +++ b/phpBB/styles/script.js @@ -3,18 +3,6 @@ var phpbb = {}; (function($) { //avoid conflicts with other libraries -$.querystring = function(string) { - var end = {}, i; - - string = string.split('&'); - for (i = 0; i < string.length; i++) - { - end[string[i].split('=')[0]] = decodeURIComponent(string[i].split('=')[1]); - } - return end; -} - - var dark = $('<div id="darkenwrapper"><div id="darken"> </div></div>'); $('body').append(dark); @@ -160,6 +148,23 @@ phpbb.confirm = function(msg, callback, fadedark) { return div; } +/** + * Turn a querystring into an array. + * + * @argument string string The querystring to parse. + * @returns array The array created. + */ +phpbb.parse_querystring = function(string) { + var end = {}, i; + + string = string.split('&'); + for (i = 0; i < string.length; i++) + { + end[string[i].split('=')[0]] = decodeURIComponent(string[i].split('=')[1]); + } + return end; +} + /** * Makes a link use AJAX instead of loading an entire page. @@ -382,7 +387,7 @@ $('[data-ajax]').each(function() { phpbb.ajaxify({ selector: '#quickmodform', exception: function(el, act, data) { - var d = $.querystring(data).action; + var d = phpbb.parse_querystring(data).action; if (d == 'make_normal') { return !(el.find('select option[value="make_global"]').length); |