Commit Graph

144 Commits

Author SHA1 Message Date
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
Andrew Short
712cc578d9 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>

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@97400 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-01-21 22:59:19 +00:00
Ingo Schommer
487bb763d9 MINOR Fixed PHP notice (#4765)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@93747 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-11-27 01:23:45 +00:00
Ingo Schommer
84125b4416 MINOR Added CMSTreeClasses() methods to Group and Folder, to mirror SiteTree behaviour and allow reusage in CMS tree implementations
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@92567 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-11-21 02:33:42 +00:00
Ingo Schommer
b1300f7c49 ENHANCEMENT Creating filesystem node in Folder->onBeforeWrite() (moved from AssetAdmin->add())
ENHANCEMENT Setting default folder title in Folder->populateDefaults()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@92563 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-11-21 02:33:33 +00:00
Ingo Schommer
8b11599917 BUGFIX Ensuring ParentID is numeric in File->setParentID()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@92562 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-11-21 02:33:30 +00:00
Ingo Schommer
0e93bcec53 MINOR Moved 'delete files' button from Folder->getCMSFields() to AssetTableField
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@92559 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-11-21 02:33:14 +00:00
Ingo Schommer
16f69c3080 BUGFIX Fixed Folder singular/plural name i18n by overloading the statics inherited from File class
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@92555 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-11-21 02:32:40 +00:00
Ingo Schommer
f7f3bc7050 MINOR Removed unused cmsCleanup_parentChanged() callback from Group, Folder and SiteTree classes
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@92543 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-11-21 02:31:59 +00:00
Ingo Schommer
204d4fb076 API CHANGED Changed SiteTree->TreeTitle() to getTreeTitle() to make it available as a dynamic property, e.g. for the CMS forms
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@92534 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-11-21 02:31:27 +00:00
Sean Harvey
b85af0194e ENHANCEMENT Filesystem::sync() now accepts a folderID argument, meaning you can specifically target a folder and it's children to sychronise, instead of everything (from r82840)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@89724 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-21 02:33:55 +00:00
Sean Harvey
d1af532bf4 MINOR Destroy the child object in Folder::syncChildren() after destroying it's internal records and components (from r82790)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@89722 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-21 02:32:11 +00:00
Sean Harvey
6b0a508502 BUGFIX Folder::syncChildren() now uses far less memory - we do this by destroying the child object memory after use (from r82780)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@89719 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-21 02:30:48 +00:00
Sean Harvey
65501a6ff2 ENHANCEMENT Filesystem::sync() will now return the number of added and deleted files and folders instead of null (from r82616, 82617 and 82724)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@89717 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-21 02:29:20 +00:00
Sam Minnee
aaeaf6ccb2 BUGFIX: Fixed image link rewriting and added a test. (from r89011)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@89208 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-15 22:40:06 +00:00
Sam Minnee
a920b7689f BUGFIX: Fix image tracking not working cross subsite (from r88008)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@89177 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-15 22:21:02 +00:00
Sam Minnee
f84180813f #150 - Pages with similar content
#148 - Stable against restructures (from r87251)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@89174 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-15 22:19:25 +00:00
Geoff Munn
9131df8061 MINOR FIX: full text column now named
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@86517 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-17 00:11:20 +00:00
Ingo Schommer
5708f79312 BUGFIX Consistently returning from a Security::permissionFailure() to avoid ambiguous situations when controllers are in ajax mode
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@86008 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-10 02:00:42 +00:00
Julian Seidenberg
844853ab10 BUGFIX: Ticket #4220 - Copying of uploaded files from temp to assets folder fails on IIS installs; simple patch fixes it
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@85696 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-03 22:45:15 +00:00
Geoff Munn
e031478576 MINOR FIX: column names escaped
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@85451 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-31 06:06:44 +00:00
Sam Minnee
e3d31f1bdd BUGFIX: Use default File classname in Folder::syncChildren()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@85085 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-24 07:21:08 +00:00
Sean Harvey
f7dc370b16 BUGFIX #4486 Make use of DataObject::get_by_id() in File::getRelativePath() instead of building ID query manually in a get_one()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@84843 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-19 23:39:39 +00:00