From 8075b40bf051b0a4cabfe43ee7f9beedfe94befb Mon Sep 17 00:00:00 2001 From: Samuel Georges Date: Sat, 27 Aug 2016 13:38:19 +1000 Subject: [PATCH] Now that File facade is removed, we must apply chmod manually --- modules/cms/classes/CodeParser.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/modules/cms/classes/CodeParser.php b/modules/cms/classes/CodeParser.php index 6d873d8de..13e8b2d07 100644 --- a/modules/cms/classes/CodeParser.php +++ b/modules/cms/classes/CodeParser.php @@ -1,5 +1,6 @@ $path])); } + File::chmod($path); + return $className; } @@ -317,8 +320,12 @@ class CodeParser $count = 0; $dir = dirname($path); - if (is_dir($dir) && !is_writable($dir)) { - throw new SystemException(Lang::get('system::lang.directory.create_fail', ['name'=>$dir])); + if (is_dir($dir)) { + if (!is_writable($dir)) { + throw new SystemException(Lang::get('system::lang.directory.create_fail', ['name'=>$dir])); + } + + return; } while (!is_dir($dir) && !@mkdir($dir, 0777, true)) { @@ -328,6 +335,8 @@ class CodeParser throw new SystemException(Lang::get('system::lang.directory.create_fail', ['name'=>$dir])); } } + + File::chmodRecursive($path); } }