Zeile 6 | Zeile 6 |
---|
* Website: http://www.mybboard.net * License: http://www.mybboard.net/about/license *
|
* Website: http://www.mybboard.net * License: http://www.mybboard.net/about/license *
|
* $Id: newreply.php 4277 2008-11-23 20:47:16Z Tikitiki $
| * $Id: newreply.php 4864 2010-04-10 09:13:19Z RyanGordon $
|
*/
define("IN_MYBB", 1);
| */
define("IN_MYBB", 1);
|
Zeile 132 | Zeile 132 |
---|
{ if(!$mybb->input['previewpost'] && $mybb->input['action'] != "do_newreply") {
|
{ if(!$mybb->input['previewpost'] && $mybb->input['action'] != "do_newreply") {
|
$username = $lang->guest;
| $username = '';
|
} elseif($mybb->input['previewpost']) {
| } elseif($mybb->input['previewpost']) {
|
Zeile 196 | Zeile 196 |
---|
if(!$mybb->input['submit']) { $mybb->input['action'] = "newreply";
|
if(!$mybb->input['submit']) { $mybb->input['action'] = "newreply";
|
| $editdraftpid = "<input type=\"hidden\" name=\"pid\" value=\"$pid\" />";
|
} }
| } }
|
Zeile 207 | Zeile 208 |
---|
if(!$mybb->input['submit']) { $mybb->input['action'] = "newreply";
|
if(!$mybb->input['submit']) { $mybb->input['action'] = "newreply";
|
| $editdraftpid = "<input type=\"hidden\" name=\"pid\" value=\"$pid\" />";
|
} }
// Setup our posthash for managing attachments. if(!$mybb->input['posthash'] && $mybb->input['action'] != "editdraft") {
|
} }
// Setup our posthash for managing attachments. if(!$mybb->input['posthash'] && $mybb->input['action'] != "editdraft") {
|
mt_srand ((double) microtime() * 1000000); $mybb->input['posthash'] = md5($thread['tid'].$mybb->user['uid'].mt_rand());
| $mybb->input['posthash'] = md5($thread['tid'].$mybb->user['uid'].random_str());
|
}
$reply_errors = "";
| }
$reply_errors = "";
|
Zeile 330 | Zeile 331 |
---|
} if(!$mybb->input['savedraft']) {
|
} if(!$mybb->input['savedraft']) {
|
$query = $db->simple_select("posts p", "p.pid", "{$user_check} AND p.tid='{$thread['tid']}' AND p.subject='".$db->escape_string($mybb->input['subject'])."' AND p.message='".$db->escape_string($mybb->input['message'])."' AND p.posthash='".$db->escape_string($mybb->input['posthash'])."'");
| $query = $db->simple_select("posts p", "p.pid", "{$user_check} AND p.tid='{$thread['tid']}' AND p.subject='".$db->escape_string($mybb->input['subject'])."' AND p.message='".$db->escape_string($mybb->input['message'])."' AND p.posthash='".$db->escape_string($mybb->input['posthash'])."' AND p.visible != '-2'");
|
$duplicate_check = $db->fetch_field($query, "pid"); if($duplicate_check) {
| $duplicate_check = $db->fetch_field($query, "pid"); if($duplicate_check) {
|
Zeile 392 | Zeile 393 |
---|
{ $post_errors = $posthandler->get_friendly_errors(); }
|
{ $post_errors = $posthandler->get_friendly_errors(); }
|
| // Mark thread as read require_once MYBB_ROOT."inc/functions_indicators.php"; mark_thread_read($tid, $fid);
|
// Check captcha image if($mybb->settings['captchaimage'] == 1 && function_exists("imagepng") && !$mybb->user['uid'])
| // Check captcha image if($mybb->settings['captchaimage'] == 1 && function_exists("imagepng") && !$mybb->user['uid'])
|
Zeile 455 | Zeile 461 |
---|
// Visible post $lang->redirect_newreply .= $lang->redirect_newreply_post; $url = get_post_link($pid, $tid)."#pid{$pid}";
|
// Visible post $lang->redirect_newreply .= $lang->redirect_newreply_post; $url = get_post_link($pid, $tid)."#pid{$pid}";
|
}
| }
|
else { // Moderated post $lang->redirect_newreply .= '<br />'.$lang->redirect_newreply_moderation; $url = get_thread_link($tid);
|
else { // Moderated post $lang->redirect_newreply .= '<br />'.$lang->redirect_newreply_moderation; $url = get_thread_link($tid);
|
}
| }
|
// Mark any quoted posts so they're no longer selected - attempts to maintain those which weren't selected if($mybb->input['quoted_ids'] && $mybb->cookies['multiquote'] && $mybb->settings['multiquote'] != 0)
| // Mark any quoted posts so they're no longer selected - attempts to maintain those which weren't selected if($mybb->input['quoted_ids'] && $mybb->cookies['multiquote'] && $mybb->settings['multiquote'] != 0)
|
Zeile 500 | Zeile 506 |
---|
} } }
|
} } }
|
// Mark thread as read require_once MYBB_ROOT."inc/functions_indicators.php"; mark_thread_read($tid, $fid);
|
|
$plugins->run_hooks("newreply_do_newreply_end"); // This was a post made via the ajax quick reply - we need to do some special things here
| $plugins->run_hooks("newreply_do_newreply_end"); // This was a post made via the ajax quick reply - we need to do some special things here
|
Zeile 588 | Zeile 590 |
---|
echo $post;
// Build a new posthash incase the user wishes to quick reply again
|
echo $post;
// Build a new posthash incase the user wishes to quick reply again
|
mt_srand((double) microtime() * 1000000); $new_posthash = md5($mybb->user['uid'].mt_rand());
| $new_posthash = md5($mybb->user['uid'].random_str());
|
echo "<script type=\"text/javascript\">\n"; echo "var hash = document.getElementById('posthash'); if(hash) { hash.value = '{$new_posthash}'; }\n"; echo "if(typeof(inlineModeration) != 'undefined') { Event.observe($('inlinemod_{$pid}'), 'click', inlineModeration.checkItem); }\n";
| echo "<script type=\"text/javascript\">\n"; echo "var hash = document.getElementById('posthash'); if(hash) { hash.value = '{$new_posthash}'; }\n"; echo "if(typeof(inlineModeration) != 'undefined') { Event.observe($('inlinemod_{$pid}'), 'click', inlineModeration.checkItem); }\n";
|
Zeile 619 | Zeile 620 |
---|
$quote_ids = ''; // If this isn't a preview and we're not editing a draft, then handle quoted posts
|
$quote_ids = ''; // If this isn't a preview and we're not editing a draft, then handle quoted posts
|
if(!$mybb->input['previewpost'] && !$reply_errors && $mybb->input['action'] != "editdraft")
| if(!$mybb->input['previewpost'] && !$reply_errors && $mybb->input['action'] != "editdraft" && !$mybb->input['attachmentaid'] && !$mybb->input['newattachment'] && !$mybb->input['updateattachment'] && !$mybb->input['rem'])
|
{ $message = ''; $quoted_posts = array();
| { $message = ''; $quoted_posts = array();
|
Zeile 651 | Zeile 652 |
---|
if(is_moderator($fid)) { $visible_where = "AND p.visible != 2";
|
if(is_moderator($fid)) { $visible_where = "AND p.visible != 2";
|
}
| }
|
else { $visible_where = "AND p.visible > 0";
| else { $visible_where = "AND p.visible > 0";
|
Zeile 793 | Zeile 794 |
---|
if($forum['allowpicons'] != 0) { $posticons = get_post_icons();
|
if($forum['allowpicons'] != 0) { $posticons = get_post_icons();
|
| } // No subject, but post info? if(!$subject && $mybb->input['subject']) { $subject = $mybb->input['subject'];
|
}
// Preview a post that was written.
| }
// Preview a post that was written.
|
Zeile 904 | Zeile 911 |
---|
{ $subject = "RE: " . $thread['subject']; }
|
{ $subject = "RE: " . $thread['subject']; }
|
|
|
// Setup a unique posthash for attachment management if(!$mybb->input['posthash'] && $mybb->input['action'] != "editdraft") {
|
// Setup a unique posthash for attachment management if(!$mybb->input['posthash'] && $mybb->input['action'] != "editdraft") {
|
mt_srand ((double) microtime() * 1000000); $posthash = md5($mybb->user['uid'].mt_rand());
| $posthash = md5($mybb->user['uid'].random_str()); } elseif($mybb->input['action'] == "editdraft") { // Drafts have posthashes, too... $posthash = $post['posthash'];
|
} else {
| } else {
|