mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
small change in folder chmod
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5127 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
3a31e38937
commit
7a0944c567
1 changed files with 4 additions and 3 deletions
|
@ -332,13 +332,14 @@ class Folder extends Object{
|
||||||
* @return bool Returns TRUE on success, FALSE on failure
|
* @return bool Returns TRUE on success, FALSE on failure
|
||||||
*/
|
*/
|
||||||
function chmod($path, $mode = false, $exceptions = false) {
|
function chmod($path, $mode = false, $exceptions = false) {
|
||||||
if (!is_dir($path)) {
|
|
||||||
return chmod($path, intval($mode, 8));
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!$mode) {
|
if(!$mode) {
|
||||||
$mode = $this->mode;
|
$mode = $this->mode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (is_dir($path)) {
|
||||||
|
return chmod($path, intval($mode, 8));
|
||||||
|
}
|
||||||
|
|
||||||
$dir = opendir($path);
|
$dir = opendir($path);
|
||||||
if($dir) {
|
if($dir) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue