Commit Graph

7 Commits

Author SHA1 Message Date
Sam Minnee
2dca48ba09 MINOR: Unit test breaks if another module or project extends Folder (from r111669)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112917 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 04:52:20 +00:00
Sam Minnee
d6c1d3b28d MINOR Fixed SQL quoting bug in FolderTest (caused by r111493) (from r111496)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112916 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 04:51:22 +00:00
Sam Minnee
b2624e0012 BUGFIX Moving folder after executing Folder::findOrMake will not set the Filenames properly. Invoking updateFilesystem() in File->onAfterWrite() instead of onBeforeWrite(), and avoid caching in FIle->getRelativePath() (fixes #5994 and #5937, thanks muzdowski) (from r111493)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112908 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 04:00:57 +00:00
Ingo Schommer
706553ee95 MINOR Checking that Folder::findOrMake() can create an assets/assets/ folder (from r107276)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112567 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 03:21:41 +00:00
Ingo Schommer
5d5bb2618a API CHANGE Don't reflect changes in File and Folder property setters on filesystem before write() is called, to ensure that validate() applies in all cases. This fixes a problem where File->setName() would circumvent restrictions in File::$allowed_extensions (fixes #5693)
API CHANGE Removed File->resetFilename(), use File->updateFilesystem() to update the filesystem, and File->getRelativePath() to just update the "Filename" property without any filesystem changes (emulating the old $renamePhysicalFile method argument in resetFilename())
API CHANGE Removed File->autosetFilename(), please set the "Filename" property via File->getRelativePath()
MINOR Added unit tests to FileTest and FolderTest (some of them copied from FileTest, to test Folder behaviour separately) (from r107273)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112563 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 03:20:47 +00:00
Sam Minnee
5ba7760f35 MINOR: Compiled duplicate tests
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112138 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-13 03:48:33 +00:00
Sam Minnee
767bfedd30 BUGFIX Fixed Folder writing by overloading validate() (was inheriting File->validate() which does extension checks)
BUGFIX Fixed Folder::findOrMake() not to create "new-folder" through File->setName() if using a trailing slash in the path (which causes an empty name). Added FolderTest to verify this. (from r101266)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@111984 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-12 23:02:10 +00:00