Zeile 364 | Zeile 364 |
---|
$thread_info = $posthandler->insert_thread(); $tid = $thread_info['tid']; $visible = $thread_info['visible'];
|
$thread_info = $posthandler->insert_thread(); $tid = $thread_info['tid']; $visible = $thread_info['visible'];
|
| // Invalidate solved captcha if($mybb->settings['captchaimage'] && !$mybb->user['uid']) { $post_captcha->invalidate_captcha(); }
|
// Mark thread as read require_once MYBB_ROOT."inc/functions_indicators.php";
| // Mark thread as read require_once MYBB_ROOT."inc/functions_indicators.php";
|
Zeile 374 | Zeile 380 |
---|
{ $lang->redirect_newthread = $lang->draft_saved; $url = "usercp.php?action=drafts";
|
{ $lang->redirect_newthread = $lang->draft_saved; $url = "usercp.php?action=drafts";
|
}
| }
|
// A poll was being posted with this thread, throw them to poll posting page. else if($mybb->input['postpoll'] && $forumpermissions['canpostpolls'])
| // A poll was being posted with this thread, throw them to poll posting page. else if($mybb->input['postpoll'] && $forumpermissions['canpostpolls'])
|
Zeile 391 | Zeile 397 |
---|
{ // User must see moderation notice, regardless of redirect settings $mybb->user['showredirect'] = 1;
|
{ // User must see moderation notice, regardless of redirect settings $mybb->user['showredirect'] = 1;
|
}
| }
|
$lang->redirect_newthread .= $lang->redirect_newthread_moderation; $url = get_forum_link($fid); }
| $lang->redirect_newthread .= $lang->redirect_newthread_moderation; $url = get_forum_link($fid); }
|
Zeile 428 | Zeile 434 |
---|
if($mybb->input['action'] == "newthread" || $mybb->input['action'] == "editdraft") {
|
if($mybb->input['action'] == "newthread" || $mybb->input['action'] == "editdraft") {
|
| |
$plugins->run_hooks("newthread_start");
|
$plugins->run_hooks("newthread_start");
|
| // Do we have attachment errors? if(count($errors) > 0) { $thread_errors = inline_error($errors); }
|
// If this isn't a preview and we're not editing a draft, then handle quoted posts if(!$mybb->input['previewpost'] && !$thread_errors && $mybb->input['action'] != "editdraft")
| // If this isn't a preview and we're not editing a draft, then handle quoted posts if(!$mybb->input['previewpost'] && !$thread_errors && $mybb->input['action'] != "editdraft")
|
Zeile 438 | Zeile 449 |
---|
$quoted_posts = array(); // Handle multiquote if($mybb->cookies['multiquote'] && $mybb->settings['multiquote'] != 0)
|
$quoted_posts = array(); // Handle multiquote if($mybb->cookies['multiquote'] && $mybb->settings['multiquote'] != 0)
|
{
| {
|
$multiquoted = explode("|", $mybb->cookies['multiquote']); foreach($multiquoted as $post) {
| $multiquoted = explode("|", $mybb->cookies['multiquote']); foreach($multiquoted as $post) {
|
Zeile 564 | Zeile 575 |
---|
// Editing a draft thread else if($mybb->input['action'] == "editdraft" && $mybb->user['uid']) {
|
// Editing a draft thread else if($mybb->input['action'] == "editdraft" && $mybb->user['uid']) {
|
| $mybb->input['threadprefix'] = $thread['prefix'];
|
$message = htmlspecialchars_uni($post['message']); $subject = htmlspecialchars_uni($post['subject']); if($post['includesig'] != 0)
| $message = htmlspecialchars_uni($post['message']); $subject = htmlspecialchars_uni($post['subject']); if($post['includesig'] != 0)
|
Zeile 584 | Zeile 596 |
---|
$postoptions_subscriptionmethod_none = "checked=\"checked\""; } else if($postoptions['subscriptionmethod'] == "instant")
|
$postoptions_subscriptionmethod_none = "checked=\"checked\""; } else if($postoptions['subscriptionmethod'] == "instant")
|
{ $postoptions_subscriptionmethod_instant = "checked=\"checked\""; }
| { $postoptions_subscriptionmethod_instant = "checked=\"checked\""; }
|
else { $postoptions_subscriptionmethod_dont = "checked=\"checked\"";
| else { $postoptions_subscriptionmethod_dont = "checked=\"checked\"";
|
Zeile 605 | Zeile 617 |
---|
$postoptions_subscriptionmethod_none = "checked=\"checked\""; } else if($mybb->user['subscriptionmethod'] == 2)
|
$postoptions_subscriptionmethod_none = "checked=\"checked\""; } else if($mybb->user['subscriptionmethod'] == 2)
|
{
| {
|
$postoptions_subscriptionmethod_instant = "checked=\"checked\"";
|
$postoptions_subscriptionmethod_instant = "checked=\"checked\"";
|
}
| }
|
else { $postoptions_subscriptionmethod_dont = "checked=\"checked\""; } $numpolloptions = "2"; }
|
else { $postoptions_subscriptionmethod_dont = "checked=\"checked\""; } $numpolloptions = "2"; }
|
|
|
// If we're preving a post then generate the preview. if($mybb->input['previewpost']) {
| // If we're preving a post then generate the preview. if($mybb->input['previewpost']) {
|
Zeile 639 | Zeile 651 |
---|
if($pid != '') { $new_thread['pid'] = $pid;
|
if($pid != '') { $new_thread['pid'] = $pid;
|
}
$posthandler->set_data($new_thread);
| }
$posthandler->set_data($new_thread);
|
// Now let the post handler do all the hard work. $valid_thread = $posthandler->verify_message(); $valid_subject = $posthandler->verify_subject();
| // Now let the post handler do all the hard work. $valid_thread = $posthandler->verify_message(); $valid_subject = $posthandler->verify_subject();
|
Zeile 658 | Zeile 670 |
---|
if(count($post_errors) > 0) { $thread_errors = inline_error($post_errors);
|
if(count($post_errors) > 0) { $thread_errors = inline_error($post_errors);
|
} else {
| } else {
|
if(!$mybb->input['username']) { $mybb->input['username'] = $lang->guest;
| if(!$mybb->input['username']) { $mybb->input['username'] = $lang->guest;
|
Zeile 675 | Zeile 687 |
---|
if(!$mybb->user['uid'] || !$post['username']) { $post['username'] = htmlspecialchars_uni($mybb->input['username']);
|
if(!$mybb->user['uid'] || !$post['username']) { $post['username'] = htmlspecialchars_uni($mybb->input['username']);
|
}
| }
|
else { $post['userusername'] = $mybb->user['username'];
| else { $post['userusername'] = $mybb->user['username'];
|
Zeile 691 | Zeile 703 |
---|
if($post['includesig'] != 1) { $post['includesig'] = 0;
|
if($post['includesig'] != 1) { $post['includesig'] = 0;
|
}
| }
|
// Fetch attachments assigned to this post if($mybb->input['pid'])
|
// Fetch attachments assigned to this post if($mybb->input['pid'])
|
{
| {
|
$attachwhere = "pid='".intval($mybb->input['pid'])."'"; } else { $attachwhere = "posthash='".$db->escape_string($mybb->input['posthash'])."'";
|
$attachwhere = "pid='".intval($mybb->input['pid'])."'"; } else { $attachwhere = "posthash='".$db->escape_string($mybb->input['posthash'])."'";
|
}
| }
|
$query = $db->simple_select("attachments", "*", $attachwhere); while($attachment = $db->fetch_array($query))
| $query = $db->simple_select("attachments", "*", $attachwhere); while($attachment = $db->fetch_array($query))
|
Zeile 718 | Zeile 730 |
---|
// Removing an attachment or adding a new one, or showting thread errors. else if($mybb->input['attachmentaid'] || $mybb->input['newattachment'] || $mybb->input['updateattachment'] || $thread_errors)
|
// Removing an attachment or adding a new one, or showting thread errors. else if($mybb->input['attachmentaid'] || $mybb->input['newattachment'] || $mybb->input['updateattachment'] || $thread_errors)
|
{
| {
|
$message = htmlspecialchars_uni($mybb->input['message']); $subject = htmlspecialchars_uni($mybb->input['subject']);
|
$message = htmlspecialchars_uni($mybb->input['message']); $subject = htmlspecialchars_uni($mybb->input['subject']);
|
}
// Do we have attachment errors? if(count($errors) > 0) { $thread_errors = inline_error($errors); }
| }
|
// Generate thread prefix selector if(!intval($mybb->input['threadprefix'])) { $mybb->input['threadprefix'] = 0;
|
// Generate thread prefix selector if(!intval($mybb->input['threadprefix'])) { $mybb->input['threadprefix'] = 0;
|
}
| }
|
$prefixselect = build_prefix_select($forum['fid'], $mybb->input['threadprefix']);
|
$prefixselect = build_prefix_select($forum['fid'], $mybb->input['threadprefix']);
|
|
|
$posthash = htmlspecialchars_uni($mybb->input['posthash']);
// Can we disable smilies or are they disabled already? if($forum['allowsmilies'] != 0)
|
$posthash = htmlspecialchars_uni($mybb->input['posthash']);
// Can we disable smilies or are they disabled already? if($forum['allowsmilies'] != 0)
|
{
| {
|
eval("\$disablesmilies = \"".$templates->get("newthread_disablesmilies")."\";"); } else
| eval("\$disablesmilies = \"".$templates->get("newthread_disablesmilies")."\";"); } else
|
Zeile 768 | Zeile 774 |
---|
else { $stickycheck = '';
|
else { $stickycheck = '';
|
}
| }
|
unset($modoptions); eval("\$modoptions = \"".$templates->get("newreply_modoptions")."\";"); $bgcolor = "trow1";
| unset($modoptions); eval("\$modoptions = \"".$templates->get("newreply_modoptions")."\";"); $bgcolor = "trow1";
|
Zeile 805 | Zeile 811 |
---|
if($mybb->settings['bbcodeinserter'] != 0 && $forum['allowmycode'] != 0 && (!$mybb->user['uid'] || $mybb->user['showcodebuttons'] != 0)) { eval("\$postinsert = \"".$templates->get("post_attachments_attachment_postinsert")."\";");
|
if($mybb->settings['bbcodeinserter'] != 0 && $forum['allowmycode'] != 0 && (!$mybb->user['uid'] || $mybb->user['showcodebuttons'] != 0)) { eval("\$postinsert = \"".$templates->get("post_attachments_attachment_postinsert")."\";");
|
}
eval("\$attach_rem_options = \"".$templates->get("post_attachments_attachment_remove")."\";");
| }
eval("\$attach_rem_options = \"".$templates->get("post_attachments_attachment_remove")."\";");
|
$attach_mod_options = ''; if($attachment['visible'] != 1) {
| $attach_mod_options = ''; if($attachment['visible'] != 1) {
|
Zeile 827 | Zeile 833 |
---|
$noshowattach = 1; } if($mybb->usergroup['attachquota'] == 0)
|
$noshowattach = 1; } if($mybb->usergroup['attachquota'] == 0)
|
{
| {
|
$friendlyquota = $lang->unlimited; } else
| $friendlyquota = $lang->unlimited; } else
|
Zeile 864 | Zeile 870 |
---|
if($post_captcha->validate_captcha() == true) { $correct = true;
|
if($post_captcha->validate_captcha() == true) { $correct = true;
|
|
|
// Generate a hidden list of items for our captcha $captcha = $post_captcha->build_hidden_captcha(); }
| // Generate a hidden list of items for our captcha $captcha = $post_captcha->build_hidden_captcha(); }
|
Zeile 873 | Zeile 879 |
---|
if(!$correct) { if($post_captcha->type == 1)
|
if(!$correct) { if($post_captcha->type == 1)
|
{
| {
|
$post_captcha->build_captcha();
|
$post_captcha->build_captcha();
|
}
| }
|
elseif($post_captcha->type == 2)
|
elseif($post_captcha->type == 2)
|
{
| {
|
$post_captcha->build_recaptcha();
|
$post_captcha->build_recaptcha();
|
}
if($post_captcha->html) {
| }
if($post_captcha->html) {
|
$captcha = $post_captcha->html; } }
| $captcha = $post_captcha->html; } }
|
Zeile 901 | Zeile 907 |
---|
{ $lang->max_options = $lang->sprintf($lang->max_options, $mybb->settings['maxpolloptions']); eval("\$pollbox = \"".$templates->get("newthread_postpoll")."\";");
|
{ $lang->max_options = $lang->sprintf($lang->max_options, $mybb->settings['maxpolloptions']); eval("\$pollbox = \"".$templates->get("newthread_postpoll")."\";");
|
}
| }
|
// Do we have any forum rules to show for this forum? $forumrules = '';
| // Do we have any forum rules to show for this forum? $forumrules = '';
|
Zeile 910 | Zeile 916 |
---|
if(!$forum['rulestitle']) { $forum['rulestitle'] = $lang->sprintf($lang->forum_rules, $forum['name']);
|
if(!$forum['rulestitle']) { $forum['rulestitle'] = $lang->sprintf($lang->forum_rules, $forum['name']);
|
}
| }
|
if(!$parser) {
| if(!$parser) {
|
Zeile 936 | Zeile 942 |
---|
{ eval("\$forumrules = \"".$templates->get("forumdisplay_rules_link")."\";"); }
|
{ eval("\$forumrules = \"".$templates->get("forumdisplay_rules_link")."\";"); }
|
}
| }
|
$plugins->run_hooks("newthread_end");
$forum['name'] = strip_tags($forum['name']);
| $plugins->run_hooks("newthread_end");
$forum['name'] = strip_tags($forum['name']);
|
Zeile 955 | Zeile 961 |
---|
eval("\$newthread = \"".$newthread_template."\";"); output_page($newthread);
|
eval("\$newthread = \"".$newthread_template."\";"); output_page($newthread);
|
| |
} ?>
| } ?>
|