Commit Graph

75 Commits

Author SHA1 Message Date
Will Rossiter
e619329dc3 FIX: Decimal field change detection. 2013-04-06 23:20:28 +13:00
Will Rossiter
ddb017a6ff API: Move LimitWordCount() to Varchar 2013-04-05 21:58:03 +13:00
Ingo Schommer
880702fc74 Fixed static config access in Currency and i18n (fixes #8341) 2013-03-26 10:13:51 +01:00
Ingo Schommer
3334eafcb1 API Marked statics private, use Config API instead (#8317)
See "Static configuration properties are now immutable, you must use Config API." in the 3.1 change log for details.
2013-03-24 17:20:53 +01:00
Ingo Schommer
4f95a07936 Removed deprecated NegationFilter tests, rewrote ExactMatchMultiFilter tests 2013-03-19 12:58:14 +01:00
Hamish Friedlander
743a186c32 API Make SSViewer#process return HTMLText not string
This means that you dont have to worry about casting it
as HTMLText again when using the result in a template or other context

However in some situations code might be assuming it can
check with is_string, in which case you now need to use instanceof HTMLText
2013-03-14 12:49:03 +13:00
Hamish Friedlander
cd41a536b9 NEW Let shortcodes be disabled in HTMLText & HTMLVarchar 2013-03-14 12:49:03 +13:00
Ingo Schommer
bea1b9002d Merge remote-tracking branch 'origin/3.0' into 3.1
Conflicts:
	control/HTTP.php
2013-02-26 13:28:35 +01:00
Ingo Schommer
92458d9f43 Fixed line lengths 2013-02-18 14:41:49 +01:00
Ingo Schommer
14a56c18e9 Merge remote-tracking branch 'origin/3.0' into 3.1
Conflicts:
	control/Director.php
2013-02-07 21:45:16 +01:00
Daniel Hensby
f0621cdd91 FEATURE: Added ability to query size of Varchar
This allows a developer to programatically access the size of the DB Varchar field. This allows us to be a bit more DRY and to define the size in one place and limit TextFields to the same value
2013-02-05 18:41:11 +00:00
Ingo Schommer
634c91c6ff Merge remote-tracking branch 'origin/3.0' into 3.1
Conflicts:
	email/Mailer.php
2013-01-30 12:46:24 +01:00
Sam Minnee
1e1df8c43e BUGFIX: Improved detection of empty HTMLText fields. 2013-01-29 18:03:47 +01:00
Mateusz Uzdowski
7026a488e6 BUGFIX: for date manipulation use the SS_Datetime::now, otherwise it does not respect the mock date. 2013-01-29 17:23:23 +01:00
Ingo Schommer
7e4629073a NEW Date->Ago() with "less than a minute" support 2012-12-13 19:01:27 +01:00
Simon Welsh
b0121b541c Add codesniffer that ensures indentation is with tabs. 2012-12-12 17:33:31 +13:00
Simon Welsh
fc5dd2994c Add codesniffer that ensures indentation is with tabs. 2012-12-12 00:12:11 +13:00
Sean Harvey
8168a7db09 Remove deprecated DBField::create(), use create_field() instead 2012-11-16 14:36:26 +13:00
Sean Harvey
5c983a25f0 emove deprecated StringField::Lower() and Upper() methods
Use LowerCase() and UpperCase() instead
2012-11-15 14:43:16 +13:00
Sean Harvey
9e7bdb3e93 Removing deprecated Text::EscapeXML(), use DBField->XML() instead 2012-11-15 14:43:16 +13:00
icecaster
8a7f9ede97 fixed empty string always on scaffolded enum fields 2012-10-17 12:30:05 +13:00
Sam Minnee
1f7fc1f76a FIX Remove instances of lines longer than 120c
The entire framework repo (with the exception of system-generated files) has been amended to respect the 120c line-length limit.  This is in preparation for the enforcement of this rule with PHP_CodeSniffer.
2012-09-30 17:18:13 +13:00
Ingo Schommer
e2f073f38a Method visibility according to coding conventions 2012-09-20 10:46:59 +02:00
Juerg Rast
00a2edd9bc Wrong deprecation notice in DBField::create() 2012-08-04 19:14:16 +02:00
Will Rossiter
a38bfc577c API: Deprecate EnumField::Lower() and EnumField::Upper() to LowerCase() and UpperCase() for consistency with StringField 2012-07-18 11:54:42 +12:00
Sean Harvey
9074f524cc BUGFIX Fixing regression in Boolean::scaffoldSearchField() 2012-05-24 14:13:55 +12:00
Sam Minnée
c5616f8724 Merge pull request #487 from nyeholt/injector_bugfixes
Change singleton and strong_create to use dependency injector, with additional fixes to existing classes to behave correctly
2012-05-23 18:46:48 -07:00
Marcus Nyeholt
82495f5a7e BUGFIX Versioned's constructor doesn't provide suitable defaults. Previously a bug/feature in singleton, where it would pass null,true as params to strong_create, which would then get passed through as params to Versioned's constructor, meant that the code still executed fine (as was set to something that wasn't an array, so the null and true were instead taken as args). The fact that the usage of singleton(Versioned) never really used the classes code, purely for value lookup, meant that this never propagated errors. I've now switched singleton() to use the injector for retrieving values, which means these dud values are no longer passed through
CHANGE Given that Config::inst is an implementation of the singleton pattern itself, I've removed the extra call to singleton(). A side effect of this is that it gets around a possibly nasty circular reference with the dependency injector (which relies on the config object); in future, this dependency structure should really be structured from the DI directly.

MINOR Change singleton and strong_create to use dependency injector

BUGFIX: Provide default constructor values for classes (fixes issues when used in 'singleton' scenario during dev/build in particular)

MINOR Clear out injector state when resetting db schema during tests (a follow on from changing singleton() calls to use the injector underneath)
2012-05-23 21:10:04 +10:00
Sean Harvey
60c72c40d9 API CHANGE Use of the DropdownField $emptyString argument is now
properly deprecated (has been marked as deprecated since 2.3). Please
use setEmptyString() on the DropdownField instance instead.
2012-05-23 22:59:40 +12:00
Sean Harvey
e5e8f489a2 Merge branch (pull request #247) 'template-global-fixes' of https://github.com/sminnee/sapphire into sminnee-template-global-fixes 2012-05-19 15:39:59 +12:00
Yuki Awano
c04b01fc2a BUGFIX Changed Date.php and DateTime.php to use DateTime->Format instead of strtotime to handle extended dates on 32bit environment(fixes #7311) 2012-05-18 16:09:38 +09:00
Sam Minnee
7201f06476 API CHANGE: Added new config option Money.default_currency. 2012-05-18 16:15:13 +12:00
Sean Harvey
46f51d5653 MINOR Fixing deprecated use of SQLQuery 2012-05-11 11:39:06 +12:00
Ingo Schommer
7b18d9d0da MINOR Switching _t() calls from sprintf() to using injection parameters (#7170) 2012-05-01 22:17:00 +02:00
Ingo Schommer
2288d80c30 Merge pull request #387 from sminnee/sapphire
---

The primary goal of this branch was to fix the sort bugs in AssetAdmin, however, it started a bit of a yak shave in that the API around SQLQuery was poor.  The biggest change that this pull request makes is it changes the format of SQLQuery::$select to contain aliases as array keys (and consistently puts the "implicit alias" in there to assist with various query generation logic), but it also makes a bunch of changes to avoid direct access of that property.
2012-05-01 17:57:03 +02:00
Sam Minnee
8661164c19 API CHANGE: Add SQLQuery::clearSelect(), SQLQuery::selectField() and SQLQuery::itemisedSelect() to make it easier for other subsystems to use SQLQuery without resorting to direct property access.
API CHANGE: Remove DataQuery::select() in place of DataQuery::selectField().
BUGFIX: Remove direct property access to SQLQuery::$select
2012-05-01 17:57:39 +12:00
Mateusz Uzdowski
59663f9289 BUGFIX: fix up some E_STRICT errors 2012-04-17 11:51:55 +12:00
Ingo Schommer
d44f6b3e1f MINOR Removed deprecated usage of $priority argument in _t() calls 2012-04-15 17:17:17 +02:00
Simon Welsh
f07258f3cf MINOR Update @package values to match renaming sapphire 2012-04-15 10:50:19 +12:00
Simon Welsh
3a6341a251 API-CHANGE sapphire folder can now be renamed. 2012-04-15 10:50:19 +12:00
Simon Welsh
f8082e4814 MINOR Add newline to end of files without one 2012-04-15 10:50:19 +12:00
Sean Harvey
6b40377a1c BUGFIX Time::setValue() now conforms to DBField::setValue() for E_STRICT compliance. 2012-04-12 12:08:22 +12:00
Sean Harvey
9bd7068394 MINOR Fixed class documentation for CompositeDBField 2012-04-12 12:04:58 +12:00
Andrew O'Neil
75c5134bc9 BUGFIX: Fix Money::setValue() using old api 2012-04-11 15:30:38 +12:00
Andrew O'Neil
bdb312c665 API CHANGE: DBField::hasValue() conflicts with ViewableData::hasValue(), use DBField::exists() instead. 2012-04-11 14:48:06 +12:00
Ingo Schommer
6517f4496b Merge pull request #273 from ajoneil/sapphire
---

This allows DataList::create(SiteTree) as equivalent to Object::create(DataList, SiteTree), without
having to have a create() function on DataList.

Required for E_STRICT compliance, as child classes cant override create() if they change the arguments.

DBField::create() is also renamed to DBField::create_field(), as this does not just call the constructor, which all other cases of create() do.

Conflicts:
	tests/model/DateTest.php
	tests/model/DatetimeTest.php
2012-04-04 16:48:16 +02:00
unclecheese
59706d5bf5 Using deprecated StringField::Upper() and StringField::Lower(). Calling $MyEnumField.Upper on the template returns an unresolvable deprecation error. 2012-04-03 15:58:17 -03:00
Sean Harvey
e097f6e1a8 MINOR Fixes to method arguments in core classes for E_STRICT support.
API CHANGE Remove abstract static function and just use static functions
in Authenticator (PHP 5.3+ doesn't support abstract static functions)
2012-03-28 22:41:42 +13:00
Andrew O'Neil
de2832e65f ENHANCEMENT: Allow Object::create() to be called with late static binding.
This allows DataList::create('SiteTree') as equivalent to Object::create('DataList', 'SiteTree'), without
having to have a create() function on DataList. Required for E_STRICT compliance.
2012-03-27 17:57:42 +13:00
Sean Harvey
02c8019bb8 ENHANCEMENT Introduce Database::prepStringForDB(), used by
DBField::prepValueForDB() and StringField::prepValueForDB() to ensure
the field value is escaped correctly for the database. This means
databases like MSSQL can introduce an "N" prefix (marking text as
unicode to be saved correctly) by overloading the
prepStringForDB method. MySQL, PostgreSQL and SQLite3
operate as usual.
2012-03-20 21:20:35 +13:00