Zeile 88 | Zeile 88 |
---|
// See if everything is valid up to here. if(isset($post) && (($post['visible'] == 0 && !is_moderator($fid, "canviewunapprove")) || ($post['visible'] < 0 && $post['uid'] != $mybb->user['uid']))) {
|
// See if everything is valid up to here. if(isset($post) && (($post['visible'] == 0 && !is_moderator($fid, "canviewunapprove")) || ($post['visible'] < 0 && $post['uid'] != $mybb->user['uid']))) {
|
error($lang->error_invalidpost);
| if($post['visible'] == 0 && !($mybb->settings['showownunapproved'] && $post['uid'] == $mybb->user['uid'])) { error($lang->error_invalidpost); }
|
} if(($thread['visible'] == 0 && !is_moderator($fid, "canviewunapprove")) || $thread['visible'] < 0) {
|
} if(($thread['visible'] == 0 && !is_moderator($fid, "canviewunapprove")) || $thread['visible'] < 0) {
|
error($lang->error_invalidthread);
| if($thread['visible'] == 0 && !($mybb->settings['showownunapproved'] && $thread['uid'] == $mybb->user['uid'])) { error($lang->error_invalidthread); }
|
} if($forum['open'] == 0 || $forum['type'] != "f") {
| } if($forum['open'] == 0 || $forum['type'] != "f") {
|
Zeile 240 | Zeile 246 |
---|
{ eval("\$editdraftpid = \"".$templates->get("newreply_draftinput")."\";"); $mybb->input['action'] = "newreply";
|
{ eval("\$editdraftpid = \"".$templates->get("newreply_draftinput")."\";"); $mybb->input['action'] = "newreply";
|
| }
if($mybb->get_input('ajax', MyBB::INPUT_INT) == 1) { header("Content-type: application/json; charset={$lang->settings['charset']}"); echo json_encode(array("success" => true)); exit();
|
} }
| } }
|
Zeile 248 | Zeile 261 |
---|
$hide_captcha = false;
// Check the maximum posts per day for this user
|
$hide_captcha = false;
// Check the maximum posts per day for this user
|
if($mybb->usergroup['maxposts'] > 0 && $mybb->usergroup['cancp'] != 1)
| if($mybb->usergroup['maxposts'] > 0)
|
{ $daycut = TIME_NOW-60*60*24;
|
{ $daycut = TIME_NOW-60*60*24;
|
$query = $db->simple_select("posts", "COUNT(*) AS posts_today", "uid='{$mybb->user['uid']}' AND visible='1' AND dateline>{$daycut}");
| $query = $db->simple_select("posts", "COUNT(*) AS posts_today", "uid='{$mybb->user['uid']}' AND visible !='-1' AND dateline>{$daycut}");
|
$post_count = $db->fetch_field($query, "posts_today"); if($post_count >= $mybb->usergroup['maxposts']) {
| $post_count = $db->fetch_field($query, "posts_today"); if($post_count >= $mybb->usergroup['maxposts']) {
|
Zeile 643 | Zeile 656 |
---|
$data .= "<script type=\"text/javascript\">\n"; $data .= "var hash = document.getElementById('posthash'); if(hash) { hash.value = '{$new_posthash}'; }\n"; $data .= "if(typeof(inlineModeration) != 'undefined') {
|
$data .= "<script type=\"text/javascript\">\n"; $data .= "var hash = document.getElementById('posthash'); if(hash) { hash.value = '{$new_posthash}'; }\n"; $data .= "if(typeof(inlineModeration) != 'undefined') {
|
$('#inlinemod_{$pid}').bind(\"click\", function(e) {
| $('#inlinemod_{$pid}').on(\"click\", function(e) {
|
inlineModeration.checkItem(); }); }\n";
| inlineModeration.checkItem(); }); }\n";
|
Zeile 679 | Zeile 692 |
---|
} } }
|
} } }
|
|
|
// Show the newreply form. if($mybb->input['action'] == "newreply" || $mybb->input['action'] == "editdraft") {
| // Show the newreply form. if($mybb->input['action'] == "newreply" || $mybb->input['action'] == "editdraft") {
|
Zeile 698 | Zeile 711 |
---|
foreach($multiquoted as $post) { $quoted_posts[$post] = (int)$post;
|
foreach($multiquoted as $post) { $quoted_posts[$post] = (int)$post;
|
}
| }
|
} // Handle incoming 'quote' button if($replyto)
| } // Handle incoming 'quote' button if($replyto)
|
Zeile 716 | Zeile 729 |
---|
if($unviewable_forums) { $unviewable_forums = "AND t.fid NOT IN ({$unviewable_forums})";
|
if($unviewable_forums) { $unviewable_forums = "AND t.fid NOT IN ({$unviewable_forums})";
|
}
| }
|
if($inactiveforums) { $inactiveforums = "AND t.fid NOT IN ({$inactiveforums})";
| if($inactiveforums) { $inactiveforums = "AND t.fid NOT IN ({$inactiveforums})";
|
Zeile 753 | Zeile 766 |
---|
else { $visible_where = "AND p.visible=1";
|
else { $visible_where = "AND p.visible=1";
|
}
| }
|
require_once MYBB_ROOT."inc/functions_posting.php"; $query = $db->query("
| require_once MYBB_ROOT."inc/functions_posting.php"; $query = $db->query("
|
Zeile 790 | Zeile 803 |
---|
} } if($mybb->settings['maxquotedepth'] != '0')
|
} } if($mybb->settings['maxquotedepth'] != '0')
|
{
| {
|
$message = remove_message_quotes($message); } if($external_quotes > 0)
| $message = remove_message_quotes($message); } if($external_quotes > 0)
|
Zeile 808 | Zeile 821 |
---|
$multiquote_quote = $lang->multiquote_external_quote; } eval("\$multiquote_external = \"".$templates->get("newreply_multiquote_external")."\";");
|
$multiquote_quote = $lang->multiquote_external_quote; } eval("\$multiquote_external = \"".$templates->get("newreply_multiquote_external")."\";");
|
}
| }
|
if(is_array($quoted_ids) && count($quoted_ids) > 0) { $quoted_ids = implode("|", $quoted_ids); } }
|
if(is_array($quoted_ids) && count($quoted_ids) > 0) { $quoted_ids = implode("|", $quoted_ids); } }
|
}
| }
|
if(isset($mybb->input['quoted_ids']))
|
if(isset($mybb->input['quoted_ids']))
|
{
| {
|
$quoted_ids = htmlspecialchars_uni($mybb->get_input('quoted_ids', MyBB::INPUT_INT)); }
| $quoted_ids = htmlspecialchars_uni($mybb->get_input('quoted_ids', MyBB::INPUT_INT)); }
|
Zeile 826 | Zeile 839 |
---|
$previewmessage = $mybb->get_input('message'); } if(empty($message))
|
$previewmessage = $mybb->get_input('message'); } if(empty($message))
|
{
| {
|
$message = $mybb->get_input('message'); } $message = htmlspecialchars_uni($message);
$postoptionschecked = array('signature' => '', 'disablesmilies' => '');
|
$message = $mybb->get_input('message'); } $message = htmlspecialchars_uni($message);
$postoptionschecked = array('signature' => '', 'disablesmilies' => '');
|
$postoptions_subscriptionmethod_dont = $postoptions_subscriptionmethod_none = $postoptions_subscriptionmethod_email = $postoptions_subscriptionmethod_pm = '';
| $subscribe = $nonesubscribe = $emailsubscribe = $pmsubscribe = '';
|
// Set up the post options. if(!empty($mybb->input['previewpost']) || $reply_errors != '')
| // Set up the post options. if(!empty($mybb->input['previewpost']) || $reply_errors != '')
|
Zeile 873 | Zeile 886 |
---|
} $subscription_method = get_subscription_method($tid); }
|
} $subscription_method = get_subscription_method($tid); }
|
${'postoptions_subscriptionmethod_'.$subscription_method} = "checked=\"checked\"";
| ${$subscription_method.'subscribe'} = "checked=\"checked\" ";
|
if($forum['allowpicons'] != 0) {
| if($forum['allowpicons'] != 0) {
|
Zeile 1122 | Zeile 1135 |
---|
}
if($attach_add_options || $attach_update_options)
|
}
if($attach_add_options || $attach_update_options)
|
{
| {
|
eval("\$newattach = \"".$templates->get("post_attachments_new")."\";"); }
| eval("\$newattach = \"".$templates->get("post_attachments_new")."\";"); }
|
Zeile 1159 | Zeile 1172 |
---|
if(!$correct) { if($post_captcha->type == 1)
|
if(!$correct) { if($post_captcha->type == 1)
|
{
| {
|
$post_captcha->build_captcha(); } elseif(in_array($post_captcha->type, array(4, 5))) { $post_captcha->build_recaptcha(); }
|
$post_captcha->build_captcha(); } elseif(in_array($post_captcha->type, array(4, 5))) { $post_captcha->build_recaptcha(); }
|
}
| }
|
else if($correct && (in_array($post_captcha->type, array(4, 5))))
|
else if($correct && (in_array($post_captcha->type, array(4, 5))))
|
{
| {
|
$post_captcha->build_recaptcha(); }
| $post_captcha->build_recaptcha(); }
|
Zeile 1177 | Zeile 1190 |
---|
$captcha = $post_captcha->html; } }
|
$captcha = $post_captcha->html; } }
|
|
|
$reviewmore = ''; if($mybb->settings['threadreview'] != 0) { if(!$mybb->settings['postsperpage'] || (int)$mybb->settings['postsperpage'] < 1)
|
$reviewmore = ''; if($mybb->settings['threadreview'] != 0) { if(!$mybb->settings['postsperpage'] || (int)$mybb->settings['postsperpage'] < 1)
|
{
| {
|
$mybb->settings['postsperpage'] = 20;
|
$mybb->settings['postsperpage'] = 20;
|
}
| }
|
|
|
if(is_moderator($fid, "canviewunapprove")) {
| if(is_moderator($fid, "canviewunapprove") || $mybb->settings['showownunapproved']) {
|
$visibility = "(visible='1' OR visible='0')"; } else
| $visibility = "(visible='1' OR visible='0')"; } else
|
Zeile 1196 | Zeile 1209 |
---|
} $query = $db->simple_select("posts", "COUNT(pid) AS post_count", "tid='{$tid}' AND {$visibility}"); $numposts = $db->fetch_field($query, "post_count");
|
} $query = $db->simple_select("posts", "COUNT(pid) AS post_count", "tid='{$tid}' AND {$visibility}"); $numposts = $db->fetch_field($query, "post_count");
|
|
|
if(!$mybb->settings['postsperpage'] || (int)$mybb->settings['postsperpage'] < 1)
|
if(!$mybb->settings['postsperpage'] || (int)$mybb->settings['postsperpage'] < 1)
|
{
| {
|
$mybb->settings['postsperpage'] = 20;
|
$mybb->settings['postsperpage'] = 20;
|
}
| }
|
if($numposts > $mybb->settings['postsperpage']) { $numposts = $mybb->settings['postsperpage']; $lang->thread_review_more = $lang->sprintf($lang->thread_review_more, $mybb->settings['postsperpage'], get_thread_link($tid)); eval("\$reviewmore = \"".$templates->get("newreply_threadreview_more")."\";");
|
if($numposts > $mybb->settings['postsperpage']) { $numposts = $mybb->settings['postsperpage']; $lang->thread_review_more = $lang->sprintf($lang->thread_review_more, $mybb->settings['postsperpage'], get_thread_link($tid)); eval("\$reviewmore = \"".$templates->get("newreply_threadreview_more")."\";");
|
}
| }
|
$query = $db->simple_select("posts", "pid", "tid='{$tid}' AND {$visibility}", array("order_by" => "dateline", "order_dir" => "desc", "limit" => $mybb->settings['postsperpage'])); while($post = $db->fetch_array($query)) { $pidin[] = $post['pid'];
|
$query = $db->simple_select("posts", "pid", "tid='{$tid}' AND {$visibility}", array("order_by" => "dateline", "order_dir" => "desc", "limit" => $mybb->settings['postsperpage'])); while($post = $db->fetch_array($query)) { $pidin[] = $post['pid'];
|
}
$pidin = implode(",", $pidin);
| }
$pidin = implode(",", $pidin);
|
// Fetch attachments $query = $db->simple_select("attachments", "*", "pid IN ($pidin)");
| // Fetch attachments $query = $db->simple_select("attachments", "*", "pid IN ($pidin)");
|
Zeile 1270 | Zeile 1283 |
---|
{ $altbg = "trow_shaded"; }
|
{ $altbg = "trow_shaded"; }
|
| $plugins->run_hooks("newreply_threadreview_post");
|
$post['message'] = $parser->parse_message($post['message'], $parser_options); get_post_attachments($post['pid'], $post);
| $post['message'] = $parser->parse_message($post['message'], $parser_options); get_post_attachments($post['pid'], $post);
|