Commit Graph

1756 Commits

Author SHA1 Message Date
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
Loz Calver
ca781c684d FIX: RequestHandler::__construct() should run after middlewares (fixes #8848) 2019-03-11 11:08:03 +00:00
Nicola Fontana
252397d8d1 Fix #8829: mention get_one does not escape field names 2019-03-08 08:20:47 +01:00
Dan Hensby
765d1568ab
Merge branch '4.3' into 4 2019-03-06 11:04:50 +00:00
Dan Hensby
a8605b04e0
Merge branch '4.2' into 4.3 2019-03-06 11:04:14 +00:00
Dan Hensby
7e34167ddf
Merge branch '4.1' into 4.2 2019-03-06 11:01:17 +00:00
Dan Hensby
625e6d5f54
Merge branch '4.0' into 4.1 2019-03-06 11:00:41 +00:00
Guy Marriott
f8f6983773
Merge pull request #8793 from wilr/pulls/orm-exception
Throw error message when searchable_field does not return a object
2019-03-06 08:50:50 +13:00
Daniel Hensby
7416ce275b
FIX doInit comparison should be lowercased 2019-03-05 19:01:12 +00:00
Damian Mooyman
d1396b7dfe
BUG Fix writeBaseRecord with unique indexes
Fixes #6819
2019-02-27 16:40:12 +13:00
Maxime Rainville
11b9429c34 Merge branch '4.3' into 4 2019-02-27 12:14:51 +13:00
Maxime Rainville
651d537196 Merge branch '4.2' into 4.3 2019-02-27 12:13:24 +13:00
Maxime Rainville
ed013fcfbb Merge branch '4.1' into 4.2 2019-02-27 12:12:39 +13:00
Maxime Rainville
ac53f77115 Merge branch '4.0' into 4.1 2019-02-27 12:11:47 +13:00
Robbie Averill
7ab55a4948 Add LoggerState to disble user-configured logging during PHPUnit tests 2019-02-22 11:43:01 +07:00
Maxime Rainville
9a59f2f57d BUG Renable the ability to do dynamic assignment with DBField 2019-02-22 11:08:43 +13:00
Robbie Averill
3e90fdf42f Merge branch '4.3' into 4 2019-02-19 08:41:05 +07:00
Robbie Averill
ed74549c4f Merge branch '4.2' into 4.3 2019-02-19 08:39:59 +07:00
Robbie Averill
79e44b42fa Merge branch '4.1' into 4.2 2019-02-19 08:37:07 +07:00
Robbie Averill
cb7f15a681 Merge branch '4.0' into 4.1 2019-02-19 08:36:41 +07:00
Aaron Carlino
09c539e1c3 Merge branch '4.3' into 4 2019-02-19 12:21:24 +13:00
Maxime Rainville
25bba49923 [SS-2018-021] Fix potential SQL vulnerability in non-scalar value hyrdation 2019-02-19 12:20:24 +13:00
Robbie Averill
7a508af387
Merge pull request #8795 from creative-commoners/pulls/4.3/improve-foreign-key-form-field-scaffolding
FIX Caching the result of counting a foreign list for performance
2019-02-12 15:56:11 +07:00
Maxime Rainville
95505db7d6 [SS-2018-021] Fix potential SQL vulnerability in non-scalar value hyrdation 2019-02-12 21:08:09 +13:00
Maxime Rainville
fd90cf6ceb [SS-2018-021] Fix potential SQL vulnerability in non-scalar value hyrdation 2019-02-12 20:44:17 +13:00
Guy Marriott
0ac43ce025
FIX Caching the result of counting a foreign list for performance 2019-02-12 15:28:03 +13:00
Will Rossiter
d4f6ff98c8 Throw error message when searchable_field does not return a object
While upgrading 4.2 to 4.3 the behaviour of GridFieldFilterHeader has changed (example code: https://gist.github.com/wilr/7c59f577e1d072eb66e4c0c84cba6732).

This patch doesn’t affect the behaviour (since the explict object is a better API) but it makes upgrading easier to identify the field.
2019-02-12 09:39:27 +13:00
Damian Mooyman
b8122f88c5
Merge pull request #8174 from creative-commoners/pulls/4.2/deprecated-fixture-state
MINOR Replace use of deprecated getFixtureFactory() with FixtureTestState
2019-02-11 14:16:37 +13:00
Robbie Averill
a104b5b48f
Merge pull request #8769 from creative-commoners/pulls/4.0/escape_for_like
FIX Escape wildcard characters when matching database name in databaseExists
2019-02-10 08:26:28 +03:00
Loz Calver
7c5b73881b FIX: Prevent null->null being flagged as a value change (fixes #8774) 2019-02-06 13:24:18 +13:00
Guy Marriott
b2e18dda9c
Merge pull request #8783 from open-sausages/pulls/4/docs-dataobject-update
DOC Clarify DataObject->update() use
2019-02-04 21:45:13 +13:00
Ingo Schommer
a78573b517 DOC Clarify DataObject->update() use 2019-02-04 20:47:27 +13:00
Robbie Averill
7775f82584 FIX Handle falsy return value when setting form field value in setAuthenticatorClass() 2019-02-01 19:39:15 +03:00
Robbie Averill
ebfab45e23 API LoginForm::authentiator_class is now deprecated, use getters or setters instead 2019-02-01 19:39:15 +03:00
Robbie Averill
3d5c330e17
Merge pull request #8558 from open-sausages/pulls/4/deprecating-declared-permissions
API Deprecating Permission::$declared_permissions and related methods/props
2019-01-30 19:48:41 +02:00
Maxime Rainville
8ec9c50c58 DOCS Correct documentation for ExecMetricMiddleware 2019-01-30 13:58:09 +13:00
Maxime Rainville
868258926f
Implement feedback on PSR-19 compatibility 2019-01-30 11:57:17 +13:00
Guy Marriott
f918dcd36a
FIX Escape wildcard characters when matching database name in databaseExists 2019-01-30 09:31:13 +13:00
mikeyc7m
0491ca03cf FIX prevent death on urls with querystrings & anchors 2019-01-29 13:15:14 +02:00
Robbie Averill
b0fc161235
Merge branch '4' into pulls/4/deprecating-declared-permissions 2019-01-29 09:33:44 +02:00
Andre Kiste
d2c8530fec
Merge pull request #8733 from open-sausages/pulls/4/add-exectmetric-url-debug-param
NEW Add new execmetric debur URL parameter to print out exection time and peak memory usage
2019-01-29 18:49:10 +13:00
Maxime Rainville
c4bf06f600 NEW Add new execmetric debug URL parameter to print out exection time and peak memory usage 2019-01-29 17:28:28 +13:00
Maxime Rainville
a589bcb092
Merge pull request #8729 from emteknetnz/bugfix/htmlvalue-getcontent
Ensure document is not falsey before attempting to clone it
2019-01-29 09:11:04 +13:00
Loz Calver
785e9f123f Replace self:: with static:: for shortcode methods 2019-01-28 14:51:34 +00:00
Robbie Averill
dc9d1b9cc0 FIX GridFieldPrintButton no longer assumes that children of GridField would implement their own print template 2019-01-28 11:45:55 +02:00
Guy Marriott
fad221bf1c
Merge pull request #8756 from open-sausages/pulls/4/string-cast-dropdownfield-entry-title
MINOR Always cast formfield display value as a string to avoid 0 being blank
2019-01-28 12:09:20 +13:00
Guy Marriott
7ee0dff391
Merge pull request #8745 from open-sausages/pulls/4/add-extra-message-to-MigrateFileTask
MINOR Add message to inform user that the task can be run again
2019-01-28 09:24:00 +13:00
Maxime Rainville
db466fb013 MINOR Always cast formfield display value as a string to avoid 0 being blank 2019-01-25 13:34:36 +13:00
Benedikt Seidl
d530bc2fb6 fix user feedback when jquery could not be loaded 2019-01-24 20:51:48 +01:00
Robbie Averill
d8cd085190 Merge branch '4.3' into 4 2019-01-24 17:14:09 +02:00
Maxime Rainville
39297b8640 MINOR Add message to inform user that the task can be run again without issue 2019-01-23 18:40:15 +13:00
Simon Gow
c28670ebed #8724 - Session timeout regression
Only emit the session refresh cookie if the session timeout is set.
2019-01-18 10:07:53 +13:00
Simon Gow
af08328e8e Existing sessions need to set a new cookie on each request, if the
session exists, otherwise our expiry is never updated and sessions
can't roll on every request.
2019-01-17 17:37:35 +13:00
Steve Boyd
7ea218aa1c Ensure document is not falsey before attempting to clone it 2019-01-16 16:24:45 +13:00
Maxime Rainville
13486ca80e MINOR Add unit test for Requirements::add_i18n_javascript() 2019-01-16 10:36:53 +13:00
Maxime Rainville
c6214b855f MINOR Update add_i18n_javascript to load lowercase-dash language files 2019-01-15 15:04:39 +13:00
Damian Mooyman
34ac228029
BUG Fix issue with assertListEquals() ignoring field getters 2019-01-11 11:35:11 +13:00
Aaron Carlino
ab5bbda88c Merge branch '4.3' into 4 2019-01-10 12:31:27 +13:00
Maxime Rainville
1e01deea39 NEW Make resources dir configurable (#8519)
* NEW Make resources dir configurable.

* Removing reference to old `resources` and updating doc #8519

* Rrtarget to 4.4 release.

* DOC Reference SS_RESOURCES_DIR in Environment doc.

* API Add a Resources method to SilverStripe\Core\Manifest\Module to read the resources-dir from composer.json

* Clean up reference to SS_RESOURCES_DIR env var

* Set default resources-dir

* Update test to use RESOURCES_DIR const in expected resource url method

* Correcting typos

Co-Authored-By: maxime-rainville <maxime@rainville.me>

* MINOR Correctubg minor typos

* DOCS Document the intricacies of exposing static assets.
2019-01-09 15:35:45 +13:00
Robbie Averill
068c240d38
Update src/Core/CustomMethods.php
Co-Authored-By: jchenevey <jchenevey@users.noreply.github.com>
2019-01-08 15:27:38 -05:00
Joe Chenevey
3730d84d18
Update CustomMethods.php
Switch to an early `continue` rather than wrapping contents of `foreach` in an `if` and indenting.
2019-01-08 15:24:21 -05:00
Joe Chenevey
afceccb9a6
CustomMethods->removeMethodsFrom Warnings
Check to ensure `self::$extra_methods[$class][$method]` exists before trying to retrieve its value. Silences warnings generated by updating a controller's failover.
2019-01-08 15:14:23 -05:00
Robbie Averill
7c96feef37 Merge branch '4.3' into 4 2019-01-08 12:27:48 +01:00
Robbie Averill
394dd4765c NEW Scaffolded field labels now only have an uppercased first word 2019-01-07 17:52:28 +01:00
Kong Jin Jie
1667af8f5e Add $disabledItems to check for disabled items instead of checking against $defaultItems
Fixes #8688
2018-12-31 17:25:11 +08:00
Russell Michell
0397c54b5a FIX: Fixes #8459
- Missing conditionals for optional constructor args
- Missing calls to FieldList::setForm()
- Missing guards around naive calls to Form::Fields()->foo()
2018-12-19 13:28:19 +13:00
Simon Gow
d01585cc98 #8543 Resolve Duplicate Headers
- fix linting
2018-12-19 12:39:32 +13:00
Simon Gow
1edfa4d956 #8543 Resolve Duplicate Headers
- Replace session name lookup with function to also check secure cookies
- Added timeout which defaults to 0 (same as PHP)
- Removed php7 style of session_start from PR
- moved session_start into headers sent block to prevent warnings.
2018-12-19 12:39:32 +13:00
Simon Gow
4eb6669c08 #8543 Resolve Duplicate Headers
Put cookie_lifetime back into the session parameters.
2018-12-19 12:39:32 +13:00
Simon Gow
2deb8f4176 Resolve Duplicate Headers
Ensure only a single Set-Cookie header is returned from Session once
we have data to save. Include backwards compatibility for PHP56
2018-12-19 12:39:32 +13:00
Maxime Rainville
7f6b80f87d Correct session doc typo 2018-12-14 13:01:22 +13:00
Guy Marriott
87b74b9cc1
Correcting Max's eggrigious typos
Co-Authored-By: maxime-rainville <maxime@rainville.me>
2018-12-13 13:50:35 +13:00
Maxime Rainville
6e214e2e8b DOCS Updating Session doc to reflect that you need to operation on an instance. 2018-12-13 11:05:49 +13:00
Robbie Averill
470093de2f
Merge pull request #8650 from sminnee/nested-vendor
FIX: Manifest should ignore vendor folders within packages contained in vendor
2018-12-12 19:52:03 +00:00
Aaron Carlino
ab116cd5d9 Merge branch '4.1' into 4.2 2018-12-12 15:56:53 +13:00
Robbie Averill
74698af402 [SS-2018-020] Ensure that table names are escaped to prevent possible SQL injection 2018-12-11 20:57:18 +13:00
Robbie Averill
8bd747d12a [SS-2018-020] Ensure that table names are escaped to prevent possible SQL injection 2018-12-11 20:56:55 +13:00
Robbie Averill
fecedc2d98 [SS-2018-020] Ensure that table names are escaped to prevent possible SQL injection 2018-12-11 20:56:40 +13:00
Robbie Averill
48bd335648 [SS-2018-020] Ensure that table names are escaped to prevent possible SQL injection 2018-12-11 20:55:58 +13:00
Robbie Averill
5d7c5ffb07 Merge branch '4.3' into 4 2018-12-06 09:40:40 +00:00
Robbie Averill
08866f89d9 Merge branch '4.2' into 4.3 2018-12-06 09:40:05 +00:00
Robbie Averill
96bd17d469 Merge branch '4.1' into 4.2 2018-12-06 09:38:45 +00:00
Robbie Averill
3f532466d1 Merge branch '4.0' into 4.1 2018-12-06 09:37:52 +00:00
Guy Marriott
6edcbe9086
Merge pull request #8592 from open-sausages/pulls/4.0/tree-multiselect-null
FIX TreeMultiselectField passes value 'unchanged' as null to ORM
2018-12-06 14:23:48 +13:00
Guy Marriott
c7b5b1efd2
FIX Switching to use Controller::curr as it was using previously 2018-11-30 15:40:45 +13:00
Guy Marriott
32d096d9e5
DOCS Moving interface subscription to the abstract and adding a changelog entry 2018-11-30 15:40:45 +13:00
Guy Marriott
ddaa22986f
Updating StateStore interface not to define a constructor & fixing GridFieldFilterHeader to add required attributes 2018-11-30 15:40:45 +13:00
Guy Marriott
b4c8f699eb
FIX Provide alternatives to session for storing GridField_FormAction state 2018-11-30 15:40:45 +13:00
Sam Minnee
0c17ffc944 FIX: Manifest should ignore vendor folders within packages contained in vendor
Without this change vendor/silverstripe/framework/vendor/silverstripe/config
will be pick up by the manifest, which is inappropriate.

Although this doesn’t happen often, it can occur if you have run
“composer install” within vendor/silverstripe/framework, which can be
done either accidentally or (in my case) as part of running the
framework tests isolated from the rest of your project (which is closer
to the execution model on Travis)

Note that the presence of the ‘nestedvendor.txt’ file tests that this
works without any explicit changes to the PHP of the tests, since it’s
merely confirming that such a file is *not* picked up.
2018-11-30 13:52:25 +13:00
Loz Calver
3f8551df41
Merge pull request #8462 from sminnee/nondestructive-enum
FIX: Make all enums non-destructive, not just ClassName
2018-11-28 16:42:12 +01:00
Loz Calver
441d079647
Merge pull request #8637 from creative-commoners/pulls/4.4/falsy-detail-component
FIX getComponentByType can return null - prevent null pointer errors
2018-11-26 18:28:26 +01:00
Robbie Averill
f22a4b980b FIX getComponentByType can return null - prevent null pointer errors 2018-11-26 16:01:46 +01:00
Robbie Averill
efa427fc45 FIX Remove redundant "rightGroup" logic and increase getRightGroupField to protected 2018-11-26 12:42:47 +01:00
Robbie Averill
1f1c344272 Merge branch '4.3' into 4
# Conflicts:
 #	tests/php/Forms/ConfirmedPasswordFieldTest.php
2018-11-26 12:15:17 +01:00
Robbie Averill
41dc9229bf FIX Reverting ExtensionTestState and Extensible extra methods modifications to prevent PHP 5.6 segfault (#8581)
* API Revert addition of Extensible::flush_extra_methods_cache() and change to ExtensionTestState

This reverts the changes from #8465 and #8505 that relate to ExtensionTestState and the
tracking of extra methods between unit tests. The existing test from #8465 testing
overloaded Extensions after extra_methods are populated has been updated to show that you
must re-add the extension to flush the extra_methods cache if you need this behaviour.

* Revert change to InjectorTest::testExtendedExtensions

* Revert "Add failing test to show that overloaded extensions are broken in Extensible"

This reverts commit 55e79ffdfd.

* DOCS Add docs for extending extensions, and upgrade guide note to 4.3 to avoid using PHP config to do so
2018-11-26 12:00:02 +13:00
Andre Kiste
1d9e40ba26 Use new plus icon (#8619)
* Use new plus icon and refactor

* MINOR: Add ability to customise the visibility of the `Previous`, `Next` and `Add` buttons at a `GridField` level

* - Merge `showPrevious` and `showNext` to `showPagination` for grid fields
- Update documentation
- Improve performance for next/previous buttons by not fetching all list records
- Refactoring

* Refactor to fail gracefully on GridFieldPaginator

* Fix merge
2018-11-23 12:40:18 +13:00
Serge Latyntcev
9ce6d91b76 FIX / TreeMultiselectField::objectForKey handles list of IDs correctly 2018-11-22 12:11:18 +13:00
Maxime Rainville
d74af1c17e FIX Explicity mark nodes when searching nodes in TreeDropdownField #8621 2018-11-21 11:43:21 +13:00
Andre Kiste
cc712892a9 NEW Port betterbuttons to framework (#8569)
* MINOR: Add `Previous`, `Next` and `Create New` actions in edit form

If the form is opened via a grid field, the filters will be retained so the previous/next record opened will be correct

* MINOR: Add ability to customise the visibility of the `Previous`, `Next` and `Add` buttons at a `GridField` level

* Fix invalid action when pressing the `New` button in an edit form unless `betterbuttons` module was installed

* - Merge `showPrevious` and `showNext` to `showPagination` for grid fields
- Update documentation
- Improve performance for next/previous buttons by not fetching all list records
- Refactoring

* Refactor to fail gracefully on GridFieldPaginator
2018-11-19 11:06:47 +13:00
Robbie Averill
3b1e91eb59 Merge branch '4.2' into 4.3 2018-11-15 13:41:23 +02:00
Robbie Averill
ef0f9dff8a Merge branch '4.1' into 4.2 2018-11-15 13:41:00 +02:00
Robbie Averill
c6e3a398c7 Merge branch '4.0' into 4.1 2018-11-15 13:40:08 +02:00
Loz Calver
b5bae137bd FIX: Redirect loop with multiple confirmation tokens present (fixes #8607) 2018-11-15 10:59:42 +00:00
Robbie Averill
580214cc30 API Add PHP deprecation notices to setLogger and getLogger 2018-11-13 11:12:06 +02:00
Robbie Averill
8854f053c8 Fix rebase conflicts 2018-11-13 11:09:33 +02:00
Robbie Averill
a8853504b4 API API MonologErrorHandler::setLogger is deprecated, use MonologErrorHandler::pushLogger instead 2018-11-13 11:08:27 +02:00
Robbie Averill
0a672372ff Update typos in PHPDocs and comments 2018-11-13 10:59:37 +02:00
Robbie Averill
d37551de34 NEW Setters in DebugViewFreindlyErrorFormatter are now chainable 2018-11-13 10:59:37 +02:00
Serge Latyntcev
15aaf9db9f Fix a code style typo 2018-11-13 10:20:49 +13:00
Guy Marriott
b2dd22fb50
Merge pull request #8506 from creative-commoners/pulls/4.3/all-the-unit-tests
NEW Adding a stack more unit tests for logging and some form fields
2018-11-11 10:31:24 +13:00
Sam Minnee
bd5a815909 FIX: Make all enums non-destructive, not just ClassName
This change also renders a portion of DBSchemaManager irrelevant, that
destructively “fixes” old values. This is in keeping with the
non-destructive principle of dev/build, and some suggestions to move
away from enum fields altogether.

Fixes https://github.com/silverstripe/silverstripe-framework/issues/1387
2018-11-10 12:10:25 +13:00
Robbie Averill
0f2eebe5d4 NEW Change to variadic calls in ListDecorator and add unit tests 2018-11-09 13:59:14 +02:00
Loz Calver
bbb208e1dd
Merge pull request #8499 from sminnee/fix-1489
FIX: CheckboxSetField can now save into DBMultiEnum
2018-11-09 10:40:55 +01:00