Commit Graph

202 Commits

Author SHA1 Message Date
Ingo Schommer
72a284c9b8 Merge remote-tracking branch 'origin/3'
Conflicts:
	core/Constants.php
	docs/en/05_Contributing/01_Code.md
	tests/model/SQLQueryTest.php
2015-04-09 16:26:16 +12:00
Loz Calver
835ee69339 NEW: Only validate DataObject model definitions during a build 2015-03-13 16:16:16 +00:00
Loz Calver
c58f4c469d Replace core uses of DataObject::has_one/has_many/many_many 2015-03-13 16:16:12 +00:00
Loz Calver
7e2a00aa3d Refactor DataObject has_one/has_many/many_many methods 2015-03-13 15:15:23 +00:00
Loz Calver
203f77116b Fixes, tests and documentation for multiple many_manys between the same class 2015-03-13 09:27:23 +00:00
Josh
3f1805bfd2 NEW: Support multiple many_manys between the same classes (closes #1377) 2015-03-13 09:27:23 +00:00
Damian Mooyman
319b96b48b Merge remote-tracking branch 'origin/3.1' into 3
Conflicts:
	docs/en/02_Developer_Guides/09_Security/04_Secure_Coding.md
	docs/en/05_Contributing/01_Code.md
	forms/TreeDropdownField.php
	model/DataObject.php
	security/Member.php
	tests/model/DataObjectTest.php
2015-03-11 11:40:06 +13:00
Daniel Hensby
95deae8a69 Merge pull request #3990 from kinglozzer/patch-1
Remove redundant config logic from DataObject::setField()
2015-03-09 21:09:23 +00:00
Loz Calver
747a794f86 Remove redundant config logic from DataObject::setField() 2015-03-09 12:51:08 +00:00
Loz Calver
3a7e24a220 FIX: Unable to access a list of all many_many_extraFields 2015-02-25 10:33:50 +00:00
Damian Mooyman
a86ed93759 Merge remote-tracking branch 'origin/3'
Conflicts:
	docs/en/05_Contributing/01_Code.md
2015-02-20 14:09:38 +13:00
Damian Mooyman
dff65867cc Merge remote-tracking branch 'origin/3.1' into 3
Conflicts:
	control/HTTP.php
	control/HTTPResponse.php
	docs/en/05_Contributing/01_Code.md
	forms/CompositeField.php
	forms/FormAction.php
	forms/FormField.php
	forms/InlineFormAction.php
	forms/NumericField.php
	forms/TreeDropdownField.php
	forms/TreeMultiselectField.php
	templates/forms/TreeDropdownField.ss
	tests/core/CoreTest.php
	tests/forms/NumericFieldTest.php
	tests/model/DataDifferencerTest.php
2015-02-20 10:17:19 +13:00
Daniel Hensby
89c14d079d Making TreeMultiSelectField consistent with parent class
NEW TreeDropdownField sanatiser helper added
Use config for default_cast of objects
FIX Determine if Diffed value should be escaped
Forcing casting for core DB fields
Fixing permissions labels
2015-02-13 11:12:30 +13:00
Aden Fraser
83db2f2d30 Fixed "Removed DataObject::$allowed_actions #3880" on master 2015-02-12 08:57:51 +00:00
Loz Calver
77ebdc22fa FIX: DataObject::db returned fields in incorrect order, with incorrect data types
fixes #3802
2015-01-19 20:38:08 +00:00
Damian Mooyman
19549d620f Moved deprecation of SQLQuery to 4.0 2014-12-04 09:30:50 +13:00
Damian Mooyman
0b1f297873 Merge remote-tracking branch 'origin/3.1'
Conflicts:
	.travis.yml
	README.md
	admin/code/LeftAndMain.php
	admin/css/screen.css
	admin/scss/screen.scss
	api/RestfulService.php
	conf/ConfigureFromEnv.php
	control/injector/ServiceConfigurationLocator.php
	control/injector/SilverStripeServiceConfigurationLocator.php
	core/ClassInfo.php
	core/Object.php
	css/AssetUploadField.css
	css/ComplexTableField_popup.css
	dev/CSSContentParser.php
	dev/DevelopmentAdmin.php
	docs/en/changelogs/index.md
	docs/en/misc/contributing/code.md
	docs/en/reference/execution-pipeline.md
	filesystem/GD.php
	filesystem/ImagickBackend.php
	filesystem/Upload.php
	forms/Form.php
	forms/FormField.php
	forms/HtmlEditorConfig.php
	forms/gridfield/GridFieldDetailForm.php
	forms/gridfield/GridFieldSortableHeader.php
	lang/en.yml
	model/Aggregate.php
	model/DataList.php
	model/DataObject.php
	model/DataQuery.php
	model/Image.php
	model/MySQLDatabase.php
	model/SQLQuery.php
	model/fieldtypes/HTMLText.php
	model/fieldtypes/Text.php
	scss/AssetUploadField.scss
	search/filters/SearchFilter.php
	security/Authenticator.php
	security/LoginForm.php
	security/Member.php
	security/MemberAuthenticator.php
	security/MemberLoginForm.php
	security/Security.php
	tests/behat/features/bootstrap/SilverStripe/Framework/Test/Behaviour/CmsFormsContext.php
	tests/control/HTTPTest.php
	tests/control/RequestHandlingTest.php
	tests/filesystem/UploadTest.php
	tests/forms/FormTest.php
	tests/forms/NumericFieldTest.php
	tests/model/DataListTest.php
	tests/model/DataObjectTest.php
	tests/model/TextTest.php
	tests/security/MemberAuthenticatorTest.php
	tests/security/SecurityDefaultAdminTest.php
	tests/view/SSViewerCacheBlockTest.php
	tests/view/SSViewerTest.php
2014-11-18 12:45:54 +13:00
Damian Mooyman
7b89c17349 Merge remote-tracking branch 'origin/3.1.7' into 3.1 2014-11-14 16:30:14 +13:00
Loz Calver
85b4ba15fc FIX: DataObject::db() doesn't respect overloaded db types (fixes #3620) 2014-11-11 10:41:54 +00:00
spekulatius
14a1086b03 Update DataObject.php
Documentation fix:

Table at http://api.silverstripe.org/3.1/class-DataObject.html is displaying the data wrong. Current it says "protected A" instead of "protected ValidationResult" as it should be.
2014-11-09 21:19:39 +13:00
g4b0
213d5f60bf belongs_many_many are now translatable 2014-10-27 11:36:00 +01:00
Ingo Schommer
fb8b22c292 Merge pull request #3402 from halkyon/plural_fix
BUG Fixing plural_name messing up singular words ending in "e" (#3251)
2014-09-18 21:56:56 +12:00
Daniel Hensby
c5956d6ac4 Use injector to create ValidationResult 2014-08-22 15:19:01 +01:00
Sean Harvey
61c6dee057 BUG Fixing plural_name messing up singular words ending in "e" (#3251)
This would ideally be fixed with the ability to use an external library
like gettext, but that's an API change. This for now fixes the issue
where a singular like "Page" returns "Pags" for the plural name.
2014-08-20 14:55:40 +12:00
Sean Harvey
404478b07f Removing @deprecated 3.1 functionality and classes.
Changelog has been updated to include what was removed in terms of
major functionality, and what to use as a replacement.
2014-08-18 16:00:13 +12:00
Sean Harvey
5f1552b365 BUG Custom label set in summary_fields config gets overridden 2014-08-14 14:19:41 +12:00
Mateusz Uzdowski
8bf3853887 Merge remote-tracking branch 'origin/3.1'
Conflicts:
	docs/en/misc/contributing/issues.md
	docs/en/reference/uploadfield.md
	forms/HtmlEditorField.php
	i18n/i18n.php
	javascript/HtmlEditorField.js
	model/DB.php
	model/Image.php
	model/SQLQuery.php
2014-08-14 09:08:26 +12:00
Michael Parkhill
7417566642 fix speling error in plural_name var description
The comment description for plural_name variable had a spelling error
2014-07-29 11:52:59 +12:00
Damian Mooyman
d8e9af8af8 API New Database abstraction layer. Ticket #7429
Database abstraction broken up into controller, connector, query builder, and schema manager, each independently configurable via YAML / Injector
Creation of new DBQueryGenerator for database specific generation of SQL
Support for parameterised queries, move of code base to use these over escaped conditions
Refactor of SQLQuery into separate query classes for each of INSERT UPDATE DELETE and SELECT
Support for PDO
Installation process upgraded to use new ORM
SS_DatabaseException created to handle database errors, maintaining details of raw sql and parameter details for user code designed interested in that data.
Renamed DB static methods to conform correctly to naming conventions (e.g. DB::getConn -> DB::get_conn)
3.2 upgrade docs
Performance Optimisation and simplification of code to use more concise API
API Ability for database adapters to register extensions to ConfigureFromEnv.php
2014-07-09 18:04:05 +12:00
Damian Mooyman
cf5d524235 BUG Fix regressions from #2206 in hasValue and dbObject
Fixes #2982
2014-03-30 18:05:46 +13:00
Damian Mooyman
7c60c73dbb API Polymorphic has_one behaviour 2014-03-18 09:18:04 +13:00
Simon Welsh
8f31352039 Merge remote-tracking branch 'origin/3.1'
Conflicts:
	.travis.yml
2014-03-16 09:36:48 +13:00
Simon Welsh
90ba514cda Merge pull request #2917 from tractorcow/pulls/fix-lazyload-queryparams
BUG Fix DataObject / Versioned publishing issues
2014-03-15 21:45:42 +13:00
Damian Mooyman
23f5f08eda BUG Fix DataObject::loadLazyFields discarding original query parameters
BUG Fix Versioned::writeToStage failing to write object with unchanged fields
2014-03-04 16:12:07 +13:00
Damian Mooyman
53b5adbcd9 BUG Prevent unnecessary reconstruction of ClassName field after default records are generated 2014-03-04 12:03:45 +13:00
Ingo Schommer
d8361f9d3f Merge remote-tracking branch 'origin/3.1' 2014-02-18 22:06:59 +13:00
Loz Calver
a91a4bbdc2 FIX: Searchable fields with dot notation can be inherited from summary_fields (fixes #1429) 2014-02-14 21:52:47 +00:00
Ingo Schommer
0d7e9a9692 Merge remote-tracking branch 'origin/3.1'
Conflicts:
	_config/routes.yml
	docs/en/topics/datamodel.md
	forms/DropdownField.php
2014-02-04 08:19:04 +13:00
Gus King
5797efa263 Documented magic properties of DataObject 2014-01-26 00:11:32 -05:00
Ingo Schommer
f29d51f433 Merge remote-tracking branch 'origin/3.1'
Conflicts:
	docs/en/reference/dataobject.md
	lang/es.yml
2013-12-19 20:23:09 +01:00
Ingo Schommer
892b772d1c Merge pull request #2616 from Zauberfisch/3.1
Check if remote class exists in DataObject->getRemoteJoinField()
2013-12-19 11:05:13 -08:00
Sean Harvey
6fc9db6f0e API DataObject::validate() visibility changed to public (issue #1659)
DataObject::validate() is currently set to protected, but this means
you can't call validate() from outside the context of itself unless
you overload the method to use a public visibility and then call
parent::validate()

As it would turn out, most classes that overload this method already
set the visibility to public, so it would make sense the parent matches
that as well.
2013-12-19 16:36:39 +13:00
Ingo Schommer
c811556ea5 Removed debug code 2013-12-13 10:04:26 +01:00
Ingo Schommer
be5484b1d2 Leave original ValidationException intact in write()
If we want DataObject->validate() to be used instead of
the form layer, we should allow for validation errors
to be passed through unchanged to the controller layer
so we can present them to the user. The context of
which class is written should be apparent from the stacktrace
of the exception.
2013-12-11 00:41:05 +01:00
Andrew Short
bedf292612 Merge branch '3.1'
Conflicts:
	docs/en/reference/execution-pipeline.md
	lang/nl.yml
2013-11-11 18:18:25 +11:00
Zauberfisch
4b138cfe0b Check if remote class exists in DataObject->getRemoteJoinField() 2013-11-09 22:43:30 +00:00
Damian Mooyman
22f5f4d644 BUG Fix undefined index ID 2013-10-30 10:34:09 +13:00
Zauberfisch
32bb98b0d7 API: DataObject->getRemoteJoinField() no longer defaults to ParentID but throws an exception instead 2013-10-21 04:11:00 +00:00
Zauberfisch
8de1ce4a56 array check to ensure getRemoteJoinField() gets an array from Config::inst()->get($remoteClass, 'has_one') (related issue: #2570) 2013-10-21 04:04:28 +00:00
Ingo Schommer
25b6175e67 Merge remote-tracking branch 'origin/3.1'
Conflicts:
	.travis.yml
	forms/FormField.php
2013-10-20 13:52:56 +02:00