Skip to content

Commit

Permalink
[ticket/10271] Reduced calls to $ in phpbb.ajaxify.
Browse files Browse the repository at this point in the history
  • Loading branch information
callumacrae authored and p committed Dec 24, 2011
1 parent 14ae4c7 commit 3256185
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions phpBB/assets/javascript/core.js
Expand Up @@ -226,9 +226,9 @@ phpbb.ajaxify = function(options, refresh, callback) {
}

selector.click(function() {
var action, data, path, that = this;
var action, data, path, that = this, $this = $(this);

if ($(this).data('ajax') == false)
if ($this.data('ajax') == false)
{
return true;
}
Expand Down Expand Up @@ -303,8 +303,8 @@ phpbb.ajaxify = function(options, refresh, callback) {
if (is_form)
{
action = /action\[([a-z]+)\]/.exec(this.name);
data = decodeURI($(this).closest('form').serialize());
path = $(this).closest('form').attr('action').replace('&', '&');
data = decodeURI($this.closest('form').serialize());
path = $this.closest('form').attr('action').replace('&', '&');

if (action)
{
Expand All @@ -316,7 +316,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($this.parents('form'), action, data))
{
return true;
}
Expand All @@ -325,7 +325,7 @@ phpbb.ajaxify = function(options, refresh, callback) {
}
else
{
if (run_exception && options.exception($(this)))
if (run_exception && options.exception($this))
{
return true;
}
Expand Down

0 comments on commit 3256185

Please sign in to comment.