Commit Graph

169 Commits

Author SHA1 Message Date
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