Commit Graph

125 Commits

Author SHA1 Message Date
Ingo Schommer
c7768d8820 API CHANGE Added interface methods to CompositeDBField
MINOR Documented CompositeDBField

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77892 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-27 00:05:10 +00:00
Ingo Schommer
2a58703ecf BUGFIX Money->setValue() was not working when loading $value and $record parameters, and only $record had a
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77790 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-26 01:08:27 +00:00
Ingo Schommer
b478c8be34 FEATURE Added MoneyField as a form field to edit Money values
ENHANCEMENT Using MoneyField in Money->scaffoldFormField()
BUGFIX Fixed Money->setValue() to respect $value parameter over $record to avoid wrongly updated values from stale $record values instead of new $value

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77772 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-25 22:21:02 +00:00
Ingo Schommer
4d55f1e5d7 BUGFIX Fixed Money->Nice() to provide symbol and currency shortname based on Money->getCurrency()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77754 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-25 06:03:06 +00:00
Sean Harvey
ee072565ec API CHANGE Removed @deprecated method Text::LimitWordCountPlainText(): Please use Text::LimitWordCount() instead
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77635 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-22 04:54:51 +00:00
Ingo Schommer
a2a507f73c BUGFIX Fixed Money->writeToManipulation() to correctly overwrite with NULL values
ENHANCEMENT Added Money->NiceWithName()
ENHANCEMENT Changed Money->NiceWithShortname() to use Zend_Currency options
BUGFIX Setting isChanged flag on Money individual setters
MINOR Added Money->__toString()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77548 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-21 04:46:58 +00:00
Sean Harvey
ed39a9e369 API CHANGE Removed @deprecated 2.3 method Varchar::Attr() on Varchar: Please use Varchar::ATT_val() instead
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77380 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-20 06:25:15 +00:00
Ingo Schommer
7a18cd8bec BUGFIX Fixed quoting in Money
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77132 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-19 01:58:29 +00:00
Sean Harvey
5322ecc692 ENHANCEMENT SSDatetime->setValue() can now set a timestamp, consistently working the same as Date does
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77120 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-19 00:35:15 +00:00
Geoff Munn
a4cf64f105 Formatting fixed
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77099 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-18 21:24:33 +00:00
Geoff Munn
b0a56e7d37 Enum values now include table name
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77098 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-18 21:24:02 +00:00
Ingo Schommer
84089a1b7d BUGFIX Increased decimal precision of Money->Amount database column to support currencies with a greater precision than 2 digits.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76743 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-13 22:21:17 +00:00
Ingo Schommer
4085b3e654 BUGFIX Added Money->addToQuery() to work around changes in the ORM which require database columns to be explcitly selected
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76664 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-12 05:29:59 +00:00
Sam Minnee
29afa282b9 BUGFIX: Added default values for Money's component fields, to work with more picky databases.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76368 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-07 05:58:10 +00:00
Normann Lou
b50d564a5c BUGFIX: pass-in the params in right order when constructing of Zend_Currency in Money Constructor. Add NiceWithShortname function.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76299 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-06 23:32:57 +00:00
Sean Harvey
b20b6e0f95 Merged from 2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76269 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-06 06:36:16 +00:00
Normann Lou
7a4320f339 ENHANCEMENT: set the DBField name to its scaffoldFormField id, so that we could get if from other places.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76257 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-06 05:50:18 +00:00
Normann Lou
d9ea21c68e MINOR: delete debug info
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76145 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-06 01:07:03 +00:00
Ingo Schommer
5e8e47ef77 FEATURE Added Money class for managing monetary amounts with currencies through the Money design pattern. Uses the CompositeDBField interface to contain multiple database columns in a single DBField
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76100 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-05 08:10:51 +00:00
Ingo Schommer
c1c920cca0 ENHANCEMENT Added DBLocale class for Translatable extension
API CHANGE Deprecated Translatable::get_langs_by_id() - use getTranslations()
MINOR Removed Translatable::is_default_locale() - no deprecation necessary, was recently added
MINOR Removed commented out methods in Translatable: augmentNumChildrenCountQuery(), augmentAllChildrenIncludingDeleted() and augmentStageChildren()
MINOR Removed fieldsInExtraTables() and extendWithSuffix()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75742 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-30 07:37:09 +00:00
Sean Harvey
a5e82ddff1 Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75590 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-29 01:20:24 +00:00
Sean Harvey
56fbe55a47 Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75580 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-28 23:55:53 +00:00
Sean Harvey
515f7b1587 ENHANCEMENT Allow calling Format() on a Time DB field type to specify the formatting type
MINOR Code formatting fixes for Date and Time classes
MINOR Added phpDoc comments to methods



git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@74786 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-20 22:32:13 +00:00
Ingo Schommer
a9a12e51d6 MINOR Documentation
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@74012 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-02 17:17:04 +00:00
Sean Harvey
41e2ea0629 BUGFIX Fix call to undefined "_12Hour" function
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73532 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-23 02:49:22 +00:00
Ingo Schommer
b12a00c391 MINOR phpdoc documentation
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73509 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-22 22:59:14 +00:00
Sam Minnee
41fb93b344 ENHANCEMENT #3032 ajshort: Use static methods for accessing static data
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73036 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-14 00:16:32 +00:00
Geoff Munn
53d551d2e6 API CHANGE: raw2sql now uses DB-specific method
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72923 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-11 21:50:26 +00:00
Sam Minnee
189f0567f8 Merged from branches/2.2
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72811 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-10 22:17:26 +00:00
Andrew O'Neil
635e2c3df6 Merged from 2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72453 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-04 03:44:11 +00:00
Geoff Munn
57dcdaa8be API CHANGE: 'Year' datatype now uses abstracted array structure
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71942 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-17 03:54:10 +00:00
Sean Harvey
0ca4177e3b ENHANCEMENT Added getValue() to DBField. This helps for unit testing DBField values.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71833 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-13 09:30:32 +00:00
Sean Harvey
7a065b087a ENHANCEMENT Strip tags before limiting characters when using LimitCharacters() on HTMLText field type
MINOR Added test to TextTest for LimitCharacters()
MINOR Added test HTMLTextTest and added test case for LimitCharacters()



git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71795 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-12 09:38:43 +00:00
Sean Harvey
1d121b7f90 ENHANCEMENT Allow setting date timestamp for Date::setValue()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71786 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-12 04:57:17 +00:00
Sean Harvey
bf07ed2d87 MINOR Code formatting for Date::past_date() and phpDoc
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71611 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-10 05:56:07 +00:00
Sean Harvey
b3ffe8d4e2 MINOR Code formatting tidy up in Percentage
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71301 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-03 20:29:21 +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
Andrew O'Neil
4c0227e105 #3340 - Add extra date functions
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@69974 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-01-12 02:02:45 +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
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
1ad0bfb165 Improved boolean field handling for postgres
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@66792 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-27 00:00:35 +00:00
Sam Minnee
2e955b498e BUGFIX: Fixing tests
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@66508 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-24 19:28:46 +00:00
Sam Minnee
d2d22aa2d7 Updated boolean SQL value generation to be more db-agnostic
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@66423 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-23 23:20:43 +00:00
Sam Minnee
c7330dd231 Introduced array-based syntax for specifying field types (Merged branches/dbabs into trunk)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@66403 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-23 01:01:03 +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
Sam Minnee
3d9532db83 Merged branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@66108 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-18 01:48:37 +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
Sam Minnee
33219fcad2 BUGFIX #2954 - Fixed support for negative numbers in decimal fields
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65269 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-05 04:10:48 +00:00
Sam Minnee
72d90ab270 Set default edit rights on pages to be only administrators
API CHANGE: Use return value of alternateCanPublish()
BUGFIX: Fixed the Link() value for homepage
BUGFIX: Allow DBField::__construct() without a name
API CAHNGE: Allow augmentPopulateDefaults on data object decorators

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65229 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-04 23:17:14 +00:00
Ingo Schommer
65d5cf088f ENHANCEMENT Scaffolding TextField instead of TextareaField in Text DBField due to size
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65092 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-02 21:07:09 +00:00