Commit Graph

43 Commits

Author SHA1 Message Date
Sean Harvey
69f1595cc8 BUGFIX Fixed possible SQL injection in file name part for File::find()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73436 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-20 01:36:19 +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
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
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
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
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
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
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
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
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
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
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
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
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
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
Andrew O'Neil
41b4064c9d Merged revisions 48857 via svnmerge from
svn://svn.silverstripe.com/silverstripe/modules/sapphire/branches/2.2.1-ssopen

........
  r48857 | aoneil | 2008-01-31 09:19:00 +1300 (Thu, 31 Jan 2008) | 2 lines
  
  fix upload folder
........


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@48952 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-02-01 01:21:42 +00:00
Andrew O'Neil
97f3d722b4 Add ability to choose which file to upload to in a FileField
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@48778 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-01-29 20:18:06 +00:00
Sam Minnee
b1d2e3906b API Documentation updates
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@47766 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-01-09 04:18:36 +00:00
Sam Minnee
d27937f448 Updated API documentation package tags
Fixed some whitespace

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@47725 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-01-08 06:37:50 +00:00
Andrew O'Neil
4056408d73 Merged revisions 46775 via svnmerge from
svn://svn.silverstripe.com/silverstripe/modules/sapphire/branches/2.2.0-privacy

........
  r46775 | aoneil | 2007-12-14 09:40:30 +1300 (Fri, 14 Dec 2007) | 2 lines
  
  Fix loops when saving files
........


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@46782 467b73ca-7a2a-4603-9d3b-597d59a354a9
2007-12-13 21:51:00 +00:00
Andrew O'Neil
69d40fd5aa Merged revisions 46506 via svnmerge from
svn://svn.silverstripe.com/silverstripe/modules/sapphire/branches/2.2.0-privacy

........
  r46506 | aoneil | 2007-12-10 10:50:26 +1300 (Mon, 10 Dec 2007) | 2 lines
  
  Remove comments
........


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@46775 467b73ca-7a2a-4603-9d3b-597d59a354a9
2007-12-13 21:47:23 +00:00
Andrew O'Neil
4a233b8854 Merged revisions 46505 via svnmerge from
svn://svn.silverstripe.com/silverstripe/modules/sapphire/branches/2.2.0-privacy

........
  r46505 | aoneil | 2007-12-10 10:48:37 +1300 (Mon, 10 Dec 2007) | 2 lines
  
  Load content from files into the database
........


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@46774 467b73ca-7a2a-4603-9d3b-597d59a354a9
2007-12-13 21:47:07 +00:00
Andrew O'Neil
5b2bcd75c2 #1660 - Drag to relocate images not working
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@44561 467b73ca-7a2a-4603-9d3b-597d59a354a9
2007-11-09 04:13:26 +00:00
Ingo Schommer
3e36baa6d8 FEATURE Using consistent umask static Filesystem::$folder_create_mask for mkdir()-calls
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@43870 467b73ca-7a2a-4603-9d3b-597d59a354a9
2007-10-25 23:07:24 +00:00
Andrew O'Neil
07eafb0aaf File modification for gallery (merged from 2.1.0 branch, r42517)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@42922 467b73ca-7a2a-4603-9d3b-597d59a354a9
2007-10-02 04:53:19 +00:00
Andrew O'Neil
bb2a97856f File Attribute Adding for the gallery module (merged from 2.1.0 branch, r42339)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@42919 467b73ca-7a2a-4603-9d3b-597d59a354a9
2007-10-02 04:50:36 +00:00
Ingo Schommer
6f21a7cea9 mlanthaler: Bugfix: *size* is not a constant, added quotes.
(merged from branches/gsoc)


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@41790 467b73ca-7a2a-4603-9d3b-597d59a354a9
2007-09-14 19:19:32 +00:00
Andrew O'Neil
716d406754 Fixed renaming of .tar.gz and .tar.bz2 files
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@40724 467b73ca-7a2a-4603-9d3b-597d59a354a9
2007-08-23 04:00:22 +00:00
Hayden Smith
4a5d9b03f8 Moved Sapphire module to open source path
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@39001 467b73ca-7a2a-4603-9d3b-597d59a354a9
2007-07-19 10:40:28 +00:00