From f83acd219e6a66acd1523d8293e60dd4369f3b0f Mon Sep 17 00:00:00 2001 From: Andrew O'Neil Date: Mon, 29 Oct 2007 02:10:59 +0000 Subject: [PATCH] #1516 - Can't use picture add folder feature when there is no assets folder git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@43933 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- code/AssetAdmin.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/code/AssetAdmin.php b/code/AssetAdmin.php index a96732ae..3846b9c0 100755 --- a/code/AssetAdmin.php +++ b/code/AssetAdmin.php @@ -32,6 +32,10 @@ class AssetAdmin extends LeftAndMain { */ function init() { parent::init(); + + if(!file_exists('../assets')) { + mkdir('../assets'); + } // needed for MemberTableField (Requirements not determined before Ajax-Call) Requirements::javascript("sapphire/javascript/ComplexTableField.js"); @@ -531,6 +535,9 @@ JS; } // Actually create + if(!file_exists('../assets')) { + mkdir('../assets'); + } mkdir($filename); chmod($filename, Filesystem::$file_create_mask);