Zeile 3 | Zeile 3 |
---|
* MyBB 1.2 * Copyright � 2006 MyBB Group, All Rights Reserved *
|
* MyBB 1.2 * Copyright � 2006 MyBB Group, All Rights Reserved *
|
* Website: http://www.mybboard.com * License: http://www.mybboard.com/eula.html
| * Website: http://www.mybboard.net * License: http://www.mybboard.net/eula.html
|
*
|
*
|
* $Id: editpost.php 2749 2007-02-10 13:33:47Z CraKteR $
| * $Id: editpost.php 3055 2007-05-13 15:01:15Z Tikitiki $
|
*/
define("IN_MYBB", 1);
| */
define("IN_MYBB", 1);
|
Zeile 193 | Zeile 193 |
---|
if($forumpermissions['candeletethreads'] == "yes") { delete_thread($tid);
|
if($forumpermissions['candeletethreads'] == "yes") { delete_thread($tid);
|
update_forum_count($fid);
| |
mark_reports($tid, "thread"); log_moderator_action($modlogdata, "Deleted Thread"); redirect("forumdisplay.php?fid=$fid", $lang->redirect_threaddeleted);
| mark_reports($tid, "thread"); log_moderator_action($modlogdata, "Deleted Thread"); redirect("forumdisplay.php?fid=$fid", $lang->redirect_threaddeleted);
|
Zeile 209 | Zeile 208 |
---|
{ // Select the first post before this delete_post($pid, $tid);
|
{ // Select the first post before this delete_post($pid, $tid);
|
update_thread_count($tid); update_forum_count($fid);
| |
mark_reports($pid, "post"); log_moderator_action($modlogdata, "Deleted Post"); $query = $db->simple_select(TABLE_PREFIX."posts", "pid", "tid='{$tid}' AND dateline <= '{$post['dateline']}'", array("limit" => 1, "order_by" => "dateline", "order_dir" => "desc"));
| mark_reports($pid, "post"); log_moderator_action($modlogdata, "Deleted Post"); $query = $db->simple_select(TABLE_PREFIX."posts", "pid", "tid='{$tid}' AND dateline <= '{$post['dateline']}'", array("limit" => 1, "order_by" => "dateline", "order_dir" => "desc"));
|
Zeile 374 | Zeile 371 |
---|
} $query = $db->query("SELECT SUM(filesize) AS ausage FROM ".TABLE_PREFIX."attachments WHERE uid='".$mybb->user['uid']."'"); $usage = $db->fetch_array($query);
|
} $query = $db->query("SELECT SUM(filesize) AS ausage FROM ".TABLE_PREFIX."attachments WHERE uid='".$mybb->user['uid']."'"); $usage = $db->fetch_array($query);
|
if($usage['ausage'] > ($mybb->usergroup['attachquota']*1000) && $mybb->usergroup['attachquota'] != 0)
| if($usage['ausage'] > ($mybb->usergroup['attachquota']*1024) && $mybb->usergroup['attachquota'] != 0)
|
{ $noshowattach = 1; }
| { $noshowattach = 1; }
|
Zeile 384 | Zeile 381 |
---|
} else {
|
} else {
|
$friendlyquota = get_friendly_size($mybb->usergroup['attachquota']*1000);
| $friendlyquota = get_friendly_size($mybb->usergroup['attachquota']*1024);
|
} $friendlyusage = get_friendly_size($usage['ausage']); $lang->attach_quota = sprintf($lang->attach_quota, $friendlyusage, $friendlyquota);
| } $friendlyusage = get_friendly_size($usage['ausage']); $lang->attach_quota = sprintf($lang->attach_quota, $friendlyusage, $friendlyquota);
|
Zeile 414 | Zeile 411 |
---|
eval("\$pollbox = \"".$templates->get("newthread_postpoll")."\";"); }
|
eval("\$pollbox = \"".$templates->get("newthread_postpoll")."\";"); }
|
if($mybb->input['previewpost'] || $post_errors)
| if($mybb->input['previewpost'] && !$post_errors)
|
{
|
{
|
$previewmessage = $message; $message = htmlspecialchars_uni($message); $subject = htmlspecialchars_uni($subject);
$postoptions = $mybb->input['postoptions'];
if($postoptions['signature'] == "yes") { $postoptionschecked['signature'] = "checked=\"checked\""; } if($postoptions['emailnotify'] == "yes") { $postoptionschecked['emailnotify'] = "checked=\"checked\"";
| // Set up posthandler. require_once MYBB_ROOT."inc/datahandlers/post.php"; $posthandler = new PostDataHandler("update"); $posthandler->action = "post"; // Set the post data that came from the input to the $post array. $post = array( "pid" => $mybb->input['pid'], "subject" => $mybb->input['subject'], "icon" => $mybb->input['icon'], "uid" => $mybb->user['uid'], "username" => $mybb->user['username'], "edit_uid" => $mybb->user['uid'], "message" => $mybb->input['message'], ); // Set up the post options from the input. $post['options'] = array( "signature" => $mybb->input['postoptions']['signature'], "emailnotify" => $mybb->input['postoptions']['emailnotify'], "disablesmilies" => $mybb->input['postoptions']['disablesmilies'] ); $posthandler->set_data($post); // Now let the post handler do all the hard work. if(!$posthandler->validate_post()) { $post_errors = $posthandler->get_friendly_errors(); $post_errors = inline_error($post_errors); $mybb->input['action'] = "editpost"; $mybb->input['previewpost'] = 0;
|
}
|
}
|
if($postoptions['disablesmilies'] == "yes")
| else
|
{
|
{
|
$postoptionschecked['disablesmilies'] = "checked=\"checked\"";
| $previewmessage = $message; $message = htmlspecialchars_uni($message); $subject = htmlspecialchars_uni($subject); $postoptions = $mybb->input['postoptions']; if($postoptions['signature'] == "yes") { $postoptionschecked['signature'] = "checked=\"checked\""; } if($postoptions['emailnotify'] == "yes") { $postoptionschecked['emailnotify'] = "checked=\"checked\""; } if($postoptions['disablesmilies'] == "yes") { $postoptionschecked['disablesmilies'] = "checked=\"checked\""; } $pid = intval($mybb->input['pid']);
|
}
|
}
|
$pid = intval($mybb->input['pid']);
| |
}
if($mybb->input['previewpost'])
| }
if($mybb->input['previewpost'])
|
Zeile 469 | Zeile 502 |
---|
$postbit = build_postbit($postinfo, 1); eval("\$preview = \"".$templates->get("previewpost")."\";"); }
|
$postbit = build_postbit($postinfo, 1); eval("\$preview = \"".$templates->get("previewpost")."\";"); }
|
elseif(!$post_errors)
| else if(!$post_errors)
|
{ $message = htmlspecialchars_uni($message); $subject = htmlspecialchars_uni($subject);
| { $message = htmlspecialchars_uni($message); $subject = htmlspecialchars_uni($subject);
|