Commit Graph

3107 Commits

Author SHA1 Message Date
Christopher Joe
1931ed497f Fix unit test for xml content check 2016-07-04 17:25:53 +12:00
Ingo Schommer
ff846134f2 Merge pull request #5734 from open-sausages/pulls/4.0/namespace-orm
API Apply Framework\ORM Namespace to model
2016-07-01 15:04:47 +12:00
Daniel Hensby
9b061edb44 Merge pull request #5605 from open-sausages/pulls/3.3/fix-cmsall-perm
BUG fix CMS_ACCESS permission being ignored if in incorrect order in array
2016-06-29 15:25:21 +01:00
Daniel Hensby
f728b144ca
Merge branch '3' 2016-06-29 11:44:18 +01:00
Daniel Hensby
390b1fc6c4
Merge branch '3.4' into 3 2016-06-29 11:43:02 +01:00
Daniel Hensby
2ab0dcf618
Merge branch '3.3' into 3.4 2016-06-29 11:42:05 +01:00
Daniel Hensby
da0b62f853
Merge branch '3.2' into 3.3 2016-06-29 11:40:58 +01:00
Daniel Hensby
3fe8d30c2c
Merge branch '3.1' into 3.2 2016-06-29 11:40:27 +01:00
Hamish Friedlander
80d4af6b6e
API Apply Framework\ORM Namespace to model 2016-06-29 10:02:32 +12:00
Damian Mooyman
fd9f29c515 Merge pull request #5732 from open-sausages/pulls/4.0/convert-lowercase
Convert::upperCamelToLowerCamel()
2016-06-29 09:48:35 +12:00
Daniel Hensby
c11ac5d248 Merge pull request #4162 from kinglozzer/pulls/object-parse-class-spec
FIX: Object::parse_class_spec failed to parse associative arrays
2016-06-28 16:07:12 +01:00
Damian Mooyman
f1a0aef0d7
BUG fix CMS_ACCESS permission being ignored if in incorrect order in array 2016-06-28 17:45:15 +12:00
Damian Mooyman
24bea79cd9 Merge pull request #5481 from mikenz/file-name-filter-test
Explictly set the FileNameFilter replacements before testing them
2016-06-28 17:03:19 +12:00
Ingo Schommer
fd0c8ad4c0 Convert::upperCamelToLowerCamel()
Used to expose lowercase web service object keys in SS4,
without requiring an explicit field mapping for these.

The first use case is exposing File data:
[ID => 99, FileName => 'test'] becomes {"id": 99, "fileName": "test"} in JSON.
2016-06-23 12:27:54 +12:00
Hamish Friedlander
51d53f4b50 Merge pull request #5646 from open-sausages/pulls/4.0/config-table-name
API Allow table_name to be declared / introduce DataObjectSchema
2016-06-14 15:06:38 +12:00
Daniel Hensby
9e3f76832b
Merge branch '3' 2016-06-13 13:41:20 +01:00
Daniel Hensby
0d36899afa
Merge branch '3.4' into 3 2016-06-13 12:30:33 +01:00
Daniel Hensby
4e392a4d43
Merge branch '3.3' into 3.4 2016-06-13 12:30:16 +01:00
Damian Mooyman
5e8ae41d47 API Refactor dataobject schema management into separate service
API Allow table_name to be configured via Config
2016-06-08 13:22:56 +12:00
Damian Mooyman
bf00810e1f
BUG Fix buttonClicked() error
Fixes #3208
2016-06-08 12:26:11 +12:00
Loz Calver
429ce55756
FIX: ViewableData::setFailover() didn't remove cached methods 2016-06-07 16:17:49 +01:00
Sam Minnee
a9eebdc7ed NEW: Allow namespaces in template include statements. 2016-06-07 14:36:00 +12:00
Sam Minnee
65eb0bde6a API: Look for templates of namespaced classes in subfolders.
This change will mean that SilverStripe\Control\Controller will look for its
template in templates/SilverStripe/Control/Controller.ss.

In order to preserve some backwards campatibility, non-namespaced classes
can have the templates stored in any template subfolder, but once you
add a namespace to a class, the namespaced path expression will need to
be a subfolder of <module>/templates or themes/<theme>/templates.

Layout and Content templates are stil supported as special template type,
Includes still functions but is a no-op. Other template subfolders should
not be used.
2016-06-07 14:36:00 +12:00
Loz Calver
946495bcf5
FIX: Regression with <% with / %> (fixes #5656) 2016-06-06 10:14:07 +01:00
Nick
dae2295e16
NEW Allow the paddedresize to take another hex value to specify a transparency on the padded color 2016-06-05 00:05:37 +01:00
Antony Thorpe
39d1ef7a4b Bugfix: BulkLoader_Result class - Deleted Items (#5598)
* Bugfix: BulkLoader_Result class - Deleted Items

The Deleted function, within BulkLoader_Result class, calls mapToArrayList, which tries to find the recently deleted dataobjects.
To correct:
- when calling addDeleted, store a map of each dataobject within the $this->deleted array; and,
- have the Deleted function return an ArrayList based upon the $this->deleted array.

* Added tests

- created a new test file for the BulkLoader_Result class
- included tests for other methods of this class
- slightly altered the addDeleted function to be consistent other methods of this class
2016-06-01 09:55:06 +12:00
Simon Erkelens
20fac04637 RFC #5487 Remove Oembed in favor of embed/embed. (#5536) 2016-05-27 13:09:03 +12:00
Daniel Hensby
e5f1ca3bbe
Cleaning up Controller::handleRequest
1. Separated responsibility of handleAction so that it no longer bootstraps the controller and cleans up after the request is handled.
2. NEW beforeHandleRequest to take responsibility of bootstrapping the controller
3. NEW afterHandleRequest to take responsibility of cleanup for the controller
4. NEW calling init on controllers deprecated in favour of callInit() which takes responsibility of enforcing that "base init" is called and the before and after hooks
5. NEW Added prepareResponse to Controller for dealing with responses from controllers
6. NEW setResponse added to controller for setting response objects on the controller
2016-05-23 00:21:04 +01:00
Damian Mooyman
decd7e5c57
BUG Fix getFinalisedQuery not including all queried columns
Fixes #1669
2016-05-23 08:41:58 +12:00
Daniel Hensby
cdb0b07345
Merge branch '3' 2016-05-20 14:20:33 +01:00
Daniel Hensby
be7e0db26e
Merge pull request #3835 from dnadesign/hideFromHierachy3 2016-05-19 11:52:47 +01:00
Damian Mooyman
b634b1a67d Merge pull request #5537 from IgorNadj/patch-niceformats
ENH: moving hardcoded nice date/time formats to config
2016-05-19 14:12:22 +12:00
Damian Mooyman
6035be7e57 Merge pull request #5548 from kinglozzer/4661-extrafields-casting
FIX: castingHelper failed to find many_many_extraFields data (fixes #4661)
2016-05-19 14:10:37 +12:00
Damian Mooyman
574bc6038b Merge 3 into master
# Conflicts:
#	CONTRIBUTING.md
#	admin/css/screen.css
#	admin/css/screen.css.map
#	admin/javascript/LeftAndMain.EditForm.js
#	admin/javascript/LeftAndMain.js
#	admin/scss/_forms.scss
#	dev/Debug.php
#	docs/en/05_Contributing/01_Code.md
#	forms/DropdownField.php
#	model/DataObject.php
#	model/Versioned.php
#	model/fieldtypes/DBLocale.php
#	tests/forms/gridfield/GridFieldExportButtonTest.yml
#	tests/model/MoneyTest.php
#	tests/model/MoneyTest.yml
#	tests/model/SQLQueryTest.php
2016-05-18 18:36:10 +12:00
Damian Mooyman
303f695751 Merge 3.3 into 3
# Conflicts:
#	admin/javascript/LeftAndMain.EditForm.js
2016-05-18 17:29:30 +12:00
Damian Mooyman
dad7981332 Merge 3.2 into 3.3 2016-05-18 17:27:28 +12:00
Damian Mooyman
8dfeeb0eb6 Merge 3.1 into 3.2 2016-05-18 17:25:42 +12:00
Hamish Friedlander
d350aa4153 Merge pull request #5555 from open-sausages/pulls/3.1/fix-display-errors
BUG Fix suppression of display_errors in ErrorControlChain
2016-05-18 16:04:57 +12:00
Damian Mooyman
62bd26d11a BUG Fix suppression of display_errors in ErrorControlChain 2016-05-18 13:36:54 +12:00
Damian Mooyman
8ed25ae482 BUG Fix DataObject::isChanged() detecting non saveable changes (#5545) 2016-05-18 09:00:04 +10:00
Loz Calver
7a81372294 FIX: castingHelper failed to find many_many_extraFields data (fixes #4661) 2016-05-17 16:04:28 +01:00
Damian Mooyman
8947bb0245 BUG Fix filtersOnId ignoring WHERE "ID" IN () (#5546) 2016-05-17 18:30:33 +12:00
Shawn Lin
2a856300c0 Fix bug, export button cannot export value '0' 2016-05-16 16:49:10 +12:00
John Milmine
c401d9daff new added hide_from_cms_tree and hide_from_hierarchy 2016-05-16 16:20:14 +12:00
Damian Mooyman
4d1ddf0e62
BUG Prevent session hijackers from resetting a user password
BUG Member::checkPassword incorrect for default admin
2016-05-16 10:54:18 +12:00
Igor Nadj
c8eda9fd5c ENH: moving hardcoded nice date/time formats to config
Old PR: #4449
2016-05-15 21:25:57 +12:00
Daniel Hensby
8ebdedf330 Merge pull request #5488 from robbieaverill/bugfix/4835-array-to-string
Fix for array to string conversion in DropdownField
2016-05-13 13:54:04 +01:00
Robbie Averill
7d7800e5e7 Fix for array to string conversion in DropdownField
* Resolves #4835
* Add unit test to cover array values
* Add value assertion
2016-05-13 10:11:42 +12:00
Daniel Hensby
0594542e7f
Merge branch '3' 2016-05-12 16:42:48 +01:00
Daniel Hensby
19a4a40d8b
Merge branch '3.3' into 3 2016-05-12 16:25:22 +01:00
Daniel Hensby
264d7e8ffe
Merge branch '3.2' into 3.3 2016-05-12 16:23:57 +01:00
Daniel Hensby
e8962b95d0
Merge branch '3.1' into 3.2 2016-05-12 16:05:54 +01:00
Loz Calver
5b275376d3
Many many bug 2016-05-12 12:38:04 +01:00
Daniel Hensby
dd554d883f
Proving bug with Deep nested many_many relations
When adding a filter to a many_many with a shared inheritance, the FROM table is removed and added as a LEFT JOIN which causes a syntax error.

This means `$dataList->filter('ManyManyRel.ID', array(1,2))` doesn't work.
2016-05-12 12:38:02 +01:00
Damian Mooyman
f13e44a265 Merge 3 into master
# Conflicts:
#	admin/javascript/LeftAndMain.Tree.js
#	admin/javascript/lang/cs.js
#	admin/javascript/lang/de.js
#	admin/javascript/lang/en.js
#	admin/javascript/lang/eo.js
#	admin/javascript/lang/es.js
#	admin/javascript/lang/fa_IR.js
#	admin/javascript/lang/fi.js
#	admin/javascript/lang/fr.js
#	admin/javascript/lang/id.js
#	admin/javascript/lang/id_ID.js
#	admin/javascript/lang/it.js
#	admin/javascript/lang/ja.js
#	admin/javascript/lang/lt.js
#	admin/javascript/lang/mi.js
#	admin/javascript/lang/nb.js
#	admin/javascript/lang/nl.js
#	admin/javascript/lang/pl.js
#	admin/javascript/lang/ro.js
#	admin/javascript/lang/ru.js
#	admin/javascript/lang/sk.js
#	admin/javascript/lang/sl.js
#	admin/javascript/lang/sr.js
#	admin/javascript/lang/sr@latin.js
#	admin/javascript/lang/sr_RS.js
#	admin/javascript/lang/sr_RS@latin.js
#	admin/javascript/lang/src/cs.js
#	admin/javascript/lang/src/de.js
#	admin/javascript/lang/src/en.js
#	admin/javascript/lang/src/eo.js
#	admin/javascript/lang/src/es.js
#	admin/javascript/lang/src/fi.js
#	admin/javascript/lang/src/fr.js
#	admin/javascript/lang/src/id.js
#	admin/javascript/lang/src/id_ID.js
#	admin/javascript/lang/src/it.js
#	admin/javascript/lang/src/ja.js
#	admin/javascript/lang/src/lt.js
#	admin/javascript/lang/src/mi.js
#	admin/javascript/lang/src/nb.js
#	admin/javascript/lang/src/nl.js
#	admin/javascript/lang/src/pl.js
#	admin/javascript/lang/src/ro.js
#	admin/javascript/lang/src/ru.js
#	admin/javascript/lang/src/sk.js
#	admin/javascript/lang/src/sl.js
#	admin/javascript/lang/src/sr.js
#	admin/javascript/lang/src/sr@latin.js
#	admin/javascript/lang/src/sr_RS.js
#	admin/javascript/lang/src/sr_RS@latin.js
#	admin/javascript/lang/src/sv.js
#	admin/javascript/lang/src/zh.js
#	admin/javascript/lang/sv.js
#	admin/javascript/lang/zh.js
#	css/GridField.css
#	forms/gridfield/GridFieldExportButton.php
#	javascript/GridField.js
#	javascript/lang/ar.js
#	javascript/lang/cs.js
#	javascript/lang/de.js
#	javascript/lang/en.js
#	javascript/lang/en_GB.js
#	javascript/lang/eo.js
#	javascript/lang/es.js
#	javascript/lang/fi.js
#	javascript/lang/fr.js
#	javascript/lang/id.js
#	javascript/lang/id_ID.js
#	javascript/lang/it.js
#	javascript/lang/ja.js
#	javascript/lang/lt.js
#	javascript/lang/mi.js
#	javascript/lang/nb.js
#	javascript/lang/nl.js
#	javascript/lang/pl.js
#	javascript/lang/ru.js
#	javascript/lang/sk.js
#	javascript/lang/sl.js
#	javascript/lang/sr.js
#	javascript/lang/sr@latin.js
#	javascript/lang/sr_RS.js
#	javascript/lang/sr_RS@latin.js
#	javascript/lang/src/ar.js
#	javascript/lang/src/cs.js
#	javascript/lang/src/de.js
#	javascript/lang/src/en.js
#	javascript/lang/src/eo.js
#	javascript/lang/src/es.js
#	javascript/lang/src/fi.js
#	javascript/lang/src/fr.js
#	javascript/lang/src/id.js
#	javascript/lang/src/id_ID.js
#	javascript/lang/src/it.js
#	javascript/lang/src/ja.js
#	javascript/lang/src/lt.js
#	javascript/lang/src/mi.js
#	javascript/lang/src/nb.js
#	javascript/lang/src/nl.js
#	javascript/lang/src/pl.js
#	javascript/lang/src/ru.js
#	javascript/lang/src/sk.js
#	javascript/lang/src/sl.js
#	javascript/lang/src/sr.js
#	javascript/lang/src/sr@latin.js
#	javascript/lang/src/sr_RS.js
#	javascript/lang/src/sr_RS@latin.js
#	javascript/lang/src/sv.js
#	javascript/lang/src/zh.js
#	javascript/lang/sv.js
#	javascript/lang/zh.js
#	scss/GridField.scss
#	tests/model/ManyManyListTest.php
#	tests/model/SQLQueryTest.php
2016-05-11 15:19:35 +12:00
Damian Mooyman
4f06a43986 Merge 3.3 into 3
# Conflicts:
#	admin/javascript/lang/src/cs.js
#	admin/javascript/lang/src/de.js
#	admin/javascript/lang/src/en.js
#	admin/javascript/lang/src/eo.js
#	admin/javascript/lang/src/es.js
#	admin/javascript/lang/src/fi.js
#	admin/javascript/lang/src/fr.js
#	admin/javascript/lang/src/id.js
#	admin/javascript/lang/src/id_ID.js
#	admin/javascript/lang/src/it.js
#	admin/javascript/lang/src/ja.js
#	admin/javascript/lang/src/lt.js
#	admin/javascript/lang/src/mi.js
#	admin/javascript/lang/src/nb.js
#	admin/javascript/lang/src/nl.js
#	admin/javascript/lang/src/pl.js
#	admin/javascript/lang/src/ro.js
#	admin/javascript/lang/src/ru.js
#	admin/javascript/lang/src/sk.js
#	admin/javascript/lang/src/sl.js
#	admin/javascript/lang/src/sr.js
#	admin/javascript/lang/src/sr@latin.js
#	admin/javascript/lang/src/sr_RS.js
#	admin/javascript/lang/src/sr_RS@latin.js
#	admin/javascript/lang/src/sv.js
#	admin/javascript/lang/src/zh.js
#	javascript/lang/fr.js
#	javascript/lang/src/ar.js
#	javascript/lang/src/cs.js
#	javascript/lang/src/de.js
#	javascript/lang/src/en.js
#	javascript/lang/src/eo.js
#	javascript/lang/src/es.js
#	javascript/lang/src/fi.js
#	javascript/lang/src/fr.js
#	javascript/lang/src/id.js
#	javascript/lang/src/id_ID.js
#	javascript/lang/src/it.js
#	javascript/lang/src/ja.js
#	javascript/lang/src/lt.js
#	javascript/lang/src/mi.js
#	javascript/lang/src/nb.js
#	javascript/lang/src/nl.js
#	javascript/lang/src/pl.js
#	javascript/lang/src/ru.js
#	javascript/lang/src/sk.js
#	javascript/lang/src/sl.js
#	javascript/lang/src/sr.js
#	javascript/lang/src/sr@latin.js
#	javascript/lang/src/sr_RS.js
#	javascript/lang/src/sr_RS@latin.js
#	javascript/lang/src/sv.js
#	javascript/lang/src/zh.js
#	lang/it.yml
2016-05-11 14:06:23 +12:00
Damian Mooyman
b165d52f30 Merge 3.2 into 3.3 2016-05-11 14:00:10 +12:00
Damian Mooyman
9da594b326 Merge 3.1 into 3.2
# Conflicts:
#	admin/javascript/lang/cs.js
#	admin/javascript/lang/de.js
#	admin/javascript/lang/eo.js
#	admin/javascript/lang/es.js
#	admin/javascript/lang/fa_IR.js
#	admin/javascript/lang/fi.js
#	admin/javascript/lang/fr.js
#	admin/javascript/lang/id.js
#	admin/javascript/lang/id_ID.js
#	admin/javascript/lang/it.js
#	admin/javascript/lang/ja.js
#	admin/javascript/lang/lt.js
#	admin/javascript/lang/mi.js
#	admin/javascript/lang/nb.js
#	admin/javascript/lang/nl.js
#	admin/javascript/lang/pl.js
#	admin/javascript/lang/ro.js
#	admin/javascript/lang/ru.js
#	admin/javascript/lang/sk.js
#	admin/javascript/lang/sl.js
#	admin/javascript/lang/sr.js
#	admin/javascript/lang/sr@latin.js
#	admin/javascript/lang/sr_RS.js
#	admin/javascript/lang/sr_RS@latin.js
#	admin/javascript/lang/src/nl.js
#	admin/javascript/lang/sv.js
#	admin/javascript/lang/zh.js
#	javascript/lang/ar.js
#	javascript/lang/bg.js
#	javascript/lang/cs.js
#	javascript/lang/de.js
#	javascript/lang/eo.js
#	javascript/lang/es.js
#	javascript/lang/fa_IR.js
#	javascript/lang/fi.js
#	javascript/lang/fr.js
#	javascript/lang/id.js
#	javascript/lang/id_ID.js
#	javascript/lang/it.js
#	javascript/lang/ja.js
#	javascript/lang/lt.js
#	javascript/lang/mi.js
#	javascript/lang/nb.js
#	javascript/lang/nl.js
#	javascript/lang/pl.js
#	javascript/lang/ru.js
#	javascript/lang/sk.js
#	javascript/lang/sl.js
#	javascript/lang/sr.js
#	javascript/lang/sr@latin.js
#	javascript/lang/sr_RS.js
#	javascript/lang/sr_RS@latin.js
#	javascript/lang/sv.js
#	javascript/lang/zh.js
#	lang/nl.yml
#	lang/sk.yml
2016-05-11 13:48:22 +12:00
Damian Mooyman
01eaf9ed64 Merge 3.3.2 into 3.3 2016-05-11 13:33:45 +12:00
Damian Mooyman
b612c0549d Merge 3.1.19 into 3.1 2016-05-11 13:15:10 +12:00
Daniel Hensby
971d561633
Allow ManyManyListTest to run standalone 2016-05-10 15:24:07 +01:00
Daniel Hensby
c97d3961e5 Merge pull request #4869 from kinglozzer/2617-include-scopes
FIX: Parameters passed to includes overwrite all scopes (fixes #2617)
2016-05-10 15:21:45 +01:00
Daniel Hensby
d5ff8ff5f3 Merge pull request #5499 from kinglozzer/sqlselect-count-int
FIX: SQLSelect count methods now cast to int (fixes #5498)
2016-05-10 13:44:30 +01:00
Daniel Hensby
63e363b55c Merge pull request #5461 from Firesphere/master
RFC #5347 remove RestfulService from SS4.
2016-05-10 12:51:01 +01:00
Loz Calver
d1df67d308
FIX: SQLSelect count methods now cast to int (fixes #5498) 2016-05-10 12:31:45 +01:00
Loz Calver
6430c66303 Merge pull request #5426 from tractorcow/pulls/3.3/fix-gridfield-autocomplete
BUG Fix GridFieldAddExistingAutocompleter
2016-05-10 09:34:59 +01:00
Loz Calver
196c211984 Merge pull request #5425 from tractorcow/pulls/4.0/error-invalid-relationships
API Filtering on invalid relation is no longer a silent error
2016-05-10 09:27:31 +01:00
Simon Erkelens
c0de5dd11e RFC #5347 remove RestfulService from SS4. Rebuild OEmbed on using curl 2016-05-10 18:55:08 +12:00
Craig Weber
e732aee6eb Fixes #3182 Fixes lazy loading of fields when query was created in default stage
When a DataObject query is created in the default stage (stage.Stage), then the
stage is changed to something else (stage.Live), the query itself runs
correctly against stage.Stage. However, lazy loaded fields incorrectly run
against stage.Live. This is due to DataQuery parameters not being saved when
the default stage is active.

This commit fixes this bug by always saving query params, even when the default
stage was active at the time of query creation.
2016-05-10 15:44:22 +12:00
Cochrane, Mike
faffdf4981 Explictly set the FileNameFilter replacements before relying on them 2016-05-09 20:12:29 +12:00
Cochrane, Mike
e2d180a754 Explictly set the FileNameFilter replacements before testing them 2016-05-09 20:03:58 +12:00
Damian Mooyman
8b94dd83df API Add CSRF to Campaign delete 2016-05-09 17:33:10 +12:00
Frank Mullenger
b4cd617ee3 FIX: Renaming to HTMLEditorConfig.
FIX: Renaming to HTMLEditorField*.

FIX: Renaming to HTMLEditorSanitiser*.
2016-05-06 14:16:34 +12:00
Daniel Hensby
d1751e3310
Merge remote-tracking branch '3.2.4' into 3.3.2 2016-05-05 12:33:21 +01:00
Daniel Hensby
cf29b2c146
Merge remote-tracking branch '3.1.19' into 3.2.4 2016-05-05 11:17:45 +01:00
Daniel Hensby
b11bbffb7d
Merge branch '3' 2016-05-04 23:36:10 +01:00
Daniel Hensby
457931d664
Merge branch '3.3' into 3 2016-05-04 23:32:10 +01:00
Loz Calver
24660afabd
FIX: Parameters passed to includes overwrite all scopes (fixes #2617) 2016-05-04 16:49:12 +01:00
Loz Calver
4bd9a04896 Merge pull request #5440 from tractorcow/pulls/4.0/api-explicit-injector-inheritance
API Injector dependencies no longer inherit from parent classes
2016-05-04 09:31:51 +01:00
Damian Mooyman
4bc04e795a Excuse php7 errors due to regressions in 7.0.6 2016-05-04 16:33:40 +12:00
Christopher Darling
220290d61c test to prove #5222 2016-05-04 12:05:02 +12:00
Damian Mooyman
8ce3d90e18 API Injector dependencies no longer inherit from parent classes automatically
API Allow classes to inherit service definitions explicitly
2016-05-03 18:39:31 +12:00
Damian Mooyman
0d4c71f393 API Filtering on invalid relation is no longer a silent error
Fixes #5331
2016-05-03 17:51:16 +12:00
Damian Mooyman
f88d708ee9 BUG Fix GridFieldAddExistingAutocompleter and GridFieldExportButton
Based on https://github.com/silverstripe/silverstripe-framework/pull/5426
Fixes #5267
2016-05-03 17:45:46 +12:00
Damian Mooyman
70480f5ee4 [ss-2015-027] FIX HtmlEditorField_Toolbar#viewfile not whitelisting URLs
Fixes #4947
2016-05-03 15:29:18 +12:00
Damian Mooyman
096f30ebe5 BUG Fix GridFieldAddExistingAutocompleter
This fix exchanges references to sub-components by ID with class references
Fixes #5382
2016-05-03 14:28:41 +12:00
Damian Mooyman
e7d5c92ec1 Fix merge regressions 2016-05-02 09:08:37 +12:00
Damian Mooyman
d52db0ba34 Merge 3 into master
# Conflicts:
#	.travis.yml
#	admin/css/ie7.css
#	admin/css/ie7.css.map
#	admin/css/ie8.css.map
#	admin/css/screen.css
#	admin/css/screen.css.map
#	admin/javascript/LeftAndMain.js
#	admin/scss/_style.scss
#	admin/scss/_uitheme.scss
#	control/HTTPRequest.php
#	core/Object.php
#	css/AssetUploadField.css
#	css/AssetUploadField.css.map
#	css/ConfirmedPasswordField.css.map
#	css/Form.css.map
#	css/GridField.css.map
#	css/TreeDropdownField.css.map
#	css/UploadField.css
#	css/UploadField.css.map
#	css/debug.css.map
#	dev/Debug.php
#	docs/en/00_Getting_Started/00_Server_Requirements.md
#	docs/en/02_Developer_Guides/06_Testing/00_Unit_Testing.md
#	docs/en/02_Developer_Guides/06_Testing/index.md
#	docs/en/02_Developer_Guides/14_Files/02_Images.md
#	docs/en/02_Developer_Guides/15_Customising_the_Admin_Interface/How_Tos/Extend_CMS_Interface.md
#	filesystem/File.php
#	filesystem/Folder.php
#	filesystem/GD.php
#	filesystem/Upload.php
#	forms/ToggleField.php
#	forms/Validator.php
#	javascript/lang/en_GB.js
#	javascript/lang/fr.js
#	javascript/lang/src/en.js
#	javascript/lang/src/fr.js
#	model/Image.php
#	model/UnsavedRelationList.php
#	model/Versioned.php
#	model/connect/MySQLDatabase.php
#	model/fieldtypes/DBField.php
#	model/fieldtypes/Enum.php
#	scss/AssetUploadField.scss
#	scss/UploadField.scss
#	templates/email/ChangePasswordEmail.ss
#	templates/forms/DropdownField.ss
#	tests/behat/features/bootstrap/SilverStripe/Framework/Test/Behaviour/CmsFormsContext.php
#	tests/behat/features/bootstrap/SilverStripe/Framework/Test/Behaviour/CmsUiContext.php
#	tests/forms/EnumFieldTest.php
#	tests/security/MemberTest.php
#	tests/security/MemberTest.yml
#	tests/security/SecurityTest.php
2016-04-29 17:50:55 +12:00
Daniel Hensby
8673ac15bc
MINOR Empty YAML config causes invalid argument error 2016-04-26 12:58:27 +01:00
Loz Calver
61a9b2a41a
FIX: GridFieldPaginator now prevents viewing pages with no results (fixes #3192) 2016-04-26 09:34:03 +01:00
Damian Mooyman
da8f4a7eb6 Merge pull request #3828 from dhensby/pulls/byids-arraylist
API `byIDs` added to `ArrayList`
2016-04-26 17:52:22 +12:00
David Craig
7fcdf35438 Add DetailEditForm to Campaign admin
- Add edit form to campaigns section
- Handle form submissions with FormBuilder
- Handle form state via Redux
- Garbage collect form state
- Removes $itemID as a required param for schema requests.
  Developers should be able to scaffold forms without populating
  values from an existing record. For example when building a form for creating new records.
2016-04-26 15:32:07 +12:00
Daniel Hensby
679185514d
Merge 3.3 into 3
Conflicts:
	admin/css/screen.css.map
2016-04-26 00:24:59 +01:00
Daniel Hensby
745faebd81
Merge 3.2 into 3.3
Conflicts:
	.travis.yml
2016-04-26 00:17:09 +01:00
Daniel Hensby
a0812f987a
Merge 3.1 into 3.2
Conflicts:
	admin/javascript/LeftAndMain.js
	control/HTTPRequest.php
	docs/en/00_Getting_Started/00_Server_Requirements.md
2016-04-26 00:09:33 +01:00
Damian Mooyman
daf5385833 API Change in behaviour to flysystem reporting for root folders
See 847841974f
2016-04-26 09:36:08 +12:00
Damian Mooyman
8b239a5011 Docs and tests for exempt validation actions 2016-04-22 14:52:38 +12:00
Damian Mooyman
fa5b8b8fb1 BUG Fix error when modals are displayed 2016-04-22 10:31:49 +12:00
JorisDebonnet
9eac541740 Enhance GD::greyscale to allow darker or lighter results, and change color weights for greyscale (#5332)
Tweaking the first three parameters (R, G, B) allows you to get a different mix of colors into grey, but it does not allow you to make the result lighter or darker because their total is normalized. This is quite a common operation on greyscaled images though, so I added a fourth parameter: brightness. It defaults to 100% so that it does not have any effect when not used (making this backwards compatible). $brightness = 50 will make it darker, $brightness = 150 will overlight it.
2016-04-21 19:26:46 +12:00
Jeffrey Guo
4f14175022 setup CMS Settings in one test step 2016-04-20 22:40:04 +12:00
Ingo Schommer
8cf38720b5 Fix Chosen.js selector for Behat feature
The recent upgrade to Chosen.js 1.5 changes the generated markup:
It still renders an <a> tag, but without the "href" attribute.
This attribute isn't actually required to uniquely identify
the link in this structure.
2016-04-20 13:52:51 +12:00
Daniel Hensby
f32c893546
[SS-2016-005] FIX Apply brute force protection to default admin 2016-04-19 23:20:29 +01:00
Damian Mooyman
0bd62735bc BUG Fix issue with Requirements mangling custom scripts (#5337)
API Remove deprecated $template parameter from Requirements::includeInHTML
2016-04-19 17:20:30 +12:00
Daniel Hensby
52226dc462 Merge pull request #5322 from tractorcow/pulls/5105
fix to support facebook autodiscover
2016-04-15 14:27:19 +01:00
Hamish Friedlander
9a5db5f760 Fix ChangeSet test mixing Object ID and ChangeSetItem ID up 2016-04-15 14:42:32 +12:00
Hamish Friedlander
35e642d0bf Add two new accessors to ChangeSetItem
You shouldn't have to worry about exactly formatting the reference to
get a ChangeSetItem related to a DataObject, and doing it that way makes
you vulnerable to breakages like introduced in previous API change
2016-04-15 14:42:24 +12:00
Hamish Friedlander
2d16d69ddb API Use base data class for ChangeSetItem#ObjectClass, not just ClassName
This is a data structure change, but makes ChangeSetItems less likely to break
on /dev/build where a ClassName changes
2016-04-15 14:41:26 +12:00
Damian Mooyman
6f548a0ed0 Add unit tests for oembed autodiscover and thumbnail detection 2016-04-15 14:00:10 +12:00
Roman Schmid
9146450c49 Fix Email test issue discovered in #5271.
Updated/added tests for changed- and forgot-password Emails.
Updated fixture and tests to no longer use a real Email address.
2016-04-11 13:46:41 +02:00
Daniel Hensby
d7289a17fc Merge pull request #5271 from bummzack/5244-remove-email-subclasses
Fix 5244: Removed Email Subclasses
2016-04-08 17:09:44 +01:00
Roman Schmid
ca4036b882 Removed Email Subclasses used by the Member class (Member_ChangePasswordEmail and Member_ForgotPasswordEmail).
Added a test for the forgot password email.
Improved the test for the change-password email.
Fixed issue where `SapphireTest::mailer` was cleared during `setUp` by moving instantiation of the mailer at the end of the `setUp` method.
No longer use deprecated i18n method in test-setup.
Replace potentially real Email Address with a fake one.
2016-04-06 09:54:17 +02:00
Ingo Schommer
f0906f6e92 Merge pull request #5261 from tractorcow/pulls/4.0/fixup-tinymce
BUG fix missing language on non-global TinyMCE Configs
2016-04-06 19:32:55 +12:00
Damian Mooyman
3c2b53157e API Update Versioned methods 2016-04-04 14:50:16 +12:00
Damian Mooyman
87ee4365e7 API Implement ChangeSets for batch publishing 2016-04-04 14:46:38 +12:00
Damian Mooyman
640691f544 BUG fix missing language on non-global configs
BUG Prevent external plugins from being passed to the minifier
API Change TinyMCEConfig::requireJS to getScriptURL() for testabilitiy
2016-04-04 09:59:31 +12:00
Damian Mooyman
6ec2656201 BUG fix ErrorControlChain causing errors to be displayed if display_errors in php.ini is false
Fixes #5250
2016-04-01 11:04:06 +13:00
Damian Mooyman
d8d005d1e2 BUG move test file to correct folder and fix class_exists 2016-03-31 17:06:23 +13:00
Damian Mooyman
e8a68c42ce BUG Prevent live manifest loading files from nested test directories
E.g. framework/admin/tests
2016-03-31 15:58:23 +13:00
Damian Mooyman
0fa7271ec2 Merge pull request #5239 from open-sausages/pulls/4.0/form-schema-fixes
Form schema fixes
2016-03-31 09:49:55 +13:00
Ingo Schommer
fb660225c2 Behat: Wait until CMS loading overlay is removed
This makes tests more robust at the expense of an additional
check with every step. The "ajax steps" logic works similarly,
but does not respect the loading indicator. While this logic
waits for a short time after ajax requests are finished,
in some cases that isn't enough time for the browser to
process the response and remove the loading indicator.
Since the "ajax steps" logic applies to operations outside of the CMS
as well, we can't add the loading indicator check there.
2016-03-29 17:24:47 +13:00
Ingo Schommer
7ba4b5b6ef Merge pull request #5241 from timkung/pulls/upload-validator-filesize-spelling
BUG changing all cases of filesize spelling to file size
2016-03-29 16:15:27 +13:00
Ingo Schommer
1049288cb5 Merge pull request #5240 from madmatt/pulls/fix-dbstringtest-annotations
MINOR: Fix PHPUnit @covers assertions for DBStringTest
2016-03-29 16:13:50 +13:00
Tim Kung
7907d20da7 BUG changing all cases of filesize spelling to file size 2016-03-29 13:38:24 +13:00
Hamish Friedlander
700cf9bd56 Merge pull request #5223 from tractorcow/pulls/4.0/transactions
API Add SS_Database::withTransaction for nice enclosed transactions
2016-03-29 10:54:04 +13:00
Ingo Schommer
8ae2894890 Fix form schema ID getter
Also moved keys of higher importance to start of array,
easier to review this way
2016-03-28 21:54:24 +13:00
madmatt
41a3a86862 MINOR: Fix PHPUnit @covers assertions for DBStringTest
This resolves issues when PHPUnit is run strictly, where it exits when
it hits an @covers annotation that references a method that doesn't exist
2016-03-26 17:58:28 +13:00
madmatt
c972692313 MINOR: Fix PHPUnit @covers assertions for GridFieldTest
This resolves issues when PHPUnit is run strictly, where it exits when
it hits an @covers annotation that references a method that doesn't exist
2016-03-26 11:55:01 +13:00
Damian Mooyman
8abede1339 API Add SS_Database::withTransaction for nice enclosed transactions 2016-03-24 09:57:07 +13:00
Damian Mooyman
094745ec0f API Formally support custom ownership relations
API 'owned_by' is no longer mandatory for relations backed by normal db relations
API Extension setOwner/clearOwner is now nested
2016-03-23 14:49:34 +13:00
Roman Schmid
25c453fe7b Fixed issue where canViewVersioned caused a DB error when Versioned was used with stages other than the default "Stage" and "Live".
Updated VersionedTest to also check an Object with a single stage in the canView test.
2016-03-22 09:42:21 +01:00
Sam Minnee
aeccb8b8e0 API: Move DBField subclasses into SilverStripe\Model\FieldType namespace
API: Deprecate SS_Datetime.

The DBField subclasses are have all been renamed to start with “DB” and
be in the SilverStripe\Model\FieldType namespace. To keep DataObject
definitions concise, the original short variations of their names are
preserved as service definitions. Most of the field generation code
doesn’t need to change, but where field classes are referenced directly,
changes will be needed.

SS_Datetime, which is commonly referenced outside the model system
itself, has been preserved as a subclass of DBDatetime. This has been
marked as deprecated and can be removed in SilverStripe 5.

A few places that referred to $db and $casting values weren’t using
the Injector to instantiate the relevant classes. This meant that the
remapping we have created as part of moving classes into a namespace
didn’t work.
2016-03-22 18:09:30 +13:00
Sam Minnee
262f487053 MINOR: Avoid access-changing subclass in test.
Using a subclass to change the visibility of protected items didn’t
seem necessary in this case, if we add a reasonably logical getter
method.
2016-03-22 17:39:09 +13:00
Sam Minnee
083799ec03 FIX: Minimal data-model changes to support PHP7.
The tidiest fix for this will be to update the namespace/naming of all
field types to follow this pattern. I’ve broken out the minimum
necessary to support PHP7 as its own commit, in case anyone needs to
backport that (e.g. if someone wanted to patch a SS 3 system to get
PHP7 support).

Rather than introduce a new API for fieldtype namespace simplification,
I’ve just used Injector. We may come up with a new configuration tool
that is better, but this has the advantage of existing now, and as such
I think is a good first step.
2016-03-22 17:39:08 +13:00
Damian Mooyman
78f19bd2ed Merge pull request #5175 from Firesphere/pulls/feature-set-owner-allmethods
Enhancement: Set the owner on an extension
2016-03-21 17:30:37 +13:00
Simon Erkelens
debe8ba2a3 Improvement: Set the owner on an extension, before getting all the available method names.
This enhances the extensions to enable certain features like adding wrapper methods instead of having to have them on the object itself.
2016-03-21 02:36:34 +01:00
Ingo Schommer
8ae794ee99 API TinyMCE Image shortcodes 2016-03-21 09:23:40 +13:00
Joris Debonnet
4c741125c5 fix #5195: allow empty values in Enum 2016-03-17 22:43:26 +01:00
Damian Mooyman
0848aca462 API Massive refactor of Versioned
API Implemented recursive versioned actions (publish, etc)
API Un-deprecate delete batch action
API Changed Versioned getters and setters for stages
BUG Inject query parameters during DataObject construction to prevent incorrect lazy loading
2016-03-17 13:43:53 +13:00
Damian Mooyman
3dada00905 Cleanup trailing whitespace 2016-03-09 10:20:31 +13:00
Damian Mooyman
6d88caa9b3 Merge pull request #5132 from open-sausages/features/form-schema
API Form schema
2016-03-07 14:08:36 +13:00
Ingo Schommer
3b11d73c46 Merge remote-tracking branch 'origin/3'
# Conflicts:
#	forms/gridfield/GridFieldDetailForm.php
#	javascript/GridField.js
2016-03-07 09:26:35 +13:00
Ingo Schommer
e1fcc64c41 Form field schema state
See https://github.com/silverstripe/silverstripe-framework/issues/4938
2016-03-03 13:36:48 +13:00
David Craig
404ac4ae43 Initial schemaState implementation 2016-03-03 08:20:54 +13:00
David Craig
afccef718c Initial Form Field Schema implementation
- Adds FormSchema class
- Adds FormSchema dependency to LeftAndMain via Injector
- Adds schema allowed_action method to LeftAndMain for generating Form schemas
- Adds FormFieldSchemaTrait to for schema getters and setters on FormFields
2016-03-03 08:20:54 +13:00
Daniel Hensby
817b836870 FIX getIP from behind a load-balancer that adds many IPs to the header 2016-03-01 21:07:48 +00:00
Damian Mooyman
b196d33bfa API Ownership API
API Filter Relation. query parameters from relations when creating objects
API Versioned::publish now triggers invokeWithExtensions
API Update behaviour of versioned for all_versions mode to respect ID filters
API Tweak behaviour of inherited query parameters
2016-02-29 14:38:44 +13:00
Damian Mooyman
e1865151c5 Merge pull request #5098 from bummzack/5086-fix-member-validator
Fix for issue #5086
2016-02-26 14:39:53 +13:00
Ingo Schommer
e88c3c8098 Merge pull request #5094 from tractorcow/pulls/4.0/invokewithextensions
API Extensible::invokeWithExtension has same method signature as Extensible::extend
2016-02-26 13:09:40 +13:00
Roman Schmid
f691a5da32 Improve Member_Validator to:
- properly check for existing members.
- allow extensions.
- remove old code and replace with new syntax and add config API.

Fix issue in Group code where Member_Validator was instantiated via "new" which didn't allow injector overrides.
Added unit-tests.

Establish a link between the member and the validator for said member.
2016-02-25 16:10:52 +01:00
Damian Mooyman
c275c21057 API Extensible::invokeWithExtension has same method signature as Extensible::extend 2016-02-25 17:32:41 +13:00