mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-29 21:10:31 +02:00
- 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
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user