Commit Graph

266 Commits

Author SHA1 Message Date
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
Luke Hudson
d82ed75b37 BUGFIX: Folder::findOrMake() will call mkdir if needed, even if object already exists in database.
This covers the corner case where DB is out of sync with filesystem.



git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97878 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:17 +13:00
Sam Minnee
9ac547d32d BUGFIX: Don't rely on the current working directory for any file access; use BASE_PATH.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97728 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:15 +13:00
Andreas Piening
8ee148297a MINOR: #4674 applied patch for special chars in folder titles
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97669 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:15 +13:00
Andrew Short
8361a41c16 MINOR: Don't include files and folders starting with an underscore in the asset system.
MINOR: Automatically rename files and folders beginning with an underscore.

From: Andrew Short <andrewjshort@gmail.com> (from r97400)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97435 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:12 +13:00
Sean Harvey
e77964a5b9 API CHANGE #3600 Inconsistency in File::getURL() which returns an absolute URL, when it should be relative - please use getAbsoluteURL() instead for old behaviour
API CHANGE #3600 Image no longer has an explicit getURL() method, instead it inherits getURL() from File which returns a relative URL


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@96988 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:08 +13:00
Sam Minnee
67f827cb5a BUGFIX: Apply file extension restrictions to extensions properly. (from r93531)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@96761 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:07 +13:00
Sam Minnee
da2f90d187 BUGFIX: Changed default config to restrict file-upload types to ADMINs, since it's protecting against security holes. (from r93327)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@96759 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:06 +13:00
Sam Minnee
3c88905299 BUGFIX: Add a default list of allowed extensions so that the CMS works reasonably out of the box.
BUGFIX: Allow files that don't have an extension (most notably folders)
BUGFIX: Ensure that file URL rewriting works if you rename a page twice without publishing.
BUGFIX: Ensure that the page doesn't go green after URLs are rewritten
ENHANCEMENT: Recognise HTTP_X_FORWARDED_HOST header and use that in place of HTTP_HOST (from r93148)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@96752 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:06 +13:00
Sam Minnee
5930458997 MINOR moved allowed_extensions and friends to the model layer (from r92046)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@96743 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:05 +13:00
Sam Minnee
b4dc73e002 MINOR moved File validation to the model (from r92044)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@96742 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:05 +13:00
Sam Minnee
ba0dd8b5eb BUGFIX: Update file link tracking as part of Filesystem::sync() (from r89907)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@96722 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:03 +13:00
Sean Harvey
28ee3ec772 MINOR Fixed error message for Folder::addUploadToFolder() to be accurate
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@94136 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:17:56 +13:00
Ingo Schommer
1c34d8f1b4 API CHANGE Deprecated TreeTitle(), use getTreeTitle() (in SiteTree, File, Group)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@115119 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-12-16 05:16:06 +00:00
Sam Minnee
6cec0a083e 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/ (from r112961)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@114496 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-12-05 00:05:05 +00:00
Jean-Fabien Barrios
5dbddba41b BUGFIX File upload not working when open_basedir is set #5547
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@114471 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-12-03 00:28:30 +00:00
Ingo Schommer
07b6d1870a 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
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@114332 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-11-30 05:13:09 +00:00
Sam Minnee
31f0ceac07 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() (from r111898)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112942 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 05:06:25 +00:00
Sam Minnee
aa1d6c72f0 MINOR Moved GD::set_default_quality() function to the top of the file to align with conventions (from r111888)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112938 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 05:04:14 +00:00
Sam Minnee
6d423c9f9b 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 (from r111887)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112937 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 05:04:00 +00:00
Sam Minnee
4e0450b590 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) (from r111494)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112909 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 04:05:29 +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
Sam Minnee
c939b02333 BUGFIX TarballArchive::extractTo() uses an incorrectly spelled argument (from r111126)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112897 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 03:47:26 +00:00
Sam Minnee
7170f386fd BUGFIX: Fixed bug with Filesystem::removeFolder() where it wouldn't delete files that ended in '.'
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112860 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 02:45:24 +00:00
Sam Minnee
e6976a8458 BUGFIX Count() call on a non-object in File::BackLinkTrackingCount() (from r109079)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112773 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 00:53:21 +00:00
Sam Minnee
f99e6059b1 BUGFIX Fixed File::getAbsoluteURL() absolute generation (from r109063)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112771 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 00:52:36 +00:00
Sam Minnee
46f1994da4 BUGFIX File::getAbsoluteURL() should return a URL, not a filesystem path (from r109062)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112770 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 00:52:21 +00:00
Ingo Schommer
fd6fa62388 MINOR Fixed merge error
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112616 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 04:02:54 +00:00
Ingo Schommer
1c54a6dc77 BUGFIX Case insensitive extension checks in File::validate() (fixes #5781, thanks simon_w) (from r107539)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112604 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 03:53:54 +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
07494a5f93 MINOR Using Filesystem::makeFolder() instead of mkdir() in Folder for file operations (from r107275)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112566 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 03:21:23 +00:00
Ingo Schommer
35b41709c2 MINOR Better presentation of extension error message in File and UploadValidator (from r107274)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112565 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 03:21:04 +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
Ingo Schommer
4d0502822f MINOR Using File::get_file_extension() instead of substr() magic in File->setName()
MINOR Using exceptions instead of user_error() in File->setName() (from r107269)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112557 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 03:15:38 +00:00
Ingo Schommer
3581a8d5f8 API CHANGE Deprecated File->getLinkedURL()
MINOR Avoiding duplication by using existing getFullPath() in File->getAbsoluteURL() (from r107268)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112556 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 03:15:26 +00:00
Ingo Schommer
96d1625102 MINOR Made File::get_file_extension() more readable, and added unit test (from r107267)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112555 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 03:14:59 +00:00
Ingo Schommer
6cf5372bf4 MINOR Removed File->setField(), doesn't have any overloaded functionality (from r107266)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112554 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 03:13:57 +00:00
Ingo Schommer
2d127753ed MINOR Documentation in File and Folder class (from r107265)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112553 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 03:12:39 +00:00
Ingo Schommer
122549ca60 MINOR Documentation (from r106804)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112538 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 03:04:27 +00:00
Ingo Schommer
2943c75156 MINOR Using ASSETS_DIR and THEMES_DIR constant in Image, ManifestBuilder, Requirements, File (fixes #5619) (from r105282)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112493 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 02:37:41 +00:00
Ingo Schommer
1724b1fa5a BUGFIX: Removed references to php5 binary in Makefile (from r104666)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112360 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 00:32:26 +00:00
Ingo Schommer
54c7e9b2cb MINOR: added illustrator formats to the allowed extensions. (from r104636)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112359 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 00:31:56 +00:00
Sam Minnee
2948bc1c64 MINOR: Misc merges from branches/2.4
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112142 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-13 03:53:12 +00:00
Sam Minnee
650a9f62c0 BUGFIX: default sort column now quoted (from r103182)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112121 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-13 03:33:16 +00:00
Sam Minnee
5fd242a25b MINOR TreeTitle really should return title, not name. (from r101882)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112047 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-13 01:17:06 +00:00
Sam Minnee
ddeebf3b7b MINOR Respecting folder sort order in admin/assets by adding Folder::$default_sort="Sort" (#5235) (from r101698)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112024 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-13 01:01:12 +00:00
Sam Minnee
e8f31282c1 BUGFIX: disabling unused file list as feature is still buggy. (from r101380)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@111997 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-13 00:44:19 +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
Sam Minnee
5fba88d3c0 BUGFIX Fixed quotes around Folder::hasChildFolders() ParentID column (from r101175)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@111972 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-12 21:55:17 +00:00
Sam Minnee
d19bf168b0 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 (from r101127)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@111594 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-04 04:52:46 +00:00
Sam Minnee
9cec4a007e MINOR Documentation relating to r101106 (from r101107)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@111588 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-04 04:47:19 +00:00
Sam Minnee
a729b86df8 BUGFIX #5199 Duplicate file uploads have odd numbering attached to end of file (from r101068)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@111581 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-04 04:44:14 +00:00
Sam Minnee
81ce1e358d BUGFIX Fixed Upload and checking for size with files that don't have any extension (from r101061)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@111580 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-04 04:44:03 +00:00
Sam Minnee
2582608b34 MINOR No need for a ternary for in_array check in Upload::isValidExtension() (from r101055)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@111577 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-04 04:43:28 +00:00
Sam Minnee
0dcf75f965 MINOR Update function doc for Upload::isValidExtension() (from r101053)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@111575 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-04 04:42:54 +00:00
Sam Minnee
f9c888438d MINOR phpDoc change for Upload (from r101052)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@111574 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-04 04:42:39 +00:00
Sam Minnee
40091e6c4e BUGFIX Allow files with no extensions by setting File::$allowed_extensions with an empty string (from r101051)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@111573 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-04 04:42:25 +00:00
Sam Minnee
2ea0e3e331 BUGFIX #5188 Upload and Folder don't handle the duplicate naming of files that have no extension (from r101050)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@111572 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-04 04:42:13 +00:00
Sam Minnee
ce173efce3 API CHANGE: Made MySQL fulltext search optional, activated with MySQLFulltextSearchable::enable() (from r101044)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@111569 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-04 04:32:48 +00:00
Ingo Schommer
132a5ebaab MINOR Added more allowed extensions to File::$allowed_extensions (from r100740)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@105633 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-05-25 04:26:31 +00:00
Ingo Schommer
16c93b1284 MINOR Made Upload::load() error more useful (from r100499)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@105582 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-05-25 04:04:20 +00:00
Ingo Schommer
ecb6c8cb3f BUGFIX: replacing calls to deprecated Upload functions - using validator instead (related to r100057) (from r100496)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@105581 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-05-25 04:03:46 +00:00
Ingo Schommer
1e5944c690 API CHANGE Removed deprecated File::loadUploaded(), please use Upload directly instead! (from r100495)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@105580 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-05-25 03:58:39 +00:00
Ingo Schommer
d74e3c43fe BUGFIX GD::setQuality() persistence issue because the GD instance is re-created instead of being cloned - thanks Tjofras! (from r100438)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@105569 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-05-25 03:53:12 +00:00
Ingo Schommer
75b98970e4 API CHANGE #5107 Upload now uses Upload_Validator to separate the validation rules from the File loading done in the Upload class (from r100057)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@105549 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-05-25 03:42:52 +00:00
Ingo Schommer
f86c05ba08 MINOR Reinstated UploadTest (from r99862)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@105540 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-05-25 03:18:49 +00:00
Ingo Schommer
c193d27f31 BUGFIX: Handle filename deduping when uploading of double-barrelled extensions and files ending in numbers better. (from r99818)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@105531 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-05-25 03:04:55 +00:00
Ingo Schommer
d00d876efe BUGFIX: Fixed the code for the unused file list, although the feature is still disabled. (from r99816)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@105530 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-05-25 03:03:56 +00:00
Ingo Schommer
6460d09570 MINOR Fixed phpdoc documentation
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@103385 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-04-23 00:11:41 +00:00
Ingo Schommer
50667bf6c3 BUGFIX: Folder::findOrMake() will create the assets/ folder if it's missing (from r99638)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102872 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-04-14 04:42:59 +00:00
Ingo Schommer
e99d56df3f MINOR Localized File->uploadMetadataFields() (from r99111)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102852 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-04-14 04:10:42 +00:00
Ingo Schommer
195e341c88 FEATURE set file metadata on upload. (from r97780) (from r99106)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102849 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-04-14 04:09:09 +00:00
Ingo Schommer
2978728265 MINOR: fixed setName() (from r98282)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102640 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-04-13 03:19:28 +00:00
Ingo Schommer
99df0fbbeb BUGFIX: missing comma (from r97937)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102559 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-04-13 01:45:40 +00:00
Ingo Schommer
1a13d9e5f5 MINOR: add flv (flash file) to File::$allowed_extensions (from r97936)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102558 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-04-13 01:45:28 +00:00
Ingo Schommer
07cc1f10fa BUGFIX: can't upload swf file in admin/assets (open ticket #4999) (from r97935)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102557 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-04-13 01:45:16 +00:00
Ingo Schommer
ba3c070dbd BUGFIX: Folder::findOrMake() will call mkdir if needed, even if object already exists in database.
This covers the corner case where DB is out of sync with filesystem. (from r97878)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102541 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-04-12 23:45:53 +00:00
Ingo Schommer
40899c3bfb BUGFIX: Don't rely on the current working directory for any file access; use BASE_PATH. (from r97728)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102527 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-04-12 23:14:36 +00:00
Ingo Schommer
caebfe6ea3 MINOR: #4674 applied patch for special chars in folder titles (from r97669)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102524 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-04-12 23:09:15 +00:00
Ingo Schommer
474a6a9931 API CHANGE #3600 Inconsistency in File::getURL() which returns an absolute URL, when it should be relative - please use getAbsoluteURL() instead for old behaviour
API CHANGE #3600 Image no longer has an explicit getURL() method, instead it inherits getURL() from File which returns a relative URL (from r96988)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102415 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-04-12 03:29:56 +00:00
Ingo Schommer
f8163a99eb BUGFIX: Apply file extension restrictions to extensions properly. (from r93531) (from r96761)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102392 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-04-12 03:14:52 +00:00
Ingo Schommer
ca29cc367c BUGFIX: Changed default config to restrict file-upload types to ADMINs, since it's protecting against security holes. (from r93327) (from r96759)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102390 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-04-12 03:13:41 +00:00
Ingo Schommer
46db9796a5 BUGFIX: Add a default list of allowed extensions so that the CMS works reasonably out of the box.
BUGFIX: Allow files that don't have an extension (most notably folders)
BUGFIX: Ensure that file URL rewriting works if you rename a page twice without publishing.
BUGFIX: Ensure that the page doesn't go green after URLs are rewritten
ENHANCEMENT: Recognise HTTP_X_FORWARDED_HOST header and use that in place of HTTP_HOST (from r93148) (from r96752)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102381 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-04-12 02:42:51 +00:00
Ingo Schommer
2ac34ccff0 MINOR moved allowed_extensions and friends to the model layer (from r92046) (from r96743)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102369 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-04-12 02:35:12 +00:00
Ingo Schommer
1bb7bfa71f MINOR moved File validation to the model (from r92044) (from r96742)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102368 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-04-12 02:34:38 +00:00
Ingo Schommer
9281b28339 BUGFIX: Update file link tracking as part of Filesystem::sync() (from r89907) (from r96722)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102345 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-04-12 01:49:37 +00:00
Geoff Munn
fda7836aca BUG FIX: Default sort columns now quoted properly
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@98232 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-02-04 19:45:14 +00:00