aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_admin.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2004-12-12 14:07:02 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2004-12-12 14:07:02 +0000
commit20d18e1a9fec071d6e2e519709b08bacf650d750 (patch)
treee6f71aa6625aae6ef8602b42716a7e531662c626 /phpBB/includes/functions_admin.php
parentaf82f666589ab73e2e2727015d82c611c93a9c6a (diff)
downloadforums-20d18e1a9fec071d6e2e519709b08bacf650d750.tar
forums-20d18e1a9fec071d6e2e519709b08bacf650d750.tar.gz
forums-20d18e1a9fec071d6e2e519709b08bacf650d750.tar.bz2
forums-20d18e1a9fec071d6e2e519709b08bacf650d750.tar.xz
forums-20d18e1a9fec071d6e2e519709b08bacf650d750.zip
- 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
Diffstat (limited to 'phpBB/includes/functions_admin.php')
-rw-r--r--phpBB/includes/functions_admin.php12
1 files changed, 1 insertions, 11 deletions
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;