Commit Graph

21 Commits

Author SHA1 Message Date
Niklas Forsdahl 88c70b3234 Fixed deprecation notices in php 8.2 by using the AllowDynamicProperties
annotation on classes that set dynamic properties
2023-08-25 11:07:48 +03:00
Sabina Talipova 05674adf51 ENH Updated deprecation warning message 2023-03-01 12:39:42 +13:00
Viktor Szépe 94d1ac8d99
ENH Various changes via static analysis tooling 2022-08-24 12:14:32 +12:00
Steve Boyd 511b3bb060 ENH PHP 8.1 compatibility 2022-04-14 13:12:59 +12:00
Bernard Hamlin f00f64120d
NEW Allow setting sql_mode via config (#9721) 2020-10-22 15:01:30 +13:00
Sam Minnée b810b7d5c9
API: Allow for user-created objects to have values passed in the constructor (#8591) 2020-08-20 12:28:31 +12:00
Daniel Hensby 237b2d5f74
Convert array delcarations to short array syntax 2020-04-20 18:58:09 +01:00
Ingo Schommer 2c5deceeb4 FIX Filter out all FULLTEXT BOOLEAN chars
The query might still work depending on where these chars are placed,
but it seems weird to only remove *some* of the valid chars here.
See https://dev.mysql.com/doc/refman/5.6/en/fulltext-boolean.html

Note that the query runs both the actual boolean query with chars,
and then a separate relevance search without them.
2020-04-09 10:32:45 +12:00
Ingo Schommer 0215fdd262 DOC Clarify sanitisation in searchEngine() under boolean mode
This came up in https://github.com/silverstripe/silverstripe-cms/issues/1452, and wasn't fully addressed.
Either we allow boolean mode and all the constraints this brings around special character usage,
or we filter out those special characters, which makes boolean mode pointless.
You can't just pass arbitrary user input in a power-user function like this.
See https://dev.mysql.com/doc/refman/5.6/en/fulltext-boolean.html

Context: This used to work for some examples like "foo>*" under MyISAM,
presumably because it had a more lenient parser. InnoDB rightfully complains about this now.
2020-04-09 10:32:45 +12:00
Sam Minnee 2615399535 FIX: Use PDO’s built-in transaction support in MySQLDatabase. 2018-11-09 10:31:19 +13:00
Federico Jaramillo Martínez e9bffe4020
Update comment about locks in MySQL
MySQL 5.7.5 and newer allow for multiple lock form the same session. This information is now reflected in the comment.
2018-10-22 22:33:16 -05:00
Sam Minnee 0cc72c91ad FIX: Use DELETE FROM instead of TRUNCATE for clearTable
clearTable is mainly used for clearing data between tests. In this case,
there are very few or zero records, and DELETE FROM is quicker than
TRUNCATE, which works by deleting and recreating the table.

This materially speeds up test execution, at least on MySQL.

Cherry-pick of SS3 ae9ab22a8f
2018-10-03 13:40:00 +13:00
Robbie Averill df257686c1 Restore check for zero or negative transaction nesting 2018-06-20 14:46:50 +12:00
Daniel Hensby d8430f549d Address feedback 2018-06-20 14:46:50 +12:00
Damian Mooyman 6da72d686f Maybe fix it? 2018-06-20 14:46:50 +12:00
Damian Mooyman fbfd454d65 ENHANCEMENT Ensure test DB is flushed on either DDL or transaction-disabled tests
Fixes #8182
2018-06-20 14:46:50 +12:00
Daniel Hensby d3278d5470 FIX Add Nested DB transaction support (#7848)
* TEST Prove nested transactions break

* Add nested transaction support
2018-02-09 10:28:32 +13:00
Damian Mooyman 099a5a3c2d
[SS-2017-008] Fix SQL injection in full text search 2017-11-20 16:53:44 +13:00
martimiz b726d64d1d
Fix SearchEngine to use quoted table names
If quotes are omitted, SQLExpression::sql() cannot replace table names
with the proper table for the current Stage.
2017-07-26 13:42:41 +01:00
Damian Mooyman 1b1e921e3d
PSR2: Whitespace-only changes 2016-11-29 12:31:16 +13:00
Sam Minnee 7a10c194bd NEW: Move code files into src/ folder.
This updates framework to be more in keeping with PHP conventions.
2016-11-01 13:37:24 +13:00