[task/code-sniffer] Replace spaces with tabs.

PHPBB3-11980
This commit is contained in:
Andreas Fischer 2013-10-30 13:37:29 +01:00
parent 7aa8f6461f
commit ef1f991837
17 changed files with 143 additions and 139 deletions

View file

@ -26,7 +26,6 @@ class captcha
var $width = 360; var $width = 360;
var $height = 96; var $height = 96;
/** /**
* Create the image containing $code with a seed of $seed * Create the image containing $code with a seed of $seed
*/ */
@ -69,7 +68,6 @@ class captcha
$bounding_boxes[$i] = $box; $bounding_boxes[$i] = $box;
} }
// Redistribute leftover x-space // Redistribute leftover x-space
$offset = array(); $offset = array();
for ($i = 0; $i < $code_len; ++$i) for ($i = 0; $i < $code_len; ++$i)
@ -99,12 +97,12 @@ class captcha
imagedashedline($img, mt_rand($x -3, $x + 3), mt_rand(0, 4), mt_rand($x -3, $x + 3), mt_rand($this->height - 5, $this->height), $current_colour); imagedashedline($img, mt_rand($x -3, $x + 3), mt_rand(0, 4), mt_rand($x -3, $x + 3), mt_rand($this->height - 5, $this->height), $current_colour);
} }
} }
if ($config['captcha_gd_wave'] && ($config['captcha_gd_y_grid'] || $config['captcha_gd_y_grid'])) if ($config['captcha_gd_wave'] && ($config['captcha_gd_y_grid'] || $config['captcha_gd_y_grid']))
{ {
$this->wave($img); $this->wave($img);
} }
if ($config['captcha_gd_3d_noise']) if ($config['captcha_gd_3d_noise'])
{ {
$xoffset = mt_rand(0,9); $xoffset = mt_rand(0,9);
@ -127,6 +125,7 @@ class captcha
$xoffset += $dimm[2]; $xoffset += $dimm[2];
} }
} }
$xoffset = 5; $xoffset = 5;
for ($i = 0; $i < $code_len; ++$i) for ($i = 0; $i < $code_len; ++$i)
{ {
@ -137,14 +136,17 @@ class captcha
$characters[$i]->drawchar($sizes[$i], $xoffset, $yoffset, $img, $colour->get_resource('background'), $scheme); $characters[$i]->drawchar($sizes[$i], $xoffset, $yoffset, $img, $colour->get_resource('background'), $scheme);
$xoffset += $dimm[2]; $xoffset += $dimm[2];
} }
if ($config['captcha_gd_wave']) if ($config['captcha_gd_wave'])
{ {
$this->wave($img); $this->wave($img);
} }
if ($config['captcha_gd_foreground_noise']) if ($config['captcha_gd_foreground_noise'])
{ {
$this->noise_line($img, 0, 0, $this->width, $this->height, $colour->get_resource('background'), $scheme, $bg_colours); $this->noise_line($img, 0, 0, $this->width, $this->height, $colour->get_resource('background'), $scheme, $bg_colours);
} }
// Send image // Send image
header('Content-Type: image/png'); header('Content-Type: image/png');
header('Cache-control: no-cache, no-store'); header('Cache-control: no-cache, no-store');
@ -233,7 +235,6 @@ class captcha
imagesetthickness($img, 1); imagesetthickness($img, 1);
} }
function captcha_noise_bg_bitmaps() function captcha_noise_bg_bitmaps()
{ {
return array( return array(

View file

@ -254,8 +254,7 @@ class manager
SET notification_read = 1 SET notification_read = 1
WHERE notification_time <= " . (int) $time . WHERE notification_time <= " . (int) $time .
(($notification_type_name !== false) ? ' AND ' . (($notification_type_name !== false) ? ' AND ' .
(is_array($notification_type_name) ? $this->db->sql_in_set('notification_type_id', $this->get_notification_type_ids($notification_type_name)) : 'notification_type_id = ' . $this->get_notification_type_id($notification_type_name)) (is_array($notification_type_name) ? $this->db->sql_in_set('notification_type_id', $this->get_notification_type_ids($notification_type_name)) : 'notification_type_id = ' . $this->get_notification_type_id($notification_type_name)) : '') .
: '') .
(($user_id !== false) ? ' AND ' . (is_array($user_id) ? $this->db->sql_in_set('user_id', $user_id) : 'user_id = ' . (int) $user_id) : '') . (($user_id !== false) ? ' AND ' . (is_array($user_id) ? $this->db->sql_in_set('user_id', $user_id) : 'user_id = ' . (int) $user_id) : '') .
(($item_id !== false) ? ' AND ' . (is_array($item_id) ? $this->db->sql_in_set('item_id', $item_id) : 'item_id = ' . (int) $item_id) : ''); (($item_id !== false) ? ' AND ' . (is_array($item_id) ? $this->db->sql_in_set('item_id', $item_id) : 'item_id = ' . (int) $item_id) : '');
$this->db->sql_query($sql); $this->db->sql_query($sql);
@ -277,8 +276,7 @@ class manager
SET notification_read = 1 SET notification_read = 1
WHERE notification_time <= " . (int) $time . WHERE notification_time <= " . (int) $time .
(($notification_type_name !== false) ? ' AND ' . (($notification_type_name !== false) ? ' AND ' .
(is_array($notification_type_name) ? $this->db->sql_in_set('notification_type_id', $this->get_notification_type_ids($notification_type_name)) : 'notification_type_id = ' . $this->get_notification_type_id($notification_type_name)) (is_array($notification_type_name) ? $this->db->sql_in_set('notification_type_id', $this->get_notification_type_ids($notification_type_name)) : 'notification_type_id = ' . $this->get_notification_type_id($notification_type_name)) : '') .
: '') .
(($item_parent_id !== false) ? ' AND ' . (is_array($item_parent_id) ? $this->db->sql_in_set('item_parent_id', $item_parent_id) : 'item_parent_id = ' . (int) $item_parent_id) : '') . (($item_parent_id !== false) ? ' AND ' . (is_array($item_parent_id) ? $this->db->sql_in_set('item_parent_id', $item_parent_id) : 'item_parent_id = ' . (int) $item_parent_id) : '') .
(($user_id !== false) ? ' AND ' . (is_array($user_id) ? $this->db->sql_in_set('user_id', $user_id) : 'user_id = ' . (int) $user_id) : ''); (($user_id !== false) ? ' AND ' . (is_array($user_id) ? $this->db->sql_in_set('user_id', $user_id) : 'user_id = ' . (int) $user_id) : '');
$this->db->sql_query($sql); $this->db->sql_query($sql);

View file

@ -817,8 +817,13 @@ if ($submit || $preview || $refresh)
// We make sure nobody else made exactly the same change // We make sure nobody else made exactly the same change
// we're about to submit by also checking $message_md5 != $post_data['post_checksum'] // we're about to submit by also checking $message_md5 != $post_data['post_checksum']
if (($edit_post_message_checksum !== '' && $edit_post_message_checksum != $post_data['post_checksum'] && $message_md5 != $post_data['post_checksum']) if ($edit_post_message_checksum !== '' &&
|| ($edit_post_subject_checksum !== '' && $edit_post_subject_checksum != $post_data['post_subject_md5'] && md5($post_data['post_subject']) != $post_data['post_subject_md5'])) $edit_post_message_checksum != $post_data['post_checksum'] &&
$message_md5 != $post_data['post_checksum']
||
$edit_post_subject_checksum !== '' &&
$edit_post_subject_checksum != $post_data['post_subject_md5'] &&
md5($post_data['post_subject']) != $post_data['post_subject_md5'])
{ {
if (topic_review($topic_id, $forum_id, 'post_review_edit', $post_id)) if (topic_review($topic_id, $forum_id, 'post_review_edit', $post_id))
{ {