Ingo Schommer
40d73127ae
MINOR Using late static binding instead of Object::create() calls
2012-04-04 17:10:31 +02: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
Sam Minnee
58433d38ce
BUGFIX: Tidied up relObject() behaviour on DataLists to restore broken SearchContext functionality.
2012-03-30 15:59:57 +13: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
Normann Lou
9e60225064
MINOR : Update core docs to use DataList::create() rather than DataObject::get()/get_one()/get_by_id() where appropriate - Trac#6891
2012-03-27 17:02:18 +02: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
Sam Minnee
2576944a45
API CHANGE: Added DataObject::relField(), which pushes the "relation dot syntax" code of TableListField/GridField back to the model.
...
BUGFIX: Made DataObject::relObject() more flexible; allowable thanks to new ORM.
2012-03-24 14:04:08 +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
Sean Harvey
f5a91cbbe8
ENHANCEMENT SS_Map_Iterator::rewind() SS_Map_Iterator::current() will
...
return the titleField if there's a method of the same name (same
behaviour as DataObjectSet::map() from SS 2.4)
2012-03-15 17:28:00 +13:00
Ingo Schommer
2555ccb543
BUGFIX Qualify join table in ON clause in ManyManyList to avoid ambiguous column names
2012-03-14 22:44:07 +01:00
Ingo Schommer
687a1ca72b
BUGFIX Don't include has_many/many_many relationships in DataObject->scaffoldFormFields() when the record doesn't have an ID yet - as the scaffolded GridFieldAddExistingAutocompleter component assumes the component has an ID to query against ( fixes #5723 )
2012-03-14 22:44:07 +01:00
Sean Harvey
f63497d6f9
ENHANCEMENT Extension arguments are now passed through to add_to_class()
...
static function on Extension classes.
BUGFIX FulltextSearchable didn't pass through arguments, use now
available $args parameter with FulltextSearchable::add_to_class()
2012-03-12 16:14:47 +13:00
Sam Minnée
603a984ad4
Merge pull request #236 from silverstripe-big-o/pull/SSF-25
...
SSF-25: ModelAdmin
2012-03-09 15:23:20 -08:00
Ingo Schommer
3a068a0d18
MINOR Removed references to outdated versions from docs
2012-03-09 21:34:05 +01:00
Ingo Schommer
4b8895c8b6
BUGFIX Don't scaffold has_one relations into a DropdownField in ForeignKey->scaffoldFormField() if more than 100 records would be created, to avoid exceeding PHP memory ( fixes #6776 )
2012-03-09 15:58:46 +01:00
Hamish Friedlander
05cf5a833b
MINOR: Dump deprecation notices introduced by the config system to 3.1.0 as it breaks heaps of code
2012-03-09 18:16:45 +13:00
Hamish Friedlander
4315e51358
BUGFIX: Fix deprecated and removed static accessor calls
2012-03-09 18:16:44 +13:00
Hamish Friedlander
9c2ebc3e5f
BUGFIX: Replace deprecated extraStatics with new methods on Versioned and Hierarchy
2012-03-09 18:16:44 +13:00
Hamish Friedlander
876f4c5299
API CHANGE: Modify extensions system to support new config system. Statics are now declared directly on extensions, and there is an add_to_class method extensions can hook into to modify class configuration
2012-03-09 18:16:44 +13:00
Sam Minnee
adbcf61c56
MINOR: Minor fixes after new SS_List interfaces cleanup
2012-03-09 17:50:32 +13:00
Stig Lindqvist
4f1da0a5e8
MINOR If the limit clause on DataObject::get() passes a SQL type of limit, modify it for SS_List::limit()
2012-03-09 17:07:42 +13:00
Stig Lindqvist
0a82b903bc
MINOR ListDecorator::limit must exactly match SS_Limitable::limit()
2012-03-09 17:07:41 +13:00
Stig Lindqvist
2cb67efe07
API CHANGE DataObject::getComponents() should use default value for limit as NULL
2012-03-09 17:07:41 +13:00
Sam Minnee
e9e7655867
API CHANGE: Added SS_Sortable, an extra interface to apply to SS_Lists.
2012-03-09 17:07:41 +13:00
Sam Minnee
f000a47813
API CHANGE: Added SS_Filterable, an extra interface to apply to lists.
2012-03-09 17:07:40 +13:00
Sam Minnee
a55e06f6b5
API CHANGE: Introduce SS_Limitable class for adding to SS_Lists that have limit capability.
...
API CHANGE: Deprecated SS_List::getRange() in favour of SS_Limitable::limit().
API CHANGE: Introduce SS_Limitable::limit($limit, $offset = 0) as the only modern way of specifying limits; deprecate all others.
2012-03-09 17:07:40 +13:00
Sean Harvey
0d8151fd3d
Merge remote-tracking branch 'upstream/master' into deprecation_fixes
2012-03-09 15:03:43 +13:00
Sean Harvey
a2353f793d
MINOR Fixed misspelled "extension" in
...
DataExtension::load_extra_statics()
2012-03-09 14:35:12 +13:00
Sean Harvey
71c2a2286a
API CHANGE Removed support for extraDBFields method in DataExtension, please ensure you are using extraStatics on your extension classes
2012-03-09 14:34:25 +13:00
Mark Stephens
627708e3a8
BUGFIX: add Director::isDev parameter so we can test if we know we're dev mode already without touching the database. Used in showqueries on MySQL, so that errors are avoided when showing queries on initial switch to dev move ( #6856 )
2012-03-09 14:20:22 +13:00
Ingo Schommer
e4a6dd5850
Merge branch 'integration'
...
Conflicts:
forms/gridfield/GridField.php
2012-03-08 20:25:21 +01:00
Ingo Schommer
51bae9e4a6
ENHANCEMENT Allowing to save ManyManyList with multiple foreign keys (e.g. required to add to an overloaded Group->Members() relationship)
2012-03-06 21:38:33 +01:00
Ingo Schommer
bb6d4c506e
BUGFIX Fixed HasManyList and ManyManyList queries for relationships on new records (was returning all available records due to the SQL filtering ignoring ID=0)
2012-03-06 01:23:34 +01:00
Sam Minnee
adfdd068e2
Merge branch 'ereg-to-preg' of https://github.com/AngryPHPNerd/sapphire
...
Conflicts:
model/fieldtypes/Date.php
2012-03-05 13:54:20 +13:00
Ingo Schommer
299bf8b9c6
Merge branch 'integration'
2012-03-02 20:53:06 +01:00
Ingo Schommer
e5c4b0a36b
ENHANCEMENT Hierarchy->Breadcrumbs()
2012-03-02 20:46:19 +01:00
Ingo Schommer
c3f4db1d7d
ENHANCEMENT Using new UploadField in ForeignKey scaffolding, replacing deprecated ImageField/FileField classes
2012-03-01 12:00:03 +01:00
Ingo Schommer
586ca7374f
Merge pull request #202 from halkyon/date_changes
...
Date changes
2012-02-29 13:02:30 -08:00
Sean Harvey
8109a5e54d
MINOR phpDoc to methods in Date, small tweaks to DayOfMonth method to be consistent with value checks
2012-03-01 09:56:05 +13:00
Ingo Schommer
da879da940
MINOR Styling and structural fixes for File/Image->getCMSFields() and relates usage in UploadField/HTMLEditorField.
2012-02-29 21:06:43 +01:00
Ingo Schommer
bcc73de85e
Merge branch '106-add-edit-records-rc'
...
Conflicts:
admin/code/LeftAndMain.php
admin/css/screen.css
admin/scss/_style.scss
admin/templates/Includes/LeftAndMain_EditForm.ss
css/GridField.css
filesystem/Folder.php
forms/gridfield/GridField.php
forms/gridfield/GridFieldDefaultColumns.php
forms/gridfield/GridFieldPopupForms.php
2012-02-27 23:58:10 +01:00
Julian Seidenberg
550f75408e
ENHANCEMENT: File and Image CMSFields styling
2012-02-27 23:52:40 +01:00
AngryPHPNerd
0e2cbb0b88
Replace ereg with preg_*
2012-02-27 22:14:02 +01:00
Sean Harvey
58d48583a9
ENHANCEMENT Date::DayOfMonth() now supports ordinal argument, so you can get somehing like "10th" or "2nd". Also supported in Date::RangeString
2012-02-24 20:38:11 +13:00
Sean Harvey
8fdc531345
BUGFIX Ensure Date and Datetime field types actually set NULL, false, empty string values correctly instead of "1970-01-01" which gets saved to the database instead of NULL.
...
BUGFIX Datetime::Nice() and casting methods return NULL when there is no value, to be consistent with Date::Nice() and so on
2012-02-24 20:37:58 +13:00
Fred Condo
d370423825
Clean up trailing ?> per coding standard
...
All sapphire but the lang directory
2012-02-12 12:40:16 -08:00
Sean Harvey
591dd4efa9
BUGFIX SS_Map::keys() and SS_Map::values() are identical, keys() should return the *keys* not the values #6818
2012-02-11 11:46:20 +13:00
Andrew O'Neil
267050171a
BUGFIX Fix HasManyList::removeByID()
2012-02-09 14:33:00 +13:00
Sam Minnee
d1a39b0b1a
BUGFIX: Fixed operation of the onlyDeletedFromStage parameter of Hierarchy::liveChildren().
2012-02-08 18:38:37 +13:00