Commit Graph

2739 Commits

Author SHA1 Message Date
Thomas Portelange
d3c2fa897c
nicer key 2023-08-01 14:27:00 +02:00
Steve Boyd
c58bc0a7ff FIX Use TransportFactory to prevent infinite config loop 2023-08-01 10:06:47 +12:00
Steve Boyd
d9f40a2e3c Merge branch '4' into 5.0 2023-07-31 11:56:28 +12:00
Steve Boyd
ae1c3bf0a0 Merge branch '4.13' into 5 2023-07-31 11:44:21 +12:00
Steve Boyd
7b21b38ac4 [CVE-2023-32302] Require password field to be non-empty 2023-07-31 11:14:22 +12:00
Thomas Portelange
909bee8101
fix cache key 2023-07-29 08:56:24 +02:00
Guy Sartorelli
158d51a0a5
Merge pull request #10861 from creative-commoners/pulls/5/no-placeholders
ENH Do not use placeholders for int ID filters
2023-07-25 14:54:07 +12:00
Steve Boyd
672396880d ENH Do not use placeholders for int ID filters 2023-07-25 14:31:39 +12:00
github-actions
4d8d5c04a5 Merge branch '5.0' into 5 2023-07-20 21:38:32 +00:00
github-actions
d8b69c36d9 Merge branch '4' into 5.0 2023-07-20 21:38:31 +00:00
Steve Boyd
a16b268ff7 MNT Tidy up double assignment 2023-07-20 18:19:14 +12:00
Guy Sartorelli
642321db61
FIX Trigger eagerloading for first() and last() (#10875) 2023-07-20 16:37:03 +12:00
Steve Boyd
7daa3fdb08 FIX Short-array syntax for Enum 2023-07-20 16:06:01 +12:00
Guy Sartorelli
3bf845a9e6
FIX Protect against loading incorrect eager-loaded relations.
Don't fetch eager-loaded has_many or many_many unless we've validated
that the relation IS actually a has_many or many_many relation.
Also clear eager-loaded relations when flushing the record.
2023-07-17 12:03:11 +12:00
Guy Sartorelli
95d1c674a2
FIX Allow multiple iterations of eager-loaded DataLists
Includes making sure toArray() uses the correct iteration logic,
and cloning resets the eagerloaded data for the new clone.

Previously, a second iteration would add every relation item to the
relation list a second time - so with each iteration your relation list
count doubled (though it was the same records time and again).
2023-07-17 12:03:11 +12:00
Guy Sartorelli
d0ca9cfdde
FIX many_many extraFields and join records weren't in eagerloading 2023-07-17 12:03:11 +12:00
Guy Sartorelli
82e96068d2
Merge branch '5.0' into 5 2023-07-10 14:30:07 +12:00
Guy Sartorelli
5854ce6190
Merge branch '4.13' into 5.0 2023-07-10 14:29:03 +12:00
Dylan Wagstaff
8c3ba81052
FIX PHP 8.1 support in MySQLiConnector::query errors (#10570)
* FIX PHP 8.1 support in MySQLiConnector::query errors

The default error reporting mode in PHP 8.1 has changed from using
errors reported on the connection handle to throwing
mysqli_sql_exception. query() makes no allowance for this, and
functions up the call stack expect to catch
Silverstripe\ORM\Connect\DatabaseException instead - resulting in the
MySQLi exception going all the way up to halt the system.

We can use a try, catch, and finally to retain backwards compatibility,
no matter which setting (e.g. PHP version default) someone has enabled.

* Move MySQLConnector test skip call into setUp()

As review feedback; marking the test as skipped in a private function
obfuscated where the call was happening and made it harder to skimread
the tests. Moving this into a setUp function makes it obvious the check
is run before each test case, and skipped if necessary.
2023-07-07 15:56:31 +12:00
Guy Sartorelli
62bd560d0e
Merge pull request #10819 from andrewandante/FEAT_add_only_individual_users_inherited_permission
NEW add OnlyTheseMembers Inherited Permission type
2023-07-07 09:37:59 +12:00
Andrew Paxley
a03d0fdf68 FIX ListboxField entwine submissions 2023-07-06 17:51:16 +12:00
Steve Boyd
730a03d3f6
Merge pull request #10855 from creative-commoners/pulls/5/fix-eagerloading-performance
FIX Resolve problems with eagerloading performance
2023-07-06 17:04:02 +12:00
Guy Sartorelli
7af0fe245c
FIX Resolve problems with eagerloading performance 2023-07-06 14:33:01 +12:00
Sabina Talipova
a57adfc778
MNT Deprecation notice if param has wrong type (#10853) 2023-07-05 17:21:30 +12:00
Guy Sartorelli
612f7e734f
FIX Allow repeated iterations of predicated query result (#10857) 2023-07-05 16:25:58 +12:00
Andrew Paxley
4b22ab4dfe API deprecate InheritedPermissions::getJoinTable 2023-07-05 16:22:17 +12:00
Andrew Paxley
34019426dd NEW add OnlyTheseMembers Inherited Permission type 2023-07-05 16:22:17 +12:00
Guy Sartorelli
85e503d012
ENH Refactor eagerloading fetch into separate methods
It is hard to work with the current structure - having each relation
type in its own method makes it way easier to see where my concerns
start and end with a given relation.

This also reduces the chance of variable bleed-over, where the value in
a variable in the first loop (in the same or other relation type) could
bleed into the next iteration of the loop.
2023-07-05 12:48:58 +12:00
Guy Sartorelli
66f2df2571
Merge pull request #10842 from andrewandante/ENH_add_listboxfield_react_component_schema
NEW ListboxField react field schema
2023-07-05 10:17:54 +12:00
Thomas Portelange
6fa71bbf51
ENH avoid multiple calls to records->count() In PermissionCheckboxSetField (#10839)
these calls are not cached and lead to duplicate queries

Co-authored-by: Michal Kleiner <mk@011.nz>
2023-07-04 13:34:12 +12:00
Andrew Paxley
e1d10a0b4c NEW ListboxField react field schema 2023-07-04 11:28:01 +12:00
Thomas Portelange
a019b34fac
csfix 2023-06-28 10:56:22 +02:00
Thomas Portelange
a969180433
add anonymize 2023-06-28 10:25:19 +02:00
Guy Sartorelli
60ca35c02d
Merge pull request #10841 from creative-commoners/pulls/5/optimise-get-schema
ENH Cache DataObject::getSchema()
2023-06-28 15:08:53 +12:00
Steve Boyd
46d7930489 ENH Cache DataObject::getSchema() 2023-06-28 11:11:43 +12:00
Steve Boyd
ed07303703 ENH Cache $item->ID for eager loading 2023-06-27 19:46:29 +12:00
Sabina Talipova
bb5378e177
FIX Gridfiled pagination missing after search (#10828) 2023-06-26 12:11:33 +12:00
Thomas Portelange
9391e696bb
use Member::class 2023-06-23 09:35:34 +02:00
Thomas Portelange
2e73b5eeca
Use cached query
Fixes https://github.com/silverstripe/silverstripe-framework/issues/10833
2023-06-22 11:04:26 +02:00
Guy Sartorelli
0c40cc9b3d
Merge branch '5.0' into 5 2023-06-22 11:19:59 +12:00
Guy Sartorelli
fb7d2256f1
Merge branch '4.13' into 5.0 2023-06-22 11:18:46 +12:00
Sabina Talipova
ad9df97626 FIX LastPage method returns true if TotalPages equals 0 2023-06-22 10:50:41 +12:00
Steve Boyd
e9358c88af DOC Update eagerLoad() docblock 2023-06-21 14:12:55 +12:00
Guy Sartorelli
d27bf3d85c
Merge pull request #10798 from beerbohmdo/fix/empty-template-arguments
FIX Passing 0 as first method argument breaks template
2023-06-15 11:04:08 +12:00
Steve Boyd
9a279f654d Merge branch '5.0' into 5 2023-06-14 16:09:58 +12:00
Steve Boyd
cfda51a48e Merge branch '4' into 5.0 2023-06-14 16:09:34 +12:00
josephlewisnz
b6a3e3a951
added an additional filter to remove empty array items (#10803)
* ENH Added filter to remove empty/null from Path::join parts

This is to ensure null values are removed and trim() deprecated warnings are not thrown
Fixes #10802

* FIX revert public signature

Co-authored-by: Steve Boyd <emteknetnz@gmail.com>

---------

Co-authored-by: Steve Boyd <emteknetnz@gmail.com>
2023-06-14 15:46:23 +12:00
Guy Sartorelli
6fd7694cbc
Merge pull request #10816 from creative-commoners/pulls/4.13/updatebool
FIX Show correct default value
2023-06-14 13:32:09 +12:00
Steve Boyd
35a8d79f62 FIX Show correct default value 2023-06-14 11:25:34 +12:00
Steve Boyd
dbefcef440 Merge branch '5.0' into 5 2023-06-14 11:10:44 +12:00
Steve Boyd
f4e0c768bd FIX Handle __TRAIT__ in i18nTextCollector 2023-06-13 10:11:12 +12:00
Steve Boyd
8cee451d41 Merge branch '5.0' into 5 2023-06-12 14:08:03 +12:00
Steve Boyd
cf77f06544 Merge branch '4' into 5.0 2023-06-12 14:07:24 +12:00
Sabina Talipova
f88b7c3c2b
FIX Duplicate page keeps original pages canView and canEdit permission (#10806) 2023-06-12 13:29:06 +12:00
dominik
face94371e FIX Passing 0 as first argument breaks template
Replace !empty with explicit string test
Added test for falseish first parameter arguments
2023-06-09 08:55:20 +02:00
Nicolaas / Sunny Side Up
675ba90280
FIX fix issue where member without valid email can not be saved
It is possible to have a member record without a valid email address. In this case, you can not save Member as it throws an error (email is tried being sent without a valid email address).
2023-06-09 15:29:54 +12:00
Bram de Leeuw
33c62033fe
Fix translation key for DataObject.GENERALSEARCH (#10805)
* MNT Use gha-dispatch-ci

* Update DataObject.php

Fix typo in GENERALSEARCH localisation

* Update en.yml

remove unnecessary localisation line

* Update nl.yml

remove unnecessary localisation line

* Update eo.yml

remove unnecessary localisation line

* Update ci.yml
2023-06-09 13:44:00 +12:00
Sabina Talipova
02aa80ffd2
Merge pull request #10783 from creative-commoners/pulls/5/eager-load
NEW ORM eager loading
2023-06-09 09:52:28 +12:00
kevingroeger
30cd4047df
Adjust isEnabled method (#10801)
* Adjust isEnabled method to use config values if present, adjust dev.yml to have a default_enabled key, add is_enabled as a private property for deprecation in cms 6

* remove default_enabled flag again, adjust comments as suggested, remove method signature from isEnabled, fix typo, adjust logic and add fallback value for isEnabled as true

* adjust isEnabled method, change static:: to ->enabled as the property is not actually static

---------

Co-authored-by: Kevin Gröger <k.groeger@headtrip.eu>
2023-06-08 12:22:14 +12:00
Steve Boyd
95eceb8d9e FIX Ensure dir exists before scanning it 2023-06-07 17:35:13 +12:00
Steve Boyd
246735101a NEW ORM eager loading 2023-06-07 14:59:02 +12:00
Steve Boyd
e1ffa18db6 Merge branch '5.0' into 5 2023-05-31 14:26:21 +12:00
Bernard Hamlin
e98f0d45af
Use ::create instead of new in GridFieldDetailForm_ItemRequest (#10791)
Updates instances of `new X` to `X::create` so that Silverstripe classes will respect dependency injection
2023-05-25 11:42:43 +12:00
Steve Boyd
f54bbc50f0 Merge branch '5.0' into 5 2023-05-22 12:46:02 +12:00
Steve Boyd
8237c73b86 Merge branch '4' into 5.0 2023-05-22 12:45:29 +12:00
Guy Sartorelli
c4b8d9a246
FIX Add back missing SSL support for database connections (#10784) 2023-05-22 12:40:59 +12:00
Michal Kleiner
f815a9cf2a
FIX Provide correct replacement suggestion in deprecation message 2023-05-21 20:12:52 +12:00
Steve Boyd
696fe79dd6 FIX Use OR conjuctive in filterAny aggregate queries 2023-05-17 11:55:56 +12:00
Guy Sartorelli
1f45607977
Merge branch '4' into 5.0 2023-05-17 10:57:32 +12:00
Guy Sartorelli
58813d5075
Merge pull request #10776 from creative-commoners/pulls/5.0/acpu-memcached-factories
FIX Get ApcuCacheFactory and MemcachedCacheFactory working again
2023-05-17 10:53:26 +12:00
Guy Sartorelli
2afb01463b
FIX Don't redirect admin URLs regardless of trailing slash (#10781) 2023-05-17 10:49:34 +12:00
Steve Boyd
ef3b91417a FIX Get ApcuCacheFactory and MemcachedCacheFactory working again 2023-05-17 10:18:28 +12:00
Mohamed Alsharaf
b51bc427aa API Remove deprecated template vars 2023-05-16 15:04:42 +12:00
Sabina Talipova
0ab36f6ae1 UPD Add support new TinyMC cs_CZ.js 2023-05-16 11:56:05 +12:00
Guy Sartorelli
234e229098
Merge pull request #9976 from kinglozzer/9975-default-form-action
FIX: Form::defaultAction() didn't work if actions were in CompositeFields (fixes #9975)
2023-05-09 21:45:24 +12:00
Florian Thoma
04266f77cc Update i18nTextCollector to collect strings also from themes 2023-05-09 11:56:12 +10:00
Guy Sartorelli
01808a8316
FIX Don't assume searchableFields() exists in gridfield filter 2023-05-09 10:00:07 +12:00
Guy Sartorelli
66f0fc4814
Merge pull request #10688 from xini/fix-i18ntextcollector-orm-4
ENH Add loading of ORM field labels to i18nTextCollector
2023-05-08 15:49:44 +12:00
Guy Sartorelli
37937b7123
Merge pull request #10751 from xini/patch-7
make Group use tri-state can* extension hooks, fixes #9580
2023-05-08 11:22:35 +12:00
Guy Sartorelli
1c2e1f86a5
Merge pull request #10763 from sunnysideup/patch-25
MINOR: faster checking if record exists
2023-05-05 13:12:06 +12:00
Steve Boyd
0978a43871 Merge branch '5.0' into 5 2023-05-04 13:25:49 +12:00
Guy Sartorelli
6296c06f3a
Merge pull request #10735 from elliot-sawyer/feature/change-search-filter-treedropdownfield
NEW: Allow different search filters on TreeDropdownField
2023-05-02 08:30:51 +12:00
Nicolaas / Sunny Side Up
9660652fbc
MINOR: faster checking if record exists
Rather than using a loop through each object, we just filter for it in the SQL query.  This is likely to speed up the code and also make it more legible.
2023-04-28 09:40:12 +12:00
Guy Sartorelli
7efde6bf37
Merge branch '4' into 5.0 2023-04-27 14:43:38 +12:00
Guy Sartorelli
73ef035bd8
API Add AbsoluteLink method to RequestHandler (#10749)
This is a method that is commonly implemented on controllers, but
it really doesn't need to be.
2023-04-26 18:25:01 +12:00
Guy Sartorelli
908b6f2006
Merge branch '4.12' into 4.13 2023-04-26 11:44:54 +12:00
Sabina Talipova
c2733a3108
Merge pull request #10760 from creative-commoners/pulls/4.12/absoluteurl-parsing
Escaped double slash is absolute URL
2023-04-26 11:30:41 +12:00
Guy Sartorelli
1a5bb4cbec
[CVE-2023-22729] Escaped double slash is absolute URL 2023-04-26 09:49:59 +12:00
Guy Sartorelli
fd5d8217e8
[CVE-2023-22728] Check canView before printing from GridField 2023-04-26 09:45:34 +12:00
Guy Sartorelli
bdcb57ec2b
NEW Add a cascading theme version of $resourceURL 2023-04-12 17:29:59 +12:00
Florian Thoma
c0722308af add loading of automatic ORM field labels to i18nTextCollector 2023-04-12 11:11:26 +10:00
Florian Thoma
41c4b4ee02 make Group use tri-state can* extension hooks, fixes #9580 2023-04-11 10:18:21 +10:00
Steve Boyd
3d03a93b8f Merge branch '4.12' into 4.13 2023-04-11 10:55:17 +12:00
Dylan Wagstaff
92061a3ba6
FIX stabilise typed APIs (#10740)
Since 4.12 the use of typehints and return types has caused issues with
values fetched directly from config without validation. This has lead to
upgrade woes in a minor version (#10721) with no immediate recourse
other than manual system intervention.

To use types, we should ensure types, leaving a stable API that won't
error on a bad value - or should give a thoughtful and directive error
message if so.

Issue #10721 summary:
SessionMiddleware runs before FlushMiddleware
SessionMiddleware causes a PHP fatal error passing `null` to a `string`
parameter.
`null` comes from config, because default string value doesn't exist. We
need flush for this - but system execution never makes it that far.
2023-04-11 10:52:41 +12:00
Florian Thoma
cd946b6c80
Group visibility for SITETREE_GRANT_ACCESS permissions
Make groups visible if member has SITETREE_GRANT_ACCESS permissions, otherwise the dropdown for selecting the group is empty
2023-04-05 16:33:41 +10:00
Guy Sartorelli
2c874a1e94
ENH Exclude a list of models for checking and repairs (#10746) 2023-04-04 14:22:00 +12:00
Steve Boyd
63c2460f72 Merge branch '4' into 5.0 2023-03-30 13:20:03 +13:00
elliot sawyer
280354df08 NEW: Allow different search filters on TreeDropdownField 2023-03-27 18:50:54 +13:00
Steve Boyd
84273b8045 FIX Remove legacy filter icon 2023-03-27 17:57:02 +13:00
Steve Boyd
0f40cc38ec FIX Respect searchable_fields 2023-03-23 10:57:03 +13:00
Steve Boyd
41bb35f3f3 FIX Reduce array method calls 2023-03-22 11:06:23 +13:00
Steve Boyd
b4f330d734 API Remove configurability of attributes 2023-03-21 16:38:05 +13:00
zemiacsik
d60af9d16e
FIX property_exists() parameters mixup
ensure that property parameter is a string
2023-03-14 08:42:22 +01:00
zemiacsik
5b8d61b55b
FIX property_exists() parameters mixup
property_exists() has first parameter "object_or_class" and second is a property to check
2023-03-13 13:51:48 +01:00
Guy Sartorelli
a4929a171e
Merge pull request #10697 from creative-commoners/pulls/4/nicer-deprecations
ENH Improve deprecation logging
2023-03-09 14:39:51 +13:00
Steve Boyd
6d239d0b88 API Remove deprecated code 2023-03-06 14:06:02 +13:00
Guy Sartorelli
046befc4ba
ENH Improve deprecation logging 2023-03-06 13:25:44 +13:00
Guy Sartorelli
128b327c6d
API Add method to check if env var is set 2023-03-06 11:49:22 +13:00
Steve Boyd
5dd6e3f8f1 MNT Remove old deprecation warnings 2023-03-03 10:34:10 +13:00
Steve Boyd
f6d8d27c89 Merge branch '4' into 5.0 2023-03-02 16:02:34 +13:00
Steve Boyd
8b148bf293 Merge branch '4.12' into 4 2023-03-02 15:37:03 +13:00
Guy Sartorelli
66561ccb49
FIX Correctly deprecation Sources.module_priority (#10711)
This config was deprecated back in #7154 and hasn't been used since
2023-03-02 11:05:35 +13:00
Maxime Rainville
403f924d22
BUG Update RelatedDataService to properly escape ClassName in Polymorphic relations (#10713) 2023-03-02 09:56:40 +13:00
Florian Thoma
6585d499f5 FIX Convert slashes in paths when getting list of classes for file/folder
This is to support the mechanism working on all operating systems where Windows may produce a mix of forward and backward slashes in some paths.
For working with the files it may not be a problem, but for exact string comparison the path delimiters need to be unified.
2023-03-01 20:32:19 +13:00
Guy Sartorelli
e3a94b9d10
FIX Ensure getters and setters are respected (#10708) 2023-03-01 15:19:07 +13:00
Guy Sartorelli
277e97a84f
Merge pull request #10709 from creative-commoners/pulls/4/deprecated-args
ENH Updated deprecation warning message
2023-03-01 14:19:18 +13:00
Guy Sartorelli
58ca426f11
Merge branch '4.12' into 4 2023-03-01 12:54:30 +13:00
Sabina Talipova
05674adf51 ENH Updated deprecation warning message 2023-03-01 12:39:42 +13:00
Guy Sartorelli
5295ba6c16
API Throw deprecation warnings for bad configuration (#10702) 2023-03-01 11:36:08 +13:00
Guy Sartorelli
6669d54f59
FIX Wrap deprecated config with no replacement (#10704) 2023-02-27 18:13:31 +13:00
Guy Sartorelli
652281507f
FIX Correctly identify deprecated API in withNoReplacement (#10706) 2023-02-27 15:25:27 +13:00
Chris Penny
c82d11ef70
Add isFlushed() to Kernel interface
Also add explicit return type
2023-02-23 11:14:57 +13:00
Guy Sartorelli
e962608918
Merge pull request #10569 from kinglozzer/formfield-validation-extensions
NEW: Add extension hook for field-specific validation
2023-02-23 09:47:40 +13:00
Steve Boyd
0075bf6e49 NEW Access dynamic data inside ViewableData 2023-02-22 09:40:27 +13:00
Loz Calver
97f7be502f NEW: Add extension hook for field-specific validation 2023-02-20 10:24:41 +00:00
Michal Kleiner
725497a485 MNT Use null safe operator and default to 1 page 2023-02-20 22:40:16 +13:00
Steve Boyd
e455aa5c5e FIX Handle null returns in GridFieldDetailForm_ItemRequest::getNumPages() 2023-02-20 14:37:48 +13:00
Guy Sartorelli
ab566b0a15
API Add new deprecation notices. (#10691)
These are removed in CMS 5.
2023-02-15 13:26:36 +13:00
Florian Thoma
54fc4ee9d2
fix directory separator in i18nTextCollector on Windows (#10681)
* fix directory separator in i18nTextCollector for Windows

* fix typo
2023-02-09 19:09:48 +13:00
Sabina Talipova
1f7adab62e
Merge pull request #10677 from creative-commoners/pulls/4/deprecate-diff
API Deprecate Diff in favour of CMS5's HtmlDiff
2023-02-08 16:36:58 +13:00
Guy Sartorelli
9a5ccdba51
ENH Protect against possible unexpected values 2023-02-08 16:18:13 +13:00
Guy Sartorelli
557421a245
MNT Fix linting issue 2023-02-08 16:18:00 +13:00
Guy Sartorelli
603723e8f3
API Rename Diff to HtmlDiff
This class doesn't diff anything other than HTML, really. For anything
else, SebastianBergmann\Diff\Differ should be used directly.
2023-02-08 14:59:34 +13:00
Guy Sartorelli
99dc6df38a
API Replace thirdparty difflib with maintained lib 2023-02-08 14:59:33 +13:00
Guy Sartorelli
0ff7623230
Merge pull request #10643 from creative-commoners/pulls/5/replace-simpletest
DEP Replace thirdparty simpletest with symfony domcrawler
2023-02-08 12:15:57 +13:00
Guy Sartorelli
3a14aafc7f
API Deprecate Diff in favour of CMS5's HtmlDiff 2023-02-08 11:15:28 +13:00
Sabina Talipova
9d13f35040 MNT Update strong typization, tests cases
Co-authored-by: Guy Sartorelli <36352093+GuySartorelli@users.noreply.github.com>
2023-02-08 10:59:27 +13:00
Sabina Talipova
5236b0a9df
Merge pull request #10666 from creative-commoners/pulls/5/security-extensions
NEW migrate functionality from security-extensions module
2023-02-07 13:50:56 +13:00
Guy Sartorelli
fecb7ba4d8
NEW Add sudo mode service 2023-02-07 13:36:42 +13:00
Guy Sartorelli
8ddedb038e
NEW Allow admins to require password reset for members
This came from silverstripe/silverstripe-security-extensions
2023-02-07 13:36:21 +13:00
Steve Boyd
4e9c74243d API Deprecate code 2023-02-07 11:56:04 +13:00
Steve Boyd
a74e9d3ecd Merge branch '4' into 5 2023-02-03 10:14:36 +13:00
Steve Boyd
23efed1802 Merge branch '4.12' into 4 2023-02-02 16:20:00 +13:00
Guy Sartorelli
7c20ade548 DEP Replace thirdparty simpletest with symfony domcrawler 2023-02-02 13:31:45 +13:00
Guy Sartorelli
738ca487ac
FIX Allow public extension getter methods to work (#10676)
Accidentally broke this in #10670
2023-02-01 16:05:54 +13:00
Guy Sartorelli
826028082b
FIX Sort without specifying a table name (#10675)
Using a table name in sort() is not allowed in CMS 5. We could use
orderBy() here but member is the table it will sort on by default anyway
so there's no need.

Also added unit tests, which should have caught this ages ago.
2023-02-01 13:52:13 +13:00
Guy Sartorelli
2274b3e765
Merge pull request #10670 from creative-commoners/pulls/5/no-private-viewabledata
FIX Don't try to access private properties/methods
2023-01-31 15:50:35 +13:00
Guy Sartorelli
14a449feaa
FIX Don't try to access private properties/methods 2023-01-31 14:59:17 +13:00
Guy Sartorelli
dca4e0bcb8
FIX Remove unused action from allowed_actions (#10672)
This action was used in CMS 3, but has since been replaced with
/Security/lostpassword/passwordsent which is a separate set of actions.
2023-01-31 13:59:12 +13:00
Thomas Portelange
3e5d99dedc
Prevent backslash in class name
since the default code is using get_called_class, you can end up with \ in the class name which is an escape character for css selectors
this update convert for example

even valCMS_ACCESS_SilverStripe\VersionedAdmin\ArchiveAdmin
to
even valCMS_ACCESS_SilverStripe-VersionedAdmin-ArchiveAdmin

ArchiveAdmin class should probably implement     private static $required_permission_codes = 'CMS_ACCESS_ArchiveAdmin '; also
2023-01-30 10:26:22 +01:00
Maxime Rainville
d1e0e1e305 ENH Make limit method return no results when zero is provided 2023-01-27 10:00:41 +13:00
Maxime Rainville
944722f34f API Removed #[\ReturnTypeWillChange] annotations 2023-01-26 18:10:05 +13:00
Steve Boyd
ec4a8b88e5 API Allow array style email addresses 2023-01-26 14:40:13 +13:00
Steve Boyd
77301408d8 MNT Remove legacy upgrader config 2023-01-20 17:05:41 +13:00
Guy Sartorelli
b784e243de
Merge pull request #10538 from xini/feature-5-trailing-slash-config-and-redirect
SS5: add trailing slash config and redirect
2023-01-20 15:24:45 +13:00
Florian Thoma
fbcf7dc3e7
API Normalise trailing slashes for all paths
NOTE: There will be additional related PRs required for at least
silverstripe/cms and silverstripe/admin.

Co-authored-by: Guy Sartorelli <guy.sartorelli@silverstripe.com>
2023-01-20 10:31:14 +13:00
Maxime Rainville
b6b0bcea9f Merge branch '4' into 5 2023-01-18 22:16:45 +13:00
Maxime Rainville
a65d470e93
Merge pull request #10647 from creative-commoners/pulls/5/dom-crawler
ENH Use masterminds/html5 for HTMLValue
2023-01-18 11:38:07 +13:00
Steve Boyd
d7ddb00254 ENH Use masterminds/html5 for HTMLValue 2023-01-18 10:58:53 +13:00
Steve Boyd
1a59bf50d1 ENH Remove unused Translatable code 2023-01-17 14:42:40 +13:00
Steve Boyd
b973c88648 API Deprecate HTML4Value 2023-01-16 15:28:23 +13:00
Mojmir Fendek
2c105cffc9
ENH: saveInto() new extension points. (#10636)
* ENH: saveInto() new extension points.
2023-01-13 09:43:22 +13:00
Sabina Talipova
6d4542561b
BUG Check is_callable parent methods before invoke (#10637) 2023-01-12 09:37:48 +13:00
Florian Thoma
bb8e3b8386
fix: optional return value for paginator state
`$state->getData()->getData('GridFieldPaginator')' (line 598) returns null by default.
2023-01-02 15:32:16 +11:00
Guy Sartorelli
5bf6835b3e
Merge pull request #10614 from creative-commoners/pulls/5/php82
ENH PHP 8.2 support
2022-12-21 15:39:32 +13:00
Steve Boyd
c1a773310d ENH PHP 8.2 support 2022-12-21 14:44:47 +13:00
Shiva Kerdel
4a1eb0c158
ISSUE-10615: Respect SS_BASE_URL scheme in CLI environment.
Additionally set _SERVER variables for HTTPS and SSL to respect SS_BASE_URL scheme when executing builds and tasks through CLI.
This should solve base tags not being provided with the correct HTTP scheme. This is important to resolve mixed content issues and insecure requests.
2022-12-20 11:13:02 +13:00
Guy Sartorelli
0d662ba95f
Merge branch '4.12' into 4 2022-12-19 01:38:09 +00:00
Guy Sartorelli
b14de847a5
API Make the public directory mandatory (#10617) 2022-12-14 16:08:47 +13:00
Guy Sartorelli
fa75a36267
Merge branch '4' into 5 2022-12-14 15:34:44 +13:00
Steve Boyd
700288d5ca FIX Cast absoluteUrl() argument to string 2022-12-14 11:24:42 +13:00
Steve Boyd
55f8fce12b MNT Linting 2022-12-08 17:12:32 +13:00
Sabina Talipova
53c0147f11
API Remove deprecated code (#10594) 2022-12-08 10:44:47 +13:00
Steve Boyd
ae4d7fa090 API Create orderBy() method to handle raw SQL 2022-12-07 12:25:58 +13:00
Sabina Talipova
4e1b99b8c7
Merge pull request #10588 from creative-commoners/pulls/4/stop-using-depr
API Stop using deprecated API
2022-12-05 16:35:09 +13:00
Steve Boyd
7860e461ed API Remove deprecated CIConfig functionality 2022-11-30 18:09:06 +13:00
Guy Sartorelli
8bb712a461
Merge branch '4.11' into 4.12-release 2022-11-30 10:54:02 +13:00
Michal Kleiner
b107622400
FIX Improve rounding logic for storing of long decimal numbers (#10593)
Co-authored-by: Michal Kleiner <michal.kleiner@cub3.com>
2022-11-29 15:07:56 +13:00
Steve Boyd
b5533e4680 API Stop using deprecated API 2022-11-28 19:16:31 +13:00
Michal Kleiner
da06a2d0cf
Merge pull request #10577 from creative-commoners/pulls/4/textcollector-class-notation 2022-11-25 10:27:59 +13:00
Will Rossiter
1354edf054
fix misleading error message with test class 2022-11-25 09:13:08 +13:00
Chris Penny
31d5aef520 Bugfix: SSViewer check object exists before calling prop or method 2022-11-24 13:18:56 +13:00
Steve Boyd
20582936d8 Merge branch '4.12' into 4 2022-11-23 16:42:25 +13:00
Sabina Talipova
a52c7795c7 Merge branch '4' into 5 2022-11-22 11:41:53 +13:00
Guy Sartorelli
8e16b57646
Merge branch '4' into 5 2022-11-21 18:13:01 +13:00
Steve Boyd
cb76f312a4 Merge branch '4.11' into 4.12-release 2022-11-21 13:44:23 +13:00
Steve Boyd
dc98cad48a Merge branch '4.10' into 4.11 2022-11-21 13:43:59 +13:00
Steve Boyd
fe13856769 [CVE-2022-37429] Sanitise XSS 2022-11-21 13:06:40 +13:00
Guy Sartorelli
17f1c7ceed
Merge pull request #10585 from creative-commoners/pulls/4.11/cve-2022-37430
Sanitise mixed case javascript
2022-11-21 13:03:30 +13:00
Guy Sartorelli
e5b81109de
Merge pull request #10584 from creative-commoners/pulls/4.11/cve-2022-38462
Don't allow CRLF in header values
2022-11-21 13:02:25 +13:00
Steve Boyd
4308a93cc8 [CVE-2022-38148] Validate SortColumn exists 2022-11-21 13:01:32 +13:00
Guy Sartorelli
b17b29eea1
Merge pull request #10583 from creative-commoners/pulls/4.11/cve-2022-38724-embed-shortcode
Restrict embed shortcode attributes
2022-11-21 13:01:23 +13:00
Sabina Talipova
ad116c63e6
Merge pull request #10565 from creative-commoners/pulls/4/stop-depr
API Stop using deprecated API
2022-11-16 14:26:18 +13:00
Steve Boyd
137ebcebec API Stop using deprecated API 2022-11-15 18:20:54 +13:00
Daniel Hensby
c49abf0fcc
Merge remote-tracking branch 'upstream/4.11' into 4.12 2022-11-11 13:25:54 +00:00
Guy Sartorelli
521c8179b1
ENH Correctly parse SomeClass::class syntax in textcollection 2022-11-11 11:37:53 +13:00
Lee Bradley
78b661dcf6
Prevent infinite loop when getting table name for ComponentID
If the field isn't in the first 2 classes then would just continue to loop
Fix means it will continue going to parent classes

Can be seen in the UsedOnTable in `admin` module if you have injected a new `Image` class that extends the built in one
2022-11-10 14:00:29 +00:00
Guy Sartorelli
ed63beeeee
Merge branch '4.11' into 4 2022-11-09 10:53:09 +13:00
Loz Calver
7f8f5afc91 Ensure forms/fields overridden by onBeforeRender() can override templates 2022-11-02 11:57:57 +00:00
Loz Calver
e2cb683f14 FIX: Stop FormField onBeforeRenderHolder extension result being overridden 2022-11-02 10:06:23 +00:00
Loz Calver
c925fae180 NEW: Add onBeforeRender extension hook to Form 2022-11-02 10:05:02 +00:00
Steve Boyd
9091d64652 API Deprecate Member::create_new_password() 2022-11-02 10:08:27 +13:00
Steve Boyd
b1dc861aac NEW Record deprecated config 2022-10-31 19:00:59 +13:00
Steve Boyd
a3c1cb0ddf
ENH Set PasswordEncryption on default admin 2022-10-27 13:57:27 +13:00
Guy Sartorelli
168ca00555
[CVE-2022-38724] Restrict embed shortcode attributes 2022-10-26 09:31:12 +13:00
Michal Kleiner
e11216d8ea
Merge pull request #10558 from creative-commoners/pulls/5/broken-builds 2022-10-21 18:46:41 +13:00
Steve Boyd
df1d4a4b9a ENH Move email to data conversion to protected method 2022-10-21 15:54:06 +13:00
Steve Boyd
6e9d3ab632 Merge branch '4' into 5 2022-10-21 12:00:39 +13:00
Steve Boyd
59b980edd7 Merge branch '4.11' into 4 2022-10-21 11:46:39 +13:00
Steve Boyd
897f9906f9 FIX Handle calling Deprecation::notice() before manifests are available 2022-10-21 10:08:31 +13:00
Sabina Talipova
3601b7ab8b
DEP Upgrade installer dependencies (#10534) 2022-10-21 09:59:34 +13:00
Steve Boyd
bd2eb15c72 FIX Ensure Deprecation works with 1.x branches 2022-10-20 13:14:58 +13:00
Steve Boyd
e3a6cad8a8 FIX Allow passing objects to InjectionCreator::create()
Co-authored-by: Nate Devereux <nate@daveclark.co.nz>
2022-10-19 18:04:48 +13:00
Guy Sartorelli
919cfcf435
Merge pull request #10494 from creative-commoners/pulls/5/symfony-mailer
NEW Migrate from swiftmailer/swiftmailer to symfony/mailer
2022-10-19 15:52:31 +13:00
Steve Boyd
2e85674ccc NEW Migrate from swiftmailer/swiftmailer to symfony/mailer 2022-10-19 15:16:14 +13:00
Steve Boyd
a57c7315a2 API Strongly-type action method signatures 2022-10-17 17:58:20 +13:00
Phillip King
c4b3d5304d Update tinymce links in comments 2022-10-14 16:11:58 +13:00
Steve Boyd
9c453abf89 API Update deprecations 2022-10-13 14:49:15 +13:00
Steve Boyd
33b6a00f49 ENH Update deprecation messages 2022-10-13 14:48:40 +13:00
Steve Boyd
e6aa183eb4 API Update deprecations for SapphireTest and FunctionalTest 2022-10-13 14:05:49 +13:00
Steve Boyd
2991901660 ENH Update deprecation messages 2022-10-13 14:05:49 +13:00
Steve Boyd
7b87926428 ENH Update deprecation messages 2022-10-13 14:05:49 +13:00
Steve Boyd
9f541b9a04 MNT Remove deprecation from private method 2022-10-13 14:05:49 +13:00
Steve Boyd
cc49036616 ENH Standardise deprecation messages 2022-10-13 14:05:49 +13:00
Steve Boyd
0852f504fb API Update deprecations for SapphireTest and FunctionalTest 2022-10-13 14:05:49 +13:00
Steve Boyd
1ee0aff1d1 FIX Prevent infinite loops in Deprecation::notice() 2022-10-13 13:37:29 +13:00
Steve Boyd
83a09daa3a Merge branch '4' into 5 2022-10-07 14:45:05 +13:00
Steve Boyd
906cd0e76d
API Deprecate render() (#10527) 2022-10-07 14:44:02 +13:00
Guy Sartorelli
8419984b36
Merge pull request #10517 from creative-commoners/pulls/4/deprecate-swiftmailer
API Deprecate swiftmailer
2022-10-07 09:37:11 +13:00
Steve Boyd
96a931d24f API Deprecate swiftmailer 2022-10-06 09:52:06 +13:00
Sabina Talipova
721b3cb597
Merge pull request #10508 from creative-commoners/pulls/5/tinymce6
FIX Update config to support tinymce6
Nice job!
2022-09-30 11:05:48 +13:00
Guy Sartorelli
ef8a02dfdc
FIX Update config to support tinymce6 2022-09-30 10:40:52 +13:00
Christian Bünte
e24fb3f86c
Fix i18nTextCollector produces corrupt output / namespaces when running under PHP8.0 (#10228)
* FIX i18nTextCollector produces corrupt output / namespaces when running under PHP8.0
2022-09-29 13:40:40 +13:00
Guy Sartorelli
5e16b29699
Merge branch '4' into 5 2022-09-29 09:43:31 +13:00
Guy Sartorelli
421864d111
Merge branch '4.11' into 4 2022-09-29 09:41:06 +13:00
Thomas Portelange
54892fa267
request may not have a session
see https://github.com/silverstripe/silverstripe-framework/pull/10512
2022-09-28 10:44:13 +02:00
Guy Sartorelli
4a598ded51
FIX Allow removing named extensions in yaml config 2022-09-27 13:15:28 +13:00
Bram de Leeuw
f78c3ee5bb
Member updateName extension hook
Allow updating the Member name from an extension
2022-09-26 16:57:39 +02:00
Guy Sartorelli
433926fc11
API Remove deprecated tinymce generator class 2022-09-19 16:21:09 +12:00
Steve Boyd
fc78763d20
Merge pull request #10497 from creative-commoners/pulls/5/rescue-master-template-enhancements
Rescue master branch PRs: Template enhancements
2022-09-15 16:55:18 +12:00
Guy Sartorelli
e140c3786c
FIX Ensure consistent behaviour with repeat iterations 2022-09-15 16:22:48 +12:00
Guy Sartorelli
62ee63706f
FIX PHP 8.1 compatability for iterators.
Setting a proper return type for these will be done in a separate PR
2022-09-15 13:29:41 +12:00
Guy Sartorelli
a76fa32a39
API Remove unnecessary getGenerator() method.
`getIterator()` now returns a generator by default.
2022-09-15 13:29:29 +12:00
Guy Sartorelli
bf331072df
FIX Don't try to call count() on an iterator 2022-09-15 13:29:29 +12:00
Sam Minnee
81beddc161
Add deprecated method to make CMS tests work 2022-09-15 13:29:29 +12:00
Sam Minnee
9eb9e13071
FIX: Re-set finalisedQuery to allow recreation of iterator. 2022-09-15 13:29:29 +12:00
Sam Minnee
9c7ecb1f79
Further work on Loz’ solution 2022-09-15 13:29:29 +12:00
Loz Calver
850482138b
Proposed solution for caching template generator counts 2022-09-15 13:29:29 +12:00
Loz Calver
8e0e797b40
Fix code style 2022-09-15 13:29:27 +12:00
Sam Minnee
6ef5785fc5
FIX: pre-cache loop content within SSViewer.
SSViewer iterates on Iterators that it receives twice: first to get the
total number of items, then to actually render each item.

This necessitates a rewind. In order to make more use of generators,
which are not rewindable, I’d like to remove the need for a rewind.

I’ve done this by caching the content of the iterator as an array
within SSViewer_Scope.

Although this means a bit of memory usage, there are no cases in which
code will get to this point without iterating on all items, which would
use the memory anyway. It would only create onerous impacts in cases
where you are iterating on very long iterators, which would mean you’re
rendering a very large page anyway, and probably have other performance
issues.
2022-09-15 13:29:00 +12:00