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: functions_upload.php 4101 2008-08-10 18:52:38Z Tikitiki $
| * $Id: functions_upload.php 4274 2008-11-19 03:22:50Z Tikitiki $
|
*/
| */
|
Zeile 385 | Zeile 385 |
---|
}
// Check if an attachment with this name is already in the post
|
}
// Check if an attachment with this name is already in the post
|
$query = $db->simple_select("attachments", "*", "filename='".$db->escape_string($attachment['name'])."' AND (posthash='$posthash' OR (pid='$pid' AND pid!='0'))");
| $query = $db->simple_select("attachments", "*", "filename='".$db->escape_string($attachment['name'])."' AND (posthash='$posthash' OR (pid='".intval($pid)."' AND pid!='0'))");
|
$prevattach = $db->fetch_array($query); if($prevattach['aid']) {
| $prevattach = $db->fetch_array($query); if($prevattach['aid']) {
|
Zeile 412 | Zeile 412 |
---|
} // All seems to be good, lets move the attachment!
|
} // All seems to be good, lets move the attachment!
|
$filename = "post_".$mybb->user['uid']."_".TIME_NOW.".attach";
| $filename = "post_".$mybb->user['uid']."_".TIME_NOW."_".md5(uniqid(rand(),�true)).".attach";
|
$file = upload_file($attachment, $mybb->settings['uploadspath']."/".$month_dir, $filename);
| $file = upload_file($attachment, $mybb->settings['uploadspath']."/".$month_dir, $filename);
|