File: phpbb/filesystem/filesystem.php
Unmodified
Added
Modified
Removed
Line 398 | Line 398 |
---|
$file_gid = @filegroup($file);
// Change owner
|
$file_gid = @filegroup($file);
// Change owner
|
if ($file_uid !== $this->chmod_info['common_owner'])
| if (is_writable($file) && $file_uid !== $this->chmod_info['common_owner'])
|
{ $this->chown($file, $this->chmod_info['common_owner'], $recursive); }
// Change group
|
{ $this->chown($file, $this->chmod_info['common_owner'], $recursive); }
// Change group
|
if ($file_gid !== $this->chmod_info['common_group'])
| if (is_writable($file) && $file_gid !== $this->chmod_info['common_group'])
|
{ $this->chgrp($file, $this->chmod_info['common_group'], $recursive); }
| { $this->chgrp($file, $this->chmod_info['common_group'], $recursive); }
|
Line 613 | Line 613 |
---|
} else {
|
} else {
|
$handle = @fopen($file, 'c');
| $handle = new \SplFileInfo($file);
|
|
|
if (is_resource($handle)) { fclose($handle); return true; }
| // Returns TRUE if writable, FALSE otherwise return $handle->isWritable();
|
} } else
| } } else
|
Line 637 | Line 634 |
---|
}
/**
|
}
/**
|
* Try to resolve real path when PHP's realpath failes to do so
| * Try to resolve real path when PHP's realpath fails to do so
|
* * @param string $path * @return bool|string
| * * @param string $path * @return bool|string
|