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 4274 2008-11-19 03:22:50Z Tikitiki $
| * $Id: functions_upload.php 4337 2009-03-30 01:21:51Z Tikitiki $
|
*/
| */
|
Zeile 36 | Zeile 36 |
---|
$plugins->run_hooks("remove_attachment_do_delete", $attachment); $db->delete_query("attachments", "aid='{$attachment['aid']}'");
|
$plugins->run_hooks("remove_attachment_do_delete", $attachment); $db->delete_query("attachments", "aid='{$attachment['aid']}'");
|
@unlink($mybb->settings['uploadspath']."/".$attachment['attachname']);
| if(defined('IN_ADMINCP')) { $uploadpath = '../'.$mybb->settings['uploadspath']; } else { $uploadpath = $mybb->settings['uploadspath']; } @unlink($uploadpath."/".$attachment['attachname']);
|
if($attachment['thumbnail']) {
|
if($attachment['thumbnail']) {
|
@unlink($mybb->settings['uploadspath']."/".$attachment['thumbnail']);
| @unlink($uploadpath."/".$attachment['thumbnail']);
|
}
$date_directory = explode('/', $attachment['attachname']);
|
}
$date_directory = explode('/', $attachment['attachname']);
|
if(@is_dir($mybb->settings['uploadspath']."/".$date_directory[0]))
| if(@is_dir($uploadpath."/".$date_directory[0]))
|
{
|
{
|
@rmdir($mybb->settings['uploadspath']."/".$date_directory[0]);
| @rmdir($uploadpath."/".$date_directory[0]);
|
}
if($attachment['visible'] == 1 && $pid)
|
}
if($attachment['visible'] == 1 && $pid)
|
{
| {
|
$post = get_post($pid); update_thread_counters($post['tid'], array("attachmentcount" => "-1")); }
| $post = get_post($pid); update_thread_counters($post['tid'], array("attachmentcount" => "-1")); }
|
Zeile 77 | Zeile 87 |
---|
else { $query = $db->simple_select("attachments", "*", "pid='$pid'");
|
else { $query = $db->simple_select("attachments", "*", "pid='$pid'");
|
| } if(defined('IN_ADMINCP')) { $uploadpath = '../'.$mybb->settings['uploadspath']; } else { $uploadpath = $mybb->settings['uploadspath'];
|
}
$num_attachments = 0;
| }
$num_attachments = 0;
|
Zeile 91 | Zeile 110 |
---|
$db->delete_query("attachments", "aid='".$attachment['aid']."'");
|
$db->delete_query("attachments", "aid='".$attachment['aid']."'");
|
@unlink($mybb->settings['uploadspath']."/".$attachment['attachname']);
| @unlink($uploadpath."/".$attachment['attachname']);
|
if($attachment['thumbnail']) {
|
if($attachment['thumbnail']) {
|
@unlink($mybb->settings['uploadspath']."/".$attachment['thumbnail']);
| @unlink($uploadpath."/".$attachment['thumbnail']);
|
}
$date_directory = explode('/', $attachment['attachname']);
|
}
$date_directory = explode('/', $attachment['attachname']);
|
if(@is_dir($mybb->settings['uploadspath']."/".$date_directory[0]))
| if(@is_dir($uploadpath."/".$date_directory[0]))
|
{
|
{
|
@rmdir($mybb->settings['uploadspath']."/".$date_directory[0]);
| @rmdir($uploadpath."/".$date_directory[0]);
|
} }
| } }
|
Zeile 249 | Zeile 268 |
---|
$ret['error'] = $lang->sprintf($lang->error_avatartoobig, $maxwidth, $maxheight); if($mybb->settings['avatarresizing'] == "user") {
|
$ret['error'] = $lang->sprintf($lang->error_avatartoobig, $maxwidth, $maxheight); if($mybb->settings['avatarresizing'] == "user") {
|
$ret['error'] .= "<br /<br />".$lang->error_avataruserresize;
| $ret['error'] .= "<br /><br />".$lang->error_avataruserresize;
|
} @unlink($avatarpath."/".$filename); return $ret;
| } @unlink($avatarpath."/".$filename); return $ret;
|