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: editpost.php 4265 2008-11-08 23:52:49Z Tikitiki $
| * $Id: editpost.php 5379 2011-02-21 11:06:42Z Tomm $
|
*/
define("IN_MYBB", 1);
| */
define("IN_MYBB", 1);
|
Zeile 147 | Zeile 147 |
---|
if(!$mybb->input['attachmentaid'] && ($mybb->input['newattachment'] || ($mybb->input['action'] == "do_editpost" && $mybb->input['submit'] && $_FILES['attachment']))) {
|
if(!$mybb->input['attachmentaid'] && ($mybb->input['newattachment'] || ($mybb->input['action'] == "do_editpost" && $mybb->input['submit'] && $_FILES['attachment']))) {
|
| // Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
if($mybb->input['posthash']) { $posthash_query = "posthash='".$db->escape_string($mybb->input['posthash'])."' OR ";
|
if($mybb->input['posthash']) { $posthash_query = "posthash='".$db->escape_string($mybb->input['posthash'])."' OR ";
|
}
| }
|
else { $posthash_query = "";
|
else { $posthash_query = "";
|
}
| }
|
$query = $db->simple_select("attachments", "COUNT(aid) as numattachs", "{$posthash_query}pid='{$pid}'"); $attachcount = $db->fetch_field($query, "numattachs");
| $query = $db->simple_select("attachments", "COUNT(aid) as numattachs", "{$posthash_query}pid='{$pid}'"); $attachcount = $db->fetch_field($query, "numattachs");
|
Zeile 174 | Zeile 177 |
---|
} }
|
} }
|
|
|
if($mybb->input['attachmentaid'] && isset($mybb->input['attachmentact']) && $mybb->input['action'] == "do_editpost" && $mybb->request_method == "post") // Lets remove/approve/unapprove the attachment {
|
if($mybb->input['attachmentaid'] && 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->input['my_post_key']);
|
$mybb->input['attachmentaid'] = intval($mybb->input['attachmentaid']); if($mybb->input['attachmentact'] == "remove") {
| $mybb->input['attachmentaid'] = intval($mybb->input['attachmentaid']); if($mybb->input['attachmentact'] == "remove") {
|
Zeile 345 | Zeile 351 |
---|
if(!$mybb->input['action'] || $mybb->input['action'] == "editpost") {
|
if(!$mybb->input['action'] || $mybb->input['action'] == "editpost") {
|
$plugins->run_hooks("editpost_start");
| $plugins->run_hooks("editpost_action_start");
|
if(!$mybb->input['previewpost']) {
| if(!$mybb->input['previewpost']) {
|
Zeile 367 | Zeile 373 |
---|
}
// Setup a unique posthash for attachment management
|
}
// Setup a unique posthash for attachment management
|
$posthash = $post['posthash'];
| $posthash = htmlspecialchars_uni($post['posthash']);
|
$bgcolor = "trow1"; if($forumpermissions['canpostattachments'] != 0)
| $bgcolor = "trow1"; if($forumpermissions['canpostattachments'] != 0)
|