MINOR Using Filesystem::makeFolder() for creating /assets in AssetAdmin->init()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@92837 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2009-11-21 03:20:32 +00:00
parent c44bc29a8f
commit e91c0ca9df

View File

@ -70,12 +70,10 @@ class AssetAdmin extends LeftAndMain {
function init() { function init() {
parent::init(); parent::init();
if(!file_exists(ASSETS_PATH)) {
mkdir(ASSETS_PATH);
}
// needed for MemberTableField (Requirements not determined before Ajax-Call) // needed for MemberTableField (Requirements not determined before Ajax-Call)
Requirements::css(SAPPHIRE_DIR . "/css/ComplexTableField.css"); Requirements::css(SAPPHIRE_DIR . "/css/ComplexTableField.css");
// Create base folder if it doesnt exist already
if(!file_exists(ASSETS_PATH)) Filesystem::makeFolder(ASSETS_PATH);
Requirements::javascript(CMS_DIR . "/javascript/AssetAdmin.js"); Requirements::javascript(CMS_DIR . "/javascript/AssetAdmin.js");