From 8d2931dda4735d5b0fe55391d2fba3b64edf5ab0 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Thu, 25 Oct 2007 23:07:24 +0000 Subject: [PATCH] FEATURE Using consistent umask static Filesystem::$folder_create_mask for mkdir()-calls git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@43870 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- code/AssetAdmin.php | 2 +- code/ImageEditor.php | 3 +-- code/StaticExporter.php | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/code/AssetAdmin.php b/code/AssetAdmin.php index 71be5637..a96732ae 100755 --- a/code/AssetAdmin.php +++ b/code/AssetAdmin.php @@ -532,7 +532,7 @@ JS; // Actually create mkdir($filename); - chmod($filename, 02775); + chmod($filename, Filesystem::$file_create_mask); $p->write(); diff --git a/code/ImageEditor.php b/code/ImageEditor.php index 6aff9ecf..303b9111 100644 --- a/code/ImageEditor.php +++ b/code/ImageEditor.php @@ -130,8 +130,7 @@ $tmpDir = '../assets/_tmp'; if(file_exists($tmpDir)) { Filesystem::removeFolder($tmpDir); - mkdir($tmpDir); - chmod($tmpDir, 02775); + mkdir($tmpDir, Filesystem::$folder_create_mask); } } diff --git a/code/StaticExporter.php b/code/StaticExporter.php index 1415eeb4..00941af7 100755 --- a/code/StaticExporter.php +++ b/code/StaticExporter.php @@ -49,7 +49,7 @@ class StaticExporter extends Controller { $folder = '/tmp/static-export/' . project(); if(!project()) $folder .= 'site'; - if(!file_exists($folder)) mkdir($folder, 02775, true); + if(!file_exists($folder)) mkdir($folder, Filesystem::$folder_create_mask, true); $f1 = Director::baseFolder() . '/assets'; $f2 = Director::baseFolder() . '/' . project(); @@ -66,7 +66,7 @@ class StaticExporter extends Controller { // Make the folder if(!file_exists($subfolder)) { - mkdir($subfolder, 02775); + mkdir($subfolder, Filesystem::$folder_create_mask); } // Run the page