Commit Graph

106 Commits

Author SHA1 Message Date
Michal Kleiner 21129b1624
Use short array syntax across the framework's codebase 2020-05-16 10:34:45 +01:00
Dan Hensby 28ba4f701a
Merge branch '4.5' into 4 2020-04-27 09:54:27 +01:00
Dan Hensby 13b4d60d4a
Merge branch '4.4' into 4.5 2020-04-27 09:53:42 +01:00
Dan Hensby 85b37999be
Merge branch '4.3' into 4.4 2020-04-27 09:52:52 +01:00
Dan Hensby e328d6f0d9
Merge branch '4.2' into 4.3 2020-04-27 09:51:24 +01:00
Dan Hensby b9f8ab44ac
Rename DBBigint.php for composer autoloading compatability 2020-04-24 23:15:42 +01:00
Daniel Hensby 237b2d5f74
Convert array delcarations to short array syntax 2020-04-20 18:58:09 +01:00
Steve Boyd 8c7e10bd55 Merge branch '4.5' into 4 2020-02-11 16:45:35 +13:00
mnuguid ca36a47bb1 FIX Update ORM DBField types to use Injector in scaffoldFormField()
- This is usable in cases where a DBField is needed to be overloaded through the Injector.
2020-02-04 21:43:47 +13:00
Garion Herman af90d17e19
Merge pull request #9359 from open-sausages/pulls/4.4/dbhtmlvarchar-scafolding
BUG Remove bad default when scaffolding form field for DBHTMLVarchar
2020-01-07 09:33:25 +13:00
Maxime Rainville 31a8c16c43
Remove default row size 2020-01-07 09:13:03 +13:00
Maxime Rainville 8d69cf9f75 BUG Remove bad default when scaffolding form field for DBHTMLVarchar 2019-12-18 17:32:02 +13: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
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
Robbie Averill c76d3a5db1 FIX Protect against undefined index when using nullifyEmpty option 2019-06-26 09:26:36 +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
Aaron Carlino c63eecc3e1 Merge branch '4.3' into 4 2019-04-18 11:57:36 +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
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
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
Robbie Averill 79e44b42fa Merge branch '4.1' into 4.2 2019-02-19 08:37:07 +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
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
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
Sam Minnee 5bb2d9484a FIX: Update “original” DataObject data to be the content of the last write
FIX: Compare to original when determining fields changes

This fixes a number of edge-case issues relating to change detection.

Fixes #8443
Fixes #3821
Fixes #4561
2018-11-05 23:09:24 +13:00
Robbie Averill b02a6fa02d FIX Replace usage of Convert JSON methods with json_encode 2018-10-28 21:15:29 +00:00
bergice a28e2e183e BUG: Fix enum filter in Search component from adding `Any` as a filter
Fixes #702
2018-10-19 17:05:12 +13:00
Sam Minnee 0fc06e51e5 FIX: Drop seconds from DBDatetime::Nice() to restore SS3 behaviour.
Note that the medium date format depends on locale, with en_NZ being
resolutely numeric. I’ve updated the test to verify a couple of locales
to make this more obvious.

Fixes #8121
2018-10-04 14:51:24 +13:00
Harsh Chokshi 6af736a9e1 Change DBCurrency scaffolded form field to CurrencyField (fixes #8246)
Add test ensuring DBCurrency scaffolds CurrencyField
2018-07-09 10:57:01 +12:00
Damian Mooyman 53dded8cff
API Remove @internal from new 4.2 methods 2018-06-15 13:14:42 +12:00
Robbie Averill 5fa5abf295 Merge branch '4.1' into 4
# Conflicts:
  #	src/Forms/DateField.php
2018-06-15 11:52:07 +12:00
Damian Mooyman b636587945
Respect semver and add tests 2018-06-15 11:04:12 +12:00
Damian Mooyman 310a259c5f
Add locale to Format
Fix up some regressions
2018-06-14 17:28:16 +12:00
Damian Mooyman 02ae2e7ed0
BUG Fix internal date formatting inheriting default locale
Fixes #8097
2018-06-13 13:32:11 +12:00
Damian Mooyman be8287fef8 BUG Prevent failover / extensions interfering with composite field properties (#7988) 2018-04-06 14:48:24 +12: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
Andreas Lindahl dd44deacb4 Fix for "too few parameters" error when using DBMultiEnum 2018-03-28 16:42:12 +02:00
Damian Mooyman 8b9c292509
Merge remote-tracking branch 'origin/4.1' into 4 2018-03-13 14:26:39 +13:00