OPEN
includes/functions_post
FIND
// Check to see if there's a new post while the user is posting
global $_POST;
global $lang;
if(!empty($_POST['post_time']) && ($mode == 'reply' || $mode == 'quote'))
{
global $topic_id;
$last_post_time = intval($_POST['post_time']);
if(isset($topic_id) && $last_post_time)
{
$sql = "SELECT post_time FROM " . POSTS_TABLE . " WHERE topic_id = $topic_id ORDER BY post_time DESC LIMIT 0, 1";
global $db;
if(($result = $db->sql_query($sql)) !== false)
{
if( $row = $db->sql_fetchrow($result) )
{
$last_post_time2 = $row['post_time'];
if($last_post_time2 > $last_post_time)
{
$error_msg .= (empty($error_msg) ? '' : '<br />') . $lang['Warn_new_post'];
}
}
$db->sql_freeresult($result);
}
}
}
global $_POST;
global $lang;
if(!empty($_POST['post_time']) && ($mode == 'reply' || $mode == 'quote'))
{
global $topic_id;
$last_post_time = intval($_POST['post_time']);
if(isset($topic_id) && $last_post_time)
{
$sql = "SELECT post_time FROM " . POSTS_TABLE . " WHERE topic_id = $topic_id ORDER BY post_time DESC LIMIT 0, 1";
global $db;
if(($result = $db->sql_query($sql)) !== false)
{
if( $row = $db->sql_fetchrow($result) )
{
$last_post_time2 = $row['post_time'];
if($last_post_time2 > $last_post_time)
{
$error_msg .= (empty($error_msg) ? '' : '<br />') . $lang['Warn_new_post'];
}
}
$db->sql_freeresult($result);
}
}
}
REPLACE WITH
/*
// Check to see if there's a new post while the user is posting
global $_POST;
global $lang;
if(!empty($_POST['post_time']) && ($mode == 'reply' || $mode == 'quote'))
{
global $topic_id;
$last_post_time = intval($_POST['post_time']);
if(isset($topic_id) && $last_post_time)
{
$sql = "SELECT post_time FROM " . POSTS_TABLE . " WHERE topic_id = $topic_id ORDER BY post_time DESC LIMIT 0, 1";
global $db;
if(($result = $db->sql_query($sql)) !== false)
{
if( $row = $db->sql_fetchrow($result) )
{
$last_post_time2 = $row['post_time'];
if($last_post_time2 > $last_post_time)
{
$error_msg .= (empty($error_msg) ? '' : '<br />') . $lang['Warn_new_post'];
}
}
$db->sql_freeresult($result);
}
}
}
*/
// Check to see if there's a new post while the user is posting
global $_POST;
global $lang;
if(!empty($_POST['post_time']) && ($mode == 'reply' || $mode == 'quote'))
{
global $topic_id;
$last_post_time = intval($_POST['post_time']);
if(isset($topic_id) && $last_post_time)
{
$sql = "SELECT post_time FROM " . POSTS_TABLE . " WHERE topic_id = $topic_id ORDER BY post_time DESC LIMIT 0, 1";
global $db;
if(($result = $db->sql_query($sql)) !== false)
{
if( $row = $db->sql_fetchrow($result) )
{
$last_post_time2 = $row['post_time'];
if($last_post_time2 > $last_post_time)
{
$error_msg .= (empty($error_msg) ? '' : '<br />') . $lang['Warn_new_post'];
}
}
$db->sql_freeresult($result);
}
}
}
*/