aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/assets
diff options
context:
space:
mode:
authorCallum Macrae <callum@lynxphp.com>2011-10-22 17:18:09 +0100
committerIgor Wiedler <igor@wiedler.ch>2012-03-31 02:09:21 +0200
commit03d4ae20d1fc98b43edfdf26ae2a2379e52b3182 (patch)
treeb5ce17b71441dc59faefda217a36655c48babf39 /phpBB/assets
parente0d6814772ce8f7d7f27ecaba66b5ee15b8f9e29 (diff)
downloadforums-03d4ae20d1fc98b43edfdf26ae2a2379e52b3182.tar
forums-03d4ae20d1fc98b43edfdf26ae2a2379e52b3182.tar.gz
forums-03d4ae20d1fc98b43edfdf26ae2a2379e52b3182.tar.bz2
forums-03d4ae20d1fc98b43edfdf26ae2a2379e52b3182.tar.xz
forums-03d4ae20d1fc98b43edfdf26ae2a2379e52b3182.zip
[ticket/10271] Started using .call for javascript callbacks.
Previously, they were just being called by appending parentheses and functions. Now, they're being called and the element is being set as the context instead of a parameter. It's a lot cleaner. PHPBB3-10271
Diffstat (limited to 'phpBB/assets')
-rw-r--r--phpBB/assets/javascript/core.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/phpBB/assets/javascript/core.js b/phpBB/assets/javascript/core.js
index a1447af491..a8ccad863f 100644
--- a/phpBB/assets/javascript/core.js
+++ b/phpBB/assets/javascript/core.js
@@ -265,7 +265,7 @@ phpbb.ajaxify = function(options, refresh, callback) {
if (typeof phpbb.ajax_callbacks[callback] === 'function')
{
- phpbb.ajax_callbacks[callback](that, res, (is_form) ? act : null);
+ phpbb.ajax_callbacks[callback].call(that, res, (is_form) ? act : null);
}
if (res.REFRESH_DATA)
@@ -322,7 +322,7 @@ phpbb.ajaxify = function(options, refresh, callback) {
data += '&' + this.name + '=' + this.value;
}
- if (run_exception && options.exception($this.parents('form'), action, data))
+ if (run_exception && options.exception.call($this.parents('form')[0], action, data))
{
return true;
}
@@ -331,7 +331,7 @@ phpbb.ajaxify = function(options, refresh, callback) {
}
else
{
- if (run_exception && options.exception($this))
+ if (run_exception && options.exception.call(this))
{
return true;
}