Commit Graph

178 Commits

Author SHA1 Message Date
Carlos Barberis
014087f0f7 ENHANCEMENT: Changed canEdit and canCreate extend to extendedCan
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@115416 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:20:06 +13:00
Ingo Schommer
30e3f08efb MINOR Checking for class_exists() before SapphireTest::is_running_tests() to avoid including the whole testing framework, and triggering PHPUnit to run a performance-intensive directory traversal for coverage file blacklists (from r114332)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@114334 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:20:03 +13:00
Sam Minnee
cf0bf20e26 BUGFIX: Don't include web.config in the assets tracked in the File table.
MINOR: Add documentation to File::$allowed_extensions explaining that there are config files to edit in assets/

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@112961 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:58 +13:00
Sean Harvey
c427744f73 BUGFIX Filesystem::removeFolder() did not remove files that ended with a "." when this is a valid file. Remove the regex and replace with specific case for "." and ".."
MINOR Code syntax formatting of Filesystem::removeFolder()


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@111898 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:56 +13:00
Sean Harvey
507f9909bd MINOR Moved GD::set_default_quality() function to the top of the file to align with conventions
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@111888 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:56 +13:00
Sean Harvey
cd05f945ad ENHANCEMENT #3775 Added getter to GD so you can retrieve the internal GD resource being used. Made setGD public so you can override the GD yourself as well
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@111887 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:56 +13:00
Ingo Schommer
b33d4e2856 BUGFIX Changing File->Filename property from arbitrary limitation on VARCHAR (255 characters) to TEXT (65k characters) to ensure the framework can handle deeply nested filesystem trees (fixes #6015, thanks muzdowski)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@111494 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:53 +13:00
Ingo Schommer
47fd9be0e0 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)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@111493 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:53 +13:00
Sean Harvey
380fc69d6d BUGFIX TarballArchive::extractTo() uses an incorrectly spelled argument
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@111126 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:53 +13:00
Sean Harvey
58ce293347 BUGFIX Count() call on a non-object in File::BackLinkTrackingCount()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@109079 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:45 +13:00
Sean Harvey
d85e75fbe6 BUGFIX Fixed File::getAbsoluteURL() absolute generation
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@109063 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:45 +13:00
Sean Harvey
cbd2bfb976 BUGFIX File::getAbsoluteURL() should return a URL, not a filesystem path
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@109062 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:45 +13:00
Ingo Schommer
b23c650c8a BUGFIX Case insensitive extension checks in File::validate() (fixes #5781, thanks simon_w)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@107539 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:37 +13:00
Ingo Schommer
d55e38b6ab MINOR Checking that Folder::findOrMake() can create an assets/assets/ folder
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@107276 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:35 +13:00
Ingo Schommer
9a1c997818 MINOR Using Filesystem::makeFolder() instead of mkdir() in Folder for file operations
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@107275 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:35 +13:00
Ingo Schommer
60cfa9e9e8 MINOR Better presentation of extension error message in File and UploadValidator
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@107274 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:34 +13:00
Ingo Schommer
c82f0335f0 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)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@107273 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:34 +13:00
Ingo Schommer
2a5a00ced4 MINOR Using File::get_file_extension() instead of substr() magic in File->setName()
MINOR Using exceptions instead of user_error() in File->setName()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@107269 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:34 +13:00
Ingo Schommer
a00dc63124 API CHANGE Deprecated File->getLinkedURL()
MINOR Avoiding duplication by using existing getFullPath() in File->getAbsoluteURL()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@107268 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:34 +13:00
Ingo Schommer
3781ecc784 MINOR Made File::get_file_extension() more readable, and added unit test
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@107267 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:34 +13:00
Ingo Schommer
80ce0b5f4f MINOR Removed File->setField(), doesn't have any overloaded functionality
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@107266 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:33 +13:00
Ingo Schommer
7e65d3c5af MINOR Documentation in File and Folder class
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@107265 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:33 +13:00
Ingo Schommer
aefecf2965 MINOR Documentation
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@106804 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:32 +13:00
Ingo Schommer
0742a38732 MINOR Using ASSETS_DIR and THEMES_DIR constant in Image, ManifestBuilder, Requirements, File (fixes #5619)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@105282 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:27 +13:00
Sam Minnee
b28b0939f2 BUGFIX: Removed references to php5 binary in Makefile
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@104666 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:22 +13:00
Will Rossiter
2a8dd78059 MINOR: added illustrator formats to the allowed extensions.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@104636 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:22 +13:00
Ingo Schommer
1f1dda8643 MINOR Fixed phpdoc documentation
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@103398 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:15 +13:00
Geoff Munn
d21e7b0623 BUGFIX: default sort column now quoted
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@103182 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:13 +13:00
Tom Rix
be41f12a4f MINOR TreeTitle really should return title, not name.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@101882 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:09 +13:00
Ingo Schommer
70ac42c577 MINOR Respecting folder sort order in admin/assets by adding Folder::$default_sort="Sort" (#5235)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@101698 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:07 +13:00
Michael Andrewartha
1baae6723b BUGFIX: disabling unused file list as feature is still buggy.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@101380 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:05 +13:00
Ingo Schommer
1e9aeaef3e 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.

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@101266 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:04 +13:00
Sean Harvey
853ee0c903 BUGFIX Fixed quotes around Folder::hasChildFolders() ParentID column
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@101175 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:03 +13:00
Sam Minnee
3aad86d9be API CHANGE: Added SiteTree::VirtualPages() and SiteTree::DependentPages() accessors.
BUGFIX: Improved reliabilty of broken link tracking.
ENHANCEMENT: Added 'Dependent pages' tab to CMS, to show virtuals, redirectors, and backlinks that point to this page.
BUGFIX: Don't mark a page as changed on stage if the only thing that has changed is broken link metadata

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@101127 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:02 +13:00
Ingo Schommer
2f516d4311 MINOR Documentation relating to r101106
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@101107 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:01 +13:00
Sean Harvey
2c809ccd87 BUGFIX #5199 Duplicate file uploads have odd numbering attached to end of file
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@101068 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:00 +13:00
Sean Harvey
4f1b504cf5 BUGFIX Fixed Upload and checking for size with files that don't have any extension
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@101061 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:00 +13:00
Sean Harvey
3d86935f58 MINOR No need for a ternary for in_array check in Upload::isValidExtension()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@101055 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:00 +13:00
Sean Harvey
572f5dfd59 MINOR Update function doc for Upload::isValidExtension()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@101053 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:00 +13:00
Sean Harvey
de1ff4a609 MINOR phpDoc change for Upload
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@101052 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:00 +13:00
Sean Harvey
81afa6d67e BUGFIX Allow files with no extensions by setting File::$allowed_extensions with an empty string
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@101051 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:00 +13:00
Sean Harvey
f19048c0c6 BUGFIX #5188 Upload and Folder don't handle the duplicate naming of files that have no extension
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@101050 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:00 +13:00
Sam Minnee
5fc298cf1e API CHANGE: Made MySQL fulltext search optional, activated with MySQLFulltextSearchable::enable()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@101044 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:00 +13:00
Sean Harvey
55eda363f4 MINOR Added more allowed extensions to File::$allowed_extensions
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@100740 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:51 +13:00
Sean Harvey
972ac38137 MINOR Made Upload::load() error more useful
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@100499 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:47 +13:00
Mateusz Uzdowski
67b3132de4 BUGFIX: replacing calls to deprecated Upload functions - using validator instead (related to r100057)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@100496 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:47 +13:00
Sean Harvey
74d5761a3c API CHANGE Removed deprecated File::loadUploaded(), please use Upload directly instead!
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@100495 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:46 +13:00
Sean Harvey
2888cf1e78 BUGFIX GD::setQuality() persistence issue because the GD instance is re-created instead of being cloned - thanks Tjofras!
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@100438 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:46 +13:00
Sean Harvey
c4760f41a4 API CHANGE #5107 Upload now uses Upload_Validator to separate the validation rules from the File loading done in the Upload class
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@100057 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:44 +13:00
Sean Harvey
fd1ca45c07 MINOR Reinstated UploadTest
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@99862 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:43 +13:00