mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-14 18:48:21 -07:00
Minor improvements (#1125)
* Minor improvements * Updated * Updated * Updated * Update viewtopic.php * Update viewtopic.php * Update viewtopic.php * Update CHANGELOG.md
This commit is contained in:
parent
3a7d7bd097
commit
9ebe3a4d5c
17 changed files with 58 additions and 59 deletions
|
@ -135,9 +135,9 @@ switch ($this->request['type']) {
|
|||
$this->ajax_die(sprintf($lang['MAX_SMILIES_PER_POST'], $bb_cfg['max_smilies']));
|
||||
}
|
||||
}
|
||||
DB()->query("UPDATE " . BB_POSTS_TEXT . " SET post_text = '" . DB()->escape($text) . "' WHERE post_id = $post_id");
|
||||
DB()->query("UPDATE " . BB_POSTS_TEXT . " SET post_text = '" . DB()->escape($text) . "' WHERE post_id = $post_id LIMIT 1");
|
||||
if ($post['topic_last_post_id'] != $post['post_id'] && $userdata['user_id'] == $post['poster_id']) {
|
||||
DB()->query("UPDATE " . BB_POSTS . " SET post_edit_time = '" . TIMENOW . "', post_edit_count = post_edit_count + 1 WHERE post_id = $post_id");
|
||||
DB()->query("UPDATE " . BB_POSTS . " SET post_edit_time = '" . TIMENOW . "', post_edit_count = post_edit_count + 1 WHERE post_id = $post_id LIMIT 1");
|
||||
}
|
||||
$s_text = str_replace('\n', "\n", $text);
|
||||
$s_topic_title = str_replace('\n', "\n", $post['topic_title']);
|
||||
|
@ -229,7 +229,7 @@ switch ($this->request['type']) {
|
|||
$message = prepare_message($message);
|
||||
|
||||
// Flood control
|
||||
$where_sql = (IS_GUEST) ? "p.poster_ip = '" . USER_IP . "'" : "p.poster_id = {$userdata['user_id']}";
|
||||
$where_sql = IS_GUEST ? "p.poster_ip = '" . USER_IP . "'" : "p.poster_id = {$userdata['user_id']}";
|
||||
|
||||
$sql = "SELECT MAX(p.post_time) AS last_post_time FROM " . BB_POSTS . " p WHERE $where_sql";
|
||||
if ($row = DB()->fetch_row($sql) and $row['last_post_time']) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue