Zeile 62 | Zeile 62 |
---|
// Get forum info $fid = $post['fid']; $forum = get_forum($fid);
|
// Get forum info $fid = $post['fid']; $forum = get_forum($fid);
|
| if(($thread['visible'] == 0 && !is_moderator($fid)) || ($thread['visible'] < 0 && $thread['uid'] != $mybb->user['uid'])) { error($lang->error_invalidthread); }
|
if(!$forum || $forum['type'] != "f") { error($lang->error_closedinvalidforum); }
|
if(!$forum || $forum['type'] != "f") { error($lang->error_closedinvalidforum); }
|
if($forum['open'] == 0 || $mybb->user['suspendposting'] == 1)
| if(($forum['open'] == 0 && !is_moderator($fid, "caneditposts")) || $mybb->user['suspendposting'] == 1)
|
{ error_no_permission(); }
| { error_no_permission(); }
|
Zeile 206 | Zeile 211 |
---|
{ $update_sql = array("visible" => 1); $db->update_query("attachments", $update_sql, "aid='{$mybb->input['attachmentaid']}'");
|
{ $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->input['attachmentact'] == "unapprove" && is_moderator($fid, 'caneditposts')) { $update_sql = array("visible" => 0); $db->update_query("attachments", $update_sql, "aid='{$mybb->input['attachmentaid']}'");
|
} elseif($mybb->input['attachmentact'] == "unapprove" && is_moderator($fid, 'caneditposts')) { $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->input['submit']) {
| } if(!$mybb->input['submit']) {
|