Commit Graph

1072 Commits

Author SHA1 Message Date
Damian Mooyman
aca1e16b8e
Merge pull request #6211 from jason-zz/patch-3
BUG Fix : relObject() should return null if one of the node is null
2018-02-05 14:18:44 +13:00
Dominik Beerbohm
416915b082 BUG tableName is blank in CompositeDBField->addToQuery
Added call to setTable() to ensure tableName is provided inside addToQuery method.
2018-01-26 14:58:46 +01:00
Damian Mooyman
a8465900bd
Merge pull request #47 from silverstripe-security/patch/3.5/SS-2017-008
[SS-2017-008] FIX Make sure int params are successfull cast to int
2017-12-06 17:30:51 +13:00
Damian Mooyman
77b46672e2
Merge branch '3.5' into pulls/3.5/versioned-base-class 2017-12-06 11:37:46 +13:00
Daniel Hensby
2aa1d8f2c4
remove create_function usage 2017-12-05 14:20:13 +00:00
Daniel Hensby
84d7afb347
FIX Use baseDataClass for allVersions as with other methods 2017-12-05 13:02:20 +00:00
Daniel Hensby
0f2049d4d4
[SS-2017-008] Fix SQL injection in search engine 2017-11-21 14:45:36 +00:00
Daniel Hensby
ce3fd370fb
FIX ManyMany link table joined with LEFT JOIN 2017-11-16 12:11:16 +00:00
Daniel Hensby
264cec1239
FIX Dont use var_export for cache key generation as it fails on circular references 2017-10-09 10:13:39 +01:00
Dylan Wagstaff
ebe1de8d8b
Fix ArrayList sort error with old (supported) PHP
PHP 5.3 at least (the reported and tested against version) requires arguments to `call_user_func_array` to be passed by reference. There exists a note as a comment in the code, but was unfortunately overlooked in a previous commit to fix case sensitive sorting 4998b80445 (diff-6ba746c3d31fd6b4c4a99d7efe35eb21L442)

To solve this issue we simply first assign the constant to a variable, so we can then pass that by reference. This has no functional impact, however fixes an issue for users locked in to old PHP versions which we still list as supported (https://docs.silverstripe.org/en/3/getting_started/server_requirements/#web-server-software-requirements).
2017-09-28 15:29:54 +01:00
Daniel Hensby
9d2503c3da Merge pull request #7274 from PapaBearNZ/patch-1
Fix Truncate Error Issue when using views in a Unittest.
2017-08-25 11:51:36 +01:00
Daniel Hensby
eb80a5f9e8
FIX LastEdited no longer updated on skipped writes 2017-08-16 23:39:22 +01:00
James Pluck
b04a1ab41c Fix Truncate Error Issue when using views in a Unittest.
When using a view in a SilverStripe project, whenever the tear down scripts for the Unittests are run the following error occurs:

Couldn't run query:
TRUNCATE "ActivityPoints_view"
Table 'ss_tmpdb2391727.ActivityPoints_view' doesn't exist

This was due to the MySQLSchemaManager::tableList() function assuming that all records in the TABLES were actual tables containing data.

This small tweak fixes the issue by modifying the SQL to filter out views from the list before truncating.
2017-08-14 15:22:19 +12:00
Daniel Hensby
7b6aad8a65 Revert "TreeDropDown performance boost." 2017-07-19 12:44:43 +01:00
Roman Schmid
a6db16b229 Fix OS X issue with Convert::html2raw, HTMLText::FirstSentence, HTMLText::Summary and Text::FirstSentence.
Use unicode modifier for regular expressions that deal with whitespace.
Added unit-tests to ensure no invalud utf-8 gets generated by these methods.
2017-07-10 09:49:55 +02:00
Mojmir Fendek
5b6a39e71a TreeDropDown performance boost. 2017-06-19 15:10:23 +12:00
Loz Calver
2afe018dc7
FIX: Ensure HasManyList foreign ID filter includes table name (fixes #7023) 2017-06-15 12:06:30 +01:00
Daniel Hensby
24166700e8
Merge remote-tracking branch 'security/3.4.6' into 3.5.4 2017-05-29 01:02:35 +01:00
Daniel Hensby
16a74bc8a9
FIX DataDifferencer needs to expliclty cast HTMLText values 2017-05-29 00:10:32 +01:00
Robbie Averill
197bc53c49 FIX Add transparency percent argument to Image::generatePad to ensure transparency works from ::Pad 2017-05-16 21:20:21 +12:00
Daniel Hensby
793a020ce9
Merge branch '3.4' into 3.5 2017-05-08 11:31:33 +01:00
Gregory Smirnov
1d36f354e8 FIX Create Image_Cached with Injector. 2017-04-26 10:40:10 +02:00
Damian Mooyman
66a9694011 Merge branch '3.5' into dblib-pdo 2017-03-20 11:49:02 +13:00
Daniel Hensby
8aaa3e3a86
Merge branch '3.4' into 3.5 2017-03-03 14:54:29 +00:00
Daniel Hensby
7f194a917d
Merge pull request #6351 from steve-silverstripe/patch-2 2017-03-03 14:05:53 +00:00
Shawn
72b6fb49b6 Fix bug: In addOrderBy method, _SortColumn will only keep the last one if there are more than 1 multi-word columns 2017-03-03 14:11:53 +13:00
Andrew O'Neil
9492a8b92f Error should be checked on the db connection, not on the result 2017-03-01 10:41:06 +11:00
Andrew O'Neil
6af3289f43 Remove negation of condition to make the code easier to read. 2017-02-10 10:54:15 +11:00
Andrew O'Neil
6e2797ffc0 Fixes for using dblib PDO driver.
These fixes allow *nix environments to connect to SQL Server using
the dblib PDO driver and the silverstripe mssql module.

  - Only set MYSQL_ATTR_INIT_COMMAND when using the mysql driver, this
    constant isn't defined if the mysql pdo driver isn't installed
  - Supress warnings on getting the server version, attributes aren't
    supported by the dblib driver
  - Explicitly check for errors on sql exec, checking the return
    value isn't reliable for statements with no return value (e.g.
    USE database)
2017-02-10 10:20:16 +11:00
Damian Mooyman
89a927d152 Merge 3.4 into 3.5 2017-02-08 10:01:14 +13:00
Daniel Hensby
0fe4ec4537
Partial revert of c6c6c13fc2 2017-02-07 15:33:20 +00:00
Daniel Hensby
3a6d41042f
Merge branch '3.4' into 3.5 2017-01-26 21:25:14 +00:00
Daniel Hensby
c6c6c13fc2
[SS-2017-001] FIX Unescaped title attribute in LeftAndMain_TreeNode::forTemplate 2017-01-26 12:56:31 +00:00
Daniel Hensby
c8a40605ec Merge pull request #6413 from volkerloew/1400-text-contextsummary
search term highlighting without altering case (fixes #1400)
2016-12-28 13:36:08 +00:00
Volker Löw
5e581eace7
search term highlighting without altering case (fixes #1400) 2016-12-28 13:03:35 +00:00
Damian Mooyman
b1b3a6ee13 Merge 3.4 into 3.5 2016-12-22 13:18:37 +13:00
Andrew Aitken-Fincham
eecdf56b36 remove Created field on duplicate 2016-12-19 13:50:48 +00:00
Steve
c034838c71 Update Versioned.php
Change isset() to array_key_exists(). In the CMS, if you have a FormField such as 'My value', then you change it to '' (blank), isset() will return false because even though the key exists, the value === null by the time it reaches this point in the code, and isset() return false on null values. array_key_exists will return true with a null value
2016-11-30 14:49:03 +13:00
Daniel Hensby
3e36f5691b
Merge branch '3.4' into 3.5.0 2016-11-22 11:31:39 +00:00
Damian Mooyman
f43a91a4f8 API Add FormField::canSubmitValue()
API Add HTMLText::getProcessShortcodes() / setProcessShortcodes()
API Split TextareaField::Value() into ValueEntities() with shortcodes disabled
2016-11-17 09:55:03 +13:00
Jonathon Menz
bec5adf09b FIX Versioned sort by ID
Prevent SQL error from a Versioned DataObject with e.g. $default_sort = 'ID DESC'
2016-11-16 12:16:33 -08:00
Daniel Hensby
17108ff50c
Merge branch '3.4' into 3.5.0 2016-11-10 14:23:38 +00:00
Damian Mooyman
ebae480c66
BUG Fix regression in aggregate column lookup from #6199 2016-11-10 11:13:02 +13:00
Daniel Hensby
955e02ab90
Merge branch '3.4' into 3 2016-11-08 17:03:10 +00:00
Daniel Hensby
0a835c6fe7
Merge branch '3.4' into 3 2016-11-03 13:27:31 +00:00
Daniel Hensby
567b125fbc
DOCS Fix up some PHPDoc on Versioned 2016-11-02 14:08:35 +00:00
Daniel Hensby
c61d61d003
FIX default_records are no longer inherited to child classes 2016-11-01 20:58:03 +00:00
Damian Mooyman
2a9138aa14 Merge pull request #6264 from dhensby/pulls/3.4/validation-docblock-fix
DOCS Docblock fixes for ValidationResult
2016-11-01 10:38:33 +13:00
Daniel Hensby
0b850e0819
DOCS Docblock fixes for ValidationResult 2016-10-31 13:33:59 +00:00
Daniel Hensby
747bd4cac0
FIX filterAny error message now refers to correct method name 2016-10-30 12:04:07 +00:00