aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_admin.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2003-10-19 15:36:45 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2003-10-19 15:36:45 +0000
commite7c3370a043fe4f163fcc4b3b529d1c78093c0f2 (patch)
treeede3cf8366d0ce1cd4e40c2b82b8056813b27c36 /phpBB/includes/functions_admin.php
parentde53ffabb410f7db9eb807a2965b02d19e314cc0 (diff)
downloadforums-e7c3370a043fe4f163fcc4b3b529d1c78093c0f2.tar
forums-e7c3370a043fe4f163fcc4b3b529d1c78093c0f2.tar.gz
forums-e7c3370a043fe4f163fcc4b3b529d1c78093c0f2.tar.bz2
forums-e7c3370a043fe4f163fcc4b3b529d1c78093c0f2.tar.xz
forums-e7c3370a043fe4f163fcc4b3b529d1c78093c0f2.zip
bump topic and orphan attachments
changes here and there... git-svn-id: file:///svn/phpbb/trunk@4614 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_admin.php')
-rw-r--r--phpBB/includes/functions_admin.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php
index 40991815a6..78c46bafd0 100644
--- a/phpBB/includes/functions_admin.php
+++ b/phpBB/includes/functions_admin.php
@@ -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))