[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

@ -763,8 +763,8 @@ class acp_board
global $user, $config; global $user, $config;
$act_ary = array( $act_ary = array(
'ACC_DISABLE' => USER_ACTIVATION_DISABLE, 'ACC_DISABLE' => USER_ACTIVATION_DISABLE,
'ACC_NONE' => USER_ACTIVATION_NONE, 'ACC_NONE' => USER_ACTIVATION_NONE,
); );
if ($config['email_enable']) if ($config['email_enable'])
{ {

View file

@ -480,7 +480,7 @@ class acp_icons
$icons_updated++; $icons_updated++;
} }
} }
} }
$cache->destroy('_icons'); $cache->destroy('_icons');

View file

@ -647,8 +647,8 @@ class acp_users
while ($row = $db->sql_fetchrow($result)) while ($row = $db->sql_fetchrow($result))
{ {
if ($topic_id_ary[$row['topic_id']][ITEM_APPROVED] == $row['topic_posts_approved'] if ($topic_id_ary[$row['topic_id']][ITEM_APPROVED] == $row['topic_posts_approved']
&& $topic_id_ary[$row['topic_id']][ITEM_UNAPPROVED] == $row['topic_posts_unapproved'] && $topic_id_ary[$row['topic_id']][ITEM_UNAPPROVED] == $row['topic_posts_unapproved']
&& $topic_id_ary[$row['topic_id']][ITEM_DELETED] == $row['topic_posts_softdeleted']) && $topic_id_ary[$row['topic_id']][ITEM_DELETED] == $row['topic_posts_softdeleted'])
{ {
$move_topic_ary[] = $row['topic_id']; $move_topic_ary[] = $row['topic_id'];
} }

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);
@ -122,11 +120,12 @@ class captcha
$dimm = $bounding_boxes[$i]; $dimm = $bounding_boxes[$i];
$xoffset += ($offset[$i] - $dimm[0]); $xoffset += ($offset[$i] - $dimm[0]);
$yoffset = mt_rand(-$dimm[1], $this->height - $dimm[3]); $yoffset = mt_rand(-$dimm[1], $this->height - $dimm[3]);
$noise[$i]->drawchar($sizes[$i], $xoffset, $yoffset, $img, $colour->get_resource('background'), $scheme); $noise[$i]->drawchar($sizes[$i], $xoffset, $yoffset, $img, $colour->get_resource('background'), $scheme);
$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(
@ -292,7 +293,7 @@ class captcha
), ),
)); ));
} }
/** /**
* Return bitmaps * Return bitmaps
*/ */

View file

@ -86,7 +86,7 @@ class captcha
$fontcolors[0] = imagecolorallocate($img, mt_rand(0, 120), mt_rand(0, 120), mt_rand(0, 120)); $fontcolors[0] = imagecolorallocate($img, mt_rand(0, 120), mt_rand(0, 120), mt_rand(0, 120));
$colors = array(); $colors = array();
$minr = mt_rand(20, 30); $minr = mt_rand(20, 30);
$ming = mt_rand(20, 30); $ming = mt_rand(20, 30);

View file

@ -823,7 +823,7 @@ function get_avatar_dim($src, $axis, $func = false, $arg1 = false, $arg2 = false
break; break;
case AVATAR_REMOTE: case AVATAR_REMOTE:
// see notes on this functions usage and (hopefully) model $func to avoid this accordingly // see notes on this functions usage and (hopefully) model $func to avoid this accordingly
return get_remote_avatar_dim($src, $axis); return get_remote_avatar_dim($src, $axis);
break; break;
@ -1297,7 +1297,7 @@ function restore_config($schema)
$src_ary = $schema['array_name']; $src_ary = $schema['array_name'];
$config_value = (isset($convert_config[$src_ary][$src])) ? $convert_config[$src_ary][$src] : ''; $config_value = (isset($convert_config[$src_ary][$src])) ? $convert_config[$src_ary][$src] : '';
} }
} }
if ($config_value !== '') if ($config_value !== '')
{ {

View file

@ -269,7 +269,7 @@ function view_folder($id, $mode, $folder_id, $folder)
// There is the chance that all recipients of the message got deleted. To avoid creating // There is the chance that all recipients of the message got deleted. To avoid creating
// exports without recipients, we add a bogus "undisclosed recipient". // exports without recipients, we add a bogus "undisclosed recipient".
if (!(isset($address[$message_id]['g']) && sizeof($address[$message_id]['g'])) && if (!(isset($address[$message_id]['g']) && sizeof($address[$message_id]['g'])) &&
!(isset($address[$message_id]['u']) && sizeof($address[$message_id]['u']))) !(isset($address[$message_id]['u']) && sizeof($address[$message_id]['u'])))
{ {
$address[$message_id]['u'] = array(); $address[$message_id]['u'] = array();
$address[$message_id]['u']['to'] = array(); $address[$message_id]['u']['to'] = array();

View file

@ -47,7 +47,7 @@ class class_loader
* @param \phpbb\cache\driver\driver_interface $cache An implementation of the phpBB cache interface. * @param \phpbb\cache\driver\driver_interface $cache An implementation of the phpBB cache interface.
*/ */
public function __construct($namespace, $path, $php_ext = 'php', \phpbb\cache\driver\driver_interface $cache = null) public function __construct($namespace, $path, $php_ext = 'php', \phpbb\cache\driver\driver_interface $cache = null)
{ {
if ($namespace[0] !== '\\') if ($namespace[0] !== '\\')
{ {
$namespace = '\\' . $namespace; $namespace = '\\' . $namespace;

View file

@ -74,8 +74,8 @@ class datetime extends \DateTime
* finally check that relative dates are supported by the language pack * finally check that relative dates are supported by the language pack
*/ */
if ($delta <= 3600 && $delta > -60 && if ($delta <= 3600 && $delta > -60 &&
($delta >= -5 || (($now_ts / 60) % 60) == (($timestamp / 60) % 60)) ($delta >= -5 || (($now_ts / 60) % 60) == (($timestamp / 60) % 60))
&& isset($this->user->lang['datetime']['AGO'])) && isset($this->user->lang['datetime']['AGO']))
{ {
return $this->user->lang(array('datetime', 'AGO'), max(0, (int) floor($delta / 60))); return $this->user->lang(array('datetime', 'AGO'), max(0, (int) floor($delta / 60)));
} }

View file

@ -13,50 +13,50 @@ use Symfony\Component\EventDispatcher\Event;
class data extends Event implements \ArrayAccess class data extends Event implements \ArrayAccess
{ {
private $data; private $data;
public function __construct(array $data = array()) public function __construct(array $data = array())
{ {
$this->set_data($data); $this->set_data($data);
} }
public function set_data(array $data = array()) public function set_data(array $data = array())
{ {
$this->data = $data; $this->data = $data;
} }
public function get_data() public function get_data()
{ {
return $this->data; return $this->data;
} }
/** /**
* Returns data filtered to only include specified keys. * Returns data filtered to only include specified keys.
* *
* This effectively discards any keys added to data by hooks. * This effectively discards any keys added to data by hooks.
*/ */
public function get_data_filtered($keys) public function get_data_filtered($keys)
{ {
return array_intersect_key($this->data, array_flip($keys)); return array_intersect_key($this->data, array_flip($keys));
} }
public function offsetExists($offset) public function offsetExists($offset)
{ {
return isset($this->data[$offset]); return isset($this->data[$offset]);
} }
public function offsetGet($offset) public function offsetGet($offset)
{ {
return isset($this->data[$offset]) ? $this->data[$offset] : null; return isset($this->data[$offset]) ? $this->data[$offset] : null;
} }
public function offsetSet($offset, $value) public function offsetSet($offset, $value)
{ {
$this->data[$offset] = $value; $this->data[$offset] = $value;
} }
public function offsetUnset($offset) public function offsetUnset($offset)
{ {
unset($this->data[$offset]); unset($this->data[$offset]);
} }
} }

View file

@ -139,7 +139,7 @@ class metadata_manager
if (!file_exists($this->metadata_file)) if (!file_exists($this->metadata_file))
{ {
throw new \phpbb\extension\exception('The required file does not exist: ' . $this->metadata_file); throw new \phpbb\extension\exception('The required file does not exist: ' . $this->metadata_file);
} }
} }
@ -158,12 +158,12 @@ class metadata_manager
{ {
if (!($file_contents = file_get_contents($this->metadata_file))) if (!($file_contents = file_get_contents($this->metadata_file)))
{ {
throw new \phpbb\extension\exception('file_get_contents failed on ' . $this->metadata_file); throw new \phpbb\extension\exception('file_get_contents failed on ' . $this->metadata_file);
} }
if (($metadata = json_decode($file_contents, true)) === null) if (($metadata = json_decode($file_contents, true)) === null)
{ {
throw new \phpbb\extension\exception('json_decode failed on ' . $this->metadata_file); throw new \phpbb\extension\exception('json_decode failed on ' . $this->metadata_file);
} }
$this->metadata = $metadata; $this->metadata = $metadata;
@ -191,50 +191,50 @@ class metadata_manager
* @return Bool True if valid, throws an exception if invalid * @return Bool True if valid, throws an exception if invalid
*/ */
public function validate($name = 'display') public function validate($name = 'display')
{ {
// Basic fields // Basic fields
$fields = array( $fields = array(
'name' => '#^[a-zA-Z0-9_\x7f-\xff]{2,}/[a-zA-Z0-9_\x7f-\xff]{2,}$#', 'name' => '#^[a-zA-Z0-9_\x7f-\xff]{2,}/[a-zA-Z0-9_\x7f-\xff]{2,}$#',
'type' => '#^phpbb-extension$#', 'type' => '#^phpbb-extension$#',
'licence' => '#.+#', 'licence' => '#.+#',
'version' => '#.+#', 'version' => '#.+#',
); );
switch ($name) switch ($name)
{ {
case 'all': case 'all':
$this->validate('display'); $this->validate('display');
$this->validate_enable(); $this->validate_enable();
break; break;
case 'display': case 'display':
foreach ($fields as $field => $data) foreach ($fields as $field => $data)
{ {
$this->validate($field); $this->validate($field);
} }
$this->validate_authors(); $this->validate_authors();
break; break;
default: default:
if (isset($fields[$name])) if (isset($fields[$name]))
{ {
if (!isset($this->metadata[$name])) if (!isset($this->metadata[$name]))
{ {
throw new \phpbb\extension\exception("Required meta field '$name' has not been set."); throw new \phpbb\extension\exception("Required meta field '$name' has not been set.");
} }
if (!preg_match($fields[$name], $this->metadata[$name])) if (!preg_match($fields[$name], $this->metadata[$name]))
{ {
throw new \phpbb\extension\exception("Meta field '$name' is invalid."); throw new \phpbb\extension\exception("Meta field '$name' is invalid.");
} }
} }
break; break;
} }
return true; return true;
} }
/** /**
* Validates the contents of the authors field * Validates the contents of the authors field
@ -245,14 +245,14 @@ class metadata_manager
{ {
if (empty($this->metadata['authors'])) if (empty($this->metadata['authors']))
{ {
throw new \phpbb\extension\exception("Required meta field 'authors' has not been set."); throw new \phpbb\extension\exception("Required meta field 'authors' has not been set.");
} }
foreach ($this->metadata['authors'] as $author) foreach ($this->metadata['authors'] as $author)
{ {
if (!isset($author['name'])) if (!isset($author['name']))
{ {
throw new \phpbb\extension\exception("Required meta field 'author name' has not been set."); throw new \phpbb\extension\exception("Required meta field 'author name' has not been set.");
} }
} }

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

@ -1180,8 +1180,8 @@ class fulltext_native extends \phpbb\search\base
* we know that it will also be lower than CJK ranges * we know that it will also be lower than CJK ranges
*/ */
if ((strncmp($word, UTF8_HANGUL_FIRST, 3) < 0 || strncmp($word, UTF8_HANGUL_LAST, 3) > 0) if ((strncmp($word, UTF8_HANGUL_FIRST, 3) < 0 || strncmp($word, UTF8_HANGUL_LAST, 3) > 0)
&& (strncmp($word, UTF8_CJK_FIRST, 3) < 0 || strncmp($word, UTF8_CJK_LAST, 3) > 0) && (strncmp($word, UTF8_CJK_FIRST, 3) < 0 || strncmp($word, UTF8_CJK_LAST, 3) > 0)
&& (strncmp($word, UTF8_CJK_B_FIRST, 4) < 0 || strncmp($word, UTF8_CJK_B_LAST, 4) > 0)) && (strncmp($word, UTF8_CJK_B_FIRST, 4) < 0 || strncmp($word, UTF8_CJK_B_LAST, 4) > 0))
{ {
$word = strtok(' '); $word = strtok(' ');
continue; continue;
@ -1675,8 +1675,8 @@ class fulltext_native extends \phpbb\search\base
$pos += $utf_len; $pos += $utf_len;
if (($utf_char >= UTF8_HANGUL_FIRST && $utf_char <= UTF8_HANGUL_LAST) if (($utf_char >= UTF8_HANGUL_FIRST && $utf_char <= UTF8_HANGUL_LAST)
|| ($utf_char >= UTF8_CJK_FIRST && $utf_char <= UTF8_CJK_LAST) || ($utf_char >= UTF8_CJK_FIRST && $utf_char <= UTF8_CJK_LAST)
|| ($utf_char >= UTF8_CJK_B_FIRST && $utf_char <= UTF8_CJK_B_LAST)) || ($utf_char >= UTF8_CJK_B_FIRST && $utf_char <= UTF8_CJK_B_LAST))
{ {
/** /**
* All characters within these ranges are valid * All characters within these ranges are valid

View file

@ -40,11 +40,11 @@ class extension extends \Twig_Extension
return 'phpbb'; return 'phpbb';
} }
/** /**
* Returns the token parser instance to add to the existing list. * Returns the token parser instance to add to the existing list.
* *
* @return array An array of Twig_TokenParser instances * @return array An array of Twig_TokenParser instances
*/ */
public function getTokenParsers() public function getTokenParsers()
{ {
return array( return array(
@ -58,36 +58,36 @@ class extension extends \Twig_Extension
); );
} }
/** /**
* Returns a list of filters to add to the existing list. * Returns a list of filters to add to the existing list.
* *
* @return array An array of filters * @return array An array of filters
*/ */
public function getFilters() public function getFilters()
{ {
return array( return array(
new \Twig_SimpleFilter('subset', array($this, 'loop_subset'), array('needs_environment' => true)), new \Twig_SimpleFilter('subset', array($this, 'loop_subset'), array('needs_environment' => true)),
new \Twig_SimpleFilter('addslashes', 'addslashes'), new \Twig_SimpleFilter('addslashes', 'addslashes'),
); );
} }
/** /**
* Returns a list of global functions to add to the existing list. * Returns a list of global functions to add to the existing list.
* *
* @return array An array of global functions * @return array An array of global functions
*/ */
public function getFunctions() public function getFunctions()
{ {
return array( return array(
new \Twig_SimpleFunction('lang', array($this, 'lang')), new \Twig_SimpleFunction('lang', array($this, 'lang')),
); );
} }
/** /**
* Returns a list of operators to add to the existing list. * Returns a list of operators to add to the existing list.
* *
* @return array An array of operators * @return array An array of operators
*/ */
public function getOperators() public function getOperators()
{ {
return array( return array(
@ -118,19 +118,19 @@ class extension extends \Twig_Extension
'mod' => array('precedence' => 60, 'class' => 'Twig_Node_Expression_Binary_Mod', 'associativity' => \Twig_ExpressionParser::OPERATOR_LEFT), 'mod' => array('precedence' => 60, 'class' => 'Twig_Node_Expression_Binary_Mod', 'associativity' => \Twig_ExpressionParser::OPERATOR_LEFT),
), ),
); );
} }
/** /**
* Grabs a subset of a loop * Grabs a subset of a loop
* *
* @param Twig_Environment $env A Twig_Environment instance * @param Twig_Environment $env A Twig_Environment instance
* @param mixed $item A variable * @param mixed $item A variable
* @param integer $start Start of the subset * @param integer $start Start of the subset
* @param integer $end End of the subset * @param integer $end End of the subset
* @param Boolean $preserveKeys Whether to preserve key or not (when the input is an array) * @param Boolean $preserveKeys Whether to preserve key or not (when the input is an array)
* *
* @return mixed The sliced variable * @return mixed The sliced variable
*/ */
function loop_subset(\Twig_Environment $env, $item, $start, $end = null, $preserveKeys = false) function loop_subset(\Twig_Environment $env, $item, $start, $end = null, $preserveKeys = false)
{ {
// We do almost the same thing as Twig's slice (array_slice), except when $end is positive // We do almost the same thing as Twig's slice (array_slice), except when $end is positive

View file

@ -49,10 +49,10 @@ class event extends \Twig_Node
// templates on page load rather than at compile. This is // templates on page load rather than at compile. This is
// slower, but makes developing extensions easier (no need to // slower, but makes developing extensions easier (no need to
// purge the cache when a new event template file is added) // purge the cache when a new event template file is added)
$compiler $compiler
->write("if (\$this->env->getLoader()->exists('@{$ext_namespace}/{$location}.html')) {\n") ->write("if (\$this->env->getLoader()->exists('@{$ext_namespace}/{$location}.html')) {\n")
->indent() ->indent()
; ;
} }
if (defined('DEBUG') || $this->environment->getLoader()->exists('@' . $ext_namespace . '/' . $location . '.html')) if (defined('DEBUG') || $this->environment->getLoader()->exists('@' . $ext_namespace . '/' . $location . '.html'))
@ -71,7 +71,7 @@ class event extends \Twig_Node
{ {
$compiler $compiler
->outdent() ->outdent()
->write("}\n\n") ->write("}\n\n")
; ;
} }
} }

View file

@ -45,5 +45,5 @@ class php extends \Twig_TokenParser
public function getTag() public function getTag()
{ {
return 'PHP'; return 'PHP';
} }
} }

View file

@ -381,7 +381,7 @@ if ($mode == 'delete' || $mode == 'soft_delete')
if ($mode == 'bump') if ($mode == 'bump')
{ {
if ($bump_time = bump_topic_allowed($forum_id, $post_data['topic_bumped'], $post_data['topic_last_post_time'], $post_data['topic_poster'], $post_data['topic_last_poster_id']) if ($bump_time = bump_topic_allowed($forum_id, $post_data['topic_bumped'], $post_data['topic_last_post_time'], $post_data['topic_poster'], $post_data['topic_last_poster_id'])
&& check_link_hash(request_var('hash', ''), "topic_{$post_data['topic_id']}")) && check_link_hash(request_var('hash', ''), "topic_{$post_data['topic_id']}"))
{ {
$meta_url = phpbb_bump_topic($forum_id, $topic_id, $post_data, $current_time); $meta_url = phpbb_bump_topic($forum_id, $topic_id, $post_data, $current_time);
meta_refresh(3, $meta_url); meta_refresh(3, $meta_url);
@ -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))
{ {