Commit Graph

169 Commits

Author SHA1 Message Date
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
Sam Minnee
876b3863f8 BUGFIX: Handle filename deduping when uploading of double-barrelled extensions and files ending in numbers better.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@99818 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:42 +13:00
Sam Minnee
1c5dc228a7 BUGFIX: Fixed the code for the unused file list, although the feature is still disabled.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@99816 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:42 +13:00
Sam Minnee
6e4ab94b8c BUGFIX: Folder::findOrMake() will create the assets/ folder if it's missing
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@99638 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:39 +13:00
Ingo Schommer
d616f9b8bb MINOR Localized File->uploadMetadataFields()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@99111 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:37 +13:00
Ingo Schommer
d404a53569 FEATURE set file metadata on upload. (from r97780)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@99106 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:37 +13:00
Andreas Piening
7de75919ac MINOR: fixed setName()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98282 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:25 +13:00
Normann Lou
0f810b9a3f BUGFIX: missing comma
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97937 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:18 +13:00
Normann Lou
edaf66d242 MINOR: add flv (flash file) to File::$allowed_extensions
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97936 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:18 +13:00
Normann Lou
398f21a678 BUGFIX: can't upload swf file in admin/assets (open ticket #4999)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97935 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:18 +13:00