Commit Graph

1768 Commits

Author SHA1 Message Date
Serge Latyntcev
5af205993d [CVE-2019-12617] Fix access escalation for CMS users with limited access through permission cache pollution 2019-09-24 16:00:51 +12:00
Serge Latyntcev
569237c0f4 [CVE-2019-12203] Session fixation in "change password" form
A potential account hijacking may happen if an attacker has physical access to
victim's computer to perform session fixation. Also possible if the targeted application contains an XSS vulnerability.
Requires the victim to click the password reset link sent to their email.
If all the above happens, attackers may reset the password before the actual user does that.
2019-09-24 16:00:51 +12:00
Jackson Darlow
a033662a3a MemberAuthenticator::recordLoginAttempt() outputs 2019-09-24 14:24:59 +12:00
Garion Herman
0d27f32cc9 FIX Add 'legal empty attributes' to allow empty alt values on imgs
In some situations, a caption is used in place of a value in the alt
attribute, and in others an image may be cosmetic and not in need of an
alt attribute value (though the alt attribute must still be rendered in
this case).
2019-09-24 11:44:12 +12:00
Robbie Averill
3cfc21c405
Merge pull request #9241 from open-sausages/pulls/4.4.3/fix-file-permission
Fix administrators not being able to see files that are restricted to groups
2019-09-23 11:13:26 -07:00
Guy Marriott
aa7c057422
FIX: Don't force-add view button to readonly GridField (fixes #… (#9254)
FIX: Don't force-add view button to readonly GridField (fixes #9249)
2019-09-23 10:31:25 -07:00
Loz Calver
efdb9cc718 FIX: run member CMS validator when editing via groups (fixes #9184) 2019-09-23 16:59:58 +01:00
Loz Calver
d85ff3bc44 FIX: Don't force-add view button to readonly GridField (fixes #9249) 2019-09-23 16:52:47 +01:00
bergice
6a1c6ecec6 Fix administrators not being able to see files that are restricted to groups
Resolves https://github.com/silverstripe/silverstripe-asset-admin/issues/777
2019-09-23 16:44:28 +12:00
Guy Marriott
6ff97821ed Merge branch '4.4' into 4 2019-09-18 15:52:36 -07:00
Guy Marriott
7877ffcc85 Merge branch '4.3' into 4.4 2019-09-18 15:52:18 -07:00
Hayden Shaw
daf9d55ecb Allow non summary fields to be used as export fields
Fixes regression in 3d989a6eae.
2019-09-19 10:00:54 +12:00
Michal Kleiner
bcbf90a837 NEW Introduce supported database transaction mode check 2019-09-16 14:44:15 +12:00
Robbie Averill
aa6b244db9 Merge branch '4.4' into 4 2019-09-13 18:11:46 -07:00
Robbie Averill
592ab6abc1 Merge branch '4.3' into 4.4 2019-09-13 18:11:34 -07:00
Robbie Averill
066ce8e01c Merge branch '4.2' into 4.3
# Conflicts:
 #	src/View/ThemeResourceLoader.php
2019-09-13 18:10:37 -07:00
Robbie Averill
cfe86ad5a1
Merge pull request #9153 from creative-commoners/pulls/4.4/stream-ree-tags
FIX Skip md5-ing the whole contents of a stream for etags
2019-09-13 17:59:26 -07:00
Robbie Averill
9a76d4adb4
Merge pull request #9181 from kinglozzer/8762-shortcode-templates
NEW: Use templates to render embed shortcodes (closes #8762)
2019-09-13 17:58:32 -07:00
Serge Latyntsev
233e0e7aa0 ENH PasswordExpirationMiddleware implementation (#9207) 2019-09-12 14:34:06 +12:00
Aaron Carlino
da6582f593 NEW: Remove web installer, move to separate package (#9231)
* Remove installer

* Remove exposed install files

* Replace Dev/Install classes still in use

* Update changelog

* FIX make the grid field actions consistent to what they look like on pages

Resolves https://github.com/silverstripe/silverstripe-admin/issues/904

* Docs changes
2019-09-11 13:10:25 +12:00
Maxime Rainville
591b88a9bc BUG Allow infinite loop when calling DataObject::writeComponent() recursively 2019-09-10 14:15:28 +12:00
Robbie Averill
e8c2f963fd FIX Member::getLastName() now correctly returns the Member surname 2019-09-06 12:12:27 -07:00
Robbie Averill
41a766d135
Merge pull request #9085 from kinglozzer/9084-path-join-exception
Catch Path::join() exceptions in findTemplate() (fixes #9084)
2019-09-06 12:00:39 -07:00
Robbie Averill
42dd02ef78
Merge pull request #9122 from aNickzz/4
Add onBeforeRenderHolder extension point for FormField
2019-09-06 11:53:10 -07:00
Hels666
22a6a5b1e3 NEW Add getLastName() method to Member.php (#9222)
* Add getLastName() method to Member.php

Add getLastName() method to Silverstripe\Security\Member.php to allow use of $LastName instead of $Surname in templates as it is a common mistake made

this is for issue #9219
as discussed in Slack on 04-Sep-2019

* Minor doc block clean-up

* Update src/Security/Member.php - typo fix

Co-Authored-By: Guy Marriott <guy@scopey.co.nz>
2019-09-06 20:31:22 +12:00
Maxime Rainville
dd40d53e6b Merge branch '4.4' into 4 2019-09-04 09:46:33 +12:00
Maxime Rainville
24015c7767 Merge branch '4.3' into 4.4 2019-09-04 09:42:09 +12:00
Robbie Averill
aec5051a24
Merge pull request #9206 from creative-commoners/pulls/4.3/strip-bom-on-csv-import
FIX Byte Order Marks (BOM) are now stripped when importing CSV files
2019-09-03 09:55:38 -07:00
Damian Mooyman
6759af3767
Escape strings a bit safer for doc generation 2019-09-03 19:38:19 +12:00
Damian Mooyman
f649657182
Clarify Director::absoluteURL behaviour
Fixes #9111
2019-09-03 19:34:16 +12:00
Robbie Averill
ef49dcf726
Merge pull request #9164 from sminnee/fix-9162
FIX: Write relations when saving in grid-field item edit form
2019-09-01 20:44:13 -07:00
Maxime Rainville
a2a202c016
Merge pull request #9200 from open-sausages/pulls/4.4.3/consistent-actions
FIX make the grid field actions consistent to what they look like on pages
2019-09-02 14:07:22 +12:00
bergice
2f8d847a10 FIX make the grid field actions consistent to what they look like on pages
Resolves https://github.com/silverstripe/silverstripe-admin/issues/904
2019-09-02 12:22:32 +12:00
Robbie Averill
0b991cc039
Merge pull request #9198 from elabuwa/pulls/4.3/bug-fix-html-entities-breadcrumbs-in-group
Bug : Add html_entity_decode to group parents
2019-08-30 09:51:52 +12:00
Dileep Ratnayake
fe4eb5dd2a
Update src/Security/Group.php
Co-Authored-By: Maxime Rainville <maxime@rainville.me>
2019-08-29 15:44:41 +12:00
Robbie Averill
77ba8391c4 FIX Byte Order Marks (BOM) are now stripped when importing CSV files 2019-08-29 14:54:57 +12:00
Maxime Rainville
73f43c6f42 BUG Remove placeholder text on new group form 2019-08-28 17:14:19 +12:00
Dileep Ratnayake
9b7075ed5d
Update Group.php 2019-08-27 16:22:00 +12:00
Dileep Ratnayake
a976a1688b
Update Group.php
move to private method
2019-08-27 16:21:08 +12:00
Dileep Ratnayake
40e5c4ec59
Update Group.php
use of convert::raw2xml, rename $grp to $group
2019-08-27 16:19:40 +12:00
Dileep Ratnayake
4f8240bd48
Update src/Security/Group.php
Co-Authored-By: Andre Kiste <bergice@users.noreply.github.com>
2019-08-27 12:19:03 +12:00
Will Rossiter
d2a07b1047
FIX Remove error when exporting a column that is not displayed in a GridField 2019-08-27 11:54:31 +12:00
Dileep Ratnayake
f7a602137a
add html_entity_decode to breadcrumbs 2019-08-27 11:49:17 +12:00
Loz Calver
759601741d NEW: Use templates to render embed shortcodes (closes #8762) 2019-08-21 09:32:16 +01:00
Robbie Averill
a5d6b998fc Merge branch '4.4' into 4 2019-08-16 16:40:39 +12:00
Robbie Averill
bae7e32680 FIX Member::changePassword() no longer applies password validation rules to the hashed value 2019-08-16 09:06:07 +12:00
Robbie Averill
45f86658ca Merge branch '4.4' into 4 2019-08-14 09:31:05 +12:00
Robbie Averill
4b44272367 Merge branch '4.3' into 4.4 2019-08-14 09:30:53 +12:00
Robbie Averill
d63e4b520c Merge branch '4.2' into 4.3 2019-08-14 09:30:41 +12:00
Nicholas Sorokin
4a32b3418a Add onBeforeRenderHolder extension point for FormField 2019-08-09 14:43:14 +09:30
Guy Marriott
3d989a6eae
FIX Use content generated by DataColumns component for print and csv export 2019-08-09 15:04:38 +12:00
Guy Marriott
f3132c89d7
Merge pull request #9170 from open-sausages/pulls/4/add-option-to-disable-user-agent-session-check
API Add option to disable user-agent header session validation
2019-08-08 11:47:07 +12:00
Aaron Carlino
b3093b7a1a BUGFIX: Allow state to be shared across nested GridFields 2019-08-07 23:09:51 +12:00
Maxime Rainville
4380d7d155 API Add option to disable user-agent header session validation 2019-08-06 22:00:01 +12:00
Robbie Averill
4268db069d
Merge pull request #9165 from sminnee/fix-multiline-gridfield
FIX: Allow multi-line content in grid field cells
2019-08-05 09:59:22 +12:00
Sam Minnee
6ec02da577 FIX: Allow multi-line content in grid field cells
It’s amazing that this but has been present for 7 years, but there you
go!
2019-08-02 17:46:56 +12:00
Sam Minnee
d088354f46 FIX: Write relations when saving in grid-field item edit form
Fixes https://github.com/silverstripe/silverstripe-framework/issues/9162
2019-08-02 16:17:42 +12:00
Robbie Averill
0672f8b76b NEW HTTPRequest now has hasSession() to determine whether a session exists for it 2019-08-02 11:29:23 +12:00
Robbie Averill
3224c9971b Merge branch '4.4' into 4 2019-08-02 11:24:54 +12:00
Robbie Averill
3b96c51688 Merge branch '4.3' into 4.4 2019-08-02 11:24:45 +12:00
Will Rossiter
82cc8b40a4 Create SearchContext via Injector (#9156) 2019-08-01 14:39:58 +12:00
Guy Marriott
0abfed3e06
FIX Skip md5-ing the whole contents of a stream for etags 2019-07-30 08:25:03 +12:00
Robbie Averill
5c794dfcdd FIX Prevent setting session value when no session exists yet 2019-07-29 17:16:01 +02:00
UndefinedOffset
40cd66852e BUGFIX: Fixed issue where multiple relationship sort order columns would be lost in favor of only the last relationship column in the sort order 2019-07-26 11:54:10 -03:00
Robbie Averill
89eb6c88b2 FIX Do not try and load fixtures from directories, fixes PHP 7.4 build errors 2019-07-26 10:13:47 +02:00
Robbie Averill
d1c927ff23 FIX Remove curly brace access to string offsets, deprecated in PHP 7.4 2019-07-24 12:17:49 +02:00
Chee Wai
cb91f5fa06 NEW Added SRI support for Requirements::css, Requirements::javascript (#9139) 2019-07-21 09:51:22 +02:00
Robbie Averill
79fa61edf8 FIX Type safety on nullable argument, fixes PHP 7.4 test 2019-07-19 12:05:27 +02:00
Robbie Averill
2a1394bed7 Merge branch '4.4' into 4 2019-07-19 10:46:00 +02:00
Robbie Averill
40f06fafa9 Merge branch '4.3' into 4.4 2019-07-19 10:45:44 +02:00
Robbie Averill
c7b15eaef5 Merge branch '4.2' into 4.3 2019-07-19 10:45:29 +02:00
Simon Gow
22b514c421 #9114 - DBText::ContextSummary() cuts line breaks
ContextSummary() was cutting the HTML which was added by nl2br because
it expected plain text elements as it's stripping and replacing text.
Instead this fix changes the behaviour to apply the nl2br after the text
changes have been made. That way we can't cut anything in the middle of
a HTML tag, but new lines, or paragraphs are replaced by BRs after,
should they exist.

- Added tests to ensure text is not cut in the middle of a sentence.
- Added test to ensure that <br>'s are added in the correct place should
the summary span between new lines.
2019-07-19 12:43:20 +12:00
Serge Latyntcev
29a663c65d Merge branch '4.4' into 4 2019-07-15 09:24:49 +12:00
Serge Latyntcev
d667d64f13 Merge branch '4.3' into 4.4 2019-07-15 09:18:17 +12:00
Guy Marriott
ec66d366d2
NEW: Deprecated PDO in favour of native drivers (#9052)
NEW: Deprecated PDO in favour of native drivers
2019-07-08 12:41:13 +12:00
Serge Latyntsev
7ef13e7ef6 FIX Confirmation components to respect SS_BASE_URL (#9074) 2019-07-05 16:05:41 +12:00
Robbie Averill
844d2ef134 NEW DBDate and DBDatetime now support modify() with a strtotime() style adjustment string (#9105) 2019-07-05 15:57:23 +12:00
Sam Minnee
404366909e FIX: Fix MysqlStatement::rewind()
Its implementation is more naive than Query’s and leads to unnecessary
seek()ing. This causes issues with the previous commit.
2019-07-03 14:28:31 +12:00
Sam Minnee
96e7914f23 FIX: Fix MySQLQuery::seek() and Query::rewind() to fix repeated iteration
API: Query::seek() and Query::rewind() no longer return a value.

Although breaking an API inside a patch release may seem odd, this in
fact is correcting a long-standing bug in our implementation of 
Iterator::rewind(), so I think it’s appropriate.

https://github.com/silverstripe/silverstripe-framework/issues/9097
2019-07-03 09:20:05 +12:00
UndefinedOffset
571a4d9ace NEW: Added support for config condition if PHP extension is loaded 2019-07-02 14:55:36 -03:00
Robbie Averill
ad050997fd
Merge pull request #9070 from kinglozzer/email-plaintext
FIX: Email::render() generating object instead of string for plaintext part (fixes #9069)
2019-07-02 18:47:18 +12:00
Robbie Averill
fd88003646
Merge pull request #9100 from creative-commoners/pulls/4.4/dataobject-scaffolding-freedom
Allow extensions to modify form scaffolder in DataObject
2019-07-02 18:46:39 +12:00
Guy Marriott
59ba9a717d
FIX Allow extensions to update form scaffolding on DataObjects 2019-06-28 16:11:16 +12:00
Guy Marriott
aeefb920e1
Allow displaying partial/full query message for debugging (#9020)
Allow displaying partial/full query message for debugging
2019-06-28 15:15:33 +12:00
Robbie Averill
c76d3a5db1 FIX Protect against undefined index when using nullifyEmpty option 2019-06-26 09:26:36 +12:00
Loz Calver
b1551a687d Catch Path::join() exceptions in findTemplate() (fixes #9084) 2019-06-21 09:40:18 +01:00
Saophalkun Ponlu
6a8c6703d1 Remove use_gzip from HTMLEditorField since it's been removed by TinyMCE codebase (#7261)
* Remove `use_gzip` from HTMLEditorField

* DOCS Mention remove use_gzip in changelog
2019-06-21 09:27:48 +12:00
Mario Sommereder
260c89fd54 Fix of delimiter not used bug
See issue https://github.com/silverstripe/silverstripe-framework/issues/8881
2019-06-20 11:11:27 +12:00
Guy Marriott
bb5b610636
Merge branch '4.4' into 4 2019-06-17 08:58:50 +12:00
3Dgoo
7e12bee86a
Requirements_Backend.php API documentation fix
The API documentation for Requirements_Backend is currently broken:
https://api.silverstripe.org/4/SilverStripe/View/Requirements_Backend.html#method_customScript

This is because there are unescaped start tags in the function documentation. 

This is the same as the recent #9060 PR, but for the Requirements_Backend class this time.

This fix changes the tags to be escaped.
2019-06-15 10:37:49 +09:30
Loz Calver
8e87264864 FIX: Email::render() generating object instead of string for plaintext part (fixes #9069) 2019-06-14 11:39:47 +01:00
3Dgoo
8dcfa53109
Requirements.php API documentation fix
The API documentation for Requirements is currently broken:
https://api.silverstripe.org/4/SilverStripe/View/Requirements.html#method_customScript

This is because there are unescaped start tags in the function documentation. 

This fix changes the tags to be escaped.
2019-06-13 09:21:12 +09:30
Sam Minnee
27ace03273 NEW: Deprecated PDO in favour of native drivers
https://github.com/silverstripe/silverstripe-framework/issues/8598
2019-06-11 16:17:30 +12:00
Aaron Carlino
d04e54c1be Merge branch '4.4' into 4 2019-06-10 17:33:30 +12:00
Aaron Carlino
c747b1f8d3 Merge branch '4.3' into 4.4 2019-06-10 17:32:07 +12:00
Aaron Carlino
f766555d61 Merge branch '4.2' into 4.3 2019-06-10 17:27:05 +12:00
Serge Latyntcev
ca56e8d78e [CVE-2019-12246] Denial of Service on flush and development URL tools 2019-06-10 17:23:56 +12:00
Aaron Carlino
e2da7b0dc4 Merge branch '4.4' into 4 2019-06-10 16:37:16 +12:00
Sam Minnée
654156d46d FIX: Fix bug when confirmed password is changed but not the password. (#9012)
In this case the confirmed password field is not reflected. It’s 
unclear how often this situation would arise outside of test scenarios,
but may come up if $form->loadDataFrom() is called more than once.

Fixes #2496 (it’s a minor issue but I think this is why Dan flagged it
as a regression). Originally introduced as part of Dan’s initial fix
at 2a6f1f1949.
2019-06-10 15:48:29 +12:00
Robbie Averill
179a982f45
Merge pull request #9019 from rafaeldsousa/pull/include-cancreate-check-gridfield-rightgroupfield
Including canCreate in if statement so that button gets removed if us…
2019-06-10 09:59:45 +12:00
Maxime Rainville
761f7d15ce
Merge pull request #9045 from open-sausages/pulls/4.4/in-memory-cache-opt-out
Opt-out of in-memory caching factory
2019-06-07 12:40:46 +12:00
Ingo Schommer
8324235eda API Opt-out of in-memory caching factory
In-memory caches are typically more resource constrained (number of items and storage space).
Give cache consumers an opt-out if they are expecting to create large caches with long lifetimes.
Use case: https://github.com/silverstripe/silverstripe-assets/pull/282
2019-06-07 12:21:10 +12:00
Andre Kiste
1da181a3b3
Merge pull request #9022 from open-sausages/pulls/4.4/migrate-task-colours
NEW Clearer file migration output with colours
2019-06-06 15:46:28 +12:00
Ingo Schommer
f4cdfb06c8 Update environment timeouts
See https://github.com/silverstripe/silverstripe-framework/issues/9029
2019-06-06 15:18:12 +12:00
Robbie Averill
e8fa3d8750 DOCS Fix incorrect deprecation reference in MonologErrorHandler 2019-06-06 09:30:50 +12:00
Ingo Schommer
b21e5d9e57 Moved time limit increases from individual job
Should apply to all file migration subtasks, not just the first one (see silverstripe/assets)
2019-06-05 15:10:46 +12:00
Ingo Schommer
2d4711de01 Fixed logging
Broke loggers attached by queuedjobs because it wasn't using the global service.
Since the stderr handler was set to bubble=false, those messages weren't picked up by queuedjobs.
Removed preformatted handler since there's no longer an ability to run this stuff via web
2019-06-05 15:09:58 +12:00
Ingo Schommer
7301b375b8 NEW Clearer file migration output with colours 2019-06-05 11:41:06 +12:00
Jarkko Linnanvirta
9184056b5e URLSegmentFilter: Remove : characters from url segments when multibyte characters are allowed. 2019-06-02 11:43:51 +03:00
Guy Marriott
0520d77461
API checkHistoricalPasswords(), characterStrength() and minLength() are now correctly deprecated from 4.5.0 onwards (#9008)
API checkHistoricalPasswords(), characterStrength() and minLength() are now correctly deprecated from 4.5.0 onwards
2019-05-31 09:56:39 +12:00
Robbie Averill
6678f92681
Merge pull request #9025 from taoceanz/4
Removed unused use BadMethodCallException statement.
2019-05-30 09:38:47 +12:00
Robbie Averill
00fd74a0a1 Merge branch '4.4' into 4
# Conflicts:
 #	src/Dev/Tasks/MigrateFileTask.php
2019-05-30 09:36:42 +12:00
Robbie Averill
14673ffd0a Merge branch '4.3' into 4.4 2019-05-30 09:35:26 +12:00
Robbie Averill
188698dcee Merge branch '4.2' into 4.3 2019-05-30 09:35:17 +12:00
Robbie Averill
7f69cc8f94 Merge branch '4.1' into 4.2 2019-05-30 09:35:06 +12:00
Robbie Averill
02864aba3f Merge branch '4.0' into 4.1 2019-05-30 09:34:55 +12:00
Robbie Averill
3e2fc6aa0b Automated phpcbf linting 2019-05-30 09:34:34 +12:00
Robbie Averill
a1f0d7a3bf
Merge pull request #9016 from sminnee/partial-fix-4622
FIX: Better message when form action handler not found.
2019-05-30 09:22:54 +12:00
Thomas Ocean
e30483a7dc Removed unused use BadMethodCallException statement. 2019-05-30 09:08:33 +12:00
shoosah
80e4886c3f Add getter and change visibility for whitelist_array property 2019-05-28 14:15:12 +12:00
Rafael Marins de Sousa
f7c1be7ac1 Including canCreate in if statement so that button gets removed if user isn't to be able to create new records 2019-05-28 12:28:00 +12:00
shoosah
d740998463 Improve displayQuery and benchmarkQuery functions and whitelist_array variable 2019-05-28 12:00:05 +12:00
shoosah
d684c69f09 Allow displaying partial/full query message for debugging 2019-05-28 12:00:05 +12:00
Andre Kiste
2c8c643ce3 MigrateFileTask now outputs "Done" when it has finished running (#8995) 2019-05-28 09:45:13 +12:00
Maxime Rainville
4f39e59aff BUG Enable file hash caching when running the file migration task (#8993) 2019-05-28 09:37:45 +12:00
Maxime Rainville
5b6d0946f4 API Add extension points to MigrateFileTask (#8994)
* API Add extension points to MigrateFileTask

* Apply suggestions from code review

Co-Authored-By: Guy Marriott <guy@scopey.co.nz>
2019-05-28 09:24:01 +12:00
Maxime Rainville
7ef604807c BUG Enable file hash caching when running the file migration task (#8993) 2019-05-28 09:21:11 +12:00
Maxime Rainville
9bfce8c1a4 API Add extension points to MigrateFileTask (#8994)
* API Add extension points to MigrateFileTask

* Apply suggestions from code review

Co-Authored-By: Guy Marriott <guy@scopey.co.nz>
2019-05-28 09:19:05 +12:00
Sam Minnee
7407096e99 FIX: List default items in the readonly view of ListboxField
Adds tests for non-readonly default items too.

Fixes #4142
2019-05-27 17:47:09 +12:00
Sam Minnee
983d36b7ee FIX: Better message when form action handler not found.
Fixes #4622 to some extent, although this fix will be most useful when
https://github.com/silverstripe/silverstripe-errorpage/issues/30 is
addressed also.
2019-05-27 15:00:10 +12:00
Robbie Averill
d873779956 API checkHistoricalPasswords(), characterStrength() and minLength() are now correctly deprecated from 4.5.0 onwards 2019-05-27 09:12:32 +12:00
Dylan Wagstaff
25aa3af032 FIX HeaderField requires the optional Title field
FormField marks the Title constructor argument as optional, and DatalessField does not override the __construct method. HeaderField on the other hand goes against the grain of FormFields as a whole and requires the Title field, seemingly for no good reason (at least, not that the commit message for a68ba38478 indicates) - this seems like an accidental ommision. This commit looks to reinstate the optionality of this constructor argument for consistency's sake.

Plus it broke a module I was investigating.
2019-05-24 13:44:01 +12:00
Robbie Averill
32c04ce765
Merge pull request #8979 from silverstripe-terraformers/feature/add-extension-for-schema-validation
Add extend function in getSchemaValidation function
2019-05-16 11:22:45 +12:00
Guy Marriott
350888bf50 NEW Adding a shuffle method to ArrayList (#8984)
* NEW Adding a shuffle method to ArrayList

* API Add shuffle to DataList for ArrayList parity
2019-05-16 09:26:11 +12:00
Aaron Carlino
3f1479edbb
BUGFIX: DataQuery overwriting _SortColumn selects (#8974)
* BUGFIX: DataQuery overwriting _SortColumn selects

* FIX DataQuery _SortColumn handling
2019-05-15 11:42:10 +12:00
shoosah
4da8be3bf5 Add extend function in getSchemaValidation function
This allows to create extensions which add validation list
2019-05-14 09:47:14 +12:00
Aaron Carlino
dfa90715f7 Merge branch '4.4' into 4 2019-05-13 16:08:05 +12:00
Guy Marriott
abaeeb9432
Merge branch '4.3' into 4.4 2019-05-13 15:56:41 +12:00
Guy Marriott
53cb804929
Merge branch '4.2' into 4.3 2019-05-13 15:56:23 +12:00
matt-in-a-hat
db0e6f7104 Fix password validation min length message
When relying on static config instead of an explicitly set minLength then this message would show without the value, like "it must be  or more characters long".
2019-05-13 13:43:29 +12:00
aNickzz
28be2b2263
Swap argument order for implode
I noticed this squiggly red line while perusing the code.

The PHP doc says
`implode ( string $glue , array $pieces ) : string`
> implode() can, for historical reasons, accept its parameters in either order. For consistency with explode(), however, it may be less confusing to use the documented order of arguments.
2019-05-11 00:32:23 +09:30
Aaron Carlino
2bdf1eac0a Merge branch '4.4' into 4 2019-05-06 16:03:35 +12:00
Guy Marriott
856e841955 FIX Ensuring pagination buttons have a consistent state to work off of (#8957) 2019-05-06 14:42:25 +12:00
Guy Marriott
371588e8b1
Merge pull request #8961 from indygriffiths/patch-1
NEW Only get an authenticator if it's an object
2019-05-06 14:27:18 +12:00
Maxime Rainville
8ee50d2ba7 API Remove DataObjectSchema::getFieldMap() (#8960)
Introduced as a less public API in https://github.com/silverstripe/silverstripe-assets/pull/227
2019-05-06 12:33:23 +12:00
Indy Griffiths
5dc57518c2
NEW Filter out authenticators that are falsy
Use-case: if a module is defining its own authenticator and you want to disable it, as it seems we don't have `unregister_authenticator()` anymore and I can't spot how to remove YAML-based injected properties, then this lets you mark it as null or false to prevent it from erroring out when it attempts to call `supportedServices()`
2019-05-04 20:58:48 +12:00
Robbie Averill
5337e6d048 API Replace FormActions with anchors to enable panel-based loading in GridField navigation buttons (#8953)
* FIX Add accessibility labels and titles to previous, next, and add new buttons in GridFields

* API Replace FormActions with anchors to enable panel-based loading in GridField navigation buttons

* FIX Previous and Next links are now correctly disabled when end of lists are reached

* Add English translations
2019-05-03 15:03:59 +12:00
Guy Marriott
82c8225502
Merge branch '4.3' into 4.4 2019-05-03 09:45:25 +12:00
Ingo Schommer
1f78e8ae80 NEW Clean up secureassets module artefacts (#8948)
See https://github.com/silverstripe/silverstripe-assets/issues/231
2019-05-02 21:05:19 +12:00
Andre Kiste
48db515fbd NEW Fix folder permissions (#8950)
* Add `FixFilePermissionsHelper` subtask
* Changed name to folder permissions, added more loggin
2019-05-02 16:28:57 +12:00
Serge Latyntcev
3d777cfb8a Backward compatible behaviour for SQLConditionalExpression::getJoins 2019-05-02 15:39:36 +12:00
Ingo Schommer
0696045e59 NEW Legacy thumbnail migration task (#8924)
* NEW Legacy thumbnail migration task

See https://github.com/silverstripe/silverstripe-assets/issues/235
Makes a start at https://github.com/silverstripe/silverstripe-assets/issues/219 as well

* API Removed migrate_legacy_file support

For the vast majority of sites, you really don't want to run your file migration as part of dev build.
The step is involved enough to warrant it's own task.
I don't think this is an API change, since the setting won't have affect
for anyone who has already enabled it - they would've already done the one-off migration.

See https://github.com/silverstripeltd/open-sourcerers/issues/91
and https://github.com/silverstripe/silverstripe-assets/issues/235
2019-05-02 09:33:53 +12:00
Guy Marriott
ecfe039e72
FIX Don't add "better buttons" previous and next without a paginator 2019-05-01 15:48:03 +12:00
Andre Kiste
0c6c57f1ef Add getFieldMap method to retrieve a list of all fields for any giv… (#8892)
* Add `getFieldMap` method to retrieve a list of all fields for any given class

* Add `TagsToShortcodeTask` to upgrading guide

Adding after the file migration part as this is where it makes the most sense to run it.

* `getFieldMap` accepts an array

* Move to `DataObjectSchema`

* Add `HTMLVarchar` to documentation
Minor refactoring

* Add test for checking that `subclassesfor` works without the base class
Add test `DataObjectSchema::getFieldMap` returns the correct array

* Remove cms dependency
2019-04-30 10:43:14 +12:00
Andre Kiste
2bcf8b5ff3 More verbose file migration logging
See https://github.com/silverstripeltd/open-sourcerers/issues/91

* Add `PreformattedEchoHandler`

cherry-picked from 4c3f3e6bea99b46b689e5b23d1bd1498a4ac696c

* Batch log messages for every 100 file.
Also make logger work for stdout

* Update src/Logging/PreformattedEchoHandler.php

Co-Authored-By: bergice <bergice@users.noreply.github.com>
2019-04-30 08:54:48 +12:00
Robbie Averill
8c6bf7ce53 Merge branch '4.3' into 4.4 2019-04-21 11:09:25 +12:00
Robbie Averill
523456ae09
Merge pull request #8921 from creative-commoners/pulls/4.3/threshold-count-in-sql
FIX Calculate threshold condition with SQL rather than PHP
2019-04-21 01:25:24 +12:00
Guy Marriott
80ad336e97 NEW Add API to create a generator from a DataList (#8931) 2019-04-18 15:31:41 +12:00
Aaron Carlino
c63eecc3e1 Merge branch '4.3' into 4 2019-04-18 11:57:36 +12:00
Guy Marriott
da1af3d8b0
FIX Postgres booleans should return as int for consistency 2019-04-17 15:15:17 +12:00
Sam Minnée
6a2762662b MINOR: Change “Choose Page” to “Search or choose Page” (#8766)
* MINOR: Change “Choose Page” to “Search or choose Page”

Based on discussions with James Ford, it wasn’t clear that you could
search.

* Use new translation key
2019-04-16 16:06:37 +12:00
Guy Marriott
9d6b5048a6 FIX Table aliases are retained on base tables in queries built using SQLConditionalExpression (#8918)
* Adding failing test for base table aliases using SQLSelect

* FIX Retain table aliases applied to the base table on queries

* FIX Move the trimmed alias outside of the condition so we can use it within the condition
2019-04-16 15:40:09 +12:00
Guy Marriott
7fd6e14423
Adding comment about the === 't' condition for supporting postgres 2019-04-16 12:10:13 +12:00
Guy Marriott
a48beac845
FIX Calculate threshold condition with SQL rather than PHP
This is a performance fix. Modern SQL engines can avoid counting a whole result set (potentially thousands of records) when you are only interested if the count exceeds a threshold.
2019-04-15 16:48:44 +12:00
Sheila Bañez
63360f8048 BUG Replace substr with mb_substr to get the correct position 2019-04-15 16:38:52 +12:00
Guy Marriott
b1339f0d72 NEW Update FieldList::replaceField API to match removeByName (#8876)
* API Update FieldList::replaceField API to match removeByName

This specifically adds the parameter that `removeByName` has but `replaceField` does not. This parameter is set to `true` by default rather than inheriting the same default as `removeByField`. This is because the existing funtionality of `replaceField` was the same as if this parameter was set to `true`. This should be updated in SS5 to match the `removeByField` API.

* Add dataFieldOnly to CompositeField
2019-04-15 16:22:54 +12:00
Ralph Slooten
66c372ce28 Include baseURL with relative setGetVar() links (#8834)
* Return baseURL with setGetVar

* Adjust testSetGetVar tests for base url
2019-04-15 14:50:46 +12:00
Robbie Averill
2c971eea83 Merge branch '4.3' into 4 2019-04-11 11:37:47 +12:00
Robbie Averill
f2f28586d9 Merge branch '4.2' into 4.3 2019-04-11 11:37:34 +12:00
Robbie Averill
116ea12783 Merge branch '4.1' into 4.2 2019-04-11 11:37:22 +12:00
Robbie Averill
f4a6115ee6 Merge branch '4.0' into 4.1 2019-04-11 11:36:40 +12:00
Robbie Averill
8a06682e31 Merge branch '4.3' into 4
# Conflicts:
 #	src/ORM/Connect/DBSchemaManager.php
2019-04-11 11:24:17 +12:00
Robbie Averill
55cbacca86 Merge branch '4.2' into 4.3
# Conflicts:
 #	src/Forms/GridField/GridFieldLevelup.php
 #	src/includes/constants.php
2019-04-11 11:21:42 +12:00
Sam Minnee
f12fa62ad6 FIX: Better error message when GridFieldLevelup passed bad record details
Fixes https://github.com/silverstripe/silverstripe-framework/issues/3519
2019-04-08 18:09:51 +12:00
Loz Calver
594af77134 FIX: prevent unnecessary field alterations for enums with empty defaults 2019-04-05 16:17:41 +01:00
Robbie Averill
8b4b54f264
PHPCS linting error on indentation 2019-04-05 16:29:24 +13:00
Sam Minnee
c9c7c0c825 FIX: Fix PDO cached statement column coercion
NEW: Add PDOStatementHandle class that is now what PDOQuery expects
2019-04-05 15:11:21 +13:00
Sam Minnee
45e1fcaf30 FIX: Correct type coercion of MySQL 2019-04-05 15:11:21 +13:00
Sam Minnee
adb6e9eb8d FIX: Perform type coercion on PDO-based MySQL and SQLite connections
It turns out that this is needed for decimal values on MySQL and all
values on SQLite
2019-04-05 15:05:42 +13:00
Ingo Schommer
afb3c825c9
Merge pull request #8890 from open-sausages/pulls/4/get-installer-to-self-create-assets-folder
BUG Update installer to create the assets folder if its missing
2019-04-05 14:41:01 +13:00
Ian Patel
759968bbe2 Fix Undefined variable: result when catch Exception 2019-04-05 11:33:01 +13:00
Guy Marriott
a9d57f5bfb
Merge pull request #8241 from creative-commoners/pulls/4.3/separate-logging
Separate core error logging from standard LoggerInterface
2019-04-05 08:49:09 +13:00
Rafael Marins de Sousa
68337bd8be Including is_array validation to getEnv method. When SS website is deployed to FortRabbit .env file is read as string what causes the website to crash, due to the lack of type check at getEnv method. 2019-04-04 15:41:13 +13:00
Maxime Rainville
c84ad4278f BUG Update installer to create the assets folder if its missing 2019-03-29 17:56:39 +13:00
Aaron Carlino
fc6213c293 Merge branch '4.3' into 4 2019-03-27 13:25:57 +13:00
Aaron Carlino
9eac374b13 Use strcasecmp 2019-03-27 12:40:56 +13:00
Jonathon Menz
fae19c16b5 FIX has_one File form scaffolding
Only allow selection of a single file when scaffolding has_one File relationship (fixes #8862)
2019-03-26 09:50:59 -07:00
Damian Mooyman
6dc41e50a0
MINOR Linting fixes 2019-03-26 17:35:58 +13:00
Damian Mooyman
83ec0b69fa
BUG Resolve issue where schema changes between enum / non-enum types 2019-03-26 14:16:05 +13:00
Loz Calver
8483a9644c
Merge pull request #8874 from johannesx75/fix-pdoconnector-generatedid-type-2
Fix PDOConnector GeneratedID return type
2019-03-22 09:09:23 +00:00
Daniel Hensby
6d4d332448
Merge pull request #8830 from ntd/pr7
Fix #8829: mention get_one does not escape field names
2019-03-21 14:38:34 +00:00
Johannes Hammersen
e1190e33d2 Fix PDOConnector GeneratedID return type 2019-03-21 09:26:14 +01:00
Kong Jin Jie
1d406c64b9 Fix: Allow editing of relation if item is created. 2019-03-20 12:51:49 +08:00
Aaron Carlino
f6a7bddd8d Linting 2019-03-20 15:50:54 +13:00
Aaron Carlino
388baa01b4 Fix linting 2019-03-20 13:19:10 +13:00
Aaron Carlino
aa491d9294 Fix tests 2019-03-20 12:33:00 +13:00
Aaron Carlino
39a29fa2f6 ENHANCEMENT: has_extension() should allow injector overrides 2019-03-20 12:33:00 +13:00
Damian Mooyman
6b450395ce API Allow empty arraylists to be typed (#8866)
* API Allow empty arraylists to be typed

* PHPCBF fixes
2019-03-20 11:46:35 +13:00
Robbie Averill
0777ab5ee7
Merge pull request #8847 from blueo/pulls/optional-test-teardown
Add option to leave Temp DB when exiting
2019-03-19 15:58:31 +13:00
Bernard Hamlin
8d1a238e97 Add option to leave Temp DB when exiting 2019-03-19 14:37:13 +13:00