When calling Folder::findOrMake(), set the Title as well as the Name of new folders

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.2@64354 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Josh Kosmala 2008-10-16 03:41:19 +00:00 committed by Sam Minnee
parent 069c4464ad
commit 26fde80558

View File

@ -30,6 +30,7 @@ class Folder extends File {
$item = new Folder(); $item = new Folder();
$item->ParentID = $parentID; $item->ParentID = $parentID;
$item->Name = $part; $item->Name = $part;
$item->Title = $part;
$item->write(); $item->write();
if(!file_exists($item->getFullPath())) mkdir($item->getFullPath(),Filesystem::$folder_create_mask); if(!file_exists($item->getFullPath())) mkdir($item->getFullPath(),Filesystem::$folder_create_mask);
} }
@ -37,6 +38,8 @@ class Folder extends File {
} }
return $item; return $item;
} }
// To Make SSP Gallery structure work
// $item->Title = $part;
function userCanUse() { function userCanUse() {
if( Member::currentUser()->_isAdmin() ) if( Member::currentUser()->_isAdmin() )