Commit Graph

186 Commits

Author SHA1 Message Date
Sean Harvey
34a4aa5b00 BUGFIX StringField::setNullifyEmpty() should assign the given value boolean, not evaluate whether it's true or not
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@109081 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:45 +13:00
Will Rossiter
7e30018e8d BUGFIX: Only highlight strings more than 2 characters long. #4949
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@107423 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:36 +13:00
Will Rossiter
41ec792cb4 ENHANCEMENT: added prefix and suffix support to ContextSummary
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@106200 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:31 +13:00
Will Rossiter
a9b238885c ENHANCEMENT: added Month function for consistency
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@104935 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:25 +13:00
Ingo Schommer
9f2a6ed501 MINOR Migrated various API-style documentation from doc.ss.org
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@104157 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:20 +13:00
Ingo Schommer
df671a35f3 MINOR Fixed phpdoc documentation (from r103390)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@103391 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:15 +13:00
Ingo Schommer
6f0df9eb19 MINOR Fixed phpdoc documentation (from r103385)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@103388 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:15 +13:00
Ingo Schommer
2107985272 MINOR Enum DBField class should default to ExactMatchFilter to avoid wrong results with overlapping Enum values in LIKE queries (see #5434)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@103322 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:14 +13:00
Sean Harvey
f6731e3efb BUGFIX Float should always be not null and default 0 in the database
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@102686 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:12 +13:00
Sean Harvey
53f2f7a873 BUGFIX #5316 Float and Double should never try to save NULL as the "null" value
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@102460 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:12 +13:00
Mateusz Uzdowski
67c9412225 BUGFIX: Date::now() supplies wrong string - it misses leading zeroes on hours
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@100767 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:52 +13:00
Geoff Munn
535698a997 BUG FIX: the default value for decimals are now cast as (doubles)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@100686 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:50 +13:00
Tom Rix
f1cd60cbf9 MINOR added Rfc2822 method to SS_Datetime. Fixed bug where dates in DataObject would not set times.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@100032 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:43 +13:00
Ingo Schommer
c945e23c62 FEATURE New DatetimeField class (form field wrapper composed of DateField andTimeField)
FEATURE New DateField and TimeField form classes with more consistent API and easier localization
API CHANGE Date/time parsing in DateField, TimeField and DatetimeField defaults to i18n::get_locale() ('en_US') instead of using en_NZ/en_GB specific parsing. Use i18n::set_locale('en_NZ') in mysite/_config.php to revert to old behaviour.
API CHANGE $timeformat constructor parameter in TimeField needs to be in ISO date notation (not PHP's date())
API CHANGE TimeField, DateField and related subclasses use Zend_Date for date parsing, meaning they're stricer than the previously used strtotime()
API CHANGE Removed DMYCalendarDateField and CalendarDateField, use DateField with setConfig('showcalendar')
API CHANGE Removed CompositeDateField, DMYDateField, use DateField with setConfig('dmyfields')
API CHANGE Removed DropdownTimeField, use TimeField with setConfig('showdropdown')
API CHANGE Removed PopupDateTimeField, use DatetimeField
API CHANGE Changed 'date', 'month' and 'year' HTML field names to lowercase in DMYDateField
API CHANGE Removed support for ambiguous date formats in DateField, e.g. '06/03/03'. Use DateField->setConfig('dateformat', '<format>') to revert to this behaviour.
API CHANGE Removed $futureOnly flag from DateField, CalendarDateField etc., use DateField->setConfig('min') and DateField->setConfig('max')
ENHANCEMENT Using Zend_Date for DateField and TimeField, with more robust date handling, starting localization support. Set globally via i18n::set_locale(), or for a field instance through setLocale(). Note: Javascript validation is not localized yet.

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@99360 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:38 +13:00
Julian Seidenberg
d5fe2733e0 BUGFIX: modified float to have the same database table schema as int. Now defaults to zero and 'not null'
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98847 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:31 +13:00
Andreas Piening
1539b8d5e3 MINOR: use DB doubles only in MySQL, fall back to float
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98178 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:24 +13:00
Sam Minnee
afe433c9ab Add some nice date formats (from r95772)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98093 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:20 +13:00
Sean Harvey
2116c46d11 API CHANGE Decimal now allows setting a default value properly
MINOR Unit tests for Decimal field type default value through new test class DecimalTest



git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98056 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:19 +13:00
Andreas Piening
ef459b2c9c MINOR: niced the way MultiEnums call requireField to give alternative adapter access
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98043 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:19 +13:00
Sam Minnee
2294d0986b BUGFIX #5009: Removed inappropriate field-detection change on multienums with no default
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97980 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:18 +13:00
Sam Minnee
11368564a3 MINOR: Better error message on bad Enum default
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97979 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:18 +13:00
Sean Harvey
30f332cd21 ENHANCEMENT Added Date::Rfc3339() for returning an RFC 3339 valid date format (from r96010)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@96049 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:00 +13:00
Sean Harvey
abab0dd631 BUGFIX #4566 Time::Nice() and Time::Nice24() return bad results if there is no value
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@94353 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:17:56 +13:00
Ingo Schommer
c66446b34d ENHANCEMENT Added parameter to DBLocale->Nice()
ENHANCEMENT Added DBLocale->getNativeName()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@93771 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:17:54 +13:00
Sam Minnee
c9a6d3a1b0 API CHANGE: Added Lower and Upper methods to Varchar, Text, and Enum
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@91048 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:17:34 +13:00
Sean Harvey
3ccada55ab BUGFIX: MSSQL does not support double, using float instead (from r90928)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@90934 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:17:31 +13:00
Sam Minnee
c4581f741a BUGFIX: Allow null default on MultiEnum fields
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@90850 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-11-05 01:14:17 +00:00
Sean Harvey
adf9bc89fe BUGFIX Fixed Text::scaffoldFormField() showing a "Is Null" checkbox, even if nullifyEmpty is true
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@90747 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-11-03 22:27:56 +00:00
Andrew Short
79773042be API CHANGE: Renamed conflicting classes to have an "SS_" namespace, and renamed existing "SS" namespace to "SS_". The affected classes are: HTTPRequest, HTTPResponse, Query, Database, SSBacktrace, SSCli, SSDatetime, SSDatetimeTest, SSLog, SSLogTest, SSLogEmailWriter, SSLogErrorEmailFormatter, SSLogErrorFileFormatter, SSLogFileWriter and SSZendLog.
MINOR: Replaced usage of renamed classes with the new namespaced name.

From: Andrew Short <andrewjshort@gmail.com>

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@90075 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-26 03:06:31 +00:00
Andrew O'Neil
8679fd9883 FEATURE: Allow Text/Varchar fields to be configured to differentiate between NULL and empty string. (#4178, petebd)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@90036 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-23 01:29:55 +00:00
Sean Harvey
87a8af00c5 BUGFIX Fixed array to string conversion error in Date::setValue() (from r82749)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@89718 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-21 02:30:07 +00:00
Andrew Short
55408946a6 MINOR: Parse HTMLText and HTMLVarchar values with ShortcodeParser before inserting into a template.
From: Andrew Short <andrewjshort@gmail.com>

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88475 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-11 00:06:59 +00:00
Andrew Short
365b4784a9 FEATURE: Refactored ViewableData. The main changes are:
* Values are not always casted before being rendered into a template.
	* Casting information can by dynamically provided by $casting_properties, rather than being hardcoded to $casting and $db.
	* Removed unneeded ViewableData_Iterator - ArrayIterator is instead used.
	* Removed ViewableData_ObjectCustomised - now just uses ViewableData_Customised.
ENHANCEMENT: Added template and value methods to database fields.
MINOR: Added ViewableDataTest and extended DataObjectTest.

From: Andrew Short <andrewjshort@gmail.com>

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88474 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-11 00:06:58 +00:00
Geoff Munn
ddfc0613ad MINOR CHANGE: numeric datatypes changed to support array types
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@87895 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-01 21:03:52 +00:00
Geoff Munn
acba65eaaa API CHANGE: array data type now supported
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@87568 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-29 22:02:35 +00:00
Geoff Munn
c2cb8dd4b9 API CHANGE: array data type now supported
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@87567 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-29 22:02:28 +00:00
Geoff Munn
05014765e6 API CHANGE: array data type now supported
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@87566 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-29 22:01:59 +00:00
Geoff Munn
dd31eb1754 API CHANGE: array data type now supported
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@87565 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-29 22:01:51 +00:00
Geoff Munn
e0334112f9 API CHANGE: array data type now supported
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@87564 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-29 22:01:41 +00:00
Geoff Munn
fa4be08785 API CHANGE: array data type now supported
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@87563 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-29 22:01:30 +00:00
Geoff Munn
d07871c372 API CHANGE: array data type now supported
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@87562 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-29 22:01:15 +00:00
Geoff Munn
c1e32fb3db API CHANGE: array data type now supported
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@87561 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-29 22:01:06 +00:00
Geoff Munn
9cb252d976 API CHANGE: array data type now supported
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@87560 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-29 22:00:56 +00:00
Geoff Munn
acbff3b95a API CHANGE: array data type now supported
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@87559 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-29 22:00:45 +00:00
Geoff Munn
8cd96982c9 API CHANGE: array data type now supported
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@87558 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-29 22:00:36 +00:00
Geoff Munn
772c1136d4 API CHANGE: array data type now supported
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@87557 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-29 22:00:27 +00:00
Sean Harvey
2fdb548594 Merged Text::ContextSummary() changes from branches/2.3 - r82035 and r82036
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@86669 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-18 02:53:46 +00:00
Sean Harvey
a1d20b8ae9 BUGFIX #3228 Fixed undefined offset error in Text::BigSummary() if trying to summarise text that is smaller than the requested word limit
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@85076 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-24 06:16:56 +00:00
Normann Lou
5c68bb3bde BUGFIX: an time field input between 12:00pm to 12:59pm can't save back to database or always save as 00:00:00.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@84086 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-10 03:56:59 +00:00
Ingo Schommer
26d7985877 MINOR Documentation in DBLocale
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@83968 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-06 21:24:15 +00:00