Merge pull request #2101 from nickvergessen/ticket/10763

[ticket/10763] Do not call non-static functions statically
This commit is contained in:
Nathan Guse 2014-03-10 20:51:20 -05:00
commit 23ea833425
4 changed files with 29 additions and 25 deletions

View file

@ -2226,8 +2226,8 @@ class colour_manager
return $this->random_colour($colour, $mode);
}
$rgb = colour_manager::model_convert($colour, $mode, 'rgb');
$store = ($this->mode == 'rgb') ? $rgb : colour_manager::model_convert($colour, $mode, $this->mode);
$rgb = $this->model_convert($colour, $mode, 'rgb');
$store = ($this->mode == 'rgb') ? $rgb : $this->model_convert($colour, $mode, $this->mode);
$resource = imagecolorallocate($this->img, $rgb[0], $rgb[1], $rgb[2]);
$this->colours[$resource] = $store;
@ -2345,7 +2345,7 @@ class colour_manager
$resource = $pre;
}
$colour = colour_manager::model_convert($this->colours[$resource], $this->mode, $mode);
$colour = $this->model_convert($this->colours[$resource], $this->mode, $mode);
$results = ($include_original) ? array($resource) : array();
$colour2 = $colour3 = $colour4 = $colour;
$colour2[0] += 150;
@ -2380,7 +2380,7 @@ class colour_manager
$resource = $pre;
}
$colour = colour_manager::model_convert($this->colours[$resource], $this->mode, $mode);
$colour = $this->model_convert($this->colours[$resource], $this->mode, $mode);
$results = array();
if ($include_original)
@ -2418,11 +2418,11 @@ class colour_manager
switch ($from_model)
{
case 'ahsv':
return colour_manager::ah2h($colour);
return $this->ah2h($colour);
break;
case 'rgb':
return colour_manager::rgb2hsv($colour);
return $this->rgb2hsv($colour);
break;
}
break;
@ -2432,11 +2432,11 @@ class colour_manager
switch ($from_model)
{
case 'hsv':
return colour_manager::h2ah($colour);
return $this->h2ah($colour);
break;
case 'rgb':
return colour_manager::h2ah(colour_manager::rgb2hsv($colour));
return $this->h2ah($this->rgb2hsv($colour));
break;
}
break;
@ -2445,11 +2445,11 @@ class colour_manager
switch ($from_model)
{
case 'hsv':
return colour_manager::hsv2rgb($colour);
return $this->hsv2rgb($colour);
break;
case 'ahsv':
return colour_manager::hsv2rgb(colour_manager::ah2h($colour));
return $this->hsv2rgb($this->ah2h($colour));
break;
}
break;
@ -2462,7 +2462,7 @@ class colour_manager
*/
function hsv2rgb($hsv)
{
colour_manager::normalize_hue($hsv[0]);
$this->normalize_hue($hsv[0]);
$h = $hsv[0];
$s = min(1, max(0, $hsv[1] / 100));
@ -2554,7 +2554,7 @@ class colour_manager
break;
}
}
colour_manager::normalize_hue($h);
$this->normalize_hue($h);
return array($h, $s * 100, $v * 100);
}
@ -2578,10 +2578,10 @@ class colour_manager
{
if (is_array($ahue))
{
$ahue[0] = colour_manager::ah2h($ahue[0]);
$ahue[0] = $this->ah2h($ahue[0]);
return $ahue;
}
colour_manager::normalize_hue($ahue);
$this->normalize_hue($ahue);
// blue through red is already ok
if ($ahue >= 240)
@ -2612,10 +2612,10 @@ class colour_manager
{
if (is_array($hue))
{
$hue[0] = colour_manager::h2ah($hue[0]);
$hue[0] = $this->h2ah($hue[0]);
return $hue;
}
colour_manager::normalize_hue($hue);
$this->normalize_hue($hue);
// blue through red is already ok
if ($hue >= 240)

View file

@ -768,13 +768,15 @@ class queue
if (!$this->jabber->connect())
{
messenger::error('JABBER', $user->lang['ERR_JAB_CONNECT']);
$messenger = new messenger();
$messenger->error('JABBER', $user->lang['ERR_JAB_CONNECT']);
continue 2;
}
if (!$this->jabber->login())
{
messenger::error('JABBER', $user->lang['ERR_JAB_AUTH']);
$messenger = new messenger();
$messenger->error('JABBER', $user->lang['ERR_JAB_AUTH']);
continue 2;
}
@ -807,7 +809,8 @@ class queue
if (!$result)
{
messenger::error('EMAIL', $err_msg);
$messenger = new messenger();
$messenger->error('EMAIL', $err_msg);
continue 2;
}
break;
@ -817,7 +820,8 @@ class queue
{
if ($this->jabber->send_message($address, $msg, $subject) === false)
{
messenger::error('JABBER', $this->jabber->get_log());
$messenger = new messenger();
$messenger->error('JABBER', $this->jabber->get_log());
continue 3;
}
}

View file

@ -279,7 +279,7 @@ class ftp extends transfer
}
// Init some needed values
transfer::transfer();
$this->transfer();
return;
}
@ -533,7 +533,7 @@ class ftp_fsock extends transfer
}
// Init some needed values
transfer::transfer();
$this->transfer();
return;
}

View file

@ -528,16 +528,16 @@ class content_visibility
if (!$force_update_all && $original_topic_data['topic_delete_time'] && $original_topic_data['topic_visibility'] == ITEM_DELETED && $visibility == ITEM_APPROVED)
{
// If we're restoring a topic we only restore posts, that were soft deleted through the topic soft deletion.
self::set_post_visibility($visibility, false, $topic_id, $forum_id, $user_id, $time, '', true, true, $original_topic_data['topic_visibility'], $original_topic_data['topic_delete_time']);
$this->set_post_visibility($visibility, false, $topic_id, $forum_id, $user_id, $time, '', true, true, $original_topic_data['topic_visibility'], $original_topic_data['topic_delete_time']);
}
else if (!$force_update_all && $original_topic_data['topic_visibility'] == ITEM_APPROVED && $visibility == ITEM_DELETED)
{
// If we're soft deleting a topic we only approved posts are soft deleted.
self::set_post_visibility($visibility, false, $topic_id, $forum_id, $user_id, $time, '', true, true, $original_topic_data['topic_visibility']);
$this->set_post_visibility($visibility, false, $topic_id, $forum_id, $user_id, $time, '', true, true, $original_topic_data['topic_visibility']);
}
else
{
self::set_post_visibility($visibility, false, $topic_id, $forum_id, $user_id, $time, '', true, true);
$this->set_post_visibility($visibility, false, $topic_id, $forum_id, $user_id, $time, '', true, true);
}
return $data;