Zeile 279 | Zeile 279 |
---|
if($limit > 0 || $dblimit > 0) {
|
if($limit > 0 || $dblimit > 0) {
|
$is_moderator = is_moderator($post['fid'], "", $post['uid']);
| if(isset($post['fid'])) { $fid = $post['fid']; } else { $fid = 0; } if(isset($post['uid'])) { $uid = $post['uid']; } else { $uid = 0; }
$is_moderator = is_moderator($fid, "", $uid);
|
// Consider minimum in user defined and database limit other than 0 if($limit > 0 && $dblimit > 0)
|
// Consider minimum in user defined and database limit other than 0 if($limit > 0 && $dblimit > 0)
|
{
| {
|
$limit = $is_moderator ? $dblimit : min($limit, $dblimit); } else { $limit = max($limit, $dblimit);
|
$limit = $is_moderator ? $dblimit : min($limit, $dblimit); } else { $limit = max($limit, $dblimit);
|
}
| }
|
if(strlen($post['message']) > $limit && (!$is_moderator || $limit == $dblimit)) {
| if(strlen($post['message']) > $limit && (!$is_moderator || $limit == $dblimit)) {
|
Zeile 303 | Zeile 320 |
---|
}
if(!$mybb->settings['mycodemessagelength'])
|
}
if(!$mybb->settings['mycodemessagelength'])
|
{
| {
|
// Check to see of the text is full of MyCode require_once MYBB_ROOT."inc/class_parser.php"; $parser = new postParser;
| // Check to see of the text is full of MyCode require_once MYBB_ROOT."inc/class_parser.php"; $parser = new postParser;
|
Zeile 350 | Zeile 367 |
---|
{ global $mybb;
|
{ global $mybb;
|
$post = &$this->data;
| $post = &$this->data;
|
// Check if post flooding is enabled within MyBB or if the admin override option is specified. if($mybb->settings['postfloodcheck'] == 1 && $post['uid'] != 0 && $this->admin_override == false) {
| // Check if post flooding is enabled within MyBB or if the admin override option is specified. if($mybb->settings['postfloodcheck'] == 1 && $post['uid'] != 0 && $this->admin_override == false) {
|
Zeile 373 | Zeile 390 |
---|
$this->set_error("post_flooding_one_second"); } else
|
$this->set_error("post_flooding_one_second"); } else
|
{
| {
|
$this->set_error("post_flooding", array($time_to_wait)); } return false;
| $this->set_error("post_flooding", array($time_to_wait)); } return false;
|
Zeile 396 | Zeile 413 |
---|
// Are we starting a new thread? if(empty($post['tid']))
|
// Are we starting a new thread? if(empty($post['tid']))
|
{ return true;
| { return true;
|
}
// Are we even turned on?
| }
// Are we even turned on?
|
Zeile 423 | Zeile 440 |
---|
$thread = $db->fetch_array($query);
// Check to see if the same author has posted within the merge post time limit
|
$thread = $db->fetch_array($query);
// Check to see if the same author has posted within the merge post time limit
|
if(((int)$mybb->settings['postmergemins'] != 0 && trim($mybb->settings['postmergemins']) != "") && (TIME_NOW-$thread['lastpost']) > ((int)$mybb->settings['postmergemins']*60))
| if( !$thread || ( ((int)$mybb->settings['postmergemins'] != 0 && trim($mybb->settings['postmergemins']) != "") && (TIME_NOW-$thread['lastpost']) > ((int)$mybb->settings['postmergemins']*60) ) )
|
{ return true; }
| { return true; }
|
Zeile 456 | Zeile 478 |
---|
return false; }
|
return false; }
|
if($post['uid'])
| if(!empty($post['uid']))
|
{ $user_check = "uid='".$post['uid']."'"; }
| { $user_check = "uid='".$post['uid']."'"; }
|
Zeile 467 | Zeile 489 |
---|
$query = $db->simple_select("posts", "pid,message,visible", "{$user_check} AND tid='".$post['tid']."' AND dateline='".$thread['lastpost']."'", array('order_by' => 'pid', 'order_dir' => 'DESC', 'limit' => 1)); return $db->fetch_array($query);
|
$query = $db->simple_select("posts", "pid,message,visible", "{$user_check} AND tid='".$post['tid']."' AND dateline='".$thread['lastpost']."'", array('order_by' => 'pid', 'order_dir' => 'DESC', 'limit' => 1)); return $db->fetch_array($query);
|
}
/**
| }
/**
|
* Verifies the image count. * * @return boolean True when valid, false when not valid. */ function verify_image_count()
|
* Verifies the image count. * * @return boolean True when valid, false when not valid. */ function verify_image_count()
|
{ global $mybb, $db;
$post = &$this->data;
| { global $mybb, $db;
$post = &$this->data;
if(isset($post['uid'])) { $uid = $post['uid']; } else { $uid = null; }
|
// Get the permissions of the user who is making this post or thread
|
// Get the permissions of the user who is making this post or thread
|
$permissions = user_permissions($post['uid']);
| $permissions = user_permissions($uid);
|
// Fetch the forum this post is being made in
|
// Fetch the forum this post is being made in
|
if(!$post['fid'])
| if(empty($post['fid']))
|
{ $query = $db->simple_select('posts', 'fid', "pid = '{$post['pid']}'"); $post['fid'] = $db->fetch_field($query, 'fid');
|
{ $query = $db->simple_select('posts', 'fid', "pid = '{$post['pid']}'"); $post['fid'] = $db->fetch_field($query, 'fid');
|
}
| }
|
$forum = get_forum($post['fid']);
// Check if this post contains more images than the forum allows
| $forum = get_forum($post['fid']);
// Check if this post contains more images than the forum allows
|
Zeile 505 | Zeile 536 |
---|
"allow_videocode" => $forum['allowvideocode'], "filter_badwords" => 1 );
|
"allow_videocode" => $forum['allowvideocode'], "filter_badwords" => 1 );
|
if($post['options']['disablesmilies'] != 1) {
| if(empty($post['options']['disablesmilies'])) {
|
$parser_options['allow_smilies'] = $forum['allowsmilies'];
|
$parser_options['allow_smilies'] = $forum['allowsmilies'];
|
}
| }
|
else { $parser_options['allow_smilies'] = 0;
|
else { $parser_options['allow_smilies'] = 0;
|
}
| }
|
$image_check = $parser->parse_message($post['message'], $parser_options);
// And count the number of image tags in the message.
| $image_check = $parser->parse_message($post['message'], $parser_options);
// And count the number of image tags in the message.
|
Zeile 540 | Zeile 571 |
---|
global $mybb, $db;
$post = &$this->data;
|
global $mybb, $db;
$post = &$this->data;
|
| if(isset($post['uid'])) { $uid = $post['uid']; } else { $uid = null; }
|
// Get the permissions of the user who is making this post or thread
|
// Get the permissions of the user who is making this post or thread
|
$permissions = user_permissions($post['uid']);
| $permissions = user_permissions($uid);
|
// Check if this post contains more videos than the forum allows if((!isset($post['savedraft']) || $post['savedraft'] != 1) && $mybb->settings['maxpostvideos'] != 0 && $permissions['cancp'] != 1)
| // Check if this post contains more videos than the forum allows if((!isset($post['savedraft']) || $post['savedraft'] != 1) && $mybb->settings['maxpostvideos'] != 0 && $permissions['cancp'] != 1)
|
Zeile 591 | Zeile 631 |
---|
$options = array( "limit_start" => 0, "limit" => 1,
|
$options = array( "limit_start" => 0, "limit" => 1,
|
"order_by" => "dateline", "order_dir" => "asc"
| "order_by" => "dateline, pid",
|
); $query = $db->simple_select("posts", "pid", "tid='{$post['tid']}'", $options); $reply_to = $db->fetch_array($query);
| ); $query = $db->simple_select("posts", "pid", "tid='{$post['tid']}'", $options); $reply_to = $db->fetch_array($query);
|
Zeile 782 | Zeile 821 |
---|
$options = array( "limit" => 1, "limit_start" => 0,
|
$options = array( "limit" => 1, "limit_start" => 0,
|
"order_by" => "dateline", "order_dir" => "asc"
| "order_by" => "dateline, pid",
|
); $query = $db->simple_select("posts", "pid", "tid='".$post['tid']."'", $options); $first_check = $db->fetch_array($query);
| ); $query = $db->simple_select("posts", "pid", "tid='".$post['tid']."'", $options); $first_check = $db->fetch_array($query);
|
Zeile 853 | Zeile 891 |
---|
/** * Insert a post into the database.
|
/** * Insert a post into the database.
|
*
| *
|
* @return array Array of new post details, pid and visibility. */ function insert_post()
| * @return array Array of new post details, pid and visibility. */ function insert_post()
|
Zeile 1004 | Zeile 1042 |
---|
// Only combine if they are both invisible (mod queue'd forum) or both visible if($double_post !== true && $double_post['visible'] == $visible) {
|
// Only combine if they are both invisible (mod queue'd forum) or both visible if($double_post !== true && $double_post['visible'] == $visible) {
|
$this->pid = $double_post['pid'];
| $_message = $post['message'];
|
$post['message'] = $double_post['message'] .= "\n".$mybb->settings['postmergesep']."\n".$post['message'];
|
$post['message'] = $double_post['message'] .= "\n".$mybb->settings['postmergesep']."\n".$post['message'];
|
$update_query = array( "message" => $db->escape_string($double_post['message']) ); $update_query['edituid'] = (int)$post['uid']; $update_query['edittime'] = TIME_NOW; $db->update_query("posts", $update_query, "pid='".$double_post['pid']."'");
if($draft_check) { $db->delete_query("posts", "pid='".$post['pid']."'"); }
if($post['posthash'])
| if ($this->validate_post())
|
{
|
{
|
// Assign any uploaded attachments with the specific posthash to the merged post. $post['posthash'] = $db->escape_string($post['posthash']);
$query = $db->simple_select("attachments", "COUNT(aid) AS attachmentcount", "pid='0' AND visible='1' AND posthash='{$post['posthash']}'"); $attachmentcount = $db->fetch_field($query, "attachmentcount");
if($attachmentcount > 0)
| $this->pid = $double_post['pid']; $update_query = array( "message" => $db->escape_string($double_post['message']) ); $update_query['edituid'] = (int)$post['uid']; $update_query['edittime'] = TIME_NOW; $db->update_query("posts", $update_query, "pid='".$double_post['pid']."'"); if($draft_check)
|
{
|
{
|
// Update forum count update_thread_counters($post['tid'], array('attachmentcount' => "+{$attachmentcount}"));
| $db->delete_query("posts", "pid='".$post['pid']."'"); } if($post['posthash']) { // Assign any uploaded attachments with the specific posthash to the merged post. $post['posthash'] = $db->escape_string($post['posthash']); $query = $db->simple_select("attachments", "COUNT(aid) AS attachmentcount", "pid='0' AND visible='1' AND posthash='{$post['posthash']}'"); $attachmentcount = $db->fetch_field($query, "attachmentcount"); if($attachmentcount > 0) { // Update forum count update_thread_counters($post['tid'], array('attachmentcount' => "+{$attachmentcount}")); } $attachmentassign = array( "pid" => $double_post['pid'], "posthash" => '' ); $db->update_query("attachments", $attachmentassign, "posthash='{$post['posthash']}' AND pid='0'");
|
}
|
}
|
$attachmentassign = array(
| // Return the post's pid and whether or not it is visible. $this->return_values = array(
|
"pid" => $double_post['pid'],
|
"pid" => $double_post['pid'],
|
"posthash" => ''
| "visible" => $visible, "merge" => true
|
);
|
);
|
$db->update_query("attachments", $attachmentassign, "posthash='{$post['posthash']}' AND pid='0'");
| $plugins->run_hooks("datahandler_post_insert_merge", $this); return $this->return_values;
|
}
|
}
|
// Return the post's pid and whether or not it is visible. $this->return_values = array( "pid" => $double_post['pid'], "visible" => $visible, "merge" => true );
$plugins->run_hooks("datahandler_post_insert_merge", $this);
return $this->return_values; } }
| else { $post['message'] = $_message; } } }
|
if($visible == 1) { $now = TIME_NOW;
| if($visible == 1) { $now = TIME_NOW;
|
Zeile 1067 | Zeile 1115 |
---|
}
$db->update_query("users", $update_array, "uid='{$post['uid']}'", 1, true);
|
}
$db->update_query("users", $update_array, "uid='{$post['uid']}'", 1, true);
|
}
// Are we updating a post which is already a draft? Perhaps changing it into a visible post?
| }
// Are we updating a post which is already a draft? Perhaps changing it into a visible post?
|
if($draft_check) { // Update a post that is a draft
| if($draft_check) { // Update a post that is a draft
|
Zeile 1139 | Zeile 1187 |
---|
$parser_options = array( 'me_username' => $post['username'], 'filter_badwords' => 1
|
$parser_options = array( 'me_username' => $post['username'], 'filter_badwords' => 1
|
);
| );
|
$excerpt = $parser->text_parse_message($post['message'], $parser_options); $excerpt = my_substr($excerpt, 0, $mybb->settings['subscribeexcerpt']).$lang->emailbit_viewthread;
|
$excerpt = $parser->text_parse_message($post['message'], $parser_options); $excerpt = my_substr($excerpt, 0, $mybb->settings['subscribeexcerpt']).$lang->emailbit_viewthread;
|
|
|
// Fetch any users subscribed to this thread receiving instant notification and queue up their subscription notices $query = $db->query(" SELECT u.username, u.email, u.uid, u.language, u.loginkey, u.salt, u.regdate, s.notification
| // Fetch any users subscribed to this thread receiving instant notification and queue up their subscription notices $query = $db->query(" SELECT u.username, u.email, u.uid, u.language, u.loginkey, u.salt, u.regdate, s.notification
|
Zeile 1162 | Zeile 1210 |
---|
while($subscribedmember = $db->fetch_array($query)) {
|
while($subscribedmember = $db->fetch_array($query)) {
|
if($done_users[$subscribedmember['uid']]) { continue;
| if(isset($done_users[$subscribedmember['uid']])) { continue;
|
}
$args['users'][$subscribedmember['uid']] = (int)$subscribedmember['uid'];
| }
$args['users'][$subscribedmember['uid']] = (int)$subscribedmember['uid'];
|
Zeile 1177 | Zeile 1225 |
---|
continue; }
|
continue; }
|
if($thread['uid'] != $subscribedmember['uid'] && $forumpermissions['canonlyviewownthread'] == 1 && !is_moderator($thread['fid'], "", $subscribedmember['uid']))
| if($thread['uid'] != $subscribedmember['uid'] && $forumpermissions['canonlyviewownthreads'] == 1 && !is_moderator($thread['fid'], "", $subscribedmember['uid']))
|
{ // User isn't a moderator or the author of the thread... continue;
| { // User isn't a moderator or the author of the thread... continue;
|
Zeile 1211 | Zeile 1259 |
---|
} } else
|
} } else
|
{
| {
|
if(($subscribedmember['notification'] == 1 && !isset($langcache[$uselang]['emailsubject_subscription'])) || !isset($langcache[$uselang]['guest'])) { $userlang = new MyLanguage;
| if(($subscribedmember['notification'] == 1 && !isset($langcache[$uselang]['emailsubject_subscription'])) || !isset($langcache[$uselang]['guest'])) { $userlang = new MyLanguage;
|
Zeile 1259 | Zeile 1307 |
---|
$queued_email = 1; } elseif($subscribedmember['notification'] == 2)
|
$queued_email = 1; } elseif($subscribedmember['notification'] == 2)
|
{
| {
|
$pm = array( 'subject' => array('pmsubject_subscription', $subject), 'message' => array('pm_subscription', $subscribedmember['username'], $post['username'], $subject, $excerpt, $mybb->settings['bburl'], str_replace("&", "&", get_thread_link($thread['tid'], 0, "newpost")), $thread['tid']),
| $pm = array( 'subject' => array('pmsubject_subscription', $subject), 'message' => array('pm_subscription', $subscribedmember['username'], $post['username'], $subject, $excerpt, $mybb->settings['bburl'], str_replace("&", "&", get_thread_link($thread['tid'], 0, "newpost")), $thread['tid']),
|
Zeile 1267 | Zeile 1315 |
---|
'language' => $subscribedmember['language'], 'language_file' => 'messages' );
|
'language' => $subscribedmember['language'], 'language_file' => 'messages' );
|
| // Workaround for eliminating PHP warnings in PHP 8. Ref: https://github.com/mybb/mybb/issues/4630#issuecomment-1369144163 $pm['sender']['uid'] = -1;
|
send_pm($pm, -1, true); } }
| send_pm($pm, -1, true); } }
|
Zeile 1305 | Zeile 1355 |
---|
// Update the unapproved posts count for the current forum $thread_update = array('replies' => '+1'); update_forum_counters($post['fid'], array("deletedposts" => "+1"));
|
// Update the unapproved posts count for the current forum $thread_update = array('replies' => '+1'); update_forum_counters($post['fid'], array("deletedposts" => "+1"));
|
}
| }
|
// Update last poster if($visible == 1 && $thread['visible'] != 1) {
| // Update last poster if($visible == 1 && $thread['visible'] != 1) {
|
Zeile 1376 | Zeile 1426 |
---|
if($this->method == "insert" || array_key_exists('dateline', $thread)) { $this->verify_dateline();
|
if($this->method == "insert" || array_key_exists('dateline', $thread)) { $this->verify_dateline();
|
}
| }
|
if($this->method == "insert" || array_key_exists('icon', $thread)) { $this->verify_post_icon();
| if($this->method == "insert" || array_key_exists('icon', $thread)) { $this->verify_post_icon();
|
Zeile 1424 | Zeile 1474 |
---|
$thread = &$this->data;
// Fetch the forum this thread is being made in
|
$thread = &$this->data;
// Fetch the forum this thread is being made in
|
$forum = get_forum($thread['fid']);
| $query = $db->simple_select("forums", "*", "fid='{$thread['fid']}'"); $forum = $db->fetch_array($query);
|
// This thread is being saved as a draft. if($thread['savedraft'])
|
// This thread is being saved as a draft. if($thread['savedraft'])
|
{
| {
|
$visible = -2; }
|
$visible = -2; }
|
|
|
// Thread is being made now and we have a bit to do. else {
| // Thread is being made now and we have a bit to do. else {
|
Zeile 1440 | Zeile 1491 |
---|
if($forumpermissions['modthreads'] == 1 && !is_moderator($thread['fid'], "", $thread['uid'])) { $visible = 0;
|
if($forumpermissions['modthreads'] == 1 && !is_moderator($thread['fid'], "", $thread['uid'])) { $visible = 0;
|
}
| }
|
else { $visible = 1;
| else { $visible = 1;
|
Zeile 1448 | Zeile 1499 |
---|
// Are posts from this user being moderated? Change visibility if($mybb->user['uid'] == $thread['uid'] && $mybb->user['moderateposts'] == 1)
|
// Are posts from this user being moderated? Change visibility if($mybb->user['uid'] == $thread['uid'] && $mybb->user['moderateposts'] == 1)
|
{
| {
|
$visible = 0; } }
| $visible = 0; } }
|
Zeile 1486 | Zeile 1537 |
---|
$plugins->run_hooks("datahandler_post_insert_thread", $this);
$db->update_query("threads", $this->thread_insert_data, "tid='{$thread['tid']}'");
|
$plugins->run_hooks("datahandler_post_insert_thread", $this);
$db->update_query("threads", $this->thread_insert_data, "tid='{$thread['tid']}'");
|
$this->post_insert_data = array( "subject" => $db->escape_string($thread['subject']), "icon" => (int)$thread['icon'], "username" => $db->escape_string($thread['username']), "dateline" => (int)$thread['dateline'], "message" => $db->escape_string($thread['message']), "ipaddress" => $db->escape_binary(my_inet_pton(get_ip())), "includesig" => $thread['options']['signature'],
| $this->post_insert_data = array( "subject" => $db->escape_string($thread['subject']), "icon" => (int)$thread['icon'], "username" => $db->escape_string($thread['username']), "dateline" => (int)$thread['dateline'], "message" => $db->escape_string($thread['message']), "ipaddress" => $db->escape_binary(my_inet_pton(get_ip())), "includesig" => $thread['options']['signature'],
|
"smilieoff" => $thread['options']['disablesmilies'], "visible" => $visible );
| "smilieoff" => $thread['options']['disablesmilies'], "visible" => $visible );
|
Zeile 1634 | Zeile 1685 |
---|
if(!empty($update_query)) { $db->update_query("users", $update_query, "uid='{$thread['uid']}'", 1, true);
|
if(!empty($update_query)) { $db->update_query("users", $update_query, "uid='{$thread['uid']}'", 1, true);
|
} }
if(!isset($forum['lastpost'])) { $forum['lastpost'] = 0;
| }
|
}
$done_users = array();
| }
$done_users = array();
|
Zeile 1668 | Zeile 1714 |
---|
"); while($subscribedmember = $db->fetch_array($query)) {
|
"); while($subscribedmember = $db->fetch_array($query)) {
|
if($done_users[$subscribedmember['uid']])
| if(!empty($done_users[$subscribedmember['uid']]))
|
{ continue; }
| { continue; }
|
Zeile 1709 | Zeile 1755 |
---|
if(!$thread['uid'] && !$thread['username']) { $thread['username'] = htmlspecialchars_uni($lang->guest);
|
if(!$thread['uid'] && !$thread['username']) { $thread['username'] = htmlspecialchars_uni($lang->guest);
|
} }
| } }
|
else { if(!isset($langcache[$uselang]['emailsubject_forumsubscription']))
| else { if(!isset($langcache[$uselang]['emailsubject_forumsubscription']))
|
Zeile 1757 | Zeile 1803 |
---|
}
// Assign any uploaded attachments with the specific posthash to the newly created post.
|
}
// Assign any uploaded attachments with the specific posthash to the newly created post.
|
if($thread['posthash'])
| if(!empty($thread['posthash']))
|
{ $thread['posthash'] = $db->escape_string($thread['posthash']); $attachmentassign = array(
| { $thread['posthash'] = $db->escape_string($thread['posthash']); $attachmentassign = array(
|
Zeile 1781 | Zeile 1827 |
---|
$query = $db->simple_select("attachments", "COUNT(aid) AS attachmentcount", "pid='{$this->pid}' AND visible='1'"); $attachmentcount = $db->fetch_field($query, "attachmentcount"); if($attachmentcount > 0)
|
$query = $db->simple_select("attachments", "COUNT(aid) AS attachmentcount", "pid='{$this->pid}' AND visible='1'"); $attachmentcount = $db->fetch_field($query, "attachmentcount"); if($attachmentcount > 0)
|
{
| {
|
update_thread_counters($this->tid, array("attachmentcount" => "+{$attachmentcount}")); }
| update_thread_counters($this->tid, array("attachmentcount" => "+{$attachmentcount}")); }
|
Zeile 1823 | Zeile 1869 |
---|
$existing_post = get_post($post['pid']); $post['tid'] = $existing_post['tid']; $post['fid'] = $existing_post['fid'];
|
$existing_post = get_post($post['pid']); $post['tid'] = $existing_post['tid']; $post['fid'] = $existing_post['fid'];
|
| if(isset($post['uid'])) { $uid = $post['uid']; } else { $uid = 0; }
|
$forum = get_forum($post['fid']);
|
$forum = get_forum($post['fid']);
|
$forumpermissions = forum_permissions($post['fid'], $post['uid']);
| $forumpermissions = forum_permissions($post['fid'], $uid);
|
// Decide on the visibility of this post.
|
// Decide on the visibility of this post.
|
$ismod = is_moderator($post['fid'], "", $post['uid']);
| $ismod = is_moderator($post['fid'], "", $uid); $editor_ismod = is_moderator($post['fid'], "", $mybb->user['uid']);
|
// Keep visibility for unapproved and deleted posts
|
// Keep visibility for unapproved and deleted posts
|
if($existing_post['visible'] == 0)
| if($existing_post['visible'] == 0 && !$editor_ismod)
|
{ $visible = 0; }
| { $visible = 0; }
|
Zeile 1839 | Zeile 1895 |
---|
{ $visible = -1; }
|
{ $visible = -1; }
|
elseif($forumpermissions['mod_edit_posts'] == 1 && !$ismod)
| elseif($forumpermissions['mod_edit_posts'] == 1 && !$ismod && !$editor_ismod)
|
{ $visible = 0; require_once MYBB_ROOT."inc/class_moderation.php";
| { $visible = 0; require_once MYBB_ROOT."inc/class_moderation.php";
|
Zeile 1910 | Zeile 1966 |
---|
{ $this->post_update_data['editreason'] = $db->escape_string(trim($post['editreason'])); }
|
{ $this->post_update_data['editreason'] = $db->escape_string(trim($post['editreason'])); }
|
elseif($post['editreason'] == '')
| elseif(empty($post['editreason']))
|
{ $this->post_update_data['editreason'] = ''; }
| { $this->post_update_data['editreason'] = ''; }
|
Zeile 1944 | Zeile 2000 |
---|
$db->update_query("posts", $this->post_update_data, "pid='".(int)$post['pid']."'");
// Automatic subscription to the thread
|
$db->update_query("posts", $this->post_update_data, "pid='".(int)$post['pid']."'");
// Automatic subscription to the thread
|
if($post['options']['subscriptionmethod'] != "" && $post['uid'] > 0)
| if($post && !empty($post['options']['subscriptionmethod']) && $uid > 0)
|
{ switch($post['options']['subscriptionmethod']) {
| { switch($post['options']['subscriptionmethod']) {
|
Zeile 1962 | Zeile 2018 |
---|
} else {
|
} else {
|
$db->delete_query("threadsubscriptions", "uid='".(int)$post['uid']."' AND tid='".(int)$post['tid']."'");
| $db->delete_query("threadsubscriptions", "uid='".(int)$uid."' AND tid='".(int)$post['tid']."'");
|
}
update_forum_lastpost($post['fid']);
| }
update_forum_lastpost($post['fid']);
|