From 20d18e1a9fec071d6e2e519709b08bacf650d750 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Sun, 12 Dec 2004 14:07:02 +0000 Subject: - fix attachment mod errors - make upload path consistent with all other 2.2 path settings - fix "post title wrong after split" bug git-svn-id: file:///svn/phpbb/trunk@5032 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions_admin.php | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'phpBB/includes/functions_admin.php') diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php index 3022266f7e..eb1554c234 100644 --- a/phpBB/includes/functions_admin.php +++ b/phpBB/includes/functions_admin.php @@ -677,23 +677,13 @@ function phpbb_unlink($filename, $mode = 'file') { global $config, $user, $phpbb_root_path; - $filename = ($mode == 'thumbnail') ? $config['upload_dir'] . '/thumb_' . $filename : $config['upload_dir'] . '/' . $filename; + $filename = ($mode == 'thumbnail') ? $phpbb_root_path . $config['upload_dir'] . '/thumb_' . basename($filename) : $phpbb_root_path . $config['upload_dir'] . '/' . basename($filename); $deleted = @unlink($filename); if (file_exists($filename)) { $filesys = str_replace('/','\\', $filename); $deleted = @system("del $filesys"); - - if (file_exists($filename)) - { - $filename = realpath($filename); - @chmod($filename, 0777); - if (!($deleted = @unlink($filename))) - { - $deleted = @system("del $filename"); - } - } } return $deleted; -- cgit v1.2.1