Zeile 138 | Zeile 138 |
---|
$post['username'] = $user['username']; } // if the uid is 0 verify the username
|
$post['username'] = $user['username']; } // if the uid is 0 verify the username
|
else if($post['uid'] == 0 && $post['username'] != $lang->guest)
| else if($post['uid'] == 0 && $post['username'] != '')
|
{ // Set up user handler require_once MYBB_ROOT."inc/datahandlers/user.php";
| { // Set up user handler require_once MYBB_ROOT."inc/datahandlers/user.php";
|
Zeile 153 | Zeile 153 |
---|
$this->errors = array_merge($this->errors, $userhandler->get_errors()); return false; }
|
$this->errors = array_merge($this->errors, $userhandler->get_errors()); return false; }
|
|
|
if($userhandler->verify_username_exists()) { // username is in use $this->errors = array_merge($this->errors, $userhandler->get_errors()); return false; }
|
if($userhandler->verify_username_exists()) { // username is in use $this->errors = array_merge($this->errors, $userhandler->get_errors()); return false; }
|
}
// After all of this, if we still don't have a username, force the username as "Guest" (Note, this is not translatable as it is always a fallback) if(!$post['username']) { $post['username'] = "Guest";
| |
}
return true;
| }
return true;
|
Zeile 184 | Zeile 178 |
---|
$subject = trim_blank_chrs($subject);
if($this->method == "update" && $post['pid'])
|
$subject = trim_blank_chrs($subject);
if($this->method == "update" && $post['pid'])
|
{
| {
|
// If this is the first post there needs to be a subject, else make it the default one. if(my_strlen($subject) == 0 && $this->first_post)
|
// If this is the first post there needs to be a subject, else make it the default one. if(my_strlen($subject) == 0 && $this->first_post)
|
{
| {
|
$this->set_error("firstpost_no_subject"); return false;
|
$this->set_error("firstpost_no_subject"); return false;
|
}
| }
|
elseif(my_strlen($subject) == 0)
|
elseif(my_strlen($subject) == 0)
|
{ $thread = get_thread($post['tid']); $subject = "RE: ".$thread['subject']; } }
| { $thread = get_thread($post['tid']); $subject = "RE: ".$thread['subject']; } }
|
// This is a new post else if($this->action == "post")
| // This is a new post else if($this->action == "post")
|
Zeile 209 | Zeile 203 |
---|
}
// This is a new thread and we require that a subject is present.
|
}
// This is a new thread and we require that a subject is present.
|
else
| else
|
{ if(my_strlen($subject) == 0) { $this->set_error("missing_subject"); return false;
|
{ if(my_strlen($subject) == 0) { $this->set_error("missing_subject"); return false;
|
} }
| } }
|
// If post is reply and begins with "RE: ", remove 4 from subject length. $subject_length = my_strlen($subject); if($this->action == "post")
| // If post is reply and begins with "RE: ", remove 4 from subject length. $subject_length = my_strlen($subject); if($this->action == "post")
|
Zeile 233 | Zeile 227 |
---|
{ // Subject is too long $this->set_error('subject_too_long', my_strlen($subject));
|
{ // Subject is too long $this->set_error('subject_too_long', my_strlen($subject));
|
return false; }
| return false; }
|
// Subject is valid - return true. return true; }
| // Subject is valid - return true. return true; }
|
Zeile 285 | Zeile 279 |
---|
{ $this->set_error("message_too_short", array($mybb->settings['minmessagelength'])); return false;
|
{ $this->set_error("message_too_short", array($mybb->settings['minmessagelength'])); return false;
|
}
| }
|
} else if(my_strlen($post['message']) < $mybb->settings['minmessagelength'] && $mybb->settings['minmessagelength'] > 0 && !is_moderator($post['fid'], "", $post['uid'])) {
| } else if(my_strlen($post['message']) < $mybb->settings['minmessagelength'] && $mybb->settings['minmessagelength'] > 0 && !is_moderator($post['fid'], "", $post['uid'])) {
|
Zeile 293 | Zeile 287 |
---|
return false; } }
|
return false; } }
|
return true; }
| return true; }
|
/** * Verifies the specified post options are correct. *
| /** * Verifies the specified post options are correct. *
|
Zeile 304 | Zeile 298 |
---|
function verify_options() { $options = &$this->data['options'];
|
function verify_options() { $options = &$this->data['options'];
|
|
|
// Verify yes/no options. $this->verify_yesno_option($options, 'signature', 0);
|
// Verify yes/no options. $this->verify_yesno_option($options, 'signature', 0);
|
$this->verify_yesno_option($options, 'disablesmilies', 0);
return true; }
| $this->verify_yesno_option($options, 'disablesmilies', 0);
return true; }
|
/** * Verify that the user is not flooding the system. *
| /** * Verify that the user is not flooding the system. *
|
Zeile 362 | Zeile 356 |
---|
function verify_post_merge($simple_mode=false) { global $mybb, $db, $session;
|
function verify_post_merge($simple_mode=false) { global $mybb, $db, $session;
|
$post = &$this->data;
| $post = &$this->data;
|
// 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? if(empty($mybb->settings['postmergemins']))
|
// Are we even turned on? if(empty($mybb->settings['postmergemins']))
|
{ return true;
| { return true;
|
}
// Assign a default separator if none is specified if(trim($mybb->settings['postmergesep']) == "")
|
}
// Assign a default separator if none is specified if(trim($mybb->settings['postmergesep']) == "")
|
{
| {
|
$mybb->settings['postmergesep'] = "[hr]"; }
// Check to see if this person is in a usergroup that is excluded if(is_member($mybb->settings['postmergeuignore'], $post['uid']))
|
$mybb->settings['postmergesep'] = "[hr]"; }
// Check to see if this person is in a usergroup that is excluded if(is_member($mybb->settings['postmergeuignore'], $post['uid']))
|
{ return true; }
| { return true; }
|
// Select the lastpost and fid information for this thread $query = $db->simple_select("threads", "lastpost,fid", "lastposteruid='".$post['uid']."' AND tid='".$post['tid']."'", array('limit' => '1'));
| // Select the lastpost and fid information for this thread $query = $db->simple_select("threads", "lastpost,fid", "lastposteruid='".$post['uid']."' AND tid='".$post['tid']."'", array('limit' => '1'));
|
Zeile 438 | Zeile 432 |
---|
$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. *
| /** * Verifies the image count. *
|
Zeile 464 | Zeile 458 |
---|
// Check if this post contains more images than the forum allows if((!isset($post['savedraft']) || $post['savedraft'] != 1) && $mybb->settings['maxpostimages'] != 0 && $permissions['cancp'] != 1)
|
// Check if this post contains more images than the forum allows if((!isset($post['savedraft']) || $post['savedraft'] != 1) && $mybb->settings['maxpostimages'] != 0 && $permissions['cancp'] != 1)
|
{
| {
|
require_once MYBB_ROOT."inc/class_parser.php"; $parser = new postParser;
| require_once MYBB_ROOT."inc/class_parser.php"; $parser = new postParser;
|
Zeile 568 | Zeile 562 |
---|
$query = $db->simple_select("posts", "pid", "tid='{$post['tid']}'", $options); $reply_to = $db->fetch_array($query); $post['replyto'] = $reply_to['pid'];
|
$query = $db->simple_select("posts", "pid", "tid='{$post['tid']}'", $options); $reply_to = $db->fetch_array($query); $post['replyto'] = $reply_to['pid'];
|
}
return true; }
| }
return true; }
|
/** * Verify the post icon.
| /** * Verify the post icon.
|
Zeile 623 | Zeile 617 |
---|
if(empty($prefix)) { $prefix = 0;
|
if(empty($prefix)) { $prefix = 0;
|
}
| }
|
else { if(!empty($this->data['tid']))
|
else { if(!empty($this->data['tid']))
|
{
| {
|
// Fetch the thread $thread = get_thread($this->data['tid']);
|
// Fetch the thread $thread = get_thread($this->data['tid']);
|
}
| }
|
$prefix_cache = build_prefixes($prefix);
| $prefix_cache = build_prefixes($prefix);
|
Zeile 649 | Zeile 643 |
---|
else { $user = get_user($this->data['uid']);
|
else { $user = get_user($this->data['uid']);
|
}
| }
|
if(!is_member($prefix_cache['groups'], array('usergroup' => $user['usergroup'], 'additionalgroups' => $user['additionalgroups'])) && (empty($this->data['tid']) || $prefix != $thread['prefix'])) {
| if(!is_member($prefix_cache['groups'], array('usergroup' => $user['usergroup'], 'additionalgroups' => $user['additionalgroups'])) && (empty($this->data['tid']) || $prefix != $thread['prefix'])) {
|
Zeile 777 | Zeile 771 |
---|
}
if($this->method == "insert" || array_key_exists('message', $post))
|
}
if($this->method == "insert" || array_key_exists('message', $post))
|
{ $this->verify_message();
| { $this->verify_message();
|
$this->verify_image_count(); $this->verify_video_count();
|
$this->verify_image_count(); $this->verify_video_count();
|
}
| }
|
if($this->method == "insert" || array_key_exists('dateline', $post))
|
if($this->method == "insert" || array_key_exists('dateline', $post))
|
{
| {
|
$this->verify_dateline();
|
$this->verify_dateline();
|
}
| }
|
if($this->method == "insert" || array_key_exists('replyto', $post)) { $this->verify_reply_to();
|
if($this->method == "insert" || array_key_exists('replyto', $post)) { $this->verify_reply_to();
|
}
| }
|
if($this->method == "insert" || array_key_exists('icon', $post))
|
if($this->method == "insert" || array_key_exists('icon', $post))
|
{
| {
|
$this->verify_post_icon();
|
$this->verify_post_icon();
|
}
| }
|
if($this->method == "insert" || array_key_exists('options', $post)) {
| if($this->method == "insert" || array_key_exists('options', $post)) {
|
Zeile 806 | Zeile 800 |
---|
if($this->method == "update" && $this->first_post) { $this->verify_prefix();
|
if($this->method == "update" && $this->first_post) { $this->verify_prefix();
|
}
| }
|
$plugins->run_hooks("datahandler_post_validate_post", $this);
// We are done validating, return. $this->set_validated(true); if(count($this->get_errors()) > 0)
|
$plugins->run_hooks("datahandler_post_validate_post", $this);
// We are done validating, return. $this->set_validated(true); if(count($this->get_errors()) > 0)
|
{
| {
|
return false;
|
return false;
|
}
| }
|
else { return true; } }
|
else { return true; } }
|
|
|
/** * Insert a post into the database. *
| /** * Insert a post into the database. *
|
Zeile 878 | Zeile 872 |
---|
// Perform any selected moderation tools. $ismod = is_moderator($post['fid'], "", $post['uid']);
|
// Perform any selected moderation tools. $ismod = is_moderator($post['fid'], "", $post['uid']);
|
if($ismod)
| if($ismod && isset($post['modoptions']))
|
{ $lang->load($this->language_file, true);
| { $lang->load($this->language_file, true);
|
Zeile 886 | Zeile 880 |
---|
$modlogdata['fid'] = $thread['fid']; $modlogdata['tid'] = $thread['tid'];
|
$modlogdata['fid'] = $thread['fid']; $modlogdata['tid'] = $thread['tid'];
|
if(!isset($modoptions['closethread'])) { $modoptions['closethread'] = $closed; }
$modoptions_update = array();
| $modoptions_update = array();
|
// Close the thread.
|
// Close the thread.
|
if($modoptions['closethread'] == 1 && $thread['closed'] != 1) { $modoptions_update['closed'] = $closed = 0;
| if(!empty($modoptions['closethread']) && $thread['closed'] != 1 && is_moderator($post['fid'], "canopenclosethreads", $post['uid'])) { $modoptions_update['closed'] = $closed = 1;
|
log_moderator_action($modlogdata, $lang->thread_closed); }
|
log_moderator_action($modlogdata, $lang->thread_closed); }
|
// Open the thread. if($modoptions['closethread'] != 1 && $thread['closed'] == 1) { $modoptions_update['closed'] = $closed = 1; log_moderator_action($modlogdata, $lang->thread_opened); }
if(!isset($modoptions['stickthread']))
| // Open the thread. if(empty($modoptions['closethread']) && $thread['closed'] == 1 && is_moderator($post['fid'], "canopenclosethreads", $post['uid']))
|
{
|
{
|
$modoptions['stickthread'] = $thread['sticky'];
| $modoptions_update['closed'] = $closed = 0; log_moderator_action($modlogdata, $lang->thread_opened);
|
}
// Stick the thread.
|
}
// Stick the thread.
|
if($modoptions['stickthread'] == 1 && $thread['sticky'] != 1)
| if(!empty($modoptions['stickthread']) && $thread['sticky'] != 1 && is_moderator($post['fid'], "canstickunstickthreads", $post['uid']))
|
{ $modoptions_update['sticky'] = 1; log_moderator_action($modlogdata, $lang->thread_stuck); }
// Unstick the thread.
|
{ $modoptions_update['sticky'] = 1; log_moderator_action($modlogdata, $lang->thread_stuck); }
// Unstick the thread.
|
if($modoptions['stickthread'] != 1 && $thread['sticky'])
| if(empty($modoptions['stickthread']) && $thread['sticky'] == 1 && is_moderator($post['fid'], "canstickunstickthreads", $post['uid']))
|
{ $modoptions_update['sticky'] = 0; log_moderator_action($modlogdata, $lang->thread_unstuck);
| { $modoptions_update['sticky'] = 0; log_moderator_action($modlogdata, $lang->thread_unstuck);
|
Zeile 1028 | Zeile 1012 |
---|
} }
|
} }
|
if($visible == 1 && $thread['visible'] == 1)
| if($visible == 1)
|
{ $now = TIME_NOW;
| { $now = TIME_NOW;
|
Zeile 1036 | Zeile 1020 |
---|
$update_array = array( 'lastpost' => "'{$now}'" );
|
$update_array = array( 'lastpost' => "'{$now}'" );
|
if($forum['usepostcounts'] != 0)
| if($forum['usepostcounts'] != 0 && $thread['visible'] == 1)
|
{ $update_array['postnum'] = 'postnum+1'; }
| { $update_array['postnum'] = 'postnum+1'; }
|
Zeile 1049 | Zeile 1033 |
---|
{ // Update a post that is a draft $this->post_update_data = array(
|
{ // Update a post that is a draft $this->post_update_data = array(
|
"subject" => $db->escape_string($post['subject']), "icon" => (int)$post['icon'],
| "subject" => $db->escape_string($post['subject']), "icon" => (int)$post['icon'],
|
"uid" => $post['uid'], "username" => $db->escape_string($post['username']), "dateline" => (int)$post['dateline'],
| "uid" => $post['uid'], "username" => $db->escape_string($post['username']), "dateline" => (int)$post['dateline'],
|
Zeile 1104 | Zeile 1088 |
---|
$thread_update = array(); if($visible == 1 && $thread['visible'] == 1) {
|
$thread_update = array(); if($visible == 1 && $thread['visible'] == 1) {
|
$thread = get_thread($post['tid']);
| |
require_once MYBB_ROOT.'inc/class_parser.php'; $parser = new Postparser;
$done_users = array();
$subject = $parser->parse_badwords($thread['subject']);
|
require_once MYBB_ROOT.'inc/class_parser.php'; $parser = new Postparser;
$done_users = array();
$subject = $parser->parse_badwords($thread['subject']);
|
|
|
$parser_options = array( 'me_username' => $post['username'], 'filter_badwords' => 1
| $parser_options = array( 'me_username' => $post['username'], 'filter_badwords' => 1
|
Zeile 1139 | Zeile 1122 |
---|
while($subscribedmember = $db->fetch_array($query)) { if($done_users[$subscribedmember['uid']])
|
while($subscribedmember = $db->fetch_array($query)) { if($done_users[$subscribedmember['uid']])
|
{
| {
|
continue; }
| continue; }
|
Zeile 1178 | Zeile 1161 |
---|
{ $emailsubject = $lang->emailsubject_subscription; $emailmessage = $lang->email_subscription;
|
{ $emailsubject = $lang->emailsubject_subscription; $emailmessage = $lang->email_subscription;
|
| }
// If the poster is unregistered and hasn't set a username, call them Guest if(!$post['uid'] && !$post['username']) { $post['username'] = htmlspecialchars_uni($lang->guest);
|
} } else
|
} } else
|
{ if($subscribedmember['notification'] == 1) { if(!isset($langcache[$uselang]['emailsubject_subscription']))
| {
if(($subscribedmember['notification'] == 1 && !isset($langcache[$uselang]['emailsubject_subscription'])) || !isset($langcache[$uselang]['guest'])) { $userlang = new MyLanguage; $userlang->set_path(MYBB_ROOT."inc/languages"); $userlang->set_language($uselang); if($subscribedmember['notification'] == 1)
|
{
|
{
|
$userlang = new MyLanguage; $userlang->set_path(MYBB_ROOT."inc/languages"); $userlang->set_language($uselang);
| |
$userlang->load("messages"); $langcache[$uselang]['emailsubject_subscription'] = $userlang->emailsubject_subscription; $langcache[$uselang]['email_subscription'] = $userlang->email_subscription;
|
$userlang->load("messages"); $langcache[$uselang]['emailsubject_subscription'] = $userlang->emailsubject_subscription; $langcache[$uselang]['email_subscription'] = $userlang->email_subscription;
|
unset($userlang);
| |
}
|
}
|
| $userlang->load("global");
$langcache[$uselang]['guest'] = $userlang->guest; unset($userlang); } if($subscribedmember['notification'] == 1) {
|
$emailsubject = $langcache[$uselang]['emailsubject_subscription']; $emailmessage = $langcache[$uselang]['email_subscription']; }
|
$emailsubject = $langcache[$uselang]['emailsubject_subscription']; $emailmessage = $langcache[$uselang]['email_subscription']; }
|
}
| // If the poster is unregistered and hasn't set a username, call them Guest if(!$post['uid'] && !$post['username']) { $post['username'] = $langcache[$uselang]['guest']; } }
|
if($subscribedmember['notification'] == 1) {
| if($subscribedmember['notification'] == 1) {
|
Zeile 1205 | Zeile 1207 |
---|
$post_code = md5($subscribedmember['loginkey'].$subscribedmember['salt'].$subscribedmember['regdate']); $emailmessage = $lang->sprintf($emailmessage, $subscribedmember['username'], $post['username'], $mybb->settings['bbname'], $subject, $excerpt, $mybb->settings['bburl'], str_replace("&", "&", get_thread_link($thread['tid'], 0, "newpost")), $thread['tid'], $post_code);
|
$post_code = md5($subscribedmember['loginkey'].$subscribedmember['salt'].$subscribedmember['regdate']); $emailmessage = $lang->sprintf($emailmessage, $subscribedmember['username'], $post['username'], $mybb->settings['bbname'], $subject, $excerpt, $mybb->settings['bburl'], str_replace("&", "&", get_thread_link($thread['tid'], 0, "newpost")), $thread['tid'], $post_code);
|
$new_email = array(
| $new_email = array(
|
"mailto" => $db->escape_string($subscribedmember['email']), "mailfrom" => '', "subject" => $db->escape_string($emailsubject),
| "mailto" => $db->escape_string($subscribedmember['email']), "mailfrom" => '', "subject" => $db->escape_string($emailsubject),
|
Zeile 1240 | Zeile 1242 |
---|
$thread_update = array('replies' => '+1');
|
$thread_update = array('replies' => '+1');
|
// Update forum count
| // Update counters
|
update_last_post($post['tid']); update_forum_counters($post['fid'], array("posts" => "+1")); update_forum_lastpost($thread['fid']);
| update_last_post($post['tid']); update_forum_counters($post['fid'], array("posts" => "+1")); update_forum_lastpost($thread['fid']);
|
Zeile 1254 | Zeile 1256 |
---|
update_forum_counters($post['fid'], array("unapprovedposts" => "+1")); } else if($thread['visible'] == 0)
|
update_forum_counters($post['fid'], array("unapprovedposts" => "+1")); } else if($thread['visible'] == 0)
|
{ // Update the unapproved posts count for the current forum $thread_update = array('replies' => '+1');
| { // Update the unapproved posts count for the current forum $thread_update = array('replies' => '+1');
|
update_forum_counters($post['fid'], array("unapprovedposts" => "+1"));
|
update_forum_counters($post['fid'], array("unapprovedposts" => "+1"));
|
}
| }
|
else if($thread['visible'] == -1)
|
else if($thread['visible'] == -1)
|
{
| {
|
// 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_post($post['tid']);
|
}
$query = $db->simple_select("attachments", "COUNT(aid) AS attachmentcount", "pid='{$this->pid}' AND visible='1'");
| }
$query = $db->simple_select("attachments", "COUNT(aid) AS attachmentcount", "pid='{$this->pid}' AND visible='1'");
|
Zeile 1527 | Zeile 1535 |
---|
}
// Perform any selected moderation tools.
|
}
// Perform any selected moderation tools.
|
if(is_moderator($thread['fid'], "", $thread['uid']) && is_array($thread['modoptions']))
| if(is_moderator($thread['fid'], "", $thread['uid']) && isset($thread['modoptions']))
|
{ $lang->load($this->language_file, true);
| { $lang->load($this->language_file, true);
|
Zeile 1541 | Zeile 1549 |
---|
$modoptions_update = array();
// Close the thread.
|
$modoptions_update = array();
// Close the thread.
|
if(!empty($modoptions['closethread']))
| if(!empty($modoptions['closethread']) && is_moderator($thread['fid'], "canopenclosethreads", $thread['uid']))
|
{ $modoptions_update['closed'] = 1; log_moderator_action($modlogdata, $lang->thread_closed); }
// Stick the thread.
|
{ $modoptions_update['closed'] = 1; log_moderator_action($modlogdata, $lang->thread_closed); }
// Stick the thread.
|
if(!empty($modoptions['stickthread']))
| if(!empty($modoptions['stickthread']) && is_moderator($thread['fid'], "canstickunstickthreads", $thread['uid']))
|
{ $modoptions_update['sticky'] = 1; log_moderator_action($modlogdata, $lang->thread_stuck);
| { $modoptions_update['sticky'] = 1; log_moderator_action($modlogdata, $lang->thread_stuck);
|
Zeile 1653 | Zeile 1661 |
---|
{ $emailsubject = $lang->emailsubject_forumsubscription; $emailmessage = $lang->email_forumsubscription;
|
{ $emailsubject = $lang->emailsubject_forumsubscription; $emailmessage = $lang->email_forumsubscription;
|
| // If the poster is unregistered and hasn't set a username, call them Guest if(!$thread['uid'] && !$thread['username']) { $thread['username'] = htmlspecialchars_uni($lang->guest); }
|
} else {
| } else {
|
Zeile 1662 | Zeile 1676 |
---|
$userlang->set_path(MYBB_ROOT."inc/languages"); $userlang->set_language($uselang); $userlang->load("messages");
|
$userlang->set_path(MYBB_ROOT."inc/languages"); $userlang->set_language($uselang); $userlang->load("messages");
|
| $userlang->load("global");
|
$langcache[$uselang]['emailsubject_forumsubscription'] = $userlang->emailsubject_forumsubscription; $langcache[$uselang]['email_forumsubscription'] = $userlang->email_forumsubscription;
|
$langcache[$uselang]['emailsubject_forumsubscription'] = $userlang->emailsubject_forumsubscription; $langcache[$uselang]['email_forumsubscription'] = $userlang->email_forumsubscription;
|
| $langcache[$uselang]['guest'] = $userlang->guest;
|
unset($userlang); } $emailsubject = $langcache[$uselang]['emailsubject_forumsubscription']; $emailmessage = $langcache[$uselang]['email_forumsubscription'];
|
unset($userlang); } $emailsubject = $langcache[$uselang]['emailsubject_forumsubscription']; $emailmessage = $langcache[$uselang]['email_forumsubscription'];
|
| // If the poster is unregistered and hasn't set a username, call them Guest if(!$thread['uid'] && !$thread['username']) { $thread['username'] = $langcache[$uselang]['guest']; }
|
} $emailsubject = $lang->sprintf($emailsubject, $forum['name']);
| } $emailsubject = $lang->sprintf($emailsubject, $forum['name']);
|
Zeile 1719 | Zeile 1741 |
---|
if($attachmentcount > 0) { update_thread_counters($this->tid, array("attachmentcount" => "+{$attachmentcount}"));
|
if($attachmentcount > 0) { update_thread_counters($this->tid, array("attachmentcount" => "+{$attachmentcount}"));
|
}
| }
|
// Return the post's pid and whether or not it is visible. $this->return_values = array(
| // Return the post's pid and whether or not it is visible. $this->return_values = array(
|
Zeile 1741 | Zeile 1763 |
---|
function update_post() { global $db, $mybb, $plugins;
|
function update_post() { global $db, $mybb, $plugins;
|
|
|
// Yes, validating is required. if($this->get_validated() != true) {
| // Yes, validating is required. if($this->get_validated() != true) {
|
Zeile 1785 | Zeile 1807 |
---|
else { $visible = 1;
|
else { $visible = 1;
|
}
| }
|
// Update the thread details that might have been changed first. if($this->first_post) {
| // Update the thread details that might have been changed first. if($this->first_post) {
|
Zeile 1831 | Zeile 1853 |
---|
if(isset($post['editreason']) && trim($post['editreason']) != '') { $this->post_update_data['editreason'] = $db->escape_string(trim($post['editreason']));
|
if(isset($post['editreason']) && trim($post['editreason']) != '') { $this->post_update_data['editreason'] = $db->escape_string(trim($post['editreason']));
|
| } elseif($post['editreason'] == '') { $this->post_update_data['editreason'] = '';
|
}
if(isset($post['icon']))
| }
if(isset($post['icon']))
|