Zeile 16 | Zeile 16 |
---|
$templatelist .= ",postbit_avatar,postbit_find,postbit_pm,postbit_rep_button,postbit_www,postbit_email,postbit_reputation,postbit_warn,postbit_warninglevel,postbit_author_user,posticons"; $templatelist .= ",postbit_signature,postbit_classic,postbit,postbit_attachments_thumbnails_thumbnail,postbit_attachments_images_image,postbit_attachments_attachment,postbit_attachments_attachment_unapproved"; $templatelist .= ",posticons_icon,post_prefixselect_prefix,post_prefixselect_single,newthread_postpoll,editpost_disablesmilies,post_attachments_attachment_mod_approve,post_attachments_attachment_unapproved";
|
$templatelist .= ",postbit_avatar,postbit_find,postbit_pm,postbit_rep_button,postbit_www,postbit_email,postbit_reputation,postbit_warn,postbit_warninglevel,postbit_author_user,posticons"; $templatelist .= ",postbit_signature,postbit_classic,postbit,postbit_attachments_thumbnails_thumbnail,postbit_attachments_images_image,postbit_attachments_attachment,postbit_attachments_attachment_unapproved"; $templatelist .= ",posticons_icon,post_prefixselect_prefix,post_prefixselect_single,newthread_postpoll,editpost_disablesmilies,post_attachments_attachment_mod_approve,post_attachments_attachment_unapproved";
|
$templatelist .= ",postbit_warninglevel_formatted,postbit_reputation_formatted_link,editpost_signature,attachment_icon,post_attachments_attachment,post_attachments_add,post_attachments,editpost_postoptions";
| $templatelist .= ",postbit_warninglevel_formatted,postbit_reputation_formatted_link,editpost_signature,attachment_icon,post_attachments_attachment,post_attachments_add,post_attachments,editpost_postoptions,post_attachments_viewlink";
|
$templatelist .= ",postbit_attachments_images,global_moderation_notice,post_attachments_new,postbit_attachments,postbit_online,postbit_away,postbit_offline,postbit_gotopost,postbit_userstar,postbit_icon";
require_once "./global.php";
| $templatelist .= ",postbit_attachments_images,global_moderation_notice,post_attachments_new,postbit_attachments,postbit_online,postbit_away,postbit_offline,postbit_gotopost,postbit_userstar,postbit_icon";
require_once "./global.php";
|
Zeile 192 | Zeile 192 |
---|
}
$attacherror = '';
|
}
$attacherror = '';
|
if($mybb->settings['enableattachments'] == 1 && !$mybb->get_input('attachmentaid', MyBB::INPUT_INT) && ($mybb->get_input('newattachment') || $mybb->get_input('updateattachment') || ($mybb->input['action'] == "do_editpost" && isset($mybb->input['submit']) && $_FILES['attachment'])))
| if($mybb->settings['enableattachments'] == 1 && ($mybb->get_input('newattachment') || $mybb->get_input('updateattachment') || ((($mybb->input['action'] == "do_editpost" && isset($mybb->input['submitbutton'])) || ($mybb->input['action'] == "editpost" && isset($mybb->input['previewpost']))) && isset($_FILES['attachments']))))
|
{ // Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
| { // Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
|
Zeile 208 | Zeile 208 |
---|
$ret = add_attachments($pid, $forumpermissions, $attachwhere, "editpost");
|
$ret = add_attachments($pid, $forumpermissions, $attachwhere, "editpost");
|
if(!empty($ret['errors']))
| if($mybb->get_input('ajax', MyBB::INPUT_INT) == 1) { if(isset($ret['success'])) { $attachment = array('aid'=>'{1}', 'icon'=>'{2}', 'filename'=>'{3}', 'size'=>'{4}'); if($mybb->settings['bbcodeinserter'] != 0 && $forum['allowmycode'] != 0 && $mybb->user['showcodebuttons'] != 0) { eval("\$postinsert = \"".$templates->get("post_attachments_attachment_postinsert")."\";"); } // Moderating options $attach_mod_options = ''; if(is_moderator($fid)) { eval("\$attach_mod_options = \"".$templates->get("post_attachments_attachment_mod_unapprove")."\";"); } eval("\$attach_rem_options = \"".$templates->get("post_attachments_attachment_remove")."\";"); eval("\$attemplate = \"".$templates->get("post_attachments_attachment")."\";"); $ret['template'] = $attemplate;
$query = $db->simple_select("attachments", "SUM(filesize) AS ausage", "uid='".$mybb->user['uid']."'"); $usage = $db->fetch_array($query); $ret['usage'] = get_friendly_size($usage['ausage']); }
header("Content-type: application/json; charset={$lang->settings['charset']}"); echo json_encode($ret); exit(); }
if(!empty($ret['errors']))
|
{ $errors = $ret['errors']; }
| { $errors = $ret['errors']; }
|
Zeile 217 | Zeile 246 |
---|
if(!empty($errors)) { $attacherror = inline_error($errors);
|
if(!empty($errors)) { $attacherror = inline_error($errors);
|
}
| }
|
// If we were dealing with an attachment but didn't click 'Update Post', force the post edit page again.
|
// If we were dealing with an attachment but didn't click 'Update Post', force the post edit page again.
|
if(!isset($mybb->input['submit']))
| if(!isset($mybb->input['submitbutton']))
|
{ $mybb->input['action'] = "editpost"; } }
|
{ $mybb->input['action'] = "editpost"; } }
|
| detect_attachmentact();
|
if($mybb->settings['enableattachments'] == 1 && $mybb->get_input('attachmentaid', MyBB::INPUT_INT) && isset($mybb->input['attachmentact']) && $mybb->input['action'] == "do_editpost" && $mybb->request_method == "post") // Lets remove/approve/unapprove the attachment
|
if($mybb->settings['enableattachments'] == 1 && $mybb->get_input('attachmentaid', MyBB::INPUT_INT) && isset($mybb->input['attachmentact']) && $mybb->input['action'] == "do_editpost" && $mybb->request_method == "post") // Lets remove/approve/unapprove the attachment
|
{ // Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
| { // Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
|
$mybb->input['attachmentaid'] = $mybb->get_input('attachmentaid', MyBB::INPUT_INT); if($mybb->input['attachmentact'] == "remove")
|
$mybb->input['attachmentaid'] = $mybb->get_input('attachmentaid', MyBB::INPUT_INT); if($mybb->input['attachmentact'] == "remove")
|
{
| {
|
remove_attachment($pid, "", $mybb->input['attachmentaid']); } elseif($mybb->get_input('attachmentact') == "approve" && is_moderator($fid, 'canapproveunapproveattachs'))
| remove_attachment($pid, "", $mybb->input['attachmentaid']); } elseif($mybb->get_input('attachmentact') == "approve" && is_moderator($fid, 'canapproveunapproveattachs'))
|
Zeile 241 | Zeile 272 |
---|
$update_sql = array("visible" => 1); $db->update_query("attachments", $update_sql, "aid='{$mybb->input['attachmentaid']}'"); update_thread_counters($post['tid'], array('attachmentcount' => "+1"));
|
$update_sql = array("visible" => 1); $db->update_query("attachments", $update_sql, "aid='{$mybb->input['attachmentaid']}'"); update_thread_counters($post['tid'], array('attachmentcount' => "+1"));
|
}
| }
|
elseif($mybb->get_input('attachmentact') == "unapprove" && is_moderator($fid, 'canapproveunapproveattachs'))
|
elseif($mybb->get_input('attachmentact') == "unapprove" && is_moderator($fid, 'canapproveunapproveattachs'))
|
{
| {
|
$update_sql = array("visible" => 0); $db->update_query("attachments", $update_sql, "aid='{$mybb->input['attachmentaid']}'"); update_thread_counters($post['tid'], array('attachmentcount' => "-1")); }
|
$update_sql = array("visible" => 0); $db->update_query("attachments", $update_sql, "aid='{$mybb->input['attachmentaid']}'"); update_thread_counters($post['tid'], array('attachmentcount' => "-1")); }
|
|
|
if($mybb->get_input('ajax', MyBB::INPUT_INT) == 1) {
|
if($mybb->get_input('ajax', MyBB::INPUT_INT) == 1) {
|
| $query = $db->simple_select("attachments", "SUM(filesize) AS ausage", "uid='".$mybb->user['uid']."'"); $usage = $db->fetch_array($query);
|
header("Content-type: application/json; charset={$lang->settings['charset']}");
|
header("Content-type: application/json; charset={$lang->settings['charset']}");
|
echo json_encode(array("success" => true));
| echo json_encode(array("success" => true, "usage" => get_friendly_size($usage['ausage'])));
|
exit(); }
|
exit(); }
|
if(!isset($mybb->input['submit']))
| if(!isset($mybb->input['submitbutton']))
|
{ $mybb->input['action'] = "editpost"; }
| { $mybb->input['action'] = "editpost"; }
|
Zeile 271 | Zeile 305 |
---|
if($mybb->get_input('delete', MyBB::INPUT_INT) == 1) {
|
if($mybb->get_input('delete', MyBB::INPUT_INT) == 1) {
|
$query = $db->simple_select("posts", "pid", "tid='{$tid}'", array("limit" => 1, "order_by" => "dateline", "order_dir" => "asc"));
| $query = $db->simple_select("posts", "pid", "tid='{$tid}'", array("limit" => 1, "order_by" => "dateline, pid"));
|
$firstcheck = $db->fetch_array($query); if($firstcheck['pid'] == $pid) {
| $firstcheck = $db->fetch_array($query); if($firstcheck['pid'] == $pid) {
|
Zeile 297 | Zeile 331 |
---|
$moderation->soft_delete_threads(array($tid)); log_moderator_action($modlogdata, $lang->thread_soft_deleted);
|
$moderation->soft_delete_threads(array($tid)); log_moderator_action($modlogdata, $lang->thread_soft_deleted);
|
} else {
| } else {
|
$moderation->delete_thread($tid); mark_reports($tid, "thread"); log_moderator_action($modlogdata, $lang->thread_deleted);
| $moderation->delete_thread($tid); mark_reports($tid, "thread"); log_moderator_action($modlogdata, $lang->thread_deleted);
|
Zeile 320 | Zeile 354 |
---|
else { redirect(get_forum_link($fid), $lang->redirect_threaddeleted);
|
else { redirect(get_forum_link($fid), $lang->redirect_threaddeleted);
|
} }
| } }
|
else { error_no_permission();
| else { error_no_permission();
|
Zeile 341 | Zeile 375 |
---|
$moderation->soft_delete_posts(array($pid)); log_moderator_action($modlogdata, $lang->post_soft_deleted);
|
$moderation->soft_delete_posts(array($pid)); log_moderator_action($modlogdata, $lang->post_soft_deleted);
|
} else {
| } else {
|
$moderation->delete_post($pid); mark_reports($pid, "post"); log_moderator_action($modlogdata, $lang->post_deleted); }
|
$moderation->delete_post($pid); mark_reports($pid, "post"); log_moderator_action($modlogdata, $lang->post_deleted); }
|
$query = $db->simple_select("posts", "pid", "tid='{$tid}' AND dateline <= '{$post['dateline']}'", array("limit" => 1, "order_by" => "dateline", "order_dir" => "desc"));
| $query = $db->simple_select("posts", "pid", "tid='{$tid}' AND dateline <= '{$post['dateline']}'", array("limit" => 1, "order_by" => "dateline DESC, pid DESC"));
|
$next_post = $db->fetch_array($query); if($next_post['pid']) { $redirect = get_post_link($next_post['pid'], $tid)."#pid{$next_post['pid']}";
|
$next_post = $db->fetch_array($query); if($next_post['pid']) { $redirect = get_post_link($next_post['pid'], $tid)."#pid{$next_post['pid']}";
|
} else
| } else
|
{ $redirect = get_thread_link($tid); }
|
{ $redirect = get_thread_link($tid); }
|
if($mybb->input['ajax'] == 1)
| if($mybb->get_input('ajax', MyBB::INPUT_INT) == 1)
|
{ header("Content-type: application/json; charset={$lang->settings['charset']}"); if(is_moderator($fid, "canviewdeleted")) { echo json_encode(array("data" => '1', "first" => '0'));
|
{ header("Content-type: application/json; charset={$lang->settings['charset']}"); if(is_moderator($fid, "canviewdeleted")) { echo json_encode(array("data" => '1', "first" => '0'));
|
}
| }
|
else { echo json_encode(array("data" => '2'));
| else { echo json_encode(array("data" => '2'));
|
Zeile 386 | Zeile 420 |
---|
else { error($lang->redirect_nodelete);
|
else { error($lang->redirect_nodelete);
|
} }
| } }
|
if($mybb->input['action'] == "restorepost" && $mybb->request_method == "post") {
| if($mybb->input['action'] == "restorepost" && $mybb->request_method == "post") {
|
Zeile 397 | Zeile 431 |
---|
$plugins->run_hooks("editpost_restorepost");
if($mybb->get_input('restore', MyBB::INPUT_INT) == 1)
|
$plugins->run_hooks("editpost_restorepost");
if($mybb->get_input('restore', MyBB::INPUT_INT) == 1)
|
{ $query = $db->simple_select("posts", "pid", "tid='{$tid}'", array("limit" => 1, "order_by" => "dateline", "order_dir" => "asc"));
| { $query = $db->simple_select("posts", "pid", "tid='{$tid}'", array("limit" => 1, "order_by" => "dateline, pid"));
|
$firstcheck = $db->fetch_array($query); if($firstcheck['pid'] == $pid)
|
$firstcheck = $db->fetch_array($query); if($firstcheck['pid'] == $pid)
|
{
| {
|
$firstpost = 1;
|
$firstpost = 1;
|
}
| }
|
else { $firstpost = 0;
|
else { $firstpost = 0;
|
}
| }
|
$modlogdata['fid'] = $fid; $modlogdata['tid'] = $tid; $modlogdata['pid'] = $pid;
| $modlogdata['fid'] = $fid; $modlogdata['tid'] = $tid; $modlogdata['pid'] = $pid;
|
Zeile 437 | Zeile 471 |
---|
} else {
|
} else {
|
if(is_moderator($fid, "canrestoreposts"))
| if(is_moderator($fid, "canrestoreposts"))
|
{ // Select the first post before this require_once MYBB_ROOT."inc/class_moderation.php";
| { // Select the first post before this require_once MYBB_ROOT."inc/class_moderation.php";
|
Zeile 447 | Zeile 481 |
---|
$redirect = get_post_link($pid, $tid)."#pid{$pid}";
if($mybb->input['ajax'] == 1)
|
$redirect = get_post_link($pid, $tid)."#pid{$pid}";
if($mybb->input['ajax'] == 1)
|
{
| {
|
header("Content-type: application/json; charset={$lang->settings['charset']}"); echo json_encode(array("data" => '1', "first" => '0')); }
| header("Content-type: application/json; charset={$lang->settings['charset']}"); echo json_encode(array("data" => '1', "first" => '0')); }
|
Zeile 467 | Zeile 501 |
---|
error($lang->redirect_norestore); } }
|
error($lang->redirect_norestore); } }
|
| $postoptions = array();
|
if($mybb->input['action'] == "do_editpost" && $mybb->request_method == "post") {
| if($mybb->input['action'] == "do_editpost" && $mybb->request_method == "post") {
|
Zeile 566 | Zeile 602 |
---|
{ $plugins->run_hooks("editpost_action_start");
|
{ $plugins->run_hooks("editpost_action_start");
|
if(!isset($mybb->input['previewpost'])) { $icon = $post['icon']; }
| $preview = ''; $posticons = '';
|
if($forum['allowpicons'] != 0) { $posticons = get_post_icons(); }
|
if($forum['allowpicons'] != 0) { $posticons = get_post_icons(); }
|
|
|
$mybb->user['username'] = htmlspecialchars_uni($mybb->user['username']); eval("\$loginbox = \"".$templates->get("changeuserbox")."\";");
|
$mybb->user['username'] = htmlspecialchars_uni($mybb->user['username']); eval("\$loginbox = \"".$templates->get("changeuserbox")."\";");
|
|
|
$deletebox = '';
|
$deletebox = '';
|
// Can we delete posts? if($post['visible'] != -1 && (is_moderator($fid, "candeleteposts") || $forumpermissions['candeleteposts'] == 1 && $mybb->user['uid'] == $post['uid']))
| if(isset($post['visible']) && $post['visible'] != -1 && (($thread['firstpost'] == $pid && (is_moderator($fid, "candeletethreads") || $forumpermissions['candeletethreads'] == 1 && $mybb->user['uid'] == $post['uid'])) || ($thread['firstpost'] != $pid && (is_moderator($fid, "candeleteposts") || $forumpermissions['candeleteposts'] == 1 && $mybb->user['uid'] == $post['uid']))))
|
{ eval("\$deletebox = \"".$templates->get("editpost_delete")."\";"); }
| { eval("\$deletebox = \"".$templates->get("editpost_delete")."\";"); }
|
Zeile 601 | Zeile 635 |
---|
if($mybb->settings['bbcodeinserter'] != 0 && $forum['allowmycode'] != 0 && $mybb->user['showcodebuttons'] != 0) { eval("\$postinsert = \"".$templates->get("post_attachments_attachment_postinsert")."\";");
|
if($mybb->settings['bbcodeinserter'] != 0 && $forum['allowmycode'] != 0 && $mybb->user['showcodebuttons'] != 0) { eval("\$postinsert = \"".$templates->get("post_attachments_attachment_postinsert")."\";");
|
}
| }
|
// Moderating options $attach_mod_options = ''; if(is_moderator($fid))
| // Moderating options $attach_mod_options = ''; if(is_moderator($fid))
|
Zeile 622 | Zeile 656 |
---|
if($attachment['visible'] != 1) { eval("\$attachments .= \"".$templates->get("post_attachments_attachment_unapproved")."\";");
|
if($attachment['visible'] != 1) { eval("\$attachments .= \"".$templates->get("post_attachments_attachment_unapproved")."\";");
|
}
| }
|
else { eval("\$attachments .= \"".$templates->get("post_attachments_attachment")."\";");
| else { eval("\$attachments .= \"".$templates->get("post_attachments_attachment")."\";");
|
Zeile 632 | Zeile 666 |
---|
$query = $db->simple_select("attachments", "SUM(filesize) AS ausage", "uid='".$mybb->user['uid']."'"); $usage = $db->fetch_array($query); if($usage['ausage'] > ($mybb->usergroup['attachquota']*1024) && $mybb->usergroup['attachquota'] != 0)
|
$query = $db->simple_select("attachments", "SUM(filesize) AS ausage", "uid='".$mybb->user['uid']."'"); $usage = $db->fetch_array($query); if($usage['ausage'] > ($mybb->usergroup['attachquota']*1024) && $mybb->usergroup['attachquota'] != 0)
|
{
| {
|
$noshowattach = 1;
|
$noshowattach = 1;
|
} else { $noshowattach = 0;
| } else { $noshowattach = 0;
|
} if($mybb->usergroup['attachquota'] == 0) { $friendlyquota = $lang->unlimited;
|
} if($mybb->usergroup['attachquota'] == 0) { $friendlyquota = $lang->unlimited;
|
} else
| } else
|
{ $friendlyquota = get_friendly_size($mybb->usergroup['attachquota']*1024);
|
{ $friendlyquota = get_friendly_size($mybb->usergroup['attachquota']*1024);
|
} $friendlyusage = get_friendly_size($usage['ausage']); $lang->attach_quota = $lang->sprintf($lang->attach_quota, $friendlyusage, $friendlyquota);
| }
$lang->attach_quota = $lang->sprintf($lang->attach_quota, $friendlyquota);
$link_viewattachments = '';
if($usage['ausage'] !== NULL) { $friendlyusage = get_friendly_size($usage['ausage']); $lang->attach_usage = $lang->sprintf($lang->attach_usage, $friendlyusage); eval("\$link_viewattachments = \"".$templates->get("post_attachments_viewlink")."\";"); } else { $lang->attach_usage = ""; }
$attach_add_options = '';
|
if($mybb->settings['maxattachments'] == 0 || ($mybb->settings['maxattachments'] != 0 && $attachcount < $mybb->settings['maxattachments']) && !$noshowattach) { eval("\$attach_add_options = \"".$templates->get("post_attachments_add")."\";"); }
|
if($mybb->settings['maxattachments'] == 0 || ($mybb->settings['maxattachments'] != 0 && $attachcount < $mybb->settings['maxattachments']) && !$noshowattach) { eval("\$attach_add_options = \"".$templates->get("post_attachments_add")."\";"); }
|
| $attach_update_options = '';
|
if(($mybb->usergroup['caneditattachments'] || $forumpermissions['caneditattachments']) && $attachcount > 0)
|
if(($mybb->usergroup['caneditattachments'] || $forumpermissions['caneditattachments']) && $attachcount > 0)
|
{
| {
|
eval("\$attach_update_options = \"".$templates->get("post_attachments_update")."\";");
|
eval("\$attach_update_options = \"".$templates->get("post_attachments_update")."\";");
|
}
| }
|
if($attach_add_options || $attach_update_options) { eval("\$newattach = \"".$templates->get("post_attachments_new")."\";"); } eval("\$attachbox = \"".$templates->get("post_attachments")."\";");
|
if($attach_add_options || $attach_update_options) { eval("\$newattach = \"".$templates->get("post_attachments_new")."\";"); } eval("\$attachbox = \"".$templates->get("post_attachments")."\";");
|
| } else { $attachbox = '';
|
} if(!$mybb->get_input('attachmentaid', MyBB::INPUT_INT) && !$mybb->get_input('newattachment') && !$mybb->get_input('updateattachment') && !isset($mybb->input['previewpost']))
|
} if(!$mybb->get_input('attachmentaid', MyBB::INPUT_INT) && !$mybb->get_input('newattachment') && !$mybb->get_input('updateattachment') && !isset($mybb->input['previewpost']))
|
{
| {
|
$message = $post['message']; $subject = $post['subject']; $reason = htmlspecialchars_uni($post['editreason']);
|
$message = $post['message']; $subject = $post['subject']; $reason = htmlspecialchars_uni($post['editreason']);
|
}
| }
|
else { $message = $mybb->get_input('message'); $subject = $mybb->get_input('subject'); $reason = htmlspecialchars_uni($mybb->get_input('editreason'));
|
else { $message = $mybb->get_input('message'); $subject = $mybb->get_input('subject'); $reason = htmlspecialchars_uni($mybb->get_input('editreason'));
|
}
| }
|
$previewmessage = $message; $previewsubject = $subject; $message = htmlspecialchars_uni($message);
| $previewmessage = $message; $previewsubject = $subject; $message = htmlspecialchars_uni($message);
|
Zeile 740 | Zeile 794 |
---|
$post_errors = inline_error($post_errors); $mybb->input['action'] = "editpost"; $mybb->input['previewpost'] = 0;
|
$post_errors = inline_error($post_errors); $mybb->input['action'] = "editpost"; $mybb->input['previewpost'] = 0;
|
} else {
| } else {
|
$postoptions = $mybb->get_input('postoptions', MyBB::INPUT_ARRAY);
| $postoptions = $mybb->get_input('postoptions', MyBB::INPUT_ARRAY);
|
Zeile 755 | Zeile 809 |
---|
{ $postoptionschecked['disablesmilies'] = " checked=\"checked\""; }
|
{ $postoptionschecked['disablesmilies'] = " checked=\"checked\""; }
|
|
|
$subscription_method = get_subscription_method($tid, $postoptions); ${$subscription_method.'subscribe'} = "checked=\"checked\" "; }
| $subscription_method = get_subscription_method($tid, $postoptions); ${$subscription_method.'subscribe'} = "checked=\"checked\" "; }
|
Zeile 787 | Zeile 841 |
---|
while($attachment = $db->fetch_array($query)) { $attachcache[0][$attachment['aid']] = $attachment;
|
while($attachment = $db->fetch_array($query)) { $attachcache[0][$attachment['aid']] = $attachment;
|
}
| }
|
if(!isset($postoptions['disablesmilies'])) {
| if(!isset($postoptions['disablesmilies'])) {
|
Zeile 797 | Zeile 851 |
---|
// Set the values of the post info array. $postinfo['message'] = $previewmessage; $postinfo['subject'] = $previewsubject;
|
// Set the values of the post info array. $postinfo['message'] = $previewmessage; $postinfo['subject'] = $previewsubject;
|
$postinfo['icon'] = $icon;
| $postinfo['icon'] = $post['icon'];
|
$postinfo['smilieoff'] = $postoptions['disablesmilies'];
|
$postinfo['smilieoff'] = $postoptions['disablesmilies'];
|
|
|
$postbit = build_postbit($postinfo, 1); eval("\$preview = \"".$templates->get("previewpost")."\";"); }
| $postbit = build_postbit($postinfo, 1); eval("\$preview = \"".$templates->get("previewpost")."\";"); }
|
Zeile 810 | Zeile 864 |
---|
if($post['includesig'] != 0) { $postoptionschecked['signature'] = " checked=\"checked\"";
|
if($post['includesig'] != 0) { $postoptionschecked['signature'] = " checked=\"checked\"";
|
}
| }
|
if($post['smilieoff'] == 1) {
| if($post['smilieoff'] == 1) {
|
Zeile 830 | Zeile 884 |
---|
}
$prefixselect = build_prefix_select($forum['fid'], $mybb->get_input('threadprefix', MyBB::INPUT_INT), 0, $thread['prefix']);
|
}
$prefixselect = build_prefix_select($forum['fid'], $mybb->get_input('threadprefix', MyBB::INPUT_INT), 0, $thread['prefix']);
|
} else
| } else
|
{ $prefixselect = ""; }
| { $prefixselect = ""; }
|
Zeile 851 | Zeile 905 |
---|
// Fetch subscription select box eval("\$subscriptionmethod = \"".$templates->get("post_subscription_method")."\";");
|
// Fetch subscription select box eval("\$subscriptionmethod = \"".$templates->get("post_subscription_method")."\";");
|
$query = $db->simple_select("posts", "*", "tid='{$tid}'", array("limit" => 1, "order_by" => "dateline", "order_dir" => "asc"));
| $query = $db->simple_select("posts", "*", "tid='{$tid}'", array("limit" => 1, "order_by" => "dateline, pid"));
|
$firstcheck = $db->fetch_array($query);
|
$firstcheck = $db->fetch_array($query);
|
|
|
$time = TIME_NOW; if($firstcheck['pid'] == $pid && $forumpermissions['canpostpolls'] != 0 && $thread['poll'] < 1 && (is_moderator($fid, "canmanagepolls") || $thread['dateline'] > ($time-($mybb->settings['polltimelimit']*60*60)) || $mybb->settings['polltimelimit'] == 0)) { $lang->max_options = $lang->sprintf($lang->max_options, $mybb->settings['maxpolloptions']); $numpolloptions = $mybb->get_input('numpolloptions', MyBB::INPUT_INT); $postpollchecked = '';
|
$time = TIME_NOW; if($firstcheck['pid'] == $pid && $forumpermissions['canpostpolls'] != 0 && $thread['poll'] < 1 && (is_moderator($fid, "canmanagepolls") || $thread['dateline'] > ($time-($mybb->settings['polltimelimit']*60*60)) || $mybb->settings['polltimelimit'] == 0)) { $lang->max_options = $lang->sprintf($lang->max_options, $mybb->settings['maxpolloptions']); $numpolloptions = $mybb->get_input('numpolloptions', MyBB::INPUT_INT); $postpollchecked = '';
|
|
|
if($numpolloptions < 1) { $numpolloptions = 2; }
|
if($numpolloptions < 1) { $numpolloptions = 2; }
|
|
|
if($mybb->get_input('postpoll', MyBB::INPUT_INT) == 1) { $postpollchecked = 'checked="checked"'; }
|
if($mybb->get_input('postpoll', MyBB::INPUT_INT) == 1) { $postpollchecked = 'checked="checked"'; }
|
|
|
eval("\$pollbox = \"".$templates->get("newthread_postpoll")."\";");
|
eval("\$pollbox = \"".$templates->get("newthread_postpoll")."\";");
|
}
| }
|
else
|
else
|
{
| {
|
$pollbox = '';
|
$pollbox = '';
|
}
| }
|
// Hide signature option if no permission $signature = ''; if($mybb->usergroup['canusesig'] == 1 && !$mybb->user['suspendsignature']) { eval("\$signature = \"".$templates->get('editpost_signature')."\";");
|
// Hide signature option if no permission $signature = ''; if($mybb->usergroup['canusesig'] == 1 && !$mybb->user['suspendsignature']) { eval("\$signature = \"".$templates->get('editpost_signature')."\";");
|
}
| }
|
// Can we disable smilies or are they disabled already? $disablesmilies = '';
| // Can we disable smilies or are they disabled already? $disablesmilies = '';
|
Zeile 905 | Zeile 959 |
---|
if($forumpermissions['modattachments'] == 1 && $forumpermissions['canpostattachments'] != 0) { $moderation_text = $lang->moderation_forum_attachments;
|
if($forumpermissions['modattachments'] == 1 && $forumpermissions['canpostattachments'] != 0) { $moderation_text = $lang->moderation_forum_attachments;
|
eval('$moderation_notice = "'.$templates->get('global_moderation_notice').'";'); } }
| eval('$moderation_notice = "'.$templates->get('global_moderation_notice').'";'); } }
|
if(!is_moderator($forum['fid'], "canapproveunapproveposts"))
|
if(!is_moderator($forum['fid'], "canapproveunapproveposts"))
|
{
| {
|
if($forumpermissions['mod_edit_posts'] == 1) { $moderation_text = $lang->moderation_forum_edits;
| if($forumpermissions['mod_edit_posts'] == 1) { $moderation_text = $lang->moderation_forum_edits;
|
Zeile 918 | Zeile 972 |
---|
} }
|
} }
|
$php_max_upload_filesize = return_bytes(ini_get('max_upload_filesize')); $php_post_max_size = return_bytes(ini_get('post_max_size'));
if ($php_max_upload_filesize != 0 && $php_post_max_size != 0) { $php_max_upload_size = min($php_max_upload_filesize, $php_post_max_size); } else { $php_max_upload_size = max($php_max_upload_filesize, $php_post_max_size); }
| $php_max_upload_size = get_php_upload_limit();
|
$php_max_file_uploads = (int)ini_get('max_file_uploads'); eval("\$post_javascript = \"".$templates->get("post_javascript")."\";");
| $php_max_file_uploads = (int)ini_get('max_file_uploads'); eval("\$post_javascript = \"".$templates->get("post_javascript")."\";");
|