Commit Graph

76 Commits

Author SHA1 Message Date
Sean Harvey
4e0bf2c671 BUGFIX Fixed Upload::isValidSize() error if a file was uploaded without an extension
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71559 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-09 23:02:46 +00:00
Andrew O'Neil
60f75c5ca4 Merged changes from 2.3 branch
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71172 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-01 23:49:53 +00:00
Ingo Schommer
b7d394008e MINOR Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@69957 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-01-10 11:35:50 +00:00
Ingo Schommer
085346f0e0 MINOR Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@69704 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-01-05 06:19:48 +00:00
Geoff Munn
fe0a640c39 API CHANGE: fulltext and unique indexes are now arrays
API CHANGE: db/build now no longer notifies you of changes which haven't actually happened.

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@69303 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-12-17 00:40:24 +00:00
Ingo Schommer
d26f08b481 MINOR merged branches/2.3 into trunk
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@67465 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-12-04 22:38:32 +00:00
Sam Minnee
96c5be8252 Updating queries to be more DB agnostic
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@66507 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-24 09:31:14 +00:00
Sam Minnee
93438e0be2 API CHANGE: Adding double quotes to all table and field references (a work in progress)
API CHANGE: DataObject::get()'s GROUP BY clause is only generated for MySQL as it needs to be improved for other databases to accept it.

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@66427 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-23 23:28:16 +00:00
Sam Minnee
a3d3fb65a9 Updated SQL queries to be ansi compatable
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@66401 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-23 00:31:06 +00:00
Sam Minnee
2984355f43 Merged branches/2.3 into trunk
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@66395 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-22 03:33:00 +00:00
Will Rossiter
8052c5dce4 Merged pre-2.3-oct08 into trunk
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@66080 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-17 22:59:17 +00:00
Ingo Schommer
1b65a6bf46 MINOR removed debug commits from r65523 in Folder.php
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65537 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-10 11:33:29 +00:00
Sam Minnee
58dbe416ee Merged from branches/2.2
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65523 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-10 03:51:35 +00:00
Ingo Schommer
cfde8adaee API CHANGE Removed Folder->userCan*() and File->userCan*()permissions and added more consistent behaviour with Folder->can*() and File->can*()
ENHANCEMENT Allowing decoration of can*() methods in File and Folder

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65452 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-07 12:17:42 +00:00
Sean Harvey
d145c50cc2 ENHANCEMENT Folder name can now be used for uploading files. Ticket #3026 - Thanks simon_w!
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65266 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-05 03:56:22 +00:00
Sam Minnee
5f177b9f08 BUGFIX #2056: Removed all references to deprecated Member::isAdmin()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65232 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-04 23:31:33 +00:00
Ingo Schommer
3edc358ead ENHANCEMENT Added fieldLabels() overloading to various DataObject subclasses. Use this method instead of directly calling _t() in getCMSFields(), and use fieldLabel('MyField') to get the label for a specific FormField. This way, we can transparently support formfield scaffolding and re-use the labels for search fields automatically.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65072 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-02 20:04:10 +00:00
Ingo Schommer
252f739919 API CHANGE Removed deprecated File->setMaxFileSize(), use Upload class
API CHANGE Removed deprecated File->getMaxFileSize(), use Upload class
API CHANGE Removed File::sync(), use Filesystem::sync()
API CHANGE Removed deprecated File::fixfiles()
API CHANGE Removed deprecated File::loadContent(), use Upload class
API CHANGE Removed deprecated File::loadallcontent(), use Upload class

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64402 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-16 11:05:57 +00:00
Ingo Schommer
b3f57dd454 API CHANGE Removed Filesystem::moverootfilesto()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64401 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-16 11:03:45 +00:00
Sean Harvey
31df9f440f ENHANCEMENT Added additional known file types, for audio and video files
MINOR Tweaked text of file type descriptions slightly

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64356 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-16 03:55:33 +00:00
Ingo Schommer
72047aa3a1 BUGFIX Fixing AssetAdmin translations which were previously moved to Folder.php - i18n::include_by_class() doesn't like filenames/namespaces which are in a different folder than the language file they're referenced in (see #2359) - started in r64076
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64077 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-10 17:35:24 +00:00
Ingo Schommer
f009e8de8a API CHANGE Moved PostBackup class to module (see r63758)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63759 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-07 16:42:25 +00:00
Ingo Schommer
5927bf2399 BUGFIX Fixed Upload->isValidExtension() - was checking array keys instead of array values ....
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63467 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-01 18:31:08 +00:00
Ingo Schommer
9371f4688b ENHANCEMENT Introduced constants for system paths like /sapphire in preparation for a more flexible directory reorganisation. Instead of hardcoding your path, please use the following constants: BASE_PATH, BASE_URL, SAPPHIRE_DIR, SAPPHIRE_PATH, CMS_DIR, CMS_PATH, THIRDPARTY_DIR, THIRDPARTY_PATH, ASSETS_DIR, ASSETS_PATH, THEMES_DIR, THEMES_PATH
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63154 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-09-27 16:02:38 +00:00
Ingo Schommer
f0feea5109 API CHANGE Removed useless File->test() method
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63077 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-09-25 12:38:36 +00:00
Sam Minnee
f2c619d10c FEATURE: Files & Images tree now shows filename rather than meta-data title, to make it easier to find the file you're looking for
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@62284 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-09-12 01:05:11 +00:00
Geoff Munn
864875c2fa Multiple 'protected' variable declaration fixed
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@62184 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-09-10 22:01:09 +00:00
Sam Minnee
5fb17f1eca Improved File tests
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@61462 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-08-25 01:42:27 +00:00
Sam Minnee
53cc576dab Reverted Folder::CanEdit() to its original behaviour; that of returning a many-many join. Note that this conflicts with DataObject::CanEdit() now.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@60911 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-08-18 00:51:35 +00:00
Sam Minnee
4acd84a837 Trap potential data-integrity bug
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@60778 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-08-14 22:20:14 +00:00
Hayden Smith
19da6e3128 Refactored [47088]: File::getFullPath now compares the filename with Director::baseFolder and returns filename if the filename stars with Director::baseFolder.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@60529 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-08-12 22:26:52 +00:00
Sam Minnee
0bd9bc4ff8 Merged changes from 2.2.2-assets - everything except the asset refactoring
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@60468 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-08-12 02:51:33 +00:00
Andrew O'Neil
1107757128 MINOR: #2445 - Function getFilename in File.php cehcks for Name, but returns Filename (Blynx)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@56944 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-06-25 05:52:58 +00:00
Andrew O'Neil
5ec9ff8862 FEATURE: #2166 - Ability to set deafult for all resampeld JPEGs (dio5)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@56939 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-06-25 05:22:56 +00:00
Ingo Schommer
60860cc1b9 MINOR Unified @package PHPdoc (added where missing, removed duplicates)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@56212 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-06-15 13:33:53 +00:00
Ingo Schommer
b1ccd1a04d BUGFIX Unsetting unused objects to conserve memory in Filesystem::sync()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@55082 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-05-24 05:23:24 +00:00
Ingo Schommer
0a3b20e672 BUGFIX Re-enabled "Unused files" tab in AssetAdmin (fixed memory problems)
MINOR Moved getUsedFilesList() and getAssetList() from AssetAdmin to Folder (needed for Folder->getCMSFields()), changed their visibility from private to protected

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@55081 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-05-24 05:19:42 +00:00
Ingo Schommer
d344eef293 Merged revisions 54204 via svnmerge from
svn://svn.silverstripe.com/silverstripe/modules/sapphire/branches/2.2.0-mesq

........
  r54204 | ischommer | 2008-05-09 10:19:21 +1200 (Fri, 09 May 2008) | 1 line
  
  API CHANGE Made deleteDatabaseOnly() public (used in Filesystem::sync())
........


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@55071 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-05-24 01:21:04 +00:00
Sam Minnee
091c0afc2e Merged revisions 52293 via svnmerge from
http://svn.silverstripe.com/open/modules/sapphire/branches/2.2.2

........
  r52293 | aoneil | 2008-04-08 12:03:43 +1200 (Tue, 08 Apr 2008) | 2 lines
  
  don't cache in overridden instance_get(), as the fields are different for subclasses
........


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@53509 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-04-26 06:47:29 +00:00
Ingo Schommer
1c929747ce Merged revisions 47623 via svnmerge from
svn://svn.silverstripe.com/silverstripe/modules/sapphire/branches/2.2.0-mesq

........
  r47623 | ischommer | 2008-01-04 21:44:51 +1300 (Fri, 04 Jan 2008) | 1 line
  
  fixed extension checking
........


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@52400 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-04-09 11:13:24 +00:00
Ingo Schommer
00f95679ce Merged revisions 47621 via svnmerge from
svn://svn.silverstripe.com/silverstripe/modules/sapphire/branches/2.2.0-mesq

........
  r47621 | ischommer | 2008-01-04 21:44:07 +1300 (Fri, 04 Jan 2008) | 1 line
  
  added get_file_extension()
........


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@52398 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-04-09 11:08:58 +00:00
Ingo Schommer
b465a46bcc API CHANGErefactored upload functionality from File into newly created Upload class
API CHANGE deprecated some File functions and attributes
API CHANGE moved management function from File to Filesystem and added permission checks: sync(), loadContent(), fixfiles(), moverootfilesto()
API CHANGE deprecated use of File->loadUploaded()
ENHANCEMENT added filesize and extension validation to AssetAdmin and FileField
FEATURE added tests for Upload class

Merged revisions 47617 via svnmerge from 
svn://svn.silverstripe.com/silverstripe/modules/cms/branches/2.2.0-mesq

........
  r47617 | ischommer | 2008-01-04 19:20:29 +1300 (Fri, 04 Jan 2008) | 5 lines

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@52205 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-04-06 08:20:13 +00:00
Ingo Schommer
5d1336a5a4 Merged revisions 47616 via svnmerge from
svn://svn.silverstripe.com/silverstripe/modules/sapphire/branches/2.2.0-mesq

........
  r47616 | ischommer | 2008-01-04 19:19:06 +1300 (Fri, 04 Jan 2008) | 1 line
  
  wording
........


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@52203 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-04-06 04:10:51 +00:00
Ingo Schommer
e7a683c0c4 Merged revisions 51257 via svnmerge from
svn://svn.silverstripe.com/silverstripe/modules/sapphire/branches/2.2.0-mesq

........
  r51257 | ischommer | 2008-03-18 12:50:03 +1300 (Tue, 18 Mar 2008) | 2 lines
  
  ENHANCEMENT Deprecated Image->URL(), changed to Image->getURL() to be consistent with File class
  FEATURE File->getAbsoluteURL()
........


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@51251 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-03-17 23:50:18 +00:00
Ingo Schommer
1b5b3f8627 Merged revisions 51246 via svnmerge from
svn://svn.silverstripe.com/silverstripe/modules/sapphire/branches/2.2.0-mesq

........
  r51246 | ischommer | 2008-03-18 11:50:47 +1300 (Tue, 18 Mar 2008) | 1 line
  
  ENHANCEMENT findOrMake() now deals with absolute paths and replaces leading/trailing slashes before checking for existing folder objects in the database
........


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@51240 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-03-17 22:51:25 +00:00
Ingo Schommer
265528a67c #2306 Attempt to unset static property File::
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@50729 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-03-09 05:08:08 +00:00
Ingo Schommer
844fe81cca removed alternative_instance_get() (only used for gallery-hack)
refactored query-caching in instance_get() to just cache the raw db fields (unlikely to change) - overzealous caching was causing problems with wrong SQL selects on subsequent calls

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@50704 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-03-07 03:19:49 +00:00
Matt Peel
7d13ba7fb8 Reverted geoffm's accidental commit to /open
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@50107 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-02-25 02:10:37 +00:00
Geoff Munn
bf3c09bec6 First post
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@50105 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-02-25 01:06:39 +00:00
Sam Minnee
b10974b553 Merged revisions 48425 via svnmerge from
svn://svn.silverstripe.com/silverstripe/modules/sapphire/branches/2.1.0-rc3oriwave2

........
  r48425 | sminnee | 2008-01-22 17:16:41 +1300 (Tue, 22 Jan 2008) | 3 lines
  
  Updated AssetAdmin to use TreeTitle() in place of Title for tree generation
  > Updated TreeTitle() to allow use of alternateTreeTitle() in decorator
  > Updated File to allow the insertion of extra columns by decorator
........


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@49799 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-02-19 00:50:17 +00:00