Commit Graph

2227 Commits

Author SHA1 Message Date
Damian Mooyman
b7e54bad24
Adjust HTTPResponse::getVersion() to match PSR-7 Method signature 2018-06-14 11:04:07 +12:00
Daniel Hensby
a88257efac
NEW Add version to HTTPRequest and create raw string representation 2018-06-13 15:29:04 +01:00
Daniel Hensby
1b425570cf
Remove IE edge case handling 2018-06-13 15:29:04 +01:00
Daniel Hensby
17ad985925
Cleanup ETag middleware 2018-06-13 15:29:03 +01:00
Daniel Hensby
0b308c871d
DOCS Update doc errors 2018-06-13 15:29:03 +01:00
Damian Mooyman
687d0a6af1
Refactor everything out of HTTP and into separate middlewares 2018-06-13 17:56:47 +12:00
Damian Mooyman
6f32762268
Fix unit tests 2018-06-13 14:09:31 +12:00
Damian Mooyman
aa1ba0ef90
Fix inverted condition
Remove unnecessary yml block
Deprecate HTTP::set_cache_age()
2018-06-13 13:56:47 +12:00
Damian Mooyman
02ae2e7ed0
BUG Fix internal date formatting inheriting default locale
Fixes #8097
2018-06-13 13:32:11 +12:00
Daniel Hensby
befd81d0c2 FIX Bug with forms being cached 2018-06-13 11:33:46 +12:00
Daniel Hensby
7c875918c7 FIX make sure we create ETags from the body, not the request 2018-06-13 11:33:46 +12:00
Daniel Hensby
6bb69d1ae5 Throw caught exceptions in HTTPCacheControlMiddleware::process 2018-06-13 11:33:46 +12:00
Daniel Hensby
37343cf0e2 Use veradic argument for HTTP::combineVary 2018-06-13 11:33:45 +12:00
Daniel Hensby
bf90af4845 Linting fixes 2018-06-13 11:33:45 +12:00
Damian Mooyman
442db3050c Manual merge up of 3.x changes to HTTP class 2018-06-13 11:33:45 +12:00
Damian Mooyman
76bf2ab21a WIP of cache middlware 2018-06-13 11:33:45 +12:00
Damian Mooyman
6c985c4e5f
Merge remote-tracking branch 'origin/4.1' into 4 2018-06-13 11:25:20 +12:00
Damian Mooyman
c2123f772f
Merge remote-tracking branch 'origin/4.0' into 4.1 2018-06-13 11:24:12 +12:00
Daniel Hensby
ec956a682d API Moving tests to use transactions 2018-06-13 09:35:45 +12:00
Robbie Averill
f256045020
Merge pull request #8158 from open-sausages/pulls/4.0/fix-cli-canonical-middleware
BUG Prevent canonical URL causing a redirect on CLI unless explicitly enabled
2018-06-12 10:53:37 +12:00
Daniel Hensby
ce58890baf
Merge branch '4.0' into 4.1 2018-06-11 09:27:42 +01:00
Robbie Averill
27e24a4728
Merge pull request #8142 from open-sausages/pulls/4.0/fix-injector-empty
BUG Safely handle empty injector factory responses
2018-06-11 15:20:24 +12:00
Damian Mooyman
2a51f34c3e
BUG Prevent canonical URL causing a redirect on CLI unless explicitly enabled
Replaces #8157
2018-06-11 13:54:27 +12:00
Damian Mooyman
77a45c0dbc
Merge remote-tracking branch 'origin/4.1' into 4
# Conflicts:
#	src/Forms/HTMLEditor/HTMLEditorSanitiser.php
#	src/ORM/DataObjectSchema.php
#	src/ORM/Queries/SQLSelect.php
#	src/View/Parsers/ShortcodeParser.php
2018-06-11 10:19:04 +12:00
Robbie Averill
d842225df6 FIX Codesniffer style violations with comments 2018-06-11 09:55:18 +12:00
Damian Mooyman
546c6c3e22
Merge pull request #8125 from open-sausages/pulls/4/date-field-tweaks
Remove legacy logic from DateField_Disabled
2018-06-11 09:23:33 +12:00
Daniel Hensby
e260319823
Merge branch '4.0' into 4.1 2018-06-08 23:05:24 +01:00
Maxime Rainville
582c69d32f
BUG Fix issue with Disabled DateField always display (not set). 2018-06-08 13:51:22 +01:00
Daniel Hensby
e1450b5e82
Merge pull request #8147 from kinglozzer/mysql-pdo-attr
FIX: Only set MYSQL_ATTR_INIT_COMMAND when using mysql driver (fixes #8103)
2018-06-08 13:06:03 +01:00
Ingo Schommer
80c30c7b05
Merge pull request #8089 from creative-commoners/pulls/4.1/fix-maori-macron
FIX Add macron to Māori language name
2018-06-08 14:07:05 +12:00
Damian Mooyman
29f9b1c18f
Fix linting issues 2018-06-08 11:38:36 +12:00
Loz Calver
66f57bd4da FIX: Only set MYSQL_ATTR_INIT_COMMAND when using mysql driver (fixes #8103) 2018-06-07 10:26:00 +01:00
Aaron Carlino
31ad3cdaab
BUGFIX: Allow buttons to opt out of display (#8113)
* Allow buttons to opt out of display

* Linting

* Remove redundant function call

* Add test for group delete action

* Add menu group check and test for delete action

* Fix linting
2018-06-06 21:14:29 +12:00
Damian Mooyman
c070e989c4
BUG Safely handle empty injector factory responses
Fixes issue with ImageBackendFactory returning null and breaking injector
2018-06-06 16:45:16 +12:00
Damian Mooyman
0aa13da0d9
BUG Backport bugfix for belongs_many_many with many_many through.
Partial backport of #7928
Fixes #8131
2018-06-06 09:43:04 +12:00
Jonathon Menz
bf07ba30f4 FIX: Make error messages available to extensions 2018-06-05 14:12:28 -07:00
Jonathon Menz
5a5ba1e5c0 Fix: negative values in read only currency field
Don’t strip out ‘-‘ character as this makes negative values appear to be positive (Fixes #8126)
2018-06-01 12:59:02 -07:00
Damian Mooyman
2510935b53
Merge pull request #8065 from dhensby/pulls/4/mmtl-jointable
NEW Add getJoinTable to MMTL
2018-06-01 10:33:46 +12:00
Robbie Averill
e0993043f8 Merge branch '4.1' into 4 2018-05-30 15:08:39 +12:00
Robbie Averill
d0d936bc40 Merge branch '4.0' into 4.1 2018-05-30 14:52:31 +12:00
Robbie Averill
c8b0bc0ad7 Merge branch '4.0' into 4.1
# Conflicts:
  #	src/ORM/DataObject.php
  #	tests/php/ORM/DataObjectDuplicationTest.php
  #	tests/php/ORM/DataObjectDuplicationTest/Class1.php
2018-05-30 14:52:07 +12:00
Robbie Averill
624a5326a7
Typo in PHPDoc type 2018-05-30 14:51:09 +12:00
Luke Edwards
385e9e105c Create GridField Actions Menu component (#8083)
* WIP GridField action menu work, the gist of the idea is using a new gridfield component

* Add delete action to actions menu

* Actions are added automatically to action menu (allows for extension)

* Add test and minor changes

* Add docs and minor changes

* Refactor ActionMenuItem into distinct types, general ActionMenu cleanup

* Add icons and fix title

* Pass columnName, so it can be used by components

* Update test to open and find action menu buttons

* Add section in changelog upgrade section for GridField_ActionMenu
2018-05-29 16:10:52 +12:00
Robbie Averill
c3e5ab2258
Merge pull request #65 from silverstripe-security/pulls/4.2/ss-2018-009
[SS-2018-009] Allow forced redirects to HTTPS for responses with basic authentication
2018-05-28 18:57:38 +12:00
Robbie Averill
ea16e28aa7 Merge branch '4.1' into 4 2018-05-28 18:33:56 +12:00
Robbie Averill
6d98a912c9 Merge branch 'heads/4.1.1' into 4.1 2018-05-28 18:26:20 +12:00
Robbie Averill
3a537bc745 Merge branch 'heads/4.0.4' into 4.0 2018-05-28 17:50:07 +12:00
Robbie Averill
722202fef4 Merge remote-tracking branch 'origin/4.0.4' into 4.1.1
# Conflicts:
  #	src/Control/Director.php
2018-05-24 15:41:11 +12:00
Damian Mooyman
5bff64b47b BUG Fix Director::test() not persisting removed session keys on teardown 2018-05-24 13:10:03 +12:00
Robbie Averill
c308416afa FIX Add macron to Māori language name 2018-05-23 11:22:30 +12:00
Damian Mooyman
865ebb3398 ENHANCEMENT Improve upgrading experience. (#8025)
* ENHANCEMENT Improve upgrading experience.
Show errors and back button if errors encountered during install
BUG Fix hard-coded 'mysite' folder
Fixes #8024

* Patch behat tests to work with new  buttons
2018-05-21 22:08:34 +12:00
Daniel Hensby
1a57c7c1d0
NEW Add getJoinTable to MMTL 2018-05-14 11:19:24 +01:00
Aaron Carlino
f847f186b1 [ss-2018-013] Remove password text from session data on failed submission 2018-05-14 17:14:38 +12:00
Robbie Averill
5887201dd5
Merge pull request #64 from silverstripe-security/pulls/4.0/ss-2018-010
[SS-2018-010] Fix regression of SS-2017-002
2018-05-14 17:12:45 +12:00
Robbie Averill
beec0c0d47 [SS-2018-010] Fix regression of SS-2017-002 2018-05-14 17:12:07 +12:00
Robbie Averill
1e6790bfb6
Merge pull request #62 from silverstripe-security/pulls/4.0/ss-2018-001
[ss-2018-001] Restrict non-admins from being assigned to admin groups
2018-05-14 17:11:03 +12:00
Damian Mooyman
e409d6f673 [ss-2018-001] Restrict non-admins from being assigned to admin groups 2018-05-14 17:10:22 +12:00
Robbie Averill
39b62e5fbb
Merge pull request #61 from silverstripe-security/pulls/4.0/ss-2018-008
[ss-2018-008] Validate against malformed urls
2018-05-14 17:07:09 +12:00
Damian Mooyman
9053014a7e [ss-2018-008] Validate against malformed urls 2018-05-14 17:06:47 +12:00
Robbie Averill
6f50728b18
Merge pull request #59 from silverstripe-security/pulls/4.0/ss-2018-006
[ss-2018-006] Prevent code execution in template value resolution
2018-05-14 17:06:04 +12:00
Robbie Averill
cd716fb61b Switch check for is_string 2018-05-14 17:05:31 +12:00
Damian Mooyman
2e13ae746f [ss-2018-006] Prevent code execution in template value resolution 2018-05-14 17:05:31 +12:00
Damian Mooyman
d935140a95 [ss-2018-005] Prevent unauthenticated isDev / isTest being allowed 2018-05-14 17:03:39 +12:00
Andrew Aitken-Fincham
64964f7402
unset http scheme on CLIRequestBuilder 2018-05-02 11:43:51 +01:00
Daniel Hensby
d5e2d3fa67
Merge branch '3.6' into 4.0 2018-05-01 21:47:17 +01:00
Daniel Hensby
62631dc3ee
Merge pull request #8013 from open-sausages/pulls/4.1/fix-password-validator-fields
BUG Prevent password validator min score producing false negatives
2018-04-30 12:16:56 +01:00
JorisDebonnet
1d3e83838d
Fix phpdoc for relation method (namespace) 2018-04-30 02:10:33 +02:00
azt3k
6b39b25e20
Fixes a count() php warning without an api change
Warning: count(): Parameter must be an array or an object that implements Countable in /path/to/vendor/silverstripe/framework/src/Security/Member.php on line 1355
2018-04-27 09:31:07 +01:00
Gorrie Coe
59f598d639 Added isset check for registered controller links in dev admin 2018-04-24 22:34:37 +12:00
Robbie Averill
30e2d9c4df [SS-2018-009] Allow forced redirects to HTTPS for responses with basic authentication 2018-04-24 14:44:29 +12:00
Damian Mooyman
b07e13d2f8 BUG Fix incorrect installer base tag generation (#8018)
Fixes #7926
2018-04-24 10:53:08 +12:00
Mojmir Fendek
07372d388e LookupField value handling corrected (atomic values are no longer thrown away). 2018-04-23 15:15:40 +12:00
Damian Mooyman
0e2bf7871d
Merge pull request #8016 from webbuilders-group/duplicate-many-many-fix-4-0
FIX: Duplicating many_many relationships looses the extra fields in 4.0
2018-04-19 12:17:47 +12:00
UndefinedOffset
d17f424541 Changed checked for UnsavedRelationList to ManyManyList 2018-04-18 12:15:16 -03:00
UndefinedOffset
fe4b90edc0 FIX: Duplicating many_many relationships looses the extra fields in 4.0 2018-04-18 11:49:20 -03:00
Damian Mooyman
f83691e7f7
BUG Make invalid dev actions 404 not 500 error
Fixes #8012
2018-04-18 11:37:31 +12:00
Damian Mooyman
9a12fac218
BUG Prevent password validator min score producing false negatives
Replaces #7995
2018-04-18 10:35:31 +12:00
Damian Mooyman
c8b3593090
API Form::makeReadonly() returns self
Fixes #8006
2018-04-16 14:01:49 +12:00
Robbie Averill
af2c3886b9 Merge branch '4.1' into 4 2018-04-10 16:27:00 +12:00
Robbie Averill
09b4f26151 Merge branch '4.0' into 4.1 2018-04-10 16:18:08 +12:00
Damian Mooyman
e11ba9a2d7 BUG Fix many_many through crashing ModelAdmin 2018-04-10 14:51:49 +12:00
Damian Mooyman
be8287fef8 BUG Prevent failover / extensions interfering with composite field properties (#7988) 2018-04-06 14:48:24 +12:00
Daniel Hensby
70effc7046
Revert "ENHANCEMENT Add config var to skip confirm logout (#7977)"
This reverts commit 47bcac930d.
2018-04-04 13:51:18 +01:00
Damian Mooyman
5ff6874dbc
Merge remote-tracking branch 'origin/4.1' into 4 2018-04-04 17:38:26 +12:00
Damian Mooyman
99426cdb05
Merge remote-tracking branch 'origin/4.0' into 4.1 2018-04-04 17:36:45 +12:00
Andrew Aitken-Fincham
47bcac930d ENHANCEMENT Add config var to skip confirm logout (#7977) 2018-04-04 09:43:49 +12:00
Damian Mooyman
878dc1f86d
BUG Change inverse polymorphic inference to silent-empty instead of explicit error 2018-03-29 09:38:07 +13:00
Andreas Lindahl
dd44deacb4 Fix for "too few parameters" error when using DBMultiEnum 2018-03-28 16:42:12 +02:00
Will Rossiter
20c6ddd354
Use ModuleResourceLoader for fixtures path
This adds the ability to refer to a fixture file path by the ModuleResourceLoader path (e.g  protected static $fixture_file = 'vendor/module:tests/fixtures.yml')
2018-03-28 10:36:56 +13:00
Ingo Schommer
983a724ea5
Merge pull request #7399 from dhensby/pulls/4/reduce-dependence-on-session-for-reading-mode
Reduce dependence on session state for accessing draft stages
2018-03-23 16:19:26 +13:00
Damian Mooyman
386ef27f65
Update requesthandlers with missing extension points 2018-03-23 15:28:00 +13:00
Damian Mooyman
7351caf487
API Allow non-DataExtension Extensions to decorate dataobject 2018-03-23 12:22:27 +13:00
Damian Mooyman
df9e0e40d3 Deprecate useDraftStage 2018-03-22 17:23:50 +13:00
Damian Mooyman
257ff69e32 API Implement many_many through polymorphic (from only) (#7928)
* API Support many_many through polymorphic relations (from side only)
Fixes #7911
Fixes #3136

* Add extra docs and allow optional arguments

* ENHANCEMENT Enable quiet to be turned off

* BUG Fix issue with manymanythroughlist duplication
2018-03-22 10:26:25 +13:00
Damian Mooyman
7e73ad2101
Extensible test session 2018-03-21 17:28:02 +13:00
Damian Mooyman
6fef72062b
Restore old functionaltest behaviour 2018-03-21 16:56:40 +13:00
Damian Mooyman
5a069e2e75
remove unnecessary use 2018-03-21 16:44:14 +13:00
Damian Mooyman
ba94e020e7
Fix FunctionalTest not setting persistent versioned mode 2018-03-21 16:07:31 +13:00
Damian Mooyman
26402f3bb5
ENHANCEMENT Enable request handlers to be extended 2018-03-21 15:50:31 +13:00
Ingo Schommer
0fe56732af RequestHandler updateLink() extension point 2018-03-20 15:08:29 +13:00
Daniel Hensby
2c121e8a07
new approach 2018-03-19 11:48:17 +00:00
Daniel Hensby
7f7fe73b77
Reduce dependence on session state for accessing draft stages 2018-03-19 11:48:16 +00:00
Daniel Hensby
35bfce28fc
Merge branch '3' into 4 2018-03-16 15:04:26 +00:00
Daniel Hensby
80d15fc4f5
Merge branch '4.1' into 4 2018-03-16 14:58:40 +00:00
Daniel Hensby
9ed3cd4042
Merge branch '4.0' into 4.1 2018-03-16 14:57:05 +00:00
Thomas Portelange
2e1c70b56c
Ensure tmpData exists
Otherwise you might get illegal string offset
2018-03-15 20:40:05 +01:00
Daniel Hensby
fb945690b1
Merge pull request #7875 from sminnee/devbuild-record-count
Suggested feature: dev/build record count
2018-03-14 14:26:49 +00:00
Daniel Hensby
c41ebd3279
Merge pull request #7930 from creative-commoners/pulls/4.1/return-self
FIX Ensure consistent return type for FieldList::removeByName
2018-03-14 14:21:47 +00:00
Daniel Hensby
069744bb21
Merge branch '3' into 4 2018-03-14 14:15:51 +00:00
Daniel Hensby
fd449618b2
Merge branch '4.1' into 4 2018-03-14 14:11:03 +00:00
Daniel Hensby
ec6ff71107
Merge branch '4.0' into 4.1 2018-03-14 14:09:40 +00:00
Daniel Hensby
d28a1b5cfc
Merge branch '3.6' into 4.0 2018-03-14 14:08:41 +00:00
Robbie Averill
a9cc4d4844 FIX Ensure consistent return type for FieldList::removeByName 2018-03-14 19:40:17 +13:00
Damian Mooyman
8b9c292509
Merge remote-tracking branch 'origin/4.1' into 4 2018-03-13 14:26:39 +13:00
Damian Mooyman
625f7b4eee
Merge remote-tracking branch 'origin/4.0' into 4.1 2018-03-13 14:26:18 +13:00
Joe Harvey
bf2cee3989 Bugfix - Correct duplicate nesting of 'Content' to be returned to template
In scenarios where:

- No member is logged in
- An 'AutoLoginHash' is provided via the 't' (token) query param
- The token isn't valid (determined by Member::validateAutoLoginToken())

The message which is intended to be returned to the end-user via $Content
in the template, is mistakenly double nested in ['Content' => ['Content' => 'Message']]
this leads to "The method forTemplate() doesn't exist on ArrayData" errors.

See - https://github.com/silverstripe/silverstripe-framework/issues/7866
2018-03-07 14:14:05 +00:00
Damian Mooyman
5fee4a81aa
BUG Files dataobjects with missing asset shouldn't un-attach themselves from parent object on save 2018-03-07 11:17:17 +13:00
Chris Joe
6ae07d100c
Merge pull request #7603 from open-sausages/pulls/4.0/error-trace-included
ENHANCEMENT Don't infer trace if explicitly provided
2018-03-07 10:10:40 +13:00
Damian Mooyman
3a1c813b28
API Add getContentCSS() / setContentCSS() to allow per-config customisation of content_css
Fixes #7873
2018-03-05 16:10:44 +13:00
Damian Mooyman
32637413de ENHANCEMENT Improve upgrade rules to support advanced upgrader rewrites (#7903)
* ENHANCEMENT Improve upgrade rules to support advanced upgrader rewrites

* Minor: Grammar fixes.
2018-03-05 15:47:06 +13:00
Damian Mooyman
4d424dd340
ENHANCEMENT get_by_id: alternate signature to allow MyDataObject::get_by_id($id) 2018-03-01 14:02:40 +00:00
Roman Schmid
40c2e299a0 Fix "mb_stripos(): Empty delimiter" warning when no search-keywords are given for DBText::ContextSummary.
Add unit-test to cover that case.
2018-03-01 11:39:30 +01:00
Daniel Hensby
9006daf20b
Cleaning up PR and adding tests 2018-02-28 13:31:56 +00:00
Joris Debonnet
559254407f
get_by_id: alternate signature to allow MyDataObject::get_by_id($id) 2018-02-28 13:09:12 +00:00
JorisDebonnet
3e0984db49
Delete orphaned Group_Members records after deleting a Member 2018-02-27 19:47:26 +01:00
Christopher Joe
1cdbab45c9 Added comment about array_merge() not working 2018-02-27 09:52:42 +13:00
Aaron Carlino
0863bac29a Update getVariables to return a copy of globals rather than including the reference in an array merge 2018-02-27 09:52:36 +13:00
Daniel Hensby
722f2d178a
Merge branch '4.1' into 4 2018-02-26 10:57:52 +00:00
Christopher Joe
f650c92436 Added comment about array_merge() not working 2018-02-26 12:24:02 +13:00
Aaron Carlino
d91648dd6e Update getVariables to return a copy of globals rather than including the reference in an array merge 2018-02-23 16:25:41 +13:00
Daniel Hensby
ced2ba1f64 API Move CSV writing/reading to league/csv library 2018-02-22 09:22:37 +13:00
Daniel Hensby
dace2f179d
Merge branch '4.1' into 4 2018-02-21 13:58:45 +00:00
Daniel Hensby
c04ff8c55a
Merge branch '4.0' into 4.1 2018-02-21 13:40:30 +00:00
Damian Mooyman
0e26c06644
BUG Fix behaviour towards versioned but unstagable records 2018-02-20 12:20:18 +13:00
Sam Minnee
a2143680e8 NEW: Add record count to dev/build output.
This small piece of metadata is intended to expose record counts to
developers as an information radiator: from time to time, SilverStripe
tables can get very large, and this exposes this information without
the developer seeking it out. 

It’s reasonable to expect that count(*) calls aren’t too time consuming,
even on large tables.

On a small test run, dev/build execution went from 3.85s to 3.98s (a 3%
or 130ms increase). Given the small relative impact it should be okay.
Where this is inappropriate, it can be disabled with a config setting.
2018-02-17 19:02:50 +13:00
Andrew Aitken-Fincham
de0b76dff6 ENHANCEMENT Fall back to SSViewer::get_themes when using themeResourceLoaders 2018-02-16 09:09:35 +13:00
Damian Mooyman
12e701c8ed
Merge remote-tracking branch 'origin/4.1' into 4 2018-02-15 09:28:14 +13:00
Damian Mooyman
e809c0fd62
Merge remote-tracking branch 'origin/4.0' into 4.1 2018-02-15 09:27:51 +13:00
Damian Mooyman
0b7cf80331
BUG Fix incorrect convert slashes argument 2018-02-13 16:33:35 +13:00
Chris Joe
03b3ea139d
Merge pull request #7860 from open-sausages/pulls/4/fix-password-display
BUG Fix incorrect display logic on password field
2018-02-13 16:20:08 +13:00
Chris Joe
d13ab11940
Merge pull request #7861 from zanderwar/pulls/enhancements/composerjson-check
ENHANCEMENT composer.json missing notice
2018-02-13 13:48:12 +13:00
Damian Mooyman
6570599aa9
BUG Fix incorrect display logic on password field 2018-02-13 13:36:21 +13:00
zanderwar
9ce21338a3 ENHANCEMENT composer.json missing notice 2018-02-13 09:03:01 +10:00
Damian Mooyman
6b38031a1e BUG Fix Director::test() not persisting removed session keys on teardown 2018-02-13 11:35:16 +13:00
Andrew Aitken-Fincham
00ff3ba4b2 ENHANCEMENT Make dropdownFieldThreshold configurable on DBForeignKey (#7789) 2018-02-13 10:32:55 +13:00
Daniel Hensby
16d3498a56
Merge branch '4.1' into 4 2018-02-12 10:26:07 +00:00
Daniel Hensby
7ec5fa2c8d
Merge branch '4.0' into 4.1 2018-02-09 15:19:15 +00:00
Daniel Hensby
e298fcc345
Merge branch '3.6' into 4.0 2018-02-09 14:32:58 +00:00
Chris Joe
95308e1af6
Merge pull request #7849 from open-sausages/pulls/4.0/fix-debug-string-class-cli
BUG Fix issue with CLIDebugView failing on class name of existing class
2018-02-09 15:41:18 +13:00
Daniel Hensby
d3278d5470 FIX Add Nested DB transaction support (#7848)
* TEST Prove nested transactions break

* Add nested transaction support
2018-02-09 10:28:32 +13:00
Damian Mooyman
0a486b8f57
BUG Fix issue with CLIDebugView failing on class name of existing class
Fixes #7827
2018-02-09 09:52:32 +13:00
Robbie Averill
dd82820242 NEW Allow GridFieldConfig::addComponents to accept an array (#7844) 2018-02-08 11:06:27 +13:00
Damian Mooyman
dd3fbf2c73 BUG Fix installer checking wrong location for files 2018-02-08 10:50:27 +13:00
Chris Joe
e0e8ca0ee6
Merge pull request #7842 from open-sausages/pulls/4/fix-installer-public-search
BUG Fix installer checking wrong location for files
2018-02-08 10:26:54 +13:00
Andrew Aitken-Fincham
860fa2a05a API Add excludeAny() and tests for complicated excludes/filters (#7838) 2018-02-08 09:20:17 +13:00
Damian Mooyman
19832000a5
BUG Fix installer checking wrong location for files 2018-02-07 15:27:23 +13:00
Damian Mooyman
e5ff48b352
BUG Fix incorrect BASE_URL when webroot is parent of public folder 2018-02-07 14:28:06 +13:00
Damian Mooyman
2f1f5c0caa
Merge remote-tracking branch 'origin/4.0' into 4 2018-02-07 11:48:46 +13:00
Damian Mooyman
2225cf4c95
BUG Fix Director::test() not persisting removed session keys on teardown 2018-02-07 11:03:32 +13:00
Daniel Hensby
660dfd34a8
FIX Issue where default admin has no password encryption 2018-02-06 20:18:32 +00:00
Daniel Hensby
62057befdb
Merge branch '4.0' into 4 2018-02-06 10:08:17 +00:00
Daniel Hensby
28ca11dd7e
FIX Regex range identifier correctly escaped 2018-02-05 15:17:20 +00:00
Damian Mooyman
e359948eb3
Merge remote-tracking branch 'origin/4.0' into 4
# Conflicts:
#	src/Core/CoreKernel.php
2018-02-05 17:52:38 +13:00
Damian Mooyman
02ec0b8375
Merge pull request #7829 from Firesphere/patch-3
[bugfix] $request == null breaks
2018-02-05 16:43:40 +13:00
Damian Mooyman
db9aa2c5c7
BUG Fix regression in has_one getters breaking DataDifferencer 2018-02-05 16:16:07 +13:00
Simon Erkelens
a071672b48 [bugfix] $request == null breaks
The $request incoming as null was not properly detected by the if/elseif structure.
2018-02-05 13:02:07 +13:00
Damian Mooyman
aa2c71424d
API Implement cascade_duplications
API Add DataObject::setComponent()
API Support unary components as getter and setter fields
API ManyManyList::add() now supports unsaved records
ENHANCEMENT Animal farm
2018-02-05 12:04:57 +13:00
Damian Mooyman
288aaf083c
BUG Fix issue with DebugView failing on class name of existing class
Fixes #7827
2018-02-05 10:45:49 +13:00
Damian Mooyman
740c3326e9
BUG Fix critical issue with incorrectly saved session data 2018-02-02 15:08:52 +13:00
Robbie Averill
b07babb9da
Merge pull request #7824 from open-sausages/pulls/4/fix-password-validation
BUG Prevent invalid members being written to database if validation_enabled is false
2018-02-01 18:24:29 +13:00
Damian Mooyman
217cb93b25
Merge pull request #7730 from dhensby/pulls/4.0/ssviewer-requirements-backend
FIX `SSViwer::execute_template` should allow requirements to be included
2018-02-01 16:42:40 +13:00
Damian Mooyman
bc2fc7f2db
BUG Prevent invalid members being written to database if validation_enabled is false 2018-02-01 16:24:31 +13:00
Damian Mooyman
cb30e09130
Update reference from $databaseConfig to .env 2018-02-01 12:58:55 +13:00
Daniel Hensby
212178bb0d
FIX SSViwer::execute_template should allow requirements to be included 2018-01-31 11:10:26 +00:00
Damian Mooyman
11f4693648
Merge pull request #7816 from creative-commoners/pulls/4.0/setrighttitle-phpdoc
Update phpdoc for FormField::setRightTitle regarding escaped HTML
2018-01-31 16:48:17 +13:00
Robbie Averill
c0ffe2797a Update phpdoc for FormField::setRightTitle regarding escaped HTML 2018-01-31 11:03:35 +13:00
Christopher Joe
456871fd91 Enhancement Updated PasswordValidator to fallback to config options - still retains instance variables 2018-01-31 10:54:43 +13:00
Damian Mooyman
ab6428ef59
Merge pull request #7808 from creative-commoners/pulls/4.0/fix-html5-parsing-embeds
FIX Allow cleanup marker regex to handle self closing HTML5 tags
2018-01-31 10:24:34 +13:00
Daniel Hensby
9103816333
NEW Add php 7.2 support 2018-01-30 16:50:32 +00:00
Raissa North
cd6faac7a9
FIX Fix typo in error message 2018-01-30 15:48:42 +13:00
Robbie Averill
3d7ecc5240 FIX Allow cleanup marker regex to handle self closing HTML5 tags 2018-01-30 11:16:21 +13:00
Damian Mooyman
76d2db12b0
Merge pull request #7794 from kinglozzer/id-like-to-place-an-ordinal
NEW: Add support for ordinals in DBDate::Format()
2018-01-26 09:27:46 +13:00
Loz Calver
fcf5022550 NEW: Add support for ordinals in DBDate::Format() 2018-01-25 09:41:06 +00:00
Damian Mooyman
bca47029c4
Merge remote-tracking branch 'origin/4.0' into 4
# Conflicts:
#	src/Control/SimpleResourceURLGenerator.php
#	tests/php/Control/SimpleResourceURLGeneratorTest.php
2018-01-25 12:53:15 +13:00
Roman Schmid
6fafce766e Fixed Rfc3339 implementation of Date and Datetime 2018-01-24 16:58:12 +01:00
Robbie Averill
1a421dc947
Merge pull request #7792 from open-sausages/pulls/4.0/fix-limit-phpdoc
DOC Fix phpdoc on ArrayList::limit
2018-01-24 11:20:37 +13:00
Chris Joe
c0085efae6
Merge pull request #7785 from open-sausages/pulls/4.0/better-upload-message
BUG Better upload error message
2018-01-24 10:37:47 +13:00
Damian Mooyman
3fce5372b0
DOC Fix phpdoc on ArrayList::limit
Fixes #7781
2018-01-24 10:18:15 +13:00
Dylan Wagstaff
e1a4b89912
Code lint fix
change `else if` to `elseif`
2018-01-24 09:04:22 +13:00
Dylan Wagstaff
9c3feb4ab4
FIX: Allow absolute URLs be use as resources
At current certain interfaces exist that assume only local assets will be loaded (e.g. `SilverStripe\Forms\HTMLEditor\TinyMCEConfig::getConfig()`), where as someone may wish to load an off site resource via the use of an absolute URL (e.g. for fontawesome css provided via a CDN). Because asset path parsing is filtered through a `SilverStripe\Core\Manifest\ResourceURLGenerator`, one must either know in advance if they want an internal or external resource (loading different generators), or the API must allow for this (i.e. an inclusion function for each type of asset). So we can either double the API on the implementing class, or simply make an exception for an absolute URL as high as possible; inside the filter - for which the `vendor/module : path/to/file.asset` shorthand syntax was specifically designed not to conflict with.
2018-01-23 17:31:43 +13:00
Damian Mooyman
b44273d1d6
BUG Better upload error message
Fixes https://github.com/silverstripe/silverstripe-asset-admin/issues/720
2018-01-23 16:08:42 +13:00
Damian Mooyman
04050b2753 API Director::host() now formally includes port in host
API Add Director::hostName() and Director::port()
Fixes #7685
2018-01-23 12:19:09 +13:00
Damian Mooyman
f4092f7bcf API Deprecate GridFieldVersionedState 2018-01-22 15:28:09 +13:00
Damian Mooyman
a3c52f901a
Merge remote-tracking branch 'origin/4.0' into 4
# Conflicts:
#	src/Core/TempFolder.php
#	src/ORM/DataObject.php
#	src/View/ThemeResourceLoader.php
#	src/includes/constants.php
#	tests/php/Control/SimpleResourceURLGeneratorTest.php
#	tests/php/Forms/HTMLEditor/HTMLEditorFieldTest.php
#	tests/php/View/RequirementsTest.php
2018-01-22 14:57:05 +13:00
Damian Mooyman
60fa7558d3
BUG Fix double casting in login authenticator name
Fixes #7769
2018-01-22 14:06:24 +13:00
Damian Mooyman
16ad7e8fea
BUG Make GridFieldConfig less susceptible to error when versioned isn't installed 2018-01-18 16:43:51 +13:00
Daniel Hensby
3eaa83ed82
Add PUBLIC_* constants to constants.php for easier backwards compatible support of 4.0 and 4.1 2018-01-17 15:16:15 +00:00
Daniel Hensby
6aaee429db
Remove inaccurate comment from constants.php 2018-01-17 15:15:38 +00:00
Robbie Averill
40b2aeb7a3
Merge pull request #7760 from open-sausages/pulls/4/fix-editor-public-resolve
BUG Fix themed editor.css url not being resolved properly
2018-01-17 12:08:32 +13:00
Daniel Hensby
db610aaf3b
Fixing string concat CS issues 2018-01-16 18:39:30 +00:00
Daniel Hensby
42511d8061
Merge pull request #7714 from @zanderwar 2018-01-16 15:43:18 +00:00
Daniel Hensby
ebeaf3e40d
Merge branch '3' into 4 2018-01-16 11:47:39 +00:00
Loz Calver
daac577e62
Merge pull request #7763 from creative-commoners/pulls/4.0/fix-remove-header
FIX HTTPResponse::removeHeader incorrectly converts header name to lowercase
2018-01-16 11:04:03 +00:00
Robbie Averill
a8c156ae98
Merge pull request #7756 from dhensby/pulls/4.0/fix-bad-request-form-handlers
Forms with FormHandlers don't have access to current request object
2018-01-16 23:32:00 +13:00
Robbie Averill
cc90cb0125 FIX HTTPResponse::removeHeader incorrectly converts header name to lowercase 2018-01-16 23:20:52 +13:00
Damian Mooyman
ca2fe3b1f6
BUG Fix themed editor.css url not being resolved properly 2018-01-16 16:25:17 +13:00
Damian Mooyman
20348b5f42
BUG Fix upgrade-code doctor with public path 2018-01-16 15:38:12 +13:00
Damian Mooyman
f86b855c90
BUG Prevent basic-auth from disallowing logout
Fixes #7555
2018-01-16 15:24:20 +13:00
Daniel Hensby
dc96862cac
FIX Forms run through FormHandler rather than Controllers now have access to current Request 2018-01-15 13:08:43 +00:00
Damian Mooyman
15ef769e1d
BUG Don't re-declare manually-declared variables for public folder 2018-01-15 14:45:15 +13:00
Daniel Hensby
e4b936c7c7
Merge branch '4.0' into 4 2018-01-12 14:40:33 +00:00
Loz Calver
67ea95bc2a
Merge pull request #7750 from creative-commoners/pulls/4.1/remove-relation-setters
NEW Add getter and setter for removeRelation in GridFieldDeleteAction
2018-01-12 09:58:23 +00:00
Damian Mooyman
a15c6887fc
Merge pull request #7746 from dhensby/pulls/4.0/allow-injector-extensions
FIX Allow extension instances to be overridden by injector
2018-01-12 17:10:04 +13:00
Damian Mooyman
8d077203d4 API Implement support for public/ webroot folder (#7741)
* API Implement support for public/ webroot folder

* Bugfixes and refactor based on feedback
2018-01-12 16:25:02 +13:00
Robbie Averill
9fddb5de99 NEW Add getter and setter for removeRelation in GridFieldDeleteAction
This allows users to modify the property value in the component without having to
remove it and add a new one when they want to change it.
2018-01-12 14:23:22 +13:00
Daniel Hensby
7d66342496
FIX Allow extension instances to be overridden by injector 2018-01-12 00:38:15 +00:00
Andrew Aitken-Fincham
fb5476cb70 check for UPLOAD_ERR_NO_FILE on FileField::saveinto 2018-01-03 12:01:18 +00:00
Daniel Hensby
02761d6ca8
Merge pull request #7712 from creative-commoners/pulls/4.0/fix-last-non-sortable-column
FIX Ensure last GridField column when non sortable has its title displayed
2017-12-28 11:53:14 +00:00
Damian Mooyman
f885101a1b
BUG Fix basic auth in PHP-CGI
Fixes #7717
2017-12-21 14:58:19 +13:00
Damian Mooyman
c4ff8443bb
API Shift basic auth checking into middleware
Fixes #7554
2017-12-20 11:39:04 +13:00
Damian Mooyman
3bd4aae521
Merge remote-tracking branch 'origin/4.0' into 4 2017-12-19 10:02:41 +13:00
Damian Mooyman
ce07e4781e BUG Do database migrations before default records
Fixes #7703
2017-12-18 16:37:21 +13:00
Chris Joe
4ad9ceca6b
Merge pull request #7702 from open-sausages/pulls/4/fix-message-casting-permissions
BUG Fix message casting for html security messages
2017-12-18 15:43:35 +13:00
Damian Mooyman
d9d1e13735
Merge pull request #7707 from gorriecoe/Requirements-javascriptTemplate-ModuleResourceLoader
FIX: Added ModuleResourceLoader to javascriptTemplate
2017-12-18 14:27:32 +13:00
Damian Mooyman
623daed5ab
Merge pull request #6472 from silbinarywolf/feat-fieldlist-nestedfields
feat(FieldList): Add nestedFields() function to return a flat array of all deeply nested fields in a FieldList.
2017-12-18 13:43:36 +13:00
Chris Joe
a892eae4f6
Merge pull request #7705 from open-sausages/pulls/4.0/director-mock-request
BUG Fix incorrect BASE_DIR inferred in CLI
2017-12-18 09:22:11 +13:00
Reece Alexander
9c91e9820e
Returns chainability in setValue from parent 2017-12-17 17:21:42 +10:00
Robbie Averill
cd9695eda9
Merge pull request #7695 from open-sausages/pulls/4/versions-of-atlantis
Update framework docs / phpdoc for versioning changes
2017-12-17 16:33:59 +13:00
Robbie Averill
ea8ed5067d FIX Allow Requirements::block to handle module resource paths 2017-12-17 16:09:22 +13:00
Damian Mooyman
c5bd9bb424
BUG Fix incorrect BASE_DIR inferred in CLI
BUG Fix Director::mockRequest() mocking incorrect $url
Fixes #7689
2017-12-15 17:20:48 +13:00
Raissa North
369653b5df FIX Ensure last GridField column when non sortable has its title displayed 2017-12-15 16:45:46 +13:00
Gorrie Coe
ef74911922 Added ModuleResourceLoader to javascriptTemplate 2017-12-15 11:20:20 +13:00
Daniel Hensby
e4bf9a31ed
Merge branch '4.0' into 4 2017-12-14 21:20:11 +00:00
Daniel Hensby
1c72d6946d
Merge branch '3.6' into 4.0 2017-12-14 21:01:35 +00:00
Jake Bentvelzen
da9c133c1b
ENHANCEMENT Add flattenFields() function to iterate over all deeply nested fields in a form 2017-12-14 14:23:00 +00:00
Damian Mooyman
9170220d2c API Add onAfterSave extension point to GridFieldDetailForm_ItemRequest 2017-12-14 15:08:32 +13:00
Damian Mooyman
a50fd009ca Update PHPDoc 2017-12-14 15:08:32 +13:00
Damian Mooyman
140ed72e2a
BUG Fix message casting for html security messages 2017-12-14 14:49:58 +13:00
Damian Mooyman
529e341dbc
Merge pull request #7699 from open-sausages/pulls/4/html-in-security-msg
ENHANCEMENT Allow html in security failure message
2017-12-14 14:30:09 +13:00
Damian Mooyman
1c8576cee7
Linting cleanup 2017-12-14 14:18:41 +13:00
Damian Mooyman
ed6561d9f5
BUG Fix incorrect merge of associative / non-associative summary fields
Fixes #7696
2017-12-14 14:17:19 +13:00
Damian Mooyman
8b1b9f022b
Fix linting issues 2017-12-14 13:50:52 +13:00
Saophalkun Ponlu
31e04c8491 ENHANCEMENT Allow html in security failure message 2017-12-13 17:10:16 +13:00
Damian Mooyman
a2fa9f0943
Merge pull request #7694 from creative-commoners/pulls/4.0/injection-session
FIX Use Injector to retrieve the current session
2017-12-12 16:47:36 +13:00
Robbie Averill
eb6c1fc6de FIX Allow the current controller as well as injectable HTTPRequest objects 2017-12-12 16:35:53 +13:00
Robbie Averill
097d0697c5 FIX Use Injector to retrieve the current session 2017-12-12 16:03:16 +13:00
Damian Mooyman
2391af5ba7
Fix literal linting 2017-12-12 09:22:18 +13:00
Damian Mooyman
33b2d50d59
Cache warming in InheritedPermissions::getCachePermissions()
Simplify Group::Members() code
Remove cms-only config
2017-12-12 09:01:43 +13:00
Loz Calver
0e1753f33d FIX: Only show table_name warning on dev/build 2017-12-11 17:33:39 +00:00
Aaron Carlino
2be902ef2f Adapt to new MemberCacheFlusher interface 2017-12-11 17:50:11 +13:00
Aaron Carlino
45999e1133 Revisions per robbieaverill 2017-12-11 17:50:11 +13:00
Aaron Carlino
aefb0aeaa8 Make InheritedPermissions use cache and implement cache flushing 2017-12-11 17:50:11 +13:00
Damian Mooyman
ee27329728 Minor linting / style updates 2017-12-11 16:46:59 +13:00
Aaron Carlino
8b429bf47b update docblock 2017-12-11 16:46:59 +13:00
Aaron Carlino
86458941be Refactor to MemberCacheFlusher 2017-12-11 16:46:59 +13:00
Aaron Carlino
4857816c9e Revisions per robbieaverill 2017-12-11 16:46:59 +13:00
Aaron Carlino
eecb9f64d3 Add new InheritedPermissionFlusher extension, CacheFlusher service 2017-12-11 16:46:59 +13:00
Damian Mooyman
71c80d3762
Merge remote-tracking branch 'origin/4.0' into 4 2017-12-11 14:09:41 +13:00
Damian Mooyman
eba6129c07
Merge pull request #7677 from open-sausages/pulls/4/textarea-maxlength
Enable max length for textarea field
2017-12-11 10:34:29 +13:00
Damian Mooyman
69decdf3a4
BUG Don't warn on table name for classes without tables
Fixes #7686
2017-12-11 09:55:57 +13:00
Damian Mooyman
627b496379
Fix linting issue 2017-12-11 09:00:04 +13:00
Saophalkun Ponlu
381ad756f2 Fix tests 2017-12-08 09:58:52 +13:00
Damian Mooyman
6b384f4b35
Merge branch '4.0' into 4 2017-12-07 13:52:00 +13:00
Saophalkun Ponlu
442f2bb762 Enable max length for textarea field 2017-12-07 12:52:28 +13:00
Damian Mooyman
286271a1e1
Merge pull request #56 from silverstripe-security/pulls/4.0/ss-2017-009
[ss-2017-009] Prevent disclosure of sensitive information via LoginAttempt (4.0 branch)
2017-12-06 18:22:47 +13:00
Damian Mooyman
b46b858847
Merge pull request #48 from silverstripe-security/pulls/4.0/fix-install-redacting
[SS-2017-010] Prevent install.php from disclosing system passwords
2017-12-06 18:22:36 +13:00
Damian Mooyman
e45921b293
Merge pull request #46 from silverstripe-security/pulls/4.0/escape-limit-args
[SS-2017-008] Fix SQL injection in full text search (4.0 branch)
2017-12-06 18:22:24 +13:00
Damian Mooyman
99e772b361
Merge pull request #51 from silverstripe-security/pulls/4.0/ss-2017-007
[ss-2017-007] Ensure xls formulae are safely sanitised on output (4.0)
2017-12-06 18:22:11 +13:00
Chris Joe
0e8d288240
Merge pull request #7667 from open-sausages/pulls/4.0/better-tinymce-locales
BUG Ensure that all tinymce_lang mappings are valid
2017-12-06 11:24:02 +13:00
Damian Mooyman
d290eee217
Merge pull request #7668 from kinglozzer/getviewertemplates
NEW: Add ViewableData::getViewerTemplates()
2017-12-06 11:22:53 +13:00
Damian Mooyman
01b48e2dd7
Merge pull request #7670 from kinglozzer/dataobject-schema-ancestry
FIX: Remove some unnecessary ClassInfo calls in DataObjectSchema
2017-12-06 11:02:49 +13:00
Loz Calver
91bd92df31 FIX: Remove some unnecessary ClassInfo calls in DataObjectSchema 2017-12-05 12:23:10 +00:00
Daniel Hensby
eb55c27124
Merge branch '4.0' into 4 2017-12-05 12:14:22 +00:00
Loz Calver
259ae3f78b NEW: Add ViewableData::getViewerTemplates()
Forms part of the fix for silverstripe/silverstripe-cms#2039
2017-12-05 09:13:28 +00:00
Russell Maclean
3a4c6705c1 Fix db autodiscover comment on loading behavior. 2017-12-02 10:52:49 +10:30
Damian Mooyman
69295a6e22
BUG Ensure that all tinymce_lang mappings are valid 2017-12-01 15:00:39 +13:00
Damian Mooyman
cfe1d4f481
[ss-2017-007] Ensure xls formulae are safely sanitised on output
CSVParser now strips leading tabs on cells
2017-12-01 10:24:49 +13:00
Damian Mooyman
f1dd3d6f03
[ss-2017-009] Prevent disclosure of sensitive information via LoginAttempt 2017-11-30 17:00:49 +13:00
Thomas Portelange
e729cd2c37
TinyMCE lang is fr_FR for all French languages
"fr" is not a valid tiny mce lang

https://www.tinymce.com/docs/configure/localization/

having "fr" as it is currently prevents loading the language file
2017-11-29 12:54:27 +01:00
Damian Mooyman
9666222637
BUG Fix _configure_database.php being ignored
Fixes #7590
2017-11-29 12:01:24 +13:00
Damian Mooyman
5bfc0c43eb
Merge pull request #7648 from creative-commoners/pulls/4.0/support-some-class-collection
FIX Support self::class text collection
2017-11-29 11:37:06 +13:00
Damian Mooyman
c23d1f3f99
Merge pull request #7649 from kinglozzer/logout-backurl
FIX: Restore BackURL preservation on log out (closes #7636)
2017-11-29 11:31:57 +13:00
Damian Mooyman
62eb531164
Merge pull request #7641 from Sil3ntStorm/patch/display_errors
Reintroduce checking against original php.ini values.
2017-11-28 17:36:50 +13:00
Damian Mooyman
2fe59680e3
Merge pull request #7620 from open-sausages/pulls/4.0/its-too-big-to-fit
BUG Added warning for auto-generated table_name
2017-11-28 09:42:12 +13:00
Loz Calver
c4b366828e FIX: Restore BackURL preservation on log out (closes #7636) 2017-11-27 16:15:28 +00:00
Daniel Hensby
8c4822edd3
Merge pull request #7643 from open-sausages/pulls/4.0/portugal
ENHANCEMENT Promote portugese (portugal) as primary locale
2017-11-27 13:29:38 +00:00
Robbie Averill
b7ea05900e FIX Support self::class text collection 2017-11-27 23:20:29 +13:00
Christopher Joe
cc72b5c852 BUG Added warning for auto-generated table_name for non-test classes 2017-11-27 20:22:37 +13:00
Damian Mooyman
7a79cd039a
[SS-2017-010] Prevent install.php from disclosing system passwords 2017-11-27 18:15:53 +13:00
Damian Mooyman
6e7fb4747e
Restore legacy $ThemeDir support 2017-11-27 15:24:40 +13:00
Damian Mooyman
33a39666ba
ENHANCEMENT Promote portugese (portugal) as primary locale
Fixes #6561
2017-11-27 14:52:51 +13:00
Simon Erkelens
0987003053 Add the ability to redirect a user to a custom page with custom content after changing their password 2017-11-27 14:18:40 +13:00
Sil3ntStorm
0b879d690a
Reintroduce checking against original php.ini values.
Seems to have been accidentally removed in 806ffb934e

Fixes https://github.com/silverstripe/silverstripe-installer/issues/211
2017-11-26 01:36:40 +01:00
Daniel Hensby
0ceb4cfa18
Merge branch '3' into 4 2017-11-25 17:34:24 +00:00
Daniel Hensby
6d5cbe0a0e
Merge branch '4.0' into 4 2017-11-25 17:19:31 +00:00
Daniel Hensby
07a0f75426
Merge branch '3.6' into 4.0 2017-11-25 16:56:50 +00:00
Daniel Hensby
333ecc201c
Merge pull request #7583 from open-sausages/pulls/4/relation-object-navigation
BUG Ensure relObject() safely bails on empty objects
2017-11-23 12:48:57 +00:00
Andrew Aitken-Fincham
3620e57b5b check for apc.enable_cli when running from CLI 2017-11-22 08:50:20 +00:00
Christopher Joe
2b6b877327 Merge branch '4.0' of https://github.com/silverstripe/silverstripe-framework into 4 2017-11-21 15:08:30 +13:00
Damian Mooyman
099a5a3c2d
[SS-2017-008] Fix SQL injection in full text search 2017-11-20 16:53:44 +13:00
Chris Joe
d8ca223e15
Merge pull request #7605 from open-sausages/pulls/4.0/fix-enum-defaults
BUG Fix DBEnum ignoring empty defaults
2017-11-20 11:32:45 +13:00
Damian Mooyman
cbf9e40115
BUG Fix postgres / PDO support 2017-11-17 12:35:55 +13:00
Damian Mooyman
ef58799103
BUG Fix DBEnum ignoring empty defaults
FIxes #7582
2017-11-17 12:35:39 +13:00
Christopher Joe
2bc7edbf47 BUG Fix don't treat zero-date as invalid 2017-11-16 13:30:15 +13:00
Damian Mooyman
6a6cf2f9eb ENHANCEMENT Raise warning if DBField::create_field() would behave unpredictably and improve PHPDoc 2017-11-16 12:55:31 +13:00
Damian Mooyman
c7ab5846df
ENHANCEMENT Don't infer trace if explicitly provided
Requires https://github.com/Seldaek/monolog/pull/1080
2017-11-16 11:03:01 +13:00
Damian Mooyman
eae3d0cfaa
Merge remote-tracking branch 'origin/4.0' into 4 2017-11-16 10:16:44 +13:00
Chris Joe
bbc95eacff
Merge pull request #7600 from open-sausages/pulls/4/dbclassname-base
API Add getShortName to DBClassName
2017-11-15 21:36:21 +13:00
Chris Joe
e78fe401e6
Merge pull request #7601 from open-sausages/pulls/4.0/ensure-assets-writable
ENHANCEMENT Ensure that non-writable assets files are notified during install
2017-11-15 16:37:03 +13:00
Chris Joe
bee3c404fa
Merge pull request #7545 from open-sausages/pulls/4.0/deprecated-each
BUG Remove usage of deprecated each() and use a helper method instead
2017-11-15 16:30:20 +13:00
Damian Mooyman
c9921447b3
Merge pull request #7539 from colintucker/fix-broken-paginated-list
Fixed array/object mismatch bug in PaginatedList
2017-11-15 15:17:15 +13:00
Damian Mooyman
ba86a1dce9
Merge pull request #7595 from andrewandante/pulls/sanitise_select_tag_4
sanitise select tag in DropdownField Docblock
2017-11-15 14:17:55 +13:00
Damian Mooyman
8b063026f0
ENHANCEMENT Ensure that non-writable assets files are notified during install
Fixes #7580
2017-11-15 13:30:19 +13:00
Damian Mooyman
f863573d1c
API Add getShortName to DBClassName
Fixes #7586
2017-11-15 11:27:58 +13:00
Daniel Hensby
cf321895ba
Merge branch '4.0' into 4 2017-11-14 13:24:15 +00:00
Andrew Aitken-Fincham
3274f29c00 sanitise more docblocks 2017-11-14 10:02:24 +00:00
Andrew Aitken-Fincham
25d8795c70 sanitise FormField docblock 2017-11-14 09:52:06 +00:00
Andrew Aitken-Fincham
6cfb0a3d86 sanitise ListboxField docblock 2017-11-14 09:47:39 +00:00
Andrew Aitken-Fincham
e5b3f82f8c sanitise select tag in DropdownField Docblock 2017-11-14 08:17:39 +00:00
Damian Mooyman
ba2c5b48f7
BUG Ensure relObject() safely bails on empty objects
BUG Remove assignment of IDs to singletons
API relation methods can take an optional $id parameter to get relations from specific parents
API Added UnsavedRelationList::relation() method
2017-11-10 15:27:02 +13:00
Russell Michell
bf20d59cb8 FIX: Fixes SapphireTest masking userland coding errors. 2017-11-09 15:39:20 +13:00
Damian Mooyman
f1865cc798
Merge pull request #7557 from sminnee/fix-1396
FIX: Fix ContextSummary behaviour with UTF8 chars
2017-11-09 13:40:43 +13:00
Damian Mooyman
7f27840926
Merge pull request #7573 from dhensby/pulls/4.0/required-fields-docblock
DOCS Improve return tags for requiredfields class
2017-11-09 13:39:15 +13:00
Daniel Hensby
6139de8680
FIX Make sure plain parts are rendered when re-rendering emails 2017-11-08 15:32:51 +00:00
Daniel Hensby
2f9fae32c1
DOCS Improve return tags for requiredfields class 2017-11-08 15:29:15 +00:00
Damian Mooyman
1284ee86d8
Merge remote-tracking branch 'origin/4.0' into 4 2017-11-08 15:29:26 +13:00
Damian Mooyman
8497b9e1e6
BUG Disable directory index with missing slash 2017-11-08 12:12:10 +13:00
Reece Alexander
642cbdafc8 API Allow an array as a param to makeFieldReadOnly() 2017-11-07 15:51:13 +13:00
Colin Tucker
f952ef747b
Fixed array/object mismatch bug in PaginatedList 2017-11-06 11:23:41 +00:00
Sam Minnee
d8b4ca91d9 FIX: Fix ContextSummary behaviour with UTF8 chars
Fixes https://github.com/silverstripe/silverstripe-framework/issues/1396

Ensure that DBTextTest has UTF8 test cases
2017-11-06 12:09:08 +13:00
Damian Mooyman
420041f2b6
Merge remote-tracking branch 'origin/4.0' into 4 2017-11-03 17:04:44 +13:00
Damian Mooyman
1929ec46bb
BUG Prevent logOut() from clearing site stage during bootstrapping due to flushed session 2017-11-03 16:22:11 +13:00
Chris Joe
38f7f87661
Merge pull request #7552 from dhensby/pulls/4.0/session-destroy-on-logout
FIX Sessions must be destroyed on logout
2017-11-03 14:50:48 +13:00
Damian Mooyman
cf381ddf51
Merge pull request #7550 from zanderwar/patch-3
Added missing @deprecated tags
2017-11-03 12:13:33 +13:00
Damian Mooyman
6a73466b41 BUG Fix basicauth 2017-11-03 12:08:38 +13:00
Damian Mooyman
ad36b8f6a9 Use restart instead of destroy 2017-11-03 12:08:38 +13:00
Daniel Hensby
a61ce077c6 FIX Sessions must be destroyed on logout 2017-11-03 12:08:38 +13:00
Damian Mooyman
3298cf061b
Merge pull request #7543 from zanderwar/patch-1
Allow chain-ability on adding and removing fields
2017-11-03 11:15:51 +13:00
Jay Devlin
af9caa4e51 Warn if theme.yml isn't writeable 2017-11-02 11:34:36 +01:00
Reece Alexander
9c836c0d3d
Added missing @deprecated tags
This PR just adds a couple of @deprecated tags where they were missing, where IDE's like PHPStorm immediately alert the user that it's deprecated.
2017-11-02 20:28:01 +13:00
Damian Mooyman
0b3ed7ff15
Merge 4.0 -> 4 2017-11-02 16:52:05 +13:00
Chris Joe
49ca45f6d9
Merge pull request #7548 from open-sausages/pulls/4.0/guzzle-dep
BUG Use parse_str in place of guzzle library
2017-11-02 14:37:02 +13:00
Damian Mooyman
df50c8da03
BUG Use parse_str in place of guzzle library
Fixes #7540
2017-11-02 11:52:39 +13:00
Robbie Averill
897cba55cb FIX Move Member log out extension points to non-deprecated methods 2017-11-02 11:39:02 +13:00
Chris Joe
cd55a039e7
Merge pull request #7520 from open-sausages/pulls/4.0/config-redirect-works
API / BUG - Introduce new request resolver middleware and fix broken forceWWW / forceSSL
2017-11-02 10:01:58 +13:00
Damian Mooyman
5bc4f3d1fc
BUG Remove usage of deprecated each() and use a helper method instead 2017-11-01 16:04:35 +13:00
zanderwar
91f1a58018 ENHANCEMENT: Allow chain-ability on adding and removing fields 2017-11-01 14:24:21 +13:00
Damian Mooyman
0c178f934d
ENHANCEMENT Adjust tinymce footer, remove branding and restore path
FIxes #294
2017-10-31 12:12:59 +13:00
Damian Mooyman
3c8848a090
Update code style and fix tests 2017-10-30 17:34:15 +13:00
Damian Mooyman
9d3277f3d3
BUG Fix forceWWW and forceSSL not working in _config.php
API Introduce CanonicalURLMiddleware
BUG Fix Director::makeRelative() failing on multi-domain sites
2017-10-30 14:42:36 +13:00
Christopher Joe
f6b7cf8889 Feature disable current user from removing their admin permission 2017-10-30 12:34:06 +13:00
Oly Su
4d85da179f 291 checks if ->value is iterable 2017-10-27 10:46:20 +13:00
Damian Mooyman
324bdad48c
ENHANCEMENT Ensure DBVarchar scaffolds text field with TextField with appropriate max length
Fixes #1413
2017-10-26 16:21:51 +13:00
Damian Mooyman
68c3279fd9
BUG Ensure readonly tree dropdown is safely encoded
Removed legacy entwine dead code
Added soft-deprecation to label field
2017-10-26 13:04:30 +13:00
Robbie Averill
da4989e8f6 FIX Do not escape the readonly values since they get escaped when rendered 2017-10-25 17:36:54 +13:00
Damian Mooyman
29af6dbafd
Merge remote-tracking branch 'origin/4.0' into 4 2017-10-25 16:59:19 +13:00
Damian Mooyman
97f9eddf90
Warn if env isn't writable 2017-10-25 15:07:35 +13:00
Damian Mooyman
2f82d08460
BUG Fix env loading in installer 2017-10-25 14:06:57 +13:00
Damian Mooyman
ff992de231 Merge pull request #7493 from kinglozzer/require-me-some-isolation
FIX: Use isolated scope when requiring files for module activation
2017-10-24 14:19:37 +13:00
Dylan Wagstaff
7c354525fb Remove dead code from GridFieldDetailForm
There is no action for 'autocomplete', there is no method 'handleAutocomplete', and out of the box there is no extension that applies it.
Manually testing the URL that would take us through such a handler does not give an exception about missing details from the URI (such as a required query string), but instead gives us an exception on there not being a handler for such.
`[Emergency] Uncaught BadMethodCallException: Object->__call(): the method 'handleAutocomplete' does not exist on 'SilverStripe\Forms\GridField\GridFieldDetailForm'`
@ e.g. `http://localhost/admin/pages/edit/EditForm/1/field/ElementalArea/autocomplete`.

Auto complete should be (and is) handled in it's own component code, such as https://github.com/silverstripe/silverstripe-framework/blob/4.0/src/Forms/GridField/GridFieldAddExistingAutocompleter.php#L210
2017-10-24 12:57:08 +13:00
Damian Mooyman
13afd6f0d5 Merge pull request #7502 from open-sausages/pulls/4.0/i-converted-an-apple-to-an-orange
Fix switch to using the Convert class for decoding
2017-10-24 10:25:53 +13:00
Sam Minnee
4bec62ba51 Merge branch '4.0' into 4 2017-10-20 18:45:16 +13:00
Damian Mooyman
b9cb1e69e6 BUG Replace phpdotenv with thread-safe replacement 2017-10-20 18:43:11 +13:00
Christopher Joe
4caf34506a Fix switch to using the Convert class for decoding 2017-10-20 14:43:19 +13:00
Loz Calver
bb9501797f FIX: Use isolated scope when requiring files for module activation 2017-10-20 09:11:00 +13:00
Damian Mooyman
d0ca9bd17a Merge pull request #7490 from open-sausages/pulls/4.0/my-email-children-deserve-the-best
BUG Fix enable email subclasses to use their respective templates
2017-10-19 16:30:37 +13:00
Christopher Joe
dabdc905ce
BUG Fix enable email subclasses to use their respective templates 2017-10-19 14:44:04 +13:00
Nathan J. Brauer
bcc2cc6a0b Adding 308 HTTP Response as an redirect code
https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
Often times, 308 are preferred over 301 redirects, as they tell the requester to, for example, re-POST a form submission on the final URL.
2017-10-18 12:27:00 -07:00
Christopher Joe
076d7d78c6 BUG cache the cacheKey in TreeDropdownField, so it doesn't need to query for it multiple times in the same request 2017-10-18 11:49:28 +13:00
Chris Joe
cafa3fc29a BUG switch to trigger_error() when a resource is not found (#7468)
* BUG switch to `trigger_error()` when a resource is not found rather than throw an exception

* Add unit test for module url failing
2017-10-16 16:11:42 +13:00
Simon Erkelens
6506a5b958 Don't add a . when there's no extension 2017-10-16 11:56:35 +13:00
Damian Mooyman
7e97f04e47
ENHANCEMENT Allow extensions to intercept incorrect deletes on unpublish 2017-10-13 10:12:08 +13:00
UndefinedOffset
7ff707df73 BUGFIX: Fixed issue on windows where the BASE_URL constant would get set wrong if the site was in a sub-folder of the web root 2017-10-12 10:54:27 -03:00
Chris Joe
d876e36424 Merge pull request #7467 from open-sausages/pulls/4.0/adjust-field-onbeforerender
Adjust FormField::onBeforeRendor so that it can influence both context and passed properties
2017-10-12 12:11:32 +13:00
Damian Mooyman
c3f321459b Merge pull request #7449 from creative-commoners/pulls/4.0-updatebreadcrumbs
Add updateBreadcrumbs hook to GridFieldDetailForm
2017-10-11 12:17:33 +13:00
Damian Mooyman
eff5c28f24
Adjust FormField::onBeforeRendor so that it can influence both context and passed properties
Fixes #7466
2017-10-11 11:43:57 +13:00
Daniel Hensby
c09dec5958 Merge pull request #7456 from open-sausages/pulls/4.0/decimal-scaffolding
BUG Fix decimal scaffolding
2017-10-10 15:46:38 +01:00
Loz Calver
7afab3043d Merge pull request #7461 from open-sausages/pulls/4.0/fix-icon-urls
Fix references to resource paths / urls
2017-10-10 09:08:08 +01:00
Damian Mooyman
6a55dcfc16
Fix references to resource paths / urls 2017-10-10 16:51:47 +13:00
Will Rossiter
dc9307bd99 Add updateBreadcrumbs hook to GridFieldDetailForm 2017-10-10 16:03:20 +13:00
Damian Mooyman
11b2c74533
ENHANCEMENT Improve upgrade experience for beta3 -> beta4 upgrade 2017-10-10 15:27:41 +13:00
Damian Mooyman
fd630a99b0
BUG Fix decimal scaffolding
Fixes #7454
2017-10-10 10:13:26 +13:00
Damian Mooyman
3e6984d5a8
Shift REQUEST_URI mangling into HTTPRequestBuilder::createFromVariables() 2017-10-09 17:35:33 +13:00
Damian Mooyman
199d607a2c Tiny revert 2017-10-09 17:21:43 +13:00
Ingo Schommer
1e913bb938 Remove rewrite-less routing through index.php
It's currently broken (doesn't rewrite subsequent links),
and is of questionable use. It was introduced during a time
when PHP didn't have a built-in webserver (I think).
Virtually ever webserver will have rewriting capabilities these days (even IIS!),
and if you struggle with the setup as a new user, you can just fall back to PHP's built-in webserver.

This doesn't affect installation capabilities, since these are triggered via install.php.
2017-10-09 17:21:43 +13:00
Ingo Schommer
1e051386c6 Simplified request building 2017-10-09 17:21:43 +13:00
Ingo Schommer
bd11bc16c7 Avoid double slash in Director mock URLs
They get faulty results when run through parse_url($url, PHP_URL_PATH)
which we started using in HTTPRequestBuilder
2017-10-09 17:21:43 +13:00
Ingo Schommer
4a94dfe55b Remove "url" query param reliance, use index.php
See https://github.com/silverstripe/silverstripe-framework/issues/7430
2017-10-09 17:21:43 +13:00
Damian Mooyman
311811a261 Merge pull request #7451 from open-sausages/pulls/4.0/whats-temporary-could-turn-path
rename TEMP_FOLDER to TEMP_PATH
2017-10-09 14:16:06 +13:00
Damian Mooyman
994689ab54 Merge pull request #7450 from open-sausages/rename-assertDOS-to-assertList
API Rename assert dos to assert list
2017-10-09 13:47:18 +13:00
Christopher Joe
3560a0418d rename TEMP_FOLDER to TEMP_PATH 2017-10-09 12:41:34 +13:00
Damian Mooyman
313f8c7ac3 Merge pull request #7439 from creative-commoners/pulls/4.0/trim-injector-names
FIX Trim whitespace off names in Injector
2017-10-09 12:31:11 +13:00
Werner M. Krauß
f686b50824 API Rename assert dos to assert list 2017-10-09 11:53:11 +13:00
Chris Joe
566d7baa48 Merge pull request #7437 from open-sausages/pulls/4.0/stateless-extensions
API Extensions are now stateless
2017-10-09 11:45:33 +13:00
Daniel Hensby
d8f49a1bda Merge pull request #7426 from silverstripe/filefield-accept-attr
NEW: Implement accept attribute in FileField (closes #7279)
2017-10-06 15:01:12 +01:00
Ingo Schommer
7406318f03 Merge pull request #7436 from creative-commoners/pulls/4.0/consistent-change-password-api
NEW Ensure changePassword is called by onBeforeWrite for a consistent API
2017-10-06 11:26:37 +01:00
Robbie Averill
3bdc8c7e65 FIX Trim whitespace off names in Injector 2017-10-06 15:52:44 +13:00
Chris Joe
58cd83e4f7 Merge pull request #7434 from open-sausages/pulls/4.0/the-tree-needs-cutting
Fix refactor TreeMultiselectField to be clearable if nothing is selected
2017-10-06 15:16:10 +13:00
Damian Mooyman
b996e2c22c
API Extensions are now stateless
ENHANCEMENT Injector now lazy-loads services more intelligently
2017-10-06 14:53:44 +13:00
Chris Joe
90ce2abecb Merge pull request #7422 from open-sausages/pulls/4.0/flags-in-gridfield
Add gridfield versioned columns
2017-10-06 14:39:02 +13:00
Saophalkun Ponlu
1a324d9d77 Wrap content gridfield cell in another non-td element for styling 2017-10-06 11:47:38 +13:00
Daniel Hensby
16cac4e3bd
Merge branch '3' into 4 2017-10-05 16:40:31 +01:00
Daniel Hensby
96a314f076 Merge pull request #7401 from creative-commoners/pulls/4.0/i18n-collector-fix
FIX Class name in _t() call in installer and run text collector
2017-10-05 10:56:12 +01:00
Robbie Averill
413034f684 Remove psuedo-property SetPassword from Member 2017-10-05 16:55:24 +13:00
Robbie Averill
cdf6ae45a3 NEW Ensure changePassword is called by onBeforeWrite for a consistent API 2017-10-05 16:14:15 +13:00
Christopher Joe
e07658ef50 Fix linting issues and fix doc 2017-10-05 15:28:58 +13:00
Saophalkun Ponlu
6424f4dea0 Changes based on peer review feedbacks 2017-10-05 15:04:46 +13:00
Christopher Joe
a1a8341929 Fix refactor TreeMultiselectField to be clearable if nothing is selected 2017-10-05 14:58:27 +13:00
Robbie Averill
6044579a3f MINOR Separate some areas of logic in LostPasswordHandler to make them more overridable 2017-10-05 14:17:38 +13:00
Damian Mooyman
168db412de Merge pull request #7424 from creative-commoners/pulls/4.0/extensible-change-password
NEW Make Member::changePassword extensible
2017-10-05 13:18:53 +13:00
Damian Mooyman
4dbd727206
BUG Config updates are now applied after middleware not before 2017-10-05 12:30:21 +13:00
Robbie Averill
6b52412693 NEW Make Member::changePassword extensible 2017-10-05 11:18:34 +13:00
Damian Mooyman
1b6d0144c5
BUG Fix resource mapping for TinyMCE
API add ModuleResource::getRelativeResource()
2017-10-04 17:44:04 +13:00
Saophalkun Ponlu
ae930833ad Add gridfield versioned columns 2017-10-04 17:33:15 +13:00
Loz Calver
43ec2f87ed NEW: Implement accept attribute in FileField (closes #7279) 2017-10-03 16:48:49 +01:00
Damian Mooyman
f4a77649a4
Fix requirements tests 2017-10-03 14:21:24 +13:00
Damian Mooyman
5ffe64f024
Fix tinymce plugins 2017-10-03 14:08:24 +13:00
Damian Mooyman
cdefd19091
Ensure HTMLEditor can load vendor css 2017-10-03 13:08:22 +13:00
Damian Mooyman
f64c95b33c
Add new ModuleResourceLoader helper 2017-10-03 12:20:49 +13:00
Ingo Schommer
e1b98d154e Fix tinymce operation for resource paths
It was referencing secondary TinyMCE assets in the vendor/* folder
from its generated files (e.g. skin.min.css).
2017-10-03 09:03:37 +13:00
Ingo Schommer
8e49b563a9 Fix installer paths for vendorised module 2017-10-03 09:03:37 +13:00
Ingo Schommer
85a951584e Update main.php path to support framework in vendor 2017-10-03 09:03:37 +13:00
Ingo Schommer
31b213be7b Allow autoloading from vendor path 2017-10-03 09:03:36 +13:00
Damian Mooyman
b4910e133c Merge pull request #7412 from open-sausages/pulls/4.0/fun-times-in-thumbnails
Enhancement add notice for MigrateFileTask if FileMigrationHelper doesn't exist
2017-10-02 16:59:40 +13:00
Damian Mooyman
17718e3854 Merge pull request #7415 from open-sausages/pulls/4.0/no-cache-in-my-home
Fix typos in FilesystemCacheFactory
2017-10-02 16:53:52 +13:00
Chris Joe
b219e40ff7 Merge pull request #7414 from open-sausages/pulls/4.0/basic-auth-var
BUG Restore SS_USE_BASIC_AUTH env var
2017-10-02 15:11:19 +13:00
Christopher Joe
26f7f0482c Fix typos in FilesystemCacheFactory 2017-10-02 15:10:44 +13:00
Christopher Joe
36397c787c Enhancement add notice for MigrateFileTask if FileMigrationHelper doesn't exist
Enhancement add call to image thumbnail helper to generate thumbnails
2017-10-02 14:54:31 +13:00
Chris Joe
fe98555d0a Merge pull request #7413 from open-sausages/pulls/4.0/member-i18n-speed
ENHANCEMENT Use less expensive i18n defaults in Member::populateDefaulateDefaults()
2017-10-02 13:03:44 +13:00
Chris Joe
ccc24764c4 Merge pull request #7411 from open-sausages/pulls/4.0/superfluous-date-props
Remove superfluous datefield props
2017-10-02 10:24:30 +13:00
Damian Mooyman
e2750c03fc
BUG Restore SS_USE_BASIC_AUTH env var
Fixes #7268
2017-09-29 16:56:56 +13:00
Damian Mooyman
f4b1417612
ENHANCEMENT Use less expensive i18n defaults in Member::populateDefaults()
Fixes #7381
2017-09-29 16:40:17 +13:00
Damian Mooyman
fa57deeba4
ENHANCEMENT Allow vendor modules with url rewriting
API Introduce ModuleResource feature
2017-09-29 10:28:38 +13:00
Damian Mooyman
3011650b5a
Remove superfluous datefield props
Fixes #7397
2017-09-29 10:25:22 +13:00
Damian Mooyman
f574f6d1b2
Reset test state for modified config options 2017-09-28 17:24:32 +13:00
Christopher Joe
90d0361a6c Enhancement update set_themes to not update config 2017-09-28 16:47:13 +13:00
Christopher Joe
7e92b053f4 Enhancement Add setter and getter for certain classes, so that LeftAndMain no longer updates config during init 2017-09-28 16:47:13 +13:00
Damian Mooyman
da27948777 Merge pull request #7373 from dhensby/pulls/4/rate-limit-security
NEW RateLimiter for Security controller
2017-09-28 11:01:37 +13:00
Damian Mooyman
e4fd9b4ff7
Code style fixes 2017-09-28 09:54:29 +13:00
Daniel Hensby
5f739c111e
added ratelimiter tests 2017-09-27 16:42:04 +01:00
Daniel Hensby
51ac297c59
Fixes to ratelimiter and new features 2017-09-27 14:44:38 +01:00
Andrew O'Neil
c7cbbb29f4 Fix links on paginated lists when there are GET vars
Prior to this change, if there were already GET vars on a page
with a PaginatedList, the links would include a mix of '&' and '&'.
2017-09-27 15:41:08 +10:00
Daniel Hensby
28552155c3
NEW Add actWithPermission to SapphireTest for shortcut to perform actions with specific permissions 2017-09-26 13:39:31 +01:00
Robbie Averill
33ae463e5b FIX Class name in _t() call in installer and run text collector 2017-09-26 14:57:16 +13:00
Mike Cochrane
b8e5a2ce32 FIX readonly PermissionCheckboxSetField
A readonly PermissionCheckboxSetField (eg in Security when viewing a member without permission to edit it) can result in calling "getRecord()" on null.  Add is_object check, consistent with line 98.
2017-09-25 15:25:10 +13:00
Loz Calver
1dd0c04891 Tidy up + document SSViewer classes 2017-09-21 17:03:21 +01:00
Damian Mooyman
f1a12e15be
BUG Fix sub-template lookup for includes 2017-09-20 18:04:01 +12:00
Chris Joe
c939737e5c Merge pull request #7386 from open-sausages/pulls/4.0/class-case-fixing
ENHANCEMENT Don't force all class names to lowercase
2017-09-20 16:46:49 +12:00
Damian Mooyman
261302a121
ENHANCEMENT Don't force all class names to lowercase
Speeds up autoloading because composer psr-4 works properly now
2017-09-20 15:14:55 +12:00
Christopher Joe
265f91060c Fix phpcs error 2017-09-20 12:42:45 +12:00
Damian Mooyman
09b3a24f30
BUG Detect, warn, and fix invalid SS_BASE_URL
Fixes #7362
2017-09-20 10:42:13 +12:00
Loz Calver
7431122b58
Make auto login token expiry configurable (closes #7278) 2017-09-18 14:06:13 +01:00
Daniel Hensby
04b1bb816e
NEW RateLimiter for Security controller 2017-09-14 14:23:36 +01:00
Damian Mooyman
7b3286d512 Merge pull request #7374 from dhensby/pulls/4/ci-http-headers
FIX HTTP Headers are case insensitive
2017-09-14 09:52:26 +12:00
Daniel Hensby
9198313658
FIX HTTP Headers are case insensitive 2017-09-13 16:02:12 +01:00
Chris Joe
c3f7165023 Merge pull request #7371 from open-sausages/pulls/4.0/fix-gridfield-print
BUG Fix gridfield print styles
2017-09-13 15:58:05 +12:00
Damian Mooyman
d05d22abc2 Merge pull request #7343 from creative-commoners/pulls/4.0/add-extra-class
NEW Allow GridFieldEditButton to have configurable HTML classes. Change edit icon.
2017-09-13 15:39:38 +12:00
Sacha Judd
c707fccf69 NEW Allow GridFieldEditButton to have configurable HTML classes. Change edit icon. 2017-09-13 13:11:17 +12:00
Damian Mooyman
f8ef97c167
BUG Fix import modal
Fixes https://github.com/silverstripe/silverstripe-admin/issues/251
2017-09-13 12:52:20 +12:00
Damian Mooyman
1892a02076
BUG Fix gridfield print styles 2017-09-13 11:48:42 +12:00
Andrew Aitken-Fincham
6613826ed8 FIX SSViewer::add_themes() to properly prepend 2017-09-12 13:34:56 +01:00
Damian Mooyman
905c4e04d5
BUG Incorrect path for requirements file 2017-09-12 10:36:48 +01:00
Bernard Hamlin
fa86f42ab9
BEM class names for filter-buttons 2017-09-12 10:16:03 +12:00
Damian Mooyman
22e991ef90 Merge pull request #7344 from creative-commoners/pulls/4.0/email-assertion-return
DOCS Update doc block for TestMailer::findEmail to reflect the new key names
2017-09-08 13:08:03 +12:00
Chris Joe
d1df61a19b Merge pull request #7332 from open-sausages/pulls/4.0/installer-env-cleanup
Ensure installer.php works nicely with .env files
2017-09-07 09:47:56 +12:00
Robbie Averill
a4aa59bfdc DOCS Update doc block for TestMailer::findEmail to reflect the new key names 2017-09-06 16:10:55 +12:00
Damian Mooyman
806ffb934e
BUG Ensure installer.php works nicely with .env files
Unenjoyable cleanup of internal logic
2017-09-06 13:52:51 +12:00
Damian Mooyman
40678d5897 Merge pull request #7342 from open-sausages/pulls/4.0/disable-me-a-plus
Fix permission check for admin role
2017-09-06 11:38:01 +12:00
Christopher Joe
25380eb454 Fix permission check for admin role 2017-09-06 10:21:01 +12:00
Chris Joe
1f5644d143 Merge pull request #7340 from open-sausages/pulls/4.0/toolbar-button-margin
Fix toolbar button margin and spacing
2017-09-05 16:07:32 +12:00
Saophalkun Ponlu
2f7f4e73d9 Fix toolbar button margin and spacing 2017-09-05 15:08:05 +12:00
Damian Mooyman
8425533487 Merge pull request #7336 from open-sausages/pulls/4.0/the-uncontained-popover-was-powerful
Fix add schema to the "auto" parts request
2017-09-05 14:01:12 +12:00
Damian Mooyman
4c84f22b2e Merge pull request #7325 from xini/patch-3
use html5 mark tag to highlight search parameter
2017-09-05 13:38:42 +12:00
Christopher Joe
afda58c515 Fix add schema to the "auto" parts request 2017-09-05 13:12:51 +12:00
Florian Thoma
d1f7e6959f update tests and doc 2017-09-05 09:42:08 +10:00
Robbie Averill
f8372ef6dc MINOR Add default value to ArrayData constructor 2017-09-05 09:42:52 +12:00
Daniel Hensby
16416fe15b Merge pull request #7334 from open-sausages/pulls/4.0/destroyed-cleanup
Remove redundant gc_collect_cycles()
2017-09-04 15:03:09 +01:00
Christopher Joe
120c772966 Add TreeDropdownField from React to Entwine 2017-09-04 12:15:41 +12:00
Saophalkun Ponlu
08fa3d6e3d
Enable TinyMCE list buttons 2017-09-04 09:30:07 +12:00
Damian Mooyman
45998444d7
Remove redundant gc_collect_cycles()
Cleanup dead references to DataObject::$destroyed
Fixes #7326
2017-09-04 09:23:07 +12:00
Florian Thoma
0d15cb02cd use html5 mark tag to highlight search parameter 2017-08-30 12:05:11 +10:00
Chris Joe
76f2358f3b Merge pull request #7324 from open-sausages/pulls/4/env-type-docs
DOCS Corrected env type docs (fixes #7290)
2017-08-30 11:44:55 +12:00
Ingo Schommer
64af679c35 DOCS Corrected env type docs (fixes #7290) 2017-08-30 08:35:41 +12:00
Damian Mooyman
98c10b089c
ENHANCEMENT Allow <% include %> to fallback outside of the Includes folder
Fixes #7108
2017-08-29 16:15:46 +12:00
Christopher Joe
e4b506cbe7
Fix add combinedFiles to clear logic 2017-08-29 13:52:14 +12:00
Sam Minnee
8c15e451c6 FIX: Removed unnecessary database_is_ready call.
This shaves about 45ms from every request (PHP 7.1 on a 2013 rMBP), 
cutting down execution time of a “hello world” controller by about 33%.

database_is_ready is still used in dev/build and ?flush=1 to stop people
from people bypassing security by DOSing the database or otherwise
forcing a DatabaseException
2017-08-25 13:06:12 +12:00
Damian Mooyman
d52e972453 Merge pull request #7308 from creative-commoners/pulls/4.0/fix-alternative-db-name-when-session-not-started
FIX Do not try and access sessions when they are not ready
2017-08-24 16:07:52 +12:00
Robbie Averill
5a9131a116 FIX Do not try and access sessions when they are not ready 2017-08-24 14:43:27 +12:00
Robbie Averill
c4ff9df1b0 FIX Use correct bootstrap class or GridFieldDetailForm delete button 2017-08-24 14:34:06 +12:00
Chris Joe
deec9b411b Merge pull request #7300 from open-sausages/pulls/4.0/flush-live-backurl
BUG Capture errors after a reload token redirect to login url
2017-08-24 14:00:33 +12:00
Damian Mooyman
d5b3280498 Merge pull request #7302 from robbieaverill/pulls/4.0/has-class-returns-bool
API Make FormField::hasClass return a boolean instead of an int
2017-08-24 13:19:30 +12:00
Damian Mooyman
80cf096a6e
BUG Prioritise SS_BASE_URL over flakey SCRIPT_FILENAME check 2017-08-24 12:58:04 +12:00
Damian Mooyman
47fced8880
BUG Capture errors after a reload token redirect to login url
Fixes #7289
2017-08-24 12:55:04 +12:00
Chris Joe
8edf070a13 Merge pull request #7303 from open-sausages/pulls/4.0/constant-logging
BUG Fix BASE_URL for CLI
2017-08-24 11:56:10 +12:00
Loz Calver
ecc619248b Merge pull request #7298 from robbieaverill/pulls/4.0/replace-stat-usage
Replace use of Configurable stat() with config()->get(), will be deprecated in future
2017-08-23 10:12:40 +01:00
Robbie Averill
595ba75a50 API Make FormField::hasClass return a boolean instead of an int 2017-08-23 16:23:28 +12:00
Damian Mooyman
1b087221d2
BUG Fix BASE_URL on CLI
Fixes #7256
2017-08-23 14:48:46 +12:00
Damian Mooyman
2c34af72e1
ENHANCEMENT Log user constants during CI for debugging improvements 2017-08-23 14:23:33 +12:00
Damian Mooyman
14761a9246
Remove mcrypt
Use session for alternativeDatabaseName instead
Fixes #7280
2017-08-23 12:13:32 +12:00
Robbie Averill
8ebc13ae4e Replace use of Configurable stat() with config()->get(), will be deprecated in future 2017-08-23 09:42:10 +12:00
Damian Mooyman
9b4d689bb2 Lazy-load custom methods and extensions on CustomMethods and Extensible traits
No longer need constructExtensions()
2017-08-22 15:47:24 +12:00
Damian Mooyman
fc2a603915 BUG Don’t construct extension_instances on objects that never use them 2017-08-22 15:47:24 +12:00
Damian Mooyman
90ba24733d Reduce unnecessary calls to Extension and DataExtension configs 2017-08-22 15:47:24 +12:00
Damian Mooyman
598a2c91e3 Reduce calls to i18n.default_config 2017-08-22 15:47:24 +12:00
Damian Mooyman
179a9fca28 Merge pull request #7292 from sminnee/injector-dependency-speedup
FIX: Prevent repeated lookup of obj.dependencies by Injector
2017-08-22 14:30:35 +12:00
Sam Minnee
c50cd34df6 FIX: Prevent repeated lookup of obj.dependencies by Injector
This unnecessary repeated call to Injector slows down the construction
of frequently instantiated classes.

On admin/pages, this reduced execution from 1.67s to 1.56s, and it
reduced the impact of having an extension added to DBField by 33%
(from 100ms to 67ms)
2017-08-22 12:12:32 +12:00
Christopher Joe
249c7048d9 Fix trim accept header parts 2017-08-21 15:31:13 +12:00
Chris Joe
c8d8adfefe Merge pull request #7287 from open-sausages/pulls/4.0/fix-multi-configs
BUG Fix issue with multiple editors breaking plugins
2017-08-21 10:58:27 +12:00
Daniel Hensby
304889ff2f Merge pull request #7281 from sminnee/test-php72
NEW: Test on php 7.2
2017-08-18 21:22:10 +01:00
Damian Mooyman
ce5e15df6e BUG Fix issue with multiple editors breaking plugins 2017-08-18 16:33:16 +12:00
Daniel Hensby
33c2c7bfe7
Merge branch '3' into 4 2017-08-17 15:06:00 +01:00
Christopher Joe
9dc11eff43 Enhancement Add a path option for the schema data, so a full tree is not required for this data 2017-08-17 16:08:27 +12:00
Damian Mooyman
bbded44056 Upgrade bootstrap class names 2017-08-16 10:50:09 +12:00
Sam Minnee
0926b04512 FIX: Fix latent bug in DataObject
This didn’t show up until we ran tests on PHP 7.3-dev
2017-08-15 11:13:57 +12:00
Daniel Hensby
c0211927aa
Merge branch '3' into 4 2017-08-14 21:18:03 +01:00
Damian Mooyman
323644c7bb
API Implement cascade_deletes 2017-08-09 15:14:00 +12:00
Robbie Averill
5d5fac7450 FIX Throw exception when "value" is used to define indexes. Update docs. 2017-08-09 09:17:28 +12:00
Damian Mooyman
0681567102 BUG Fix flushing on live mode (#7241)
* BUG Fix flushing on live mode
Fixes #7217

* Clarify injector service documentation
2017-08-07 13:53:23 +12:00
Damian Mooyman
f7bebdd8f8
BUG Fix install issue with IIS
Fixes #7218
2017-08-07 10:15:40 +12:00
Chris Joe
6ebc333e00 Merge pull request #7238 from open-sausages/pulls/4.0/flush-tinymce-cache
ENHANCEMENT Ensure flush destroys temp tinymce files
2017-08-03 19:13:54 +12:00
Damian Mooyman
b6a8e45888
BUG Ensure mocked controller has request assigned
Fixes #7237
2017-08-03 15:52:31 +12:00
Damian Mooyman
06efd2ac12
ENHANCEMENT Ensure flush destroys temp tinymce files 2017-08-03 13:21:48 +12:00
Chris Joe
34ca944bd6 Merge pull request #7235 from open-sausages/pulls/4.0/update-installer
Update installer path to match recipe
2017-08-03 10:58:58 +12:00
Damian Mooyman
e64acef53a BUG Fix invalid i18n yaml 2017-08-03 10:13:09 +12:00
Damian Mooyman
24ab3abbea
Update installer path to match recipe 2017-08-03 10:02:55 +12:00
Damian Mooyman
8418011456
Fix linting issues 2017-08-02 14:08:59 +12:00
Robbie Averill
e307f067ed FIX Replace deprecated %s placeholders in translations with named placeholders
* Remove the use of sprintf and %s placeholders in the i18n tests
2017-08-02 13:03:55 +12:00
Damian Mooyman
ae97c15e42
ENHANCEMENT Soft-code CSS explicit height and compute against rows 2017-08-01 15:46:49 +12:00
Damian Mooyman
078a508d71 API Replace legacy tiny_mce_gzip compressor with asset generator
Fixes https://github.com/silverstripe/silverstripe-admin/issues/74
2017-08-01 13:43:30 +12:00
vagrant
f02949fc09 Initially set a default height for the html editor to 350px 2017-07-31 16:49:48 +12:00
Damian Mooyman
9392380dd1 Merge pull request #7225 from silverstripe/pulls/4.0/injector-extension-setters
Use ClassInfo::hasMethod instead of method_exists()
2017-07-31 10:23:10 +12:00
Damian Mooyman
90f6710020 Merge pull request #7219 from silverstripe/pulls/4.0/dbcomposite-properties
BUGFIX: DBComposite doesn't allow arbitrary property assignment
2017-07-31 10:11:58 +12:00
Aaron Carlino
c9cf7b1d75 Use ClassInfo::hasMethod instead of method_exists()
This allows for setters to exist in extension instances.
2017-07-30 22:43:28 +12:00
Aaron Carlino
9903104fb8 Use parent::setField() 2017-07-30 22:39:42 +12:00
Daniel Hensby
1a4211f089 Merge pull request #7222 from kinglozzer/showqueries-pdo
FIX: ?showqueries=inline failed on PDO databases (fixes #7199)
2017-07-28 10:23:57 +01:00
Loz Calver
980d6b7ef7 FIX: ?showqueries=inline failed on PDO databases (fixes #7199) 2017-07-28 09:33:26 +01:00
Aaron Carlino
3ef9ca69d1 BUGFIX: DBComposite doesn't allow arbitrary property assignment
To be more consistent with `ViewableData`, whose `setField()` method will fallback on [assigning properties arbitrarily](https://github.com/silverstripe/silverstripe-framework/blob/4/src/View/ViewableData.php#L213), `DBComposite` shouldn't bail out of `setField` when the field specified isn't in the record.

Arbitrary property assignment is particularly important in injection.

```yaml
SilverStripe\ORM\FieldType\DBComposite:
  dependencies:
    myService: %$Service
```

Right now, that fails, because `$obj->myService = Service` invokes `__set()` which calls `setField()` which refuses the assignment when `myService`is not in the record.
2017-07-27 17:25:29 +12:00
Damian Mooyman
697798b464 Merge pull request #7206 from open-sausages/pulls/4.0/select-them-all-again
Enhancement add support for TreeMultiselectField in react
2017-07-27 13:41:18 +12:00
Damian Mooyman
7f6974e309
Update PHPDoc 2017-07-27 12:08:42 +12:00
Aaron Carlino
74873096bd New getSummary() API for SearchContext 2017-07-27 11:56:37 +12:00
martimiz
b726d64d1d
Fix SearchEngine to use quoted table names
If quotes are omitted, SQLExpression::sql() cannot replace table names
with the proper table for the current Stage.
2017-07-26 13:42:41 +01:00
Damian Mooyman
9bff74bd61
Clean up all fluent property accessors 2017-07-26 18:14:27 +12:00
Christopher Joe
78d4d0d5dd Enhancement add support for TreeMultiselectField in react 2017-07-26 18:14:08 +12:00
Daniel Hensby
884f53e0f2
Merge branch '3' into 4 2017-07-25 16:17:44 +01:00
Damian Mooyman
2c500c79c3 Merge pull request #7201 from kinglozzer/build-perf
Ensure ClassManifest isn't flushed twice on build
2017-07-25 09:51:00 +12:00
Daniel Hensby
6aeab571db Merge pull request #7195 from open-sausages/pulls/4.0/missing-unnested-from
BUG Fix unassigned nestedFrom
2017-07-24 17:07:07 +01:00
Loz Calver
ad2e1cf552 Ensure ClassManifest isn't flushed twice on build 2017-07-24 09:36:03 +01:00
Robbie Averill
392cda15f6 NEW Add updateRules extension point to Director::handleRequest 2017-07-23 22:10:46 +12:00
Chris Joe
6a3c51e072 Merge pull request #7036 from fullscreeninteractive/wilr-patch-1
Fix ImportButton not opening the modal
2017-07-21 14:10:31 +12:00
Damian Mooyman
6fd6a38949
BUG Fix unassigned nestedFrom
Fixes #7194
2017-07-21 08:58:19 +12:00
Damian Mooyman
e77c7fe04c Merge pull request #7188 from dhensby/pulls/4/fix-full-text-search-table-option
FIX FulltextSearchable  DB engine not set correctly
2017-07-20 12:27:30 +12:00
Loz Calver
c41c0a957b Merge pull request #7163 from sachajudd/pulls/4.0/debugview-info-color
NEW add web accessible colours to web view dev/build
2017-07-19 15:01:36 +01:00
Daniel Hensby
8aeec92087
FIX FulltextSearchable DB engine not set correctly 2017-07-19 12:28:15 +01:00
Daniel Hensby
d7095c2213
Merge branch '3' into 4 2017-07-18 14:19:16 +01:00
Daniel Hensby
d59e2dbe5b Merge pull request #7183 from robbieaverill/pulls/4.0/fix-log-in-as-someone-else
FIX Log in as someone else returns user back to login screen
2017-07-18 11:54:33 +01:00
Sacha Judd
f367a0aa62 NEW add web accessible colours to web view dev/build 2017-07-18 22:00:35 +12:00
Robbie Averill
ba9ad55274 FIX Base URL defaults to a slash in currentURL if not defined already 2017-07-18 21:56:21 +12:00
Robbie Averill
a5ca4ecb59 FIX Log in as someone else returns user back to login screen 2017-07-18 17:15:58 +12:00
Damian Mooyman
ed0ed89865 Merge pull request #7055 from robbieaverill/pulls/4.0/polymorphic-has-one-indexes
NEW Ensure polymorphic has_one fields are indexed
2017-07-18 16:39:45 +12:00
Robbie Averill
fb18e441a7 DBIndexable::getIndexSpecs is responsible for returning a DBFields full indexable spec 2017-07-18 15:03:56 +12:00
Saophalkun Ponlu
c2841b6d64 Enhancement Remove "Remove link" button from the editor's main toolbar
Fix behat for selecting link should focus on field
2017-07-18 13:11:27 +12:00
Damian Mooyman
de7b746094 Merge pull request #7180 from robbieaverill/pulls/4.0/remove-config-update-use
Use merge and set instead of update for config calls
2017-07-18 09:16:20 +12:00
Daniel Hensby
be7b2d4970 Merge pull request #7179 from robbieaverill/pulls/4.0/is-cli-for-phpdbg
FIX Ensure phpdbg calls are registered by SilverStripe core as a CLI call
2017-07-17 14:26:39 +01:00
Robbie Averill
da4e46e4de FIX Use merge and set instead of update for config calls 2017-07-17 17:59:40 +12:00
Robbie Averill
ea4181166f FIX Ensure phpdbg calls are registered by SilverStripe core as a CLI call 2017-07-17 16:56:01 +12:00
Robbie Averill
bd5782adca NEW Allow index type to be configured per DBField instance 2017-07-17 14:36:47 +12:00
Robbie Averill
c9c4390619 NEW Ensure polymorphic has_one fields are indexed
* Add tests for config based indexing on composite DBFields
* Allow fields to have "indexed" option passed via field spec
2017-07-17 14:36:29 +12:00
Robbie Averill
1a38feff22 FIX Version provider uses early bound config getter, move LeftAndMain config to admin module 2017-07-16 16:49:10 +12:00
Daniel Hensby
7fd316d405
Merge branch 3 into 4 2017-07-15 13:20:37 +01:00
Daniel Hensby
be0e16d648 Merge pull request #7170 from robbieaverill/pulls/4.0/ignore-exceptions-on-killing-testdb
FIX Ignore exceptions thrown when deleting test databases
2017-07-14 14:53:51 +01:00
Loz Calver
aafd2a573d Update Convert::memstring2bytes() logic 2017-07-14 09:16:05 +01:00
Damian Mooyman
3a7f9e8eb5 Merge pull request #7167 from open-sausages/pulls/4.0/tree-search-in-forest
API TreeDropdown tree parameter
2017-07-14 16:23:30 +12:00
Simon Erkelens
3e97b99e22 [BUG] Fix issues with multiple authenticators for a single task (#7149)
Using multiple 2FA authenticators, logging out, resetting password etc. proved to be handled wrong.
Example scenario:
The result is an error, because the `renderWrappedController` was called, despite the responses being a set of either array with Content or Form, or a redirect action.

The default action should be followed and not try to render if there is nothing to render

Because the logout (or changepassword, or resetpassword, etc.) has already been handled, the first response is the default authenticator's response. This _could_ be a form (in case of logout without valid token), a content set (reset password) or a form (change password).

This edge case only happens when there are multiple authenticators supporting the requested method that is _not_ login.
2017-07-14 09:20:58 +12:00
Robbie Averill
b16896f22b FIX Ignore exceptions thrown when deleting test databases
This will prevent long runnings builds (e.g. code coverage) from failing when the test database connection is gone (MySQL server has gone away) by the time the shutdown handler runs.
2017-07-13 23:33:51 +12:00
Robbie Averill
823e49526f NEW Allow SSViewer and SSViewer_FromString to be injectable 2017-07-13 20:48:58 +12:00
Christopher Joe
ccda816f90 API added flatList argument for generating the json tree list with a context string property 2017-07-13 17:04:35 +12:00
Damian Mooyman
5fcd7d084f
BUG Fix registered shutdown function not handling responsibility for outputting redirection response 2017-07-13 15:32:39 +12:00
Aaron Carlino
2b266276c2 API Implement new module sorting pattern 2017-07-13 10:27:27 +12:00
Daniel Hensby
b2831b809c Merge pull request #7133 from kinglozzer/cache-classname
Cache ClassInfo::class_name() calls
2017-07-10 13:23:45 +01:00
Damian Mooyman
85359ad59e
BUG Ensure that installer can create an initial admin account
Fixes #7124
2017-07-06 13:30:04 +12:00
Loz Calver
e3e16fe835 Cache ClassInfo::class_name() calls 2017-07-05 15:15:08 +01:00
Daniel Hensby
aafa054cf7 Merge pull request #7129 from mfendeksilverstripe/master
Limited nodes with too many children are no longer accessible
2017-07-05 12:37:26 +01:00
Daniel Hensby
2c5e237a93
Merge pull request #7103 from dnadesign/fix-numericfield-null 2017-07-05 11:45:45 +01:00
Daniel Hensby
2f551c91d7 Merge pull request #6922 from kinglozzer/debugview-styles
Update DebugView styles
2017-07-05 11:35:04 +01:00
Loz Calver
713b01ebc7 Update DebugView styles 2017-07-05 09:14:26 +01:00
Aaron Carlino
c836a2e2d2 BUGFIX: Module resource regex does not allow ports 2017-07-05 13:26:30 +12:00
Mojmir Fendek
3f2d217a45 Limited nodes that have more children than allowed limit are no longer accessible to the user. 2017-07-05 11:34:24 +12:00
John Milmine
f14e6bae2c fix numeric field for null values 2017-07-05 07:35:13 +12:00
Daniel Hensby
64005bff91 Merge pull request #6440 from open-sausages/pulls/4.0/json-detection
ENHANCEMENT: Debug class emits plain text for application/json requests
2017-07-04 13:42:42 +01:00
Damian Mooyman
ed26b251c8
ENHANCEMENT: Better output type detection for debugging 2017-07-04 17:33:49 +12:00
Damian Mooyman
4b23205838
Fix unnamespaced i18n keys
Fixes https://github.com/silverstripe/silverstripe-framework/issues/6862
2017-07-04 14:18:47 +12:00
Damian Mooyman
f65e3627dc
BUG Implement or exclude all pending upgrader deltas 2017-07-03 12:21:47 +12:00
Damian Mooyman
92903d883e Allow editor themes to fall back safely 2017-07-03 10:38:50 +12:00
Aaron Carlino
cddaaf1444 Update TinyMCEConfig to use theme CSS 2017-07-03 10:38:50 +12:00
Daniel Hensby
c69a565b08 Merge pull request #7046 from andrewandante/FEAT/add_inGroup_to_Group
add inGroup(s) methods to Group
2017-06-30 16:38:55 +01:00
Andrew Aitken-Fincham
ab60a167e6 add inGroup(s) methods to Group 2017-06-30 12:47:37 +01:00
Damian Mooyman
3633947699
BUG Fix broken installer assets and session crash 2017-06-30 14:50:58 +12:00
Damian Mooyman
ee05c586b6 Merge pull request #7083 from sminnee/get-one-miss-null
FIX: DataObject::get_one() misses return null, not false
2017-06-30 13:08:20 +12:00
Aaron Carlino
ad9d4e6820 Pulls/4.0/shortcode namespacing (#7085)
* New shortcode providers, update config, docs

* Use new ImageShortcodeProvider

* Move tests

* New shortcodes namespace

* Move file and image shortcode registrations from framework to assets
2017-06-29 18:45:17 +12:00
Christopher Joe
061393a098 Fix enable ?flush rather than just ?flush=1 2017-06-29 16:13:38 +12:00
Daniel Hensby
30986b4ea3
[SS-2017-002] FIX Lock out users who dont exist in the DB 2017-06-29 13:58:55 +12:00
Sam Minnee
2c8790ca7d FIX: DataObject::get_one() misses return null, not false
Fixes https://github.com/silverstripe/silverstripe-framework/issues/5441
2017-06-29 13:51:52 +12:00
Daniel Hensby
e7df10dc52
Merge branch '3' 2017-06-28 18:59:08 +01:00
Damian Mooyman
b2f3b218a3
BUG Fix incorrect $database autoinit
BUG Fix missing $request in Installer bootstrapping
2017-06-28 17:59:16 +12:00
Damian Mooyman
8078ee08f2
BUG Fix folder urls getting mtime querystring appended 2017-06-28 16:59:41 +12:00
Sam Minnee
741166e369 API: ModulePath template global now takes any composer package name.
NEW: URL generation now handled by pluggable ResourceURLGenerator service.
NEW: Requirements::javascript() and Requirements::css() now support “vendor/package:resource” syntax.

These changes will make it easier to us to fully abstract:
 - file access from module location
 - file location from URL generation

API: ModulePath template global now takes any composer package name.
NEW: URL generation now handled by pluggable ResourceURLGenerator service.
NEW: Requirements::javascript() and Requirements::css() now support “vendor/package:resource” syntax.

These changes will make it easier to us to fully abstract:
 - file access from module location
 - file location from URL generation
2017-06-28 16:59:28 +12:00
Saophalkun Ponlu
288de2eb14 BUG Add flag on form whether to notify user when there's unsaved changes 2017-06-28 11:14:12 +12:00
Will Rossiter
ecb5d85de0 Support empty SS_DATABASE_PREFIX 2017-06-28 08:18:21 +12:00
Damian Mooyman
f699650b5f Update based on feedback 2017-06-27 13:32:39 +12:00
Damian Mooyman
d20ab50f9d API Stronger Injector service unregistration
BUG Fix up test regressions
FIX director references to request object
API Move all middlewares to common namespace
API Implement RequestHandlerMiddlewareAdapter
ENHANCEMENT Improve IP address parsing
Fix up PHPDoc / psr2 linting
BUG Fix property parsing in TrustedProxyMiddleware
BUG Fix Director::is_https()
2017-06-27 13:32:39 +12:00
Damian Mooyman
7aa67f856b Move files to middleware folder 2017-06-27 13:32:39 +12:00
Sam Minnee
67887febc5 fix - session now uses request 2017-06-27 13:32:39 +12:00
Sam Minnee
69fe166897 API: Director::handleRequest() is no longer static - use a Director service
NEW: Add HTMLMiddlewareAware trait to HTTPApplication, Director, and RequestHandler
NEW: Allow service specs to be passed to Director rules.

This refactor of the controller middlewares takes a service definition
approach rather than a static-method-and-config approach that Director
historically had.

The use of a trait for middleware means that the Middlewares array
property can be defined on RequestHandler, Director, and HTTPApplication
objects in the same way.
2017-06-27 13:32:39 +12:00
Sam Minnee
e92c63c545 API: Remove $sid argument of Session::start()
NEW: Pass HTTPRequest to session
NEW: Pass HTTPReuqest optionally to Director statics

The session handler now expects to operate on a specific
HTTPRequest object.
2017-06-27 13:32:39 +12:00
Sam Minnee
ccc86306b6 NEW: Add TrustedProxyMiddleware
API: SS_TRUSTED_PROXY_HOST_HEADER replace with middleware config
API: SS_TRUSTED_PROXY_PROTOCOL_HEADER replace with middleware config
API: SS_TRUSTED_PROXY_IP_HEADER replace with middleware config
API: Front-End-Https = “on” header no longer supported

This middleware replaces the TRUSTED_PROXY setting and shifts its
configuration out of the env vars and bootstrap and into the Director
flow.
2017-06-27 13:32:39 +12:00
Sam Minnee
c4d038f20d NEW: Add HTTPRequest::getScheme()/setScheme()
NEW: Add HTTPRequest::setIP()
API: Rely on HTTPRequestBuilder to set scheme and IP

These changes tidy up HTTPRequest making it a container for information
and removing special logic from it.

This makes it less feature-rich: it doesn’t contain trusted-proxy logic.
This will be able to provided by a middleware.

The new getScheme() method is designed to be closish to PSR-7’s
getUri()->getScheme() equivalent.

There are no more direct $_SERVER references in HTTPRequest.
2017-06-27 13:32:39 +12:00
Sam Minnee
4d89daac78 NEW: Register Injector::inst()->get(HTTPRequest)
HTTPRequest is provided as a service so that global references for
session, hostname, etc can be facilitated. It’s a bit of a hack and
should be avoided but we’re unlikely to scrub it completely from the
Silverstripe 4 code.
2017-06-27 13:32:39 +12:00
Sam Minnee
10866c0809 API: Replace Director::direct() with Director::handleRequest().
There was no longer any code in direct() and so I opted to expose the
handleRequest() method instead.
2017-06-27 13:32:39 +12:00
Sam Minnee
72a7655e95 NEW: Moved allowed-hosts checking to a middleware. 2017-06-27 13:32:39 +12:00
Sam Minnee
db080c0603 NEW: Move session activation to SessionMiddleware. 2017-06-27 13:32:39 +12:00
Sam Minnee
254204a3a6 NEW: Replace AuthenticationRequestFilter with AuthenticationMiddleware 2017-06-27 13:32:39 +12:00
Sam Minnee
e855622890 NEW: Replace FlushRequestFilter with FlushMiddleware 2017-06-27 13:32:39 +12:00
Sam Minnee
b30f410ea0 API: Deprecate RequestFilter.
NEW: Allow application of HTTPMiddleware to Director.

Director can now use the same HTTPMiddleware objects as the app object.
They can be applied either globally or pre-rule.
2017-06-27 13:32:39 +12:00
Sam Minnee
26b9bf11ed NEW: Allow “%$” prefix in Injector::get()
Injector::get() looks up services by name. In yaml config it can make
things clearer to prefix service names by %$, which is how they must
be prefixed when referencing nested services within service definitions.

This change means that any other system referencing services will
support an optional prefix without needing to specifically code support
in themselves.
2017-06-27 13:32:39 +12:00
Damian Mooyman
17c8e913bc Merge pull request #7053 from creative-commoners/pulls/4.0/restore-extension-constructor
NEW restored Extension::__construct()
2017-06-26 21:39:55 +12:00
Franco Springveldt
d3d426bdfc NEW restored Extension::__construct() 2017-06-26 17:34:43 +12:00
Sam Minnee
3c35d25a64 FIX: Allow DB::setConfig() in _config.php
This wasn’t working because the database was being validated before
_config.php was loaed.

This is how the installer sets config so this is an important fix.
2017-06-26 14:04:20 +12:00
Ingo Schommer
fa568e333e Fixed linting errors 2017-06-23 11:19:16 +12:00
Will Rossiter
ad54e7eb30 Fix ImportButton not opening the modal 2017-06-23 10:10:01 +12:00
Damian Mooyman
3873e4ba00 API Refactor bootstrap, request handling
See https://github.com/silverstripe/silverstripe-framework/pull/7037
and https://github.com/silverstripe/silverstripe-framework/issues/6681

Squashed commit of the following:

commit 8f65e56532
Author: Ingo Schommer <me@chillu.com>
Date:   Thu Jun 22 22:25:50 2017 +1200

    Fixed upgrade guide spelling

commit 76f95944fa
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Thu Jun 22 16:38:34 2017 +1200

    BUG Fix non-test class manifest including sapphiretest / functionaltest

commit 9379834cb4
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Thu Jun 22 15:50:47 2017 +1200

    BUG Fix nesting bug in Kernel

commit 188ce35d82
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Thu Jun 22 15:14:51 2017 +1200

    BUG fix db bootstrapping issues

commit 7ed4660e7a
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Thu Jun 22 14:49:07 2017 +1200

    BUG Fix issue in DetailedErrorFormatter

commit 738f50c497
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Thu Jun 22 11:49:19 2017 +1200

    Upgrading notes on mysite/_config.php

commit 6279d28e5e
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Thu Jun 22 11:43:28 2017 +1200

    Update developer documentation

commit 5c90d53a84
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Thu Jun 22 10:48:44 2017 +1200

    Update installer to not use global databaseConfig

commit f9b2ba4755
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Wed Jun 21 21:04:39 2017 +1200

    Fix behat issues

commit 5b59a912b6
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Wed Jun 21 17:07:11 2017 +1200

    Move HTTPApplication to SilverStripe\Control namespace

commit e2c4a18f63
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Wed Jun 21 16:29:03 2017 +1200

    More documentation
    Fix up remaining tests
    Refactor temp DB into TempDatabase class so it’s available outside of unit tests.

commit 5d235e64f3
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Wed Jun 21 12:13:15 2017 +1200

    API HTTPRequestBuilder::createFromEnvironment() now cleans up live globals
    BUG Fix issue with SSViewer
    Fix Security / View tests

commit d88d4ed4e4
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Tue Jun 20 16:39:43 2017 +1200

    API Refactor AppKernel into CoreKernel

commit f7946aec33
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Tue Jun 20 16:00:40 2017 +1200

    Docs and minor cleanup

commit 12bd31f936
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Tue Jun 20 15:34:34 2017 +1200

    API Remove OutputMiddleware
    API Move environment / global / ini management into Environment class
    API Move getTempFolder into TempFolder class
    API Implement HTTPRequestBuilder / CLIRequestBuilder
    BUG Restore SS_ALLOWED_HOSTS check in original location
    API CoreKernel now requires $basePath to be passed in
    API Refactor installer.php to use application to bootstrap
    API move memstring conversion globals to Convert
    BUG Fix error in CoreKernel nesting not un-nesting itself properly.

commit bba9791146
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Mon Jun 19 18:07:53 2017 +1200

    API Create HTTPMiddleware and standardise middleware for request handling

commit 2a10c2397b
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Mon Jun 19 17:42:42 2017 +1200

    Fixed ORM tests

commit d75a8d1d93
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Mon Jun 19 17:15:07 2017 +1200

    FIx i18n tests

commit 06364af3c3
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Mon Jun 19 16:59:34 2017 +1200

    Fix controller namespace
    Move states to sub namespace

commit 2a278e2953
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Mon Jun 19 12:49:45 2017 +1200

    Fix forms namespace

commit b65c21241b
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Thu Jun 15 18:56:48 2017 +1200

    Update API usages

commit d1d4375c95
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Thu Jun 15 18:41:44 2017 +1200

    API Refactor $flush into HTPPApplication
    API Enforce health check in Controller::pushCurrent()
    API Better global backup / restore
    Updated Director::test() to use new API

commit b220534f06
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Tue Jun 13 22:05:57 2017 +1200

    Move app nesting to a test state helper

commit 603704165c
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Tue Jun 13 21:46:04 2017 +1200

    Restore kernel stack to fix multi-level nesting

commit 2f6336a15b
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Tue Jun 13 17:23:21 2017 +1200

    API Implement kernel nesting

commit fc7188da7d
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Tue Jun 13 15:43:13 2017 +1200

    Fix core tests

commit a0ae723514
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Tue Jun 13 15:23:52 2017 +1200

    Fix manifest tests

commit ca03395251
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Tue Jun 13 15:00:00 2017 +1200

    API Move extension management into test state

commit c66d433977
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Tue Jun 13 14:10:59 2017 +1200

    API Refactor SapphireTest state management into SapphireTestState
    API Remove Injector::unregisterAllObjects()
    API Remove FakeController

commit f26ae75c6e
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Mon Jun 12 18:04:34 2017 +1200

    Implement basic CLI application object

commit 001d559662
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Mon Jun 12 17:39:38 2017 +1200

    Remove references to SapphireTest::is_running_test()
    Upgrade various code

commit de079c041d
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Wed Jun 7 18:07:33 2017 +1200

    API Implement APP object
    API Refactor of Session
2017-06-22 22:50:45 +12:00
Loz Calver
5d27dccd60 NEW: Add CSRF token to logout action 2017-06-21 15:42:13 +01:00
Damian Mooyman
306d801258 Merge pull request #6984 from dhensby/pulls/4/default-pdo
NEW DB Driver defaults to PDO
2017-06-18 21:27:32 +12:00
Chris Joe
8c91d48d3a Merge pull request #7033 from open-sausages/pulls/4.0/remove-parse-indexspec
FIX Remove reference to removed method parseIndexSpec
2017-06-16 16:40:51 +12:00
Chris Joe
102eaed36c Merge pull request #6722 from open-sausages/pulls/4.0/requirements-html-cleanup
Better HTML generation behaviour for Requirements_Backend
2017-06-16 13:52:06 +12:00
Damian Mooyman
64e802f795
API Move createTag to HTML class
ENHANCEMENT Better HTML generation behaviour for Requirements_Backend
2017-06-16 12:22:05 +12:00
Damian Mooyman
54879402ce
BUG Removed reserved / removed / invalid country codes
Fixes #6996
2017-06-16 11:38:00 +12:00
Damian Mooyman
957d238caa
FIX Remove reference to removed method parseIndexSpec
Fixes #6968
2017-06-16 11:20:52 +12:00
Damian Mooyman
0f90c5b63f ENHANCEMENT Update style of CMSLogin form 2017-06-15 18:13:14 +12:00
Damian Mooyman
024371c37e
API Change authentication ValidationResult handling to pass by-reference 2017-06-15 17:25:23 +12:00
Damian Mooyman
62d095305b
API Update DefaultAdmin services
API Improve validation of authentication process
2017-06-15 15:53:57 +12:00
Simon Erkelens
576eee72dc Remove DefaultAdmin things from Security and Member into the MemberAuthenticator, unifying and removing duplicate code. 2017-06-15 14:20:29 +12:00
Chris Joe
950b1dfec2 Merge pull request #7010 from flamerohr/pulls/4.0/no-path-to-follow
Enhancement show the path which threw the error
2017-06-12 10:36:46 +12:00
Damian Mooyman
0dcfa5fa9d FIX CMSSecurity doesn't have Authenticators assigned. 2017-06-12 10:10:34 +12:00
Christopher Joe
7178caf4a9 Enhancement show the path which threw the error 2017-06-12 10:08:12 +12:00
Simon Erkelens
3fe837dad7 Fix for CMS Authenticator. Should only apply to CMSSecurity 2017-06-10 14:47:53 +12:00
Simon Erkelens
5c4e55b60d It's not CascadeLogInTo anymore, it's CascadeInTo
I'm mildly surprised this didn't break. I changed it to CascadeInTo, as the logout action needs to cascade into the session as well.
2017-06-10 12:58:22 +12:00
Damian Mooyman
d89bd15330
Move authentication hooks to SapphireTest 2017-06-09 16:25:40 +12:00
Damian Mooyman
62753b3cb1
Cleanup and RequestFilter refactor 2017-06-09 15:07:35 +12:00
Simon Erkelens
5fce3308b4 Move LostPasswordHandler in to it's own class.
- Moved the Authenticators from statics to normal
- Moved MemberLoginForm methods to the getFormFields as they make more sense there
- Did some spring-cleaning on the LostPasswordHandler
- Removed the BuildResponse from ChangePasswordHandler after spring cleaning
2017-06-08 20:09:57 +12:00
Simon Erkelens
082db89550 Feedback from Damian.
- Move the success and message to a validationresult
- Fix tests for validationresult return
- We need to clear the session in Test logOut method
- Rename to MemberAuthenticator and CMSMemberAuthenticator for consistency.
- Unify all to getCurrentUser on Security
- ChangePasswordHandler removed from Security
- Update SapphireTest for CMS login/logout
- Get the Member ID correctly, if it's an object.
- Only enable "remember me" when it's allowed.
- Add flag to disable password logging
- Remove Subsites coupling, give it an extension hook to disable itself
- Change cascadeLogInTo to cascadeInTo for the logout method logic naming
- Docblocks
- Basicauth config
2017-06-08 17:50:20 +12:00
Simon Erkelens
2b26cafcff Separate out the log-out handling.
Repairing tests and regressions
Consistently use `Security::getCurrentUser()` and `Security::setCurrentUser()`
Fix for the logout handler to properly logout, some minor wording updates
Remove the login hashes for the member when logging out.
BasicAuth to use `HTTPRequest`
2017-06-07 21:11:58 +12:00
Sam Minnee
f9ea752bae NEW: Add AuthenticationHandler interface
NEW: Add IdentityStore for registering log-in / log-out data
NEW: Add AuthenticationRequestFilter for managing login
NEW: Add Security:setCurrentUser() / Security::getCurrentUser()
NEW: Add FunctionalTest::logOut()
2017-06-07 21:11:55 +12:00
Simon Erkelens
c4194f0ed2 CMS Login Handling
Move to canLogin in the authentication check. Protected isLockedOut

Enable login to be called with a different login service (CMSLogin), enabling CMS Log in. Seems the styling and/or output is still broken.

logOut could be managed from the Authenticator instead of the member
2017-06-07 21:11:54 +12:00
Sam Minnee
7af7e6719e API: Security.authenticators is now a map, not an array
Authenticators is now a map of keys -> service names. The key is used
in things such as URL segments. The “default_authenticator” value has
been replaced with the key “default” in this map, although in time a
default authenticator may not be needed.
IX: Refactor login() to avoid code duplication on single/multiple handlers
IX: Refactor LoginHandler to be more amenable to extension
IX: Fixed permissionFailure hack
his LoginHandler is expected to be the starting point for other
custom authenticators so it should be easier to repurpose components
`of it.
IX: Fix database-is-ready checks in tests.
IX: Fixed MemberAuthenticatorTest to match the new API
IX: Update security URLs in MemberTest
2017-06-07 21:11:53 +12:00
Sam Minnee
e226b67d06 Refactoring of authenticators
Further down the line, I'm only returning the `Member` on the doLogin, so it's possible for the Handler or Extending Handler to move to a second step.
Also cleaned up some minor typos I ran in to. Nothing major.

This solution works and is manually tested for now. Supports multiple login forms that end up in the correct handler. I haven't gotten past the handler yet, as I've yet to refactor my Yubiauth implementation.

FIX: Corrections to the multi-login-form support.

Importantly, the system provide a URL-space for each handler, e.g.
“Security/login/default” and “Security/login/other”. This is much
cleaner than identifying the active authenticator by a get parameter,
and means that the tabbed interface is only needed on the very first view.

Note that you can test this without a module simply by loading the
default authenticator twice:

SilverStripe\Security\Security:
  authenticators:
    default: SilverStripe\Security\MemberAuthenticator\Authenticator
    other: SilverStripe\Security\MemberAuthenticator\Authenticator

FIX: Refactor delegateToHandler / delegateToHandlers to have less
duplicated code.
2017-06-07 21:11:52 +12:00
Daniel Hensby
856aa79892 Merge pull request #6987 from open-sausages/pull/4.0/3239-consisten-fist-last-returns
Consistent return values for first and last methods
2017-06-06 16:59:04 +01:00
Damian Mooyman
8c0ced311f Merge pull request #6998 from AntonyThorpe/StrictFormMethodCheck
Updated Form.php & 04_Form_Security.md  - strictFormMethodCheck to true
2017-06-06 23:06:11 +12:00
Antony Thorpe
6348f2e3e8 Updated Form.php & 04_Form_Security.md
Changed the `strictFormMethodCheck` protected property from false to true to step out on the front foot with this security setting.  In the documentation under the title [Cross-Site Request Forgery](https://github.com/silverstripe/silverstripe-framework/blob/master/docs/en/02_Developer_Guides/09_Security/04_Secure_Coding.md#cross-site-request-forgery-csrf) it states, "it is also recommended to limit form submissions to the intended HTTP verb (mostly GET or POST) through [api:Form::setStrictFormMethodCheck()]."  The same advice is noted in [Form Security](c2292a4cc1/docs/en/02_Developer_Guides/03_Forms/04_Form_Security.md (strict-form-submission)).

Why not make this the default behaviour?  Is there a scenario where this would cause a problem?  Have manually tested in the CMS (alpha7) and is working fine.

Note: Original commit that establised the API Form::setStrictFormMethodCheck is 14c59be8.
2017-06-06 21:10:49 +12:00
Saophalkun Ponlu
e267d29b9a BUG Consistent return values for first and last methods 2017-06-06 17:22:55 +12:00
Christopher Joe
d12c986dd5
Fixes printing from crashing 2017-06-06 13:31:37 +12:00
Daniel Hensby
9a0e01d4a0
NEW DB Driver defaults to PDO 2017-06-01 11:00:35 +01:00
Daniel Hensby
11de4abe0a Merge pull request #6977 from andrewandante/FIX/move_dotenv_higher
move TRUSTED_PROXY below .env loader
2017-05-30 12:41:09 +01:00
Andrew Aitken-Fincham
8f44b8f0ba move trusted_proxy_ips below .env loader 2017-05-30 12:18:47 +01:00
Damian Mooyman
b27ef810d4 Merge pull request #6974 from colintucker/fix-csv-bulk-loader
Fixes a bug with split file names during CSV import
2017-05-30 16:18:06 +12:00
Damian Mooyman
e7d87add9f API Remove legacy HTMLEditor classes 2017-05-30 11:01:28 +12:00
Nick
acb74a8577 Fix $class variable from being clobbered
The $class variable gets overwritten in the function.

This causes error messages to be less helpful. For example if you setup a has_many but forget the has_one on the other side the error will look something like

`[Emergency] Uncaught Exception: No has_one found on class 'SomeObject', the has_many relation from 'SilverStripe\View\ViewableData' to 'SomeObject' requires a has_one on 'SomeObject'`

fixing this gives a more useful error, like

`[Emergency] Uncaught Exception: No has_one found on class 'SomeObject', the has_many relation from 'Page' to 'SomeObject' requires a has_one on 'SomeObject'`
2017-05-29 20:31:09 +12:00
Colin Tucker
db59e51c4a Fixes a bug with split file names during CSV import 2017-05-29 16:08:23 +10:00
Damian Mooyman
963d9197d3
API Ensure that all DataQuery joins are aliased based on relationship name 2017-05-26 13:38:58 +12:00
Daniel Hensby
893f19a5ea
DOCS Updating index definition examples 2017-05-25 23:29:12 +01:00
Daniel Hensby
3e556b5966
NEW Move index generation to DataObjectSchema and solidify index spec 2017-05-25 23:29:12 +01:00
Damian Mooyman
0cd40ca6e5
BUG Fix minor accessors of legacy ->class property 2017-05-25 11:55:12 +12:00
Damian Mooyman
29f450b1e1 Revert injector type hint to Injector 2017-05-25 11:06:48 +12:00
Damian Mooyman
906a4c444b
API Add streamable response object 2017-05-23 16:32:29 +12:00
Damian Mooyman
d15b9ee0b0 Response to feedback 2017-05-23 13:50:35 +12:00
Damian Mooyman
fba8e2c245 API Remove Object class
API DataObjectSchema::manyManyComponent() return array is now associative array
2017-05-23 13:50:35 +12:00
Damian Mooyman
7e2f8d1f2d Merge pull request #6951 from sminnee/fix-2494
FIX: Don’t assume posix_getpwuid is available.
2017-05-23 13:10:56 +12:00
Sam Minnee
09164e7e2a FIX: Better error checking for non-writable temp paths
Fixes https://github.com/silverstripe/silverstripe-framework/issues/1666
2017-05-23 10:06:48 +12:00
Sam Minnee
40d9bbfd69 FIX: Don’t assume posix_getpwuid is available.
Fixes https://github.com/silverstripe/silverstripe-framework/issues/2494

In Silverstripe 3.1, on some shared hosts the following bug can occur:
Warning: posix_getpwuid() has been disabled for security reasons
2017-05-23 10:00:36 +12:00
Damian Mooyman
7bc8172bc1 Merge pull request #6937 from caffeineinc/2930-checkboxfield-invalid-html
CheckboxField creates invalid HTML when required #2939
2017-05-22 13:44:58 +12:00
Ingo Schommer
a433e5f4a8 Find root modules with _config.php
When modules are installed as the webroot,
manifest generation should behave the same way as when they're in a subfolder.
Which means accepting the module folder both with a _config/ folder
and a _config.php file present.
2017-05-22 12:16:57 +12:00
Simon Gow
cdc03602ed CheckboxField creates invalid HTML when required #2939
- Updated CheckboxField, CheckboxSetField, DropdownField, OptionsetField
 to validate with HTML5 attributes & aria-required.

https://www.w3.org/TR/wai-aria/states_and_properties#aria-required
2017-05-22 12:15:28 +12:00
Damian Mooyman
2aa3b5d5fa Merge pull request #6934 from robbieaverill/pulls/4.0/consistent-instance-method
API Consistent use of inst() naming across framework
2017-05-22 11:57:20 +12:00
Damian Mooyman
80bff0d099 Merge pull request #6932 from mikenz/pulls/4.0/treedropdownfield-orphaned
Bugfix: Parent treedropdownfield for an orphaned page is broken
2017-05-22 10:53:33 +12:00
Damian Mooyman
4197090e11 Merge pull request #6940 from kinglozzer/randomgenerator
Only use random_bytes() for RandomGenerator (closes #6397)
2017-05-22 10:29:55 +12:00
Damian Mooyman
f35017479b Merge pull request #6933 from robbieaverill/pulls/4.0/table-name-on-dev-build
Change to show created table names instead of model names in dev/build
2017-05-20 23:10:19 +12:00
Robbie Averill
4408726b6b Change to show created table names instead of model names in dev/build 2017-05-20 16:09:49 +12:00
Loz Calver
e653e90997 Only use random_bytes() for RandomGenerator (closes #6397) 2017-05-19 11:18:56 +01:00
Robbie Averill
f2cbe86f03 Remove CustomMethods::createMethod and create_function implementations, replace with closures 2017-05-19 15:56:44 +12:00
Robbie Averill
ad43a82923 API Consistent use of inst() naming across framework 2017-05-19 14:38:06 +12:00
Ingo Schommer
100048da33 API PSR-11 compliance (fixes #6594) (#6931)
Note that our usage of `$asSingleton` in `get()` is fine. Quote from the PSR:

> Two successive calls to get with the same identifier SHOULD return the same value. However, depending on the implementor design and/or user configuration, different values might be returned, so user SHOULD NOT rely on getting the same value on 2 successive calls.
2017-05-19 13:45:07 +12:00
Mike Cochrane
31578d4771 Bugfix: Parent treedropdownfield for an orphaned page is broken 2017-05-19 12:15:36 +12:00
Daniel Hensby
db3e3d51fd Merge pull request #6928 from open-sausages/pulls/4.0/form-action-handler-regression
Process actions on Form subclasses
2017-05-18 12:09:28 +01:00
Ingo Schommer
adbf9d9f71 Process actions on Form subclasses
Regression introduced through https://github.com/silverstripe/silverstripe-framework/issues/6362.

Quote from the RFC:

```
Thus the order of action precedence becomes

action callback
action on the Form
action on the FormRequestHandler
action on any parent controller (if given)
```
2017-05-18 22:47:39 +12:00
Daniel Hensby
3495c0826e Cleanup SapphireTest and time related tests (#6898)
* Test databases now include timestamp for easier debugging

* Use classname::class instead of string literal classnames

* Remove DataObject::get_one() from SapphireTest

* More fixes to ICU DB inconsitency for time formatting

* Correctly restore PHPUnits error handler
2017-05-18 22:01:55 +12:00
Damian Mooyman
8ed675d29b Merge pull request #4542 from patricknelson/issue-4417-validator-remove-validation-master
FIX for #4417: Ensuring ->removeValidation() is defined on instances of Validator. Setup new API for enabling/disabling validation. Documentation and better type handling.
2017-05-18 09:27:48 +12:00
Nick
dddf88278c Fix a typo in comment
Typo
2017-05-17 22:09:07 +12:00
Loz Calver
471166c15e Merge pull request #6169 from open-sausages/pulls/4.0/duplicate-manymany-option
API Duplication of many_many relationships now defaults to many_many only
2017-05-17 09:31:09 +01:00
Christopher Joe
0534a5ec0c Fix TreeDowndropField copying 2017-05-17 16:52:21 +12:00
Christopher Joe
287ad35f0d Fix change API to hasEmptyDefault() to be inline with SingleSelectField 2017-05-17 10:13:54 +12:00
Christopher Joe
3927e7e248 Fix added cache key for TreeDropdownField cache 2017-05-17 10:13:54 +12:00
Christopher Joe
6869e450a0 Enhancement added customisable emptyTitle and a showRootOption property in TreeDropdownField 2017-05-17 10:13:54 +12:00
Patrick Nelson
5fa3c85280
FIX for #4417: Ensuring ->removeValidation() is defined on instances of Validator. Setup new API for enabling/disabling validation. Documentation and better type handling. 2017-05-16 12:58:00 +01:00
Damian Mooyman
f5f6fdce12
API Duplication of many_many relationships now defaults to many_many only
Fixes https://github.com/silverstripe/silverstripe-cms/issues/1453
2017-05-16 23:26:39 +12:00
Damian Mooyman
259f957ce8 API Rename services to match FQN of interface / classes 2017-05-16 14:15:49 +12:00
Saophalkun Ponlu
1ec7c4e523 Fix lint error 2017-05-16 11:53:23 +12:00
Saophalkun Ponlu
a975b88661 Pass autofocus flag to front-end 2017-05-16 11:53:23 +12:00
Nick
eb0da138aa Correct a typo when css/js file doesn't exist
Typo
2017-05-14 07:37:14 +12:00
Daniel Hensby
e741af9127
Merge branch 'pull/6905' 2017-05-12 12:21:02 +01:00
Ralph Slooten
43a122cc36 Fix for meta closing tags
Prevent html errors when FormField::create_tag('meta') is called from $MetaTags() so
```
<meta name="generator" content="SilverStripe - http://silverstripe.org"></meta>
```
becomes
```
<meta name="generator" content="SilverStripe - http://silverstripe.org" />
```

Add all void elements to list
2017-05-12 08:49:15 +12:00
Daniel Hensby
fac2bab785 Merge pull request #6901 from mikenz/patch-12
BUGFIX: Prevent infinite loop
2017-05-11 12:00:28 +01:00
Daniel Hensby
dcf23ac0e0 Merge pull request #6786 from mikenz/patch-10
Support booleans in SilverStripe\View\Parsers\Diff::getHTMLChunks
2017-05-11 11:58:31 +01:00
Damian Mooyman
0b70b008b3 API Implement InheritedPermission calculator (#6877)
* API Implement InheritedPermission calculator

* API Rename RootPermissions to DefaultPermissionChecker
API Refactor inherited permission fields into InheritedPermissionExtension
API Introduce PermissionChecker interface
2017-05-11 21:07:27 +12:00
Mike Cochrane
9d77537061 Support booleans in SilverStripe\View\Parsers\Diff::getHTMLChunks
Convert booleans to strings ("true", "false") so they can be diff'd for display.
2017-05-11 15:58:17 +12:00
Mike Cochrane
4373bdb991 BUGFIX: Prevent infinite loop
Prevent infinite loop when a < is present without a matching >
2017-05-11 15:52:35 +12:00
Ingo Schommer
36214343f0 Merge pull request #6902 from open-sausages/pulls/4/remove-jsmin
Pulls/4/remove jsmin
2017-05-11 11:54:14 +12:00
Aaron Carlino
11a5918810 Deprecate minifier API 2017-05-11 11:52:31 +12:00
Aaron Carlino
5b46461879 Remove JSMinifier implementation 2017-05-11 10:40:00 +12:00
Aaron Carlino
7fa47e234f New API for minified files using injectable service 2017-05-11 10:14:16 +12:00
Christopher Joe
edcb220e4a Enhancement add EmailLink form factory server-side 2017-05-11 09:57:55 +12:00
Christopher Joe
c58dc97d39 Fix optional $id param because of how methodSchema passes a parameter 2017-05-11 09:57:55 +12:00
Christopher Joe
2ee0d99806 Enhancement switch FormFactories to use RequestHandler instead of Controller 2017-05-11 09:57:55 +12:00
Christopher Joe
403f4db14d Fix change titles to return schema values in schema
Enhancement Add EditorExternalLink call for toolbar
2017-05-11 09:57:55 +12:00
Aaron Carlino
4af71b9ed7 Pulls/4/remove reliance on admin dir (#6876)
* Stop relying on external constants

* Revise getTinyMCEPath method to throw exception when no path can be computed

* Throw exception on no gzip, better admin module check
2017-05-10 13:18:44 +12:00
Saophalkun Ponlu
fd51f35bc2 Update tests 2017-05-09 16:52:32 +12:00
Saophalkun Ponlu
97dac7028c De-couple schema type and type attribute 2017-05-09 16:50:33 +12:00
Sam Minnée
33119a1f36 Merge branch 'master' into pulls/4.0/remove-deprecated-methods 2017-05-09 15:31:53 +12:00
Ingo Schommer
670dfd2ea0 Changed deprecation of SSViewer::set_theme()
We introduced SSViewer::set_themes() in 4.0 only,
and its quite a commonly used method
2017-05-09 11:38:35 +12:00
Ingo Schommer
5784a7d2d7 API Removed deprecated Security::set_login_recording() 2017-05-09 11:38:35 +12:00
Ingo Schommer
2a7c76e9e9 API Removed deprecated DatabaseAdmin#clearAllData() 2017-05-09 11:38:35 +12:00
Ingo Schommer
81e5c7ac40 API Removed deprecated Session::set_config() 2017-05-09 11:38:35 +12:00
Ingo Schommer
1d438d3fb5 API Remove deprecated FormAction::createTag() 2017-05-09 11:38:35 +12:00
Ingo Schommer
75b7e19066 API Remove deprecated SS_HOST 2017-05-09 11:38:35 +12:00
Ingo Schommer
bbf15ab9f1 Allow type override in FormAction 2017-05-09 11:16:41 +12:00
Ingo Schommer
0d9b383631 API Removed legacy form fields (fixes #6099) 2017-05-09 11:16:41 +12:00
Aaron Carlino
afd1575267 ENHANCEMENT GridField passes in context for canCreate 2017-05-09 09:15:09 +12:00
Aaron Carlino
c99ed2d262 Reorganise i18n keys 2017-05-08 23:34:39 +12:00
Damian Mooyman
8f43bc128b Merge pull request #6348 from open-sausages/pulls/4.0/test-cleanup-db
ENHANCEMENT Prevent test DBs persisting after testing
2017-05-08 23:14:53 +12:00
Damian Mooyman
d2c6c539d2 Merge pull request #6872 from sminnee/fixture-by-table
NEW: Allow SapphireTest::objFromFixture() to accept either table or class
2017-05-05 15:14:01 +12:00
Damian Mooyman
942c0257b7 API Upgrade to behat 3 2017-05-05 14:32:07 +12:00
Sam Minnee
1691e90fbd NEW: Allow SapphireTest::objFromFixture() to accept either table or class
Right now SapphireTest::objFromFixture() requires a class as the first
argument. This is fine when your fixture file uses classes as the keys,
but if populating a fixture via tables, objFromFixture() won’t work.

This patch lets you specify either the table name or the class name as
the key.

The benefit here is that you can build fixtures as raw inserts, which is
substantially quicker, and is likely to be a useful tool in building
more efficient test suites.
2017-05-05 10:53:49 +12:00
Damian Mooyman
8b9f41d4f4 BUG Fix ApcuCache and MemCache namespace 2017-05-04 12:17:33 +12:00
Damian Mooyman
0c52ea067c BUG Fix incorrect text collection of __CLASS__ following an Name::class constant (#6868) 2017-05-04 10:19:05 +12:00
Damian Mooyman
edcb46bd3a Merge pull request #6836 from sminnee/cli-error-fix
FIX: Show detailed errors on CLI for live environments
2017-05-03 15:49:09 +12:00
Sam Minnee
4c772c80c3 FIX: Show detailed errors on CLI for live environments
API: Add HTTPOutputHandler::setCLIFormatter

Fixes https://github.com/silverstripe/silverstripe-framework/issues/6835

This provides detailed errors (but not warnings or notices) in CLI calls
on live environments.

It does this by adding a 2nd argument to our output handler,
CliFormatter. This formatter will be used when Director::is_cli() is
true.
2017-05-01 15:28:48 +12:00
Damian Mooyman
12fc690d80 Merge pull request #6850 from robbieaverill/bugfix/i18n-lang-region-same
FIX IntlLocales::validate when lang and region are the same e.g. de_DE
2017-05-01 08:41:44 +12:00
Damian Mooyman
3f9528a073 Merge pull request #6849 from robbieaverill/bugfix/extension-arguments-in-sapphiretest
FIX Regression from 3.x: allow $required_extensions to have arguments
2017-04-28 20:29:11 +12:00
Robbie Averill
3a372a1f41 FIX IntlLocales::validate when lang and region are the same e.g. de_DE 2017-04-28 17:19:27 +12:00
Damian Mooyman
699d5d6a42 Fix i18nTextCollector handling of special string characters 2017-04-28 14:59:42 +12:00
Uncle Cheese
d51c4891e2 New namespaced i18n keys 2017-04-28 14:59:42 +12:00
Uncle Cheese
494cbd1875 Ran upgrader for lang files 2017-04-28 14:59:42 +12:00
Ingo Schommer
22f232ed4d Mark up <time> in validation errors
Allow better localisation of values in JS
2017-04-27 21:44:52 +12:00
Robbie Averill
c95c6c466f FIX Regression from 3.x: allow $required_extensions to have arguments 2017-04-27 17:59:52 +12:00
Ingo Schommer
cbe534c675 Fixed component capitalisation 2017-04-27 15:36:18 +12:00
Ingo Schommer
94b49e3e28 Removed unused field 2017-04-27 15:36:11 +12:00
Ingo Schommer
60706c8efd Store $value in ISO and server timezone consistently, fix min/max timezone handling 2017-04-27 14:59:11 +12:00
Ingo Schommer
628fd216ad PHPDoc fixes 2017-04-27 11:56:23 +12:00
Ingo Schommer
f01a20d5c4 Only used normalised ISO on HTML5 2017-04-27 11:56:18 +12:00
Ingo Schommer
de8abe1167 API rename 2017-04-27 11:53:43 +12:00
Ingo Schommer
b852a76334 Consistent schema keys 2017-04-27 11:47:04 +12:00
Ingo Schommer
14b3468eee Removed setting format in getter
That’s already handled in getFormatter()
2017-04-27 11:09:59 +12:00
Ingo Schommer
655b047d80 Removed superfluous methods 2017-04-27 11:09:43 +12:00
Ingo Schommer
d3afa0c3b5 Remove array check since setSubmittedValue() no longer supports it 2017-04-27 10:59:44 +12:00
Ingo Schommer
958736502a Removed “T” str_replace, more comments 2017-04-27 10:32:22 +12:00
Ingo Schommer
1ec2abe75f Fixed timezone and normalised ISO handling
A few observations:
- ISO says “T” is optional (https://en.wikipedia.org/wiki/ISO_8601#cite_note-21),
- WHATWG says in the HTML5 spec that it’s optional (https://html.spec.whatwg.org/multipage/infrastructure.html#local-dates-and-times)
- W3C says it’s reqiured in 1997 (https://www.w3.org/TR/NOTE-datetime), but then later says it’s optional in its HTML5 spec (https://www.w3.org/TR/html5/infrastructure.html#floating-dates-and-times).
- Chrome doesn’t parse values with whitespace separators (requires "T")
- DataObject DBDatetime values and database columns use whitespace separators (and will have many devs relying on this format)
- MySQL only supports whitespace separators (https://dev.mysql.com/doc/refman/5.7/en/datetime.html)
- SQLite can parse both ways (https://sqlite.org/lang_datefunc.html)

So the goal here is to retain ORM/database compatibility with 3.x (whitespace separator),
while exposing "T" separators to the browser in HTML5 mode.

Regarding timezones, this fixes a regression where setValue() would not actually
apply the timezone (last $value assignment is ineffective now that sub fields are removed).
2017-04-26 22:55:29 +12:00
Ingo Schommer
e97783b057 Better second handling 2017-04-26 22:45:08 +12:00
Ingo Schommer
d2132e85db More specific localisations 2017-04-26 22:45:07 +12:00
Saophalkun Ponlu
dba1f61f13 Fix tests related to date time 2017-04-26 22:45:07 +12:00
Saophalkun Ponlu
9d7eef7cf3 Fix datetime field validation for the refactor 2017-04-26 22:45:07 +12:00
Saophalkun Ponlu
4a70662940 Pass html5 flag to front-end 2017-04-26 22:45:07 +12:00
Saophalkun Ponlu
9f8fe88eea Refactor DateTimeField not to use DateField and TimeField 2017-04-26 22:45:07 +12:00
Saophalkun Ponlu
81a21f68cd Add 'lang' attribute to front-end date field schema 2017-04-26 22:45:06 +12:00
Damian Mooyman
0791b387b8 API Update serialisation of JSON tree data
Update TreeDropdownField schema
2017-04-26 17:30:10 +12:00
Saophalkun Ponlu
68041f4265 Wrap selection group input in label 2017-04-26 13:54:06 +12:00
Ingo Schommer
5a7c6d4f60 Allow —no-dev install via a PHPUnit shim
Partially reinstates the 3.x style PhpUnitWrapper which was removed in d1af214ef5.
While we no longer need the full wrapper, the part which creates a fake class is still useful.

The preferred alternative would be to remove any references to SapphireTest from non-dev files,
which mostly applies to SapphireTest::is_running_test(). This should be solved in a larger refactor
of SapphireTest into optional traits and more fine grained functionality.
2017-04-24 15:24:02 +12:00
Simon Erkelens
ff3ad6eb6b Use Config for authenticator settings 2017-04-22 14:48:56 +12:00
Damian Mooyman
c21f71405f Merge pull request #6823 from open-sausages/pulls/4.0/remove-TeamCityListener
Removed TeamCityListener
2017-04-21 15:56:20 +12:00
Ingo Schommer
0a55ff9f8c API Remove SapphireTestReporter and CliTestReporter
Was missed from the removal of PHPUnitWrapper:
a16588aac3

Original reason for this: Don't fail dev/build without phpunit
When you install a SilverStripe project with "composer install --no-dev",
the PHPUnit dependency gets skipped. Which means the PHPUnit_Framework_TestListener
interface doesn't exist. The SilverStripe Classloader might still include
SapphireTestReporter which relies on this interface, which then breaks execution.

SS3 fixed this by NOT defining the class in the first place.
This has been removed in 2fdc96a0de (diff-82b3f89e8e5ae090c93e9c3a2ba8aa36L3),
as part of a PHPUnit version upgrade - but without an apparent fix to replace this.
2017-04-21 15:11:59 +12:00
Ingo Schommer
60e4c011de Removed TeamCityListener 2017-04-21 12:13:13 +12:00
Damian Mooyman
2548bfba1e API Replace SS_HOST with SS_BASE_URL
API Remove Director::$test_servers / $dev_servers
API Remove MODULES_PATH / MODULES_DIR constants
ENHANCEMENT Injector backtick syntax now supports environment variables as well as constants
Fixes #6588
2017-04-20 22:28:57 +12:00
Simon Erkelens
f862ce71d5 Pass the AuthenticationMethod to the controller
Resolves issue #6788
The AuthenticationMethed is passed in via hidden field as per usual, but due to changes, the fallback authenticator was always the MemberAuthenticator and the actual passed in authenticator was defaulting to an empty string.
This causes an issue when there are multiple authenticators and the default authenticator is _not_ in the allowed authenticators, but is still the default. It caused the getAuthenticator method to return the default MemberAuthenticator to be returned, despite it being disabled.
A second issue around multiple authenticators, was the template using a no-longer used method `getAuthenticatorName`. This method returned a null on the default MemberLoginForm (as nothing was set), causing a Warning.
Because the getAuthenticator and getAuthenticatorName are no longer in
use, I've opted to replace these with a translatable string
`getAuthenticatorName`, to
display the title of the form on the tabs, as per the tabset on
Security_MultiAuthenticatorLogin template.
2017-04-18 16:58:15 +12:00
Ingo Schommer
ab54c8e090 Merge pull request #6792 from open-sausages/pulls/4.0/tree-dropdown-react
API major Hierarchy refactor
2017-04-18 08:41:40 +12:00
Simon Erkelens
3f1f9d04b7 Improve the default LoginForm
- has the fields and actions extracted to a separate method, so it's more easily overridable
- Moved the global variable $_REQUEST to getting the info from the controller
- Updated string variables to `::class`
- Updated RequiredFields to be set in the YML, so it's overridable/updatable from either Config or code
2017-04-16 19:05:29 +12:00
Damian Mooyman
136b67f597
API Major refactor of Hierarchy into MarkedSet 2017-04-13 16:27:13 +12:00
Damian Mooyman
f38ae1d837 Cleanup phpdocs on DatetimeField 2017-04-13 14:00:30 +12:00
Damian Mooyman
f2768c85b1 API Enable namespaced-localisation keys in templates
BUG Fix whitespaces in SSTemplateParser.peg
2017-04-11 18:07:53 +12:00
Damian Mooyman
e61257c27b API Update embed/embed to 3.0
API Better shortcode generation for embed shortcodes
2017-04-04 10:20:08 +12:00
Damian Mooyman
9be22701fd API exists() no longer true for nullifyIfEmpty if empty string
Optimise DBString::exists() to skip shortcodes
2017-04-04 10:20:08 +12:00
Christopher Joe
2c5e482de0 Add LabelField component definition 2017-04-04 10:20:08 +12:00
Ingo Schommer
e3fbd1dcac Fixed coding conventions 2017-04-03 20:54:25 +12:00
Ingo Schommer
3b94d14e42 MERGE 2017-04-03 12:11:21 +12:00
Ingo Schommer
326aa37ea4 API HTML5 date/time fields, remove member prefs (fixes #6626) 2017-03-31 15:21:47 +13:00
Ingo Schommer
ac6d4f3038 Move DateField->placeholders to subclass
It’s only used there
2017-03-31 14:15:21 +13:00
Mike Cochrane
227ba8dcc4 FIX illegal_extensions in unit tests not being removed 2017-03-30 13:54:53 +13:00
Sam Minnee
9cdcb339e9 FIX: Fix test breakage in most recent change. 2017-03-30 11:55:43 +13:00
Daniel Hensby
ac075eaf0b Remove TestListener and rely on PHPUnits APIs 2017-03-30 11:46:58 +13:00
Damian Mooyman
ede549a6ed FIX illegalExtensions are optional, requiredExtensions are mandatory with useful error messages. 2017-03-29 11:08:07 +13:00
Damian Mooyman
8c486da3df Merge pull request #6746 from sminnee/underscore-backslash-fix
FIX: Don't mistake \ for _ in dev/build
2017-03-29 10:55:32 +13:00
Damian Mooyman
c2fbb68408 Merge pull request #6748 from robbieaverill/bugfix/config-api-in-fulltextsearchable
FIX Update config API reference in FulltextSearchable and use namespaced imports for class names
2017-03-29 10:51:05 +13:00
Ingo Schommer
ac9d645e4e Root-level module support in Module->getResourcePath()
See https://github.com/silverstripe/silverstripe-framework/pull/6733
2017-03-29 10:19:31 +13:00
Robbie Averill
bd14f6db9e FIX Update config API reference in FulltextSearchable and use namespaced imports for class names 2017-03-29 00:20:39 +13:00
Sam Minnee
59a5eb4308 FIX: Don't mistake \ for _ in dev/build
The query SHOW TABLES LIKE 'some_thing' will match the table some\thing.

This causes issues when the namespace separator has changed.

The fix is to escape the _s in this LIKE statement, as done here.
2017-03-28 18:14:32 +13:00
Ingo Schommer
e08948480c Remove File dependency from Module class 2017-03-28 17:26:23 +13:00
Ingo Schommer
556c9a537e Module->getResourcePath()
Based on Sam's feedback in https://github.com/silverstripe/silverstripe-framework/pull/6733
2017-03-28 17:22:30 +13:00
Damian Mooyman
874c6ccdd4 API Add experimental getResource() to Module 2017-03-28 14:13:47 +13:00
Damian Mooyman
ac3a9c9e6e API Split out SilverStripe\ORM\Versioned into new module 2017-03-27 11:03:39 +13:00
Daniel Hensby
0410b4c35e
Respect PHPUnit method visibility 2017-03-24 16:23:03 +13:00
Damian Mooyman
1186f07830 API Use mysql-safe table namespace separator 2017-03-24 14:17:30 +13:00
Sam Minnée
d91c6659be Merge pull request #6723 from open-sausages/pulls/4.0/assets-module
API Split SilverStripe\Assets into separate module
2017-03-23 09:21:27 +13:00
Damian Mooyman
dae6d5902f API Split SilverStripe\Assets into separate module 2017-03-21 11:12:51 +13:00
Damian Mooyman
e4c68bc2bf
Fix and test pluralisation usages 2017-03-21 10:49:30 +13:00
Sam Minnée
cfa6a36697 Merge pull request #6706 from open-sausages/pulls/4.0/manifest-cache
API Build new ManifestCache based on PSR-16 SimpleCache
2017-03-21 10:29:03 +13:00
Damian Mooyman
3a0099161b API Remove Log class 2017-03-21 09:43:49 +13:00
Damian Mooyman
54ba08a306 API Replace ManifestCache with ManifestCacheFactory
API Remove lots of deprecated module code from ClassManifest
2017-03-21 09:43:48 +13:00
Christopher Joe
6dd236e9b1 remove spaces in elseif statements 2017-03-20 15:39:53 +13:00
Daniel Hensby
3e17dd3201
Move to template PHP syntax for installer 2017-03-16 16:09:46 +13:00
Daniel Hensby
53b98284fe
FIX Remove undefined var from installer 2017-03-16 16:09:33 +13:00
Damian Mooyman
ce14060913 API Apply default logger to all caches
API Rename ‘Logger’ service name to ‘Psr\Log\LoggerInterface’
API DefaultCacheFactory constructor now takes an array of default arguments
2017-03-15 15:31:24 +13:00
Damian Mooyman
8f0f9fa119 API Apply logging to config cache 2017-03-15 15:31:24 +13:00
Ingo Schommer
6b43d79f3e Removed confusing src/ dir 2017-03-15 11:59:13 +13:00
Ingo Schommer
f6a4a059fa Moved frontend code from dist/ to src/
We no longer compile it, so it’s technically the “source” now
2017-03-15 11:07:17 +13:00
Ingo Schommer
02bbc05816 Remove unnecessary frontend build tooling
We’re loading 60MB of node_modules to compile 600 LOC of SCSS files down to CSS.
These can be maintained as plain CSS for now, at least until we redesign installer (at which point we’ll likely split it out into a separate module)
2017-03-15 11:03:04 +13:00
Damian Mooyman
9f953770f5 API Move CMSPreviewable to framework module
Remove or soft-link dependency on admin module
2017-03-14 10:22:45 +13:00
Damian Mooyman
810dcab748 Simplify config for admin removal 2017-03-14 10:22:45 +13:00
Damian Mooyman
a07a9bffc4
API Add FormRequestHandler::forTemplate() for backwards compatibility 2017-03-13 12:51:37 +13:00
Damian Mooyman
0c41a97a8b API Refactor Form request handling into FormRequestHandler
API Add HasRequestHandler interface
API Refactor Link() and url handling behaviour from Controller into RequestHandler
API RequestHandler classes now must define url_segment to have a default Link()
API Clean up redirectBack()
2017-03-10 15:04:33 +13:00
Christopher Joe
466c50b302 API Switch from npm4 and shrinkwrap to npm6 and yarn 2017-03-10 11:38:26 +13:00
Damian Mooyman
63e3fbdccb Remove default scaffold field for DBFile 2017-03-09 13:33:00 +13:00
Christopher Joe
50deb17763 API remove UploadField, AssetField and associated files
Fixes #6481
2017-03-09 10:16:46 +13:00
Daniel Hensby
9c9443602d
FIX Installer no longer causes recursion in yml config 2017-03-07 11:39:11 +00:00
Daniel Hensby
cdb4a86e1c
PHPParser optimisations and update 2017-03-06 10:35:25 +00:00
Loz Calver
f8e3443c89
Initial PHP Parser implementation 2017-03-06 10:19:00 +00:00
Daniel Hensby
f225b83e2b
Merge branch '3' 2017-03-03 15:55:22 +00:00
Daniel Hensby
d01da57da1 Merge pull request #6674 from oilee80/master
Fix for APCu cache otherwise you get 'Cache key must be string, "bool…
2017-03-03 12:17:06 +00:00
Lee Bradley
263e747d07 Fix for APCu cache otherwise you get 'Cache key must be string, "boolean" given'
Also corrects parameter variable name
2017-03-03 10:35:01 +00:00
Damian Mooyman
58f336928a Merge pull request #6672 from andrewandante/FIX/apcu-cache-error
FIX/apcu cache errors
2017-03-03 15:37:50 +13:00
Andrew Aitken-Fincham
abe967f235 FIX/pass arguments directly (not in array) 2017-03-02 11:12:06 +00:00
Damian Mooyman
b6d9b34ce4
BUG Mark $instance as internal to prevent being saved to config 2017-03-02 17:19:44 +13:00
Damian Mooyman
6ed98a3a94
BUG Prevent obsolete class cache breaking autoload
Remove hard-coded class paths
2017-03-01 10:06:15 +13:00
Damian Mooyman
e74556b322 API Protect Director::get_environment_type() from invoking 2017-02-28 10:49:29 +13:00
Damian Mooyman
3983b4d1b1 Fix cache used in ModuleManifest 2017-02-27 16:54:01 +13:00
Damian Mooyman
c452d5f6cd API Rename CoreConfigCreator to CoreConfigFactory
Fix rebase regressions
2017-02-27 16:54:01 +13:00
Damian Mooyman
3362e15a29 API Upgrade code to use updated config 2017-02-27 16:54:01 +13:00
Damian Mooyman
3958788858 API Remove Director.environment_type config and replace with static methods 2017-02-27 16:54:01 +13:00
Damian Mooyman
a6e9a7111b API Substitute core config system with new silverstripe/config module 2017-02-27 16:54:01 +13:00
Damian Mooyman
72ddac2a56 API Implement ModuleLoader for module registration by composer name 2017-02-27 16:54:01 +13:00
Damian Mooyman
b3fc11e594
API Move ssmedia plugin to asset-admin 2017-02-27 10:58:41 +13:00
Damian Mooyman
1d49c4afe9 API Remove non-asset-admin TinyMCE media dialog
API Split ssplugin into ssmedia and sslink plugins
2017-02-27 10:38:23 +13:00
Damian Mooyman
bab52e2403 Tweak dropdownfield 2017-02-27 10:38:23 +13:00
Christopher Joe
98ecaf9bd0 Change UploadField to TreeDropdownField for modal fields
Change UploadField to abstract placeholder FileHandleField for non-modal fields
2017-02-27 10:38:23 +13:00
Sam Minnee
f63b741e46 FIX: Improve DebugView’s display of non-header information.
DebugView had not ability just to output a regular paragraph that
didn’t have a blue background.

This refactors the CSS classes a bit to amend this.
2017-02-26 15:07:32 +13:00
Ingo Schommer
cef4ab79a6 Remove debug code 2017-02-26 13:08:02 +13:00
Ingo Schommer
d220ca3f67 API Use symfony/cache (fixes #6252) 2017-02-26 13:07:59 +13:00
Daniel Hensby
7156da6279
Merge branch '3' 2017-02-20 22:19:33 +00:00
Ingo Schommer
d2de4b10e1 Absolute paths for theme lang dirs (fixes #1354)
Regression in 4.x i18n rewrite. Can’t test this since ThemeResourceLoader hardcodes constants like THEME_DIR,
so its impossible to mock in different directory structures. Ideally this would use an application object with access
to environment variables, but that’s too much of a refactor to validate this simple fix.
2017-02-17 16:26:44 +13:00
Ingo Schommer
2805a13cc5 Merge pull request #6607 from open-sausages/pulls/4.0/i18n-locale
API Substitute Zend_Locale / Zend_Date with php-intl
2017-02-16 10:56:13 +13:00
Ingo Schommer
b7bed18192 Mark setShowCalendar() as experimental 2017-02-16 10:55:07 +13:00
Ingo Schommer
80723c077b Reinstated separated DateField functionality 2017-02-16 09:06:14 +13:00
Anselm Christophersen
449ed8d379 Text supports up to 16 megabytes, not 2 (#6368)
See the `requireField` method that defines it as `mediumtext`.
2017-02-15 11:14:41 +13:00
Damian Mooyman
014f0d23ed
API Create SeparatedDateField
API Restrict allowed values parsed via DBDate::setValue
API Remove NumericField_Readonly
API Remove DBTime::Nice12 / Nice24
2017-02-15 11:07:58 +13:00
Damian Mooyman
029a8b9586
API Substitute Zend_Currency with NumberFormatter based solution
API Substitute Zend_Locale with Locale / NumberFormatter
API Substitute Zend_Date with IntlDateFormatter
API Added DBTIme::Nice12, FormatFromSettings
API Added Short() method to DBDate / DBTime / DBDatetime
API Add Date::getTimestamp()
API Added setSubmittedValue api for FormField
API Add second arg to base FormField::setValue()
API Major refactor of i18n into component data parts
API Implement Resettable interface to reset objects between tests
ENHANCEMENT Changed DBField::create_field return type to `static` to support better type hinting
ENHANCEMENT i18nTextCollector supports __CLASS__
2017-02-09 15:28:59 +13:00
Daniel Hensby
71383b827d
Merge branch '3' 2017-02-08 12:34:45 +00:00
Andrew Aitken-Fincham
b8a0944bda FIX/load fields if lazy ones exists 2017-02-08 08:52:48 +00:00
Aaron Carlino
0982f77ec7 Feature/aggregate data filters (#6553) 2017-02-03 09:03:19 +13:00
Damian Mooyman
8d5ff9b2fe Merge pull request #6583 from robbieaverill/bugfix/remove-theme-dir
API Remove ViewableData::ThemeDir, update changelog to reflect suggested replacement
2017-02-02 12:57:20 +13:00
Daniel Hensby
8c8231c03e
NEW Director::host() to determine host name of site 2017-01-31 21:36:04 +00:00
Daniel Hensby
873fd8c5bc
NEW replace _ss_environment.php with .env and environment vars 2017-01-31 20:40:17 +00:00
Daniel Hensby
a5da085cc7
Merge branch '3' 2017-01-31 17:03:53 +00:00
Daniel Hensby
efb5c5bfe9 Merge pull request #6567 from open-sausages/pulls/4.0/flush-tests
BUG Ensure that tests run with flush=1 clean Flushables
2017-01-31 11:36:07 +00:00
Damian Mooyman
7b26b4a1f3 BUG Ensure that tests run with flush=1 clean Flushables
BUG Restore opt-in flushing (regression from #4404)
2017-01-31 18:59:19 +13:00
Robbie Averill
9d35ff8f95 API Remove ViewableData::ThemeDir, update changelog to reflect suggested replacement 2017-01-31 10:56:52 +13:00
Robbie Averill
232b218dfb FIX Ensure that Zend_ classes can still be autoloaded 2017-01-30 11:12:24 +13:00
Daniel Hensby
77bfea1197 Merge pull request #6564 from Quadra-Digital/dbfield-setter-improvements
ENHANCEMENT: DBField 'setter' methods return instance of themselves
2017-01-28 09:23:39 +00:00
Loz Calver
d3c24769ac Merge pull request #6469 from dhensby/pulls/4/image-backend-interface
FIX Make sure image backends implement method getImageResource
2017-01-27 16:59:46 +00:00
Daniel Hensby
a282b3f420 Merge pull request #6528 from zacps/3310-permissions
Simplify permissions displayed when admin (fixes #3310)
2017-01-27 10:26:12 +00:00
Colin Tucker
34398b0faa Cast SmallFieldHolder to HTMLFragment - fixes #6568 2017-01-27 09:16:58 +11:00
Daniel Hensby
c81959cce0 Merge pull request #6558 from open-sausages/pulls/4.0/i18n-symfony
API Replace i18n message localisation with symfony/translation
2017-01-26 13:11:59 +00:00
Damian Mooyman
de02a3f733
Restored context parameter to i18n, and added to a “comment” key
Rolled pluralisation functionality into the i18n::_t() method
Warnings on missing default can now be turned off
2017-01-25 18:12:40 +13:00
Damian Mooyman
8a07c56bdf API Replace i18n message localisation with symfony/translation
API Implement enhanced pluralisation
Remove Zend_Translate and all Zend dependencies from i18n
Deprecated $context from i18n::_t()
Warn on missing default string for i18n::_t()
2017-01-25 17:08:12 +13:00
Damian Mooyman
5d6c90361c
BUG Ensure root path of any local adapter is safely created and mapped from symlink
Fixes https://github.com/silverstripe/silverstripe-asset-admin/issues/362
2017-01-25 13:55:02 +13:00
Joe Harvey
daeb3d7abf Updating all setter methods on DBMoney to return an instance of themselves 2017-01-24 15:57:02 +00:00
Joe Harvey
38e86f04d8 Updating all setter methods on DBField to return an instance of themselves 2017-01-24 15:56:51 +00:00
Joe Harvey
3633d6e27f Updating all setter methods on DBDate to return an instance of themselves 2017-01-24 15:56:45 +00:00
Zac Pullar-Strecker
a0d01542a6 Remove examples of Log::::add_writer() (fixes #6346)
Log::add_writer() has been removed in SilverStripe 4.0.0.
2017-01-20 12:27:54 +13:00
Zac Pullar-Strecker
720e2045c9 Simplify permissions displayed when admin (fixes #3310)
This changes permissions inherited by being a superuser to gray,
instead of the red x that made it look like you didn't have it.
2017-01-18 14:01:44 +13:00
Daniel Hensby
8b4cce435e
Merge branch '3' 2017-01-17 14:17:45 +00:00
Lee Bradley
6000e3ba16 GridFieldAddExistingAutocompleter: Make Search Response HTTPResponse
Also adds the 'text/json' Content-Type header
2017-01-17 10:03:07 +00:00
Damian Mooyman
d192a4f86f BUG Fix root folder getFilename() returning incorrect path (#6510) 2017-01-17 17:49:42 +13:00
Damian Mooyman
87ac3e3971 ENHANCEMENT Display warning on always_populate_raw_post_data not being -1 in php 5 (#6507) 2017-01-16 17:31:48 +13:00
Damian Mooyman
7d67c5b9bd
API Allow users to act-as another 2017-01-16 09:04:20 +13:00
Daniel Hensby
c4972da37e Merge pull request #6496 from robbieaverill/feature/remove-gridfield-components
API Enhancement: Allow "removeComponentsByType" to remove multiple component"s"
2017-01-13 11:29:04 +00:00
Robbie Averill
ce38f1f1fd API Enhancement: Allow "removeComponentsByType" to remove multiple component"s" 2017-01-13 23:30:30 +13:00
Loz Calver
b64b4497ca Merge pull request #6492 from open-sausages/pulls/4.0/security-page-class
API Shift Security page class config to separate option
2017-01-13 09:18:14 +00:00
Daniel Hensby
3ea5015f8b NEW Move to SwiftMailer powered Emails (#6466)
* API Replace existing Email and Mailer classes with SwiftMailer powered email system

* DOCS New Email docs

* Initial feedback from Damian

* Making Mailer an interface

* Templates relocated

* Round of feedback

* More robust approach to plain parts

* Revert changes to TestMailer
2017-01-13 14:48:46 +13:00
Damian Mooyman
e6ae532998 Merge pull request #6484 from open-sausages/pulls/unique-folder-enforced
Enforce unique Folder names, use AssetNameGenerator
2017-01-13 13:54:51 +13:00
Damian Mooyman
1049b710fe Merge pull request #6487 from robbieaverill/bugfix/remapping-versioned-classnames
FIX Remap versioned ClassNames during build process
2017-01-13 12:05:22 +13:00
Robbie Averill
9559cb2eda Handle Versioned implementations that do not have stages 2017-01-13 11:29:48 +13:00
Ingo Schommer
3b06e30558 Don’t add extension dot in FileNameFilter
File names are generally valid without an extension (although they might be disallowed by upload constraints),
so the filter should deal gracefully with them (“myfile” should return “myfile”, not “myfile.”)
2017-01-13 11:11:40 +13:00
Ingo Schommer
b1d5e97a3d Enforce unique Folder names, use AssetNameGenerator 2017-01-13 11:11:37 +13:00
Damian Mooyman
2c274c838e
API Shift Security page class config to separate option 2017-01-13 09:16:13 +13:00
Damian Mooyman
3f1cda8510 Merge pull request #6491 from kinglozzer/mysqlquery-seek
FIX: MySQLQuery::seek() failed to return a row
2017-01-13 09:06:53 +13:00
Loz Calver
30d125f144 FIX: MySQLQuery::seek() failed to return a row 2017-01-12 15:34:28 +00:00
Loz Calver
3e95fc51f7 Merge pull request #6490 from colintucker/fix-empty-db-installer-bug
Check if $database is empty before adding prefix/suffix
2017-01-12 09:31:29 +00:00
Colin Tucker
d4db1f5189 Check if $database is empty before adding prefix/suffix 2017-01-12 11:24:33 +11:00
Robbie Averill
a4bc9f49d1 FIX Regression in using template_main to render the Security area
* Introduced in 0cf477d36
* Should use the "template_main" static to decide which model to use for rendering this page
* Assuming SiteTree means any requirements added in Page and assumed to work everywhere will not
2017-01-12 13:11:40 +13:00
Robbie Averill
2d1d2aea79 FIX Remap versioned ClassNames during build process 2017-01-12 12:15:21 +13:00
Sam Minnee
6fc50cae5c FIX: Refactor TestMailer to better be base class
This small refactoring makes TestMailer better suited as a base class
for the behat-extension’s implementation, which means that we don’t
need to coordinate cross-module commits in dhensby’ SwiftMailer work.

See https://github.com/silverstripe/silverstripe-framework/pull/6466
2017-01-12 10:22:57 +13:00
Daniel Hensby
747c0770e7 Merge pull request #6446 from robbieaverill/feature/controllers-without-underscores
API Allow controller discovery without underscores (PSR-2 compliance)
2017-01-11 15:27:56 +00:00
Damian Mooyman
b52a963ed7
ENHANCEMENT Remove jquery-ui button() api from default HTML editor dialog 2017-01-11 17:04:20 +13:00
Robbie Averill
e4f67f6e2c Add extra backslashes and ungreedy modifier 2017-01-11 14:49:09 +13:00
Damian Mooyman
6b5efb91fd Merge pull request #6434 from open-sausages/features/4.0/ui-button-refresh
Refresh CMS UI buttons to new flat style and bootstrap classes
2017-01-11 14:22:25 +13:00
Robbie Averill
62eb0e6142 FIX Rename template parser from .inc to .peg so PHP doesn't include it automatically 2017-01-11 12:36:08 +13:00
Damian Mooyman
d9034f5bfc
Remove redundant CMSSecurity.js dist file
Cleanup GridFieldFilterHeader / GridFieldSortableHeader
2017-01-11 12:00:01 +13:00
Robbie Averill
6fb49224b9 FIX SSViewer should resolve templates with or without underscores
* Capture fully qualified class name, without "Controller"
2017-01-11 09:59:28 +13:00
Robbie Averill
c620063608 DOCS Update docs to reference PageController without an underscore, implement some PSR-2 2017-01-11 09:59:28 +13:00
Daniel Hensby
a996e20e79 Merge pull request #6450 from mikenz/page-to-sitetree
ENHANCEMENT: Use SiteTree instead of Page class in more places
2017-01-10 16:02:15 +00:00
Daniel Hensby
8badad90df
FIX Make sure image backends implement method getImageResource 2017-01-10 15:15:51 +00:00
Daniel Hensby
f3b6bb1470
Merge branch '3' 2017-01-10 14:31:07 +00:00
Damian Mooyman
b62f9b60a0
BUG Fix broken member / group import
BUG GridFieldImportButton no longer only works on ModelAdmin
2017-01-10 17:57:54 +13:00
Christopher Joe
8118448a9c Fix PHP linting issues 2017-01-10 11:34:50 +13:00
Will Rossiter
56c2363909 Implement feedback fixes
Enhancement Fix ModelAdmin import form not POSTing to correct form
2017-01-10 11:05:58 +13:00
Paul Clarke
e893fc4c51 Enhancement improve secondary action colours
Enhancement add accessibility info to page number
Enhancement new font icons added, improve trash icon and increase icon size of close
Enhancement improve title of gridfield search trigger
Enhancement add title to button to open gridfield search and improve gridfield search styles
API Shortcode fails if no parent
API JQuery-UI classes removed
Enhancement centre actions tabs within dropup in more-actions
Enhancement fix IE input height issue and fix for safari of icons in buttons with hidden text (e.g. pagination)
Enhancement only show external link on hover
2017-01-10 10:55:34 +13:00
Will Rossiter
ddc9a9c6d6 Enhancement Fix up buttons within gridfield search
Enhancement Fix up batch actions button
2017-01-10 10:53:10 +13:00
Paul Clarke
7b90ee137d Enhancement resize icon to sit inline and increase size of search icon and Upload icon
Enhancement remove float from buttons as already aligned inline
Enhancement Align buttons in toolbar more consistently
API remove ui overrides
API ss-ui-button no longer exists so styles where not seen, removed nesting
2017-01-10 10:51:07 +13:00
Will Rossiter
cb6ec11f1b Enhancement Implement import CSV icon and tidy up import forms
Enhancement Tidy up permission icons to new icon library
WIP The modal is a short term workaround until the UI is all react based but we wanted to do some cleanup prior to 4 release
API Remove ssui.button
Enhancement Update buttons to new flat bootstrap style
2017-01-10 10:49:15 +13:00
Paul Clarke
178bd480eb API Changes required for asset search behaviour 2017-01-09 14:55:20 +13:00
Ingo Schommer
3b50506aa0 Fail manipulateImage() without image resource
Sometimes a manipulation can’t be carried out, either because the backend isn’t available,
or because there isn’t enough PHP memory available. In these cases, $backend->getImageResource()
will be set to NULL. This should be picked up by manipulateImage(), to avoid passing an invalid
backend into the $callback provided.

The specific case this solves is calling Image->FitMax() on large images:
$resizedImage = $originalImage->FitMax(<width>, <height>)
This will have $resizedImage==$originalImage if the image is smaller than the targeted dimensions,
but with this fix $resizedImage==NULL if the image is too large to be resized.
Which gives custom code the ability to determine which of the two should be used,
for example choosing not to pass the original large image URL to the client
since it wouldn’t be considered a “thumbnail” size.
2017-01-06 18:45:56 +13:00
Ingo Schommer
fcb511b1c0 Reinstated GDBackend->checkAvailableMemory()
This was removed as part of the SS4 assets refactor:
be239896d3
Presumably @tractorcow didn’t feel it’s possible to retain this,
because we don’t have local file handles required for getimagesize().
Since there’s getimagesizefromstring() as well (added in PHP 5.4),
we just needed a different logic branch.

Also makes the logic more resilient against missing GD resources on a backend.
Lack of available memory for a resize is only one (new) reason,
other edge cases were already causing these missing resources (e.g. an invalid file string).

Original discussion: https://groups.google.com/forum/m/#!topic/silverstripe-dev/B57a3KYeAVQ
Pull request for 3.x: https://github.com/silverstripe/silverstripe-framework/pull/2859
More context: https://github.com/silverstripe/silverstripe-framework/pull/2569
2017-01-06 18:45:56 +13:00
Ingo Schommer
6e561f00bd Force GC in GDBackend
This has been discussed previously, and was assumed to be handled by PHP automatically:
https://github.com/silverstripe/silverstripe-framework/issues/2739#issuecomment-32603005
It’s unclear if its a regression in SS4.

Tested with PHP 5.6.29, by setting xdebug breakpoints
and inspecting memory_get_usage() before and after GDBackend->manipulateImage().
Even a single 7MB JPEG straight from my DSLR (6000x300) can chomp bring the system from 30MB to >128MB memory use.
That’s in addition to the 7MB of PHP memory required for the $content variable.
Note that the image manipulations likely happen on the raw bitmap, which is much larger than the 7MB compressed JPEG.

Checked ImagickBackend, which doesn’t have this issue (and only uses about half the memory for the same set of images).
2017-01-06 18:45:56 +13:00
Daniel Hensby
9ee3be9337 Merge pull request #6449 from mikenz/show-query-number
ENHANCEMENT: Show the query count/query number when using showqueries
2017-01-03 12:04:47 +00:00
Mike Cochrane
0cf477d36e Use SiteTree instead of Page class in more places 2017-01-03 20:37:17 +13:00
Mike Cochrane
90fec4b8e7 Show the query count/query number when using showqueries 2017-01-03 18:13:44 +13:00
Mike Cochrane
b43f2d57c2 Add mising use statements for showqueries=inline to work 2017-01-03 18:04:11 +13:00
Robbie Averill
6f4162ed74 FIX PHP 7.x should use random_bytes for entropy ahead of deprecated mcrypt lib 2016-12-29 23:46:08 +13:00
Robbie Averill
37a009289c Consolidate temporary file creation and deletion logic. 2016-12-29 22:32:04 +13:00
Robbie Averill
7448622a1a FIX Replace ini casting to int with explicit split and cast for PHP 7.1. Add tests. 2016-12-29 21:55:52 +13:00
Daniel Hensby
664c0eafbe
Merge branch '3' 2016-12-28 14:30:54 +00:00
Damian Mooyman
9be5142fc1 API ChangeSet::publish() / canPublish() no longer treats hasChanges() = false as a permission error
BUG fix issues with doArchive() in live mode
2016-12-21 14:28:20 +13:00
Daniel Hensby
ba39e552a2
Merge branch '3' 2016-12-15 12:20:29 +00:00
Damian Mooyman
6e589aac75
API Updates to Form, ValidationResponse, ValidationException
API Implement form schema "errors" handling
2016-12-09 14:24:11 +13:00
Sam Minnee
6650561dac Don't use session and FormSchema to manage server-side React validation responses 2016-12-09 10:27:23 +13:00
Jake Bentvelzen
085c8f5a43 ENHANCEMENT 2x increase in scanning of files for ConfigManifest 2016-12-08 21:35:38 +11:00
Ingo Schommer
322d3e18fd Merge pull request #6370 from open-sausages/pulls/4.0/remove-temp-json
ENHANCEMENT Move temporary JSON block into standard component
2016-12-08 23:24:58 +13:00
Damian Mooyman
2a25a525cb
ENHANCEMENT Move temporary JSON block into standard component 2016-12-08 13:31:11 +13:00
Damian Mooyman
6b06fd9f2d
API Add buttonTooltop to PopoverField and fix critical positioning issue 2016-12-07 13:06:35 +13:00
Damian Mooyman
6107f45d1e
Temp patch to 5987 to prevent cms crashing 2016-11-30 11:20:22 +13:00
Damian Mooyman
0e92ecea0c
ENHANCEMENT Prevent test DBs persisting after testing 2016-11-30 10:59:37 +13:00
Daniel Hensby
c6d43b477e
Merge branch '3' 2016-11-29 13:27:49 +00:00
Damian Mooyman
bc19b2a491
PSR2 cleanup 2016-11-29 16:18:48 +13:00
Damian Mooyman
d4abfea4eb Rename Uploadable -> UploadReceiver and FileUploadable -> FileUploadReceiver 2016-11-29 16:16:16 +13:00
Damian Mooyman
7cba50e3a5 API Refactor UploadField, FileField and AssetField into traits Uploadable and FileUploadable 2016-11-29 16:15:59 +13:00
Damian Mooyman
4b7d31377b
PSR2: Automatic fixes 2016-11-29 12:33:28 +13:00
Damian Mooyman
1b1e921e3d
PSR2: Whitespace-only changes 2016-11-29 12:31:16 +13:00
Daniel Hensby
1be2e70a2a
Merge branch '3' 2016-11-24 14:18:09 +00:00
Damian Mooyman
38a63ad73f Merge pull request #6327 from open-sausages/pulls/4.0/file-icon-update
Update doc icons for files area
2016-11-24 10:34:55 +13:00
Christopher Pitt
06d1297fbe Replace hard-coded directory separators constant
This removes warnings when building the manifest cache in Windows environments.
2016-11-24 08:05:56 +13:00
Damian Mooyman
22cb3d0d74 Fix various ORM test issues 2016-11-23 19:25:12 +13:00
Damian Mooyman
00c9c2c775 BUG Fix DataObject::dbObject assigning incorrect table to DBField instance 2016-11-23 19:25:12 +13:00
Damian Mooyman
cac326eebb API Add getExtraDataObjects() and getExtraControllers() methods to SapphireTest 2016-11-23 19:25:12 +13:00
Damian Mooyman
6e8304ff2f API Namespace framework tests 2016-11-23 19:25:12 +13:00
Paul Clarke
f5923cf433 Update doc icons 2016-11-23 11:26:38 +13:00
Christopher Joe
875811fdfd API Create loading state for schema
API Create stateOverride state for schema
Enhancement Moved crumbs property to rely on redux state
Enhancement Updated file app icon names
API Added InsertMediaModal functionality to HtmlEditorField
API Removed dependency on schema ID that is returned from server
API Added afterMessages property for FormBuilder to display content after the alert message
2016-11-22 16:58:00 +13:00
Daniel Hensby
bcc21c2403
Merge branch '3' 2016-11-10 01:09:35 +00:00
UndefinedOffset
f18ef75c3d BUGFIX: Fixed crash when BASE_PATH is set by assuming the location of Constants.php 2016-11-04 13:43:42 -03:00
Damian Mooyman
857caa8fff Merge pull request #6274 from SpiritLevel/PDO-as-default-in-webinstaller
Setting default db adapter in installation  as PDO MySQL
2016-11-03 17:42:20 +13:00
Damian Mooyman
eefecc21fc BUG Fix incorrect include paths in tests and railsyml (#6279) 2016-11-03 14:41:19 +13:00
Christopher Joe
8a7ea044ac Added validator class to decouple validation library from FormBuilder
Added required rule priority logic and fix styling of error messages
2016-11-03 10:39:53 +13:00
Christopher Joe
0901de2995 BUG Fix php schema generation 2016-11-03 10:26:39 +13:00
Damian Mooyman
1142757c21 API Add 'validation' to form schema 2016-11-03 10:07:24 +13:00
David Alexander
506213899b Setting default db adapter in installation as PDO MySQL with MySQLi as fail safe.
Added back missed assignment of $_REQUEST['db']['type']
2016-11-02 19:51:13 +13:00
Damian Mooyman
019e99dd4d BUG Fix regressions from src folder creation (#6272) 2016-11-02 13:18:56 +13:00
Damian Mooyman
38fdafb474 Fix tinymce breaking in non-typical install location 2016-11-01 17:40:59 +13:00
Damian Mooyman
5650254b53 NEW: Fixes to allow code files in src/ folder.
Separated from the file renames for clarity.
2016-11-01 16:35:32 +13:00
Sam Minnee
e9d2f2f733 NEW: Use composer autoloader to set the right include path. 2016-11-01 16:35:02 +13:00
Sam Minnee
7a10c194bd NEW: Move code files into src/ folder.
This updates framework to be more in keeping with PHP conventions.
2016-11-01 13:37:24 +13:00
Damian Mooyman
8dd644d25d
API Namespace all classes
Namespace all templates
Move difflib and BBCodeParser2 to thirdparty
Remove deprecated API marked for removal in 4.0
2016-09-08 10:23:17 +12:00
Damian Mooyman
4a011303b9 Add missing packages 2015-08-24 16:15:38 +12:00
Andrew Short
2f817ba177 NEW: Allow specifying a factory to use for creating services.
A service factory can be used for creating instances where a non-trivial
construction process is required. This is done by adding a `factory`
key to the service definition.
2014-02-03 11:30:22 +11:00