1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-06 08:47:45 +02:00

bump topic and orphan attachments

changes here and there...


git-svn-id: file:///svn/phpbb/trunk@4614 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen
2003-10-19 15:36:45 +00:00
parent de53ffabb4
commit e7c3370a04
13 changed files with 471 additions and 160 deletions

View File

@@ -652,7 +652,8 @@ function delete_attachments($post_id_array = -1, $attach_id_array = -1, $page =
$db->sql_freeresult($result);
}
// TODO - Return number of deleted attachments
// TODO
// Return number of deleted attachments
}
function delete_topic_shadows($max_age, $forum_id = '', $auto_sync = TRUE)
@@ -702,9 +703,11 @@ function delete_topic_shadows($max_age, $forum_id = '', $auto_sync = TRUE)
// Delete File
function phpbb_unlink($filename, $mode = 'file')
{
global $config, $user;
global $config, $user, $phpbb_root_path;
$filename = ($mode == 'thumbnail') ? $config['upload_dir'] . '/thumbs/t_' . $filename : $config['upload_dir'] . '/' . $filename;
$upload_dir = ($config['upload_dir'][0] == '/' || ($config['upload_dir'][0] != '/' && $config['upload_dir'][1] == ':')) ? $config['upload_dir'] : $phpbb_root_path . $config['upload_dir'];
$filename = ($mode == 'thumbnail') ? $upload_dir . '/thumbs/t_' . $filename : $upload_dir . '/' . $filename;
$deleted = @unlink($filename);
if (file_exists($filename))