Commit Graph

757 Commits

Author SHA1 Message Date
Damian Mooyman
c7bd50427a BUG Fix cookie errors when running in CLI 2015-07-09 10:46:13 +12:00
Daniel Hensby
6169bf2760 FIX No longer caching has_one after ID change 2015-06-16 17:38:34 +01:00
Nick
168955135b Fix the order of params
The parameters for the strpos and substr functions were wrong. strpos always failed so never triggered the substr.

This would mean $fieldClass would be left with 'Varchar(255)'

Fixing this had no speed or memory effect.
2015-06-10 13:49:52 +12:00
Damian Mooyman
25f2689833 Merge pull request #4202 from jonom/fix-treedropdown-folders
FIX: TreeDropdownField Folder expansion
2015-05-29 10:14:46 +12:00
Damian Mooyman
50e33b8e5e Merge remote-tracking branch 'origin/3.1.13' into 3.1 2015-05-28 19:08:12 +12:00
Damian Mooyman
79cfa2bb64 Bug fix sqlquery select 2015-05-28 10:11:32 +12:00
Jonathon Menz
a56d08b1ae FIX: TreeDropdownField Folder expansion
When viewing a Folder tree, an expansion icon was shown if the Folder had *any* children, but it should be restricted to children that are Folders.
2015-05-27 09:22:42 -07:00
Gregory Smirnov
77a50d153e fixed Transliterator for pl_PL letters 2015-05-20 19:05:48 +02:00
Patrick Nelson
b43d79cff5 Fixed typo in SS_List ->toArray() return type. 2015-05-17 18:24:24 -04:00
Aram Balakjian
be10d90cc5 BUG count breaks when having clause defined 2015-05-07 21:26:12 +01:00
Ingo Schommer
2ff4fe5e81 Merge pull request #3998 from kinglozzer/pulls/cache-is-composite-field
Performance improvements to DataObject::is_composite_field()
2015-04-26 18:24:11 +12:00
Ingo Schommer
8f5932acec Allow empty has_one returns in DataDifferencer
Sometimes the has_one getter is incorrectly implemented,
resulting in an empty return object. While that's technically
a core API validation, there's no checks around it (i.e. no PHP class interface).
DataDifferencer has the option to continue here, so we should
program it defensively rather than resulting in a fatal error.
2015-04-20 09:13:33 +12:00
Damian Mooyman
b34c236b3c BUG Fix joins on tables containing "select" being mistaken for sub-selects
Fix PHPDoc on SQLQuery::addFrom and SQLQuery::setFrom
Fixes #3965
2015-03-18 16:10:07 +13:00
Loz Calver
a4fff63020 Performance improvements to DataObject::is_composite_field() 2015-03-10 17:07:22 +00:00
Daniel Hensby
95deae8a69 Merge pull request #3990 from kinglozzer/patch-1
Remove redundant config logic from DataObject::setField()
2015-03-09 21:09:23 +00:00
Loz Calver
747a794f86 Remove redundant config logic from DataObject::setField() 2015-03-09 12:51:08 +00:00
Loz Calver
f234301c0a FIX: DataQuery::applyRelation using incorrect foreign key (fixes #3954) 2015-03-02 09:56:47 +00:00
Loz Calver
3a7e24a220 FIX: Unable to access a list of all many_many_extraFields 2015-02-25 10:33:50 +00:00
Damian Mooyman
1db08bac88 BUG Fix FormAction title encoding
BUG Fix TreeMultiSelectField using the wrong label
BUG Fix encoding of selected title on TreeDropdownField
BUG Fix DataDifferencer trying to compare non-comparable fields (non-dbfield objects)
BUG: Fix issue with TreeMultiSelectField not saving
BUG: Fix issue with GridFieldPrintButton
ENHANCEMENT Instead of using multiple api calls to encode dbfield values, delegate this operation to the individual fields via forTemplate
Instead of using a new API to communicate html encoding to treeselect, just ensure all content is HTML encoded, and enable html_titles in jstree.
2015-02-13 15:50:45 +13:00
Daniel Hensby
89c14d079d Making TreeMultiSelectField consistent with parent class
NEW TreeDropdownField sanatiser helper added
Use config for default_cast of objects
FIX Determine if Diffed value should be escaped
Forcing casting for core DB fields
Fixing permissions labels
2015-02-13 11:12:30 +13:00
3Dgoo
0ec53d8fdd sort method comments fixed missing single quote 2015-02-12 14:39:54 +10:30
Daniel Hensby
9fd57ea4f6 MINOR SS_Query properties now protected 2015-02-09 16:24:25 +00:00
Loz Calver
77ebdc22fa FIX: DataObject::db returned fields in incorrect order, with incorrect data types
fixes #3802
2015-01-19 20:38:08 +00:00
Stig Lindqvist
9155eb5802 Merge pull request #3675 from micmania1/fix-datadifferencer-comparison
FIX DataDifferencer was trying to compare fields, even if the fields did...
2014-12-05 19:04:05 +13:00
Damian Mooyman
1f4f5e68ba BUG Fix versioned
Versioned is not writing Version to _version tables for subclasses of Version dataobjects which have their own DB fields
- Fix disjoint of ID / RecordID (which should be the same)
- Fix calculation of new record version
- Fix use of empty vs !isset to check for existing version

Conflicts:
	model/Versioned.php
	tests/model/VersionedTest.php

Cherry picked from commit c140459ac6
2014-12-02 22:30:59 +02:00
micmania1
7384d011e9 FIX DataDifferencer was trying to compare fields, even if the fields didn't exist causing an error. 2014-11-28 05:35:06 +00:00
Damian Mooyman
7b89c17349 Merge remote-tracking branch 'origin/3.1.7' into 3.1 2014-11-14 16:30:14 +13:00
Tadas Giniotis
2f59a6c59b filterAny method comments fixed to reflect actual operation 2014-11-13 22:12:58 +02:00
Sam Minnée
b15b93630c Merge pull request #3609 from pedro2555/1494-DBField-exists-returns-value
Explicit cast return of DBField->exists()
2014-11-12 13:41:49 +13:00
Sam Minnée
71c354d768 Merge pull request #3623 from kinglozzer/pulls/dataobject-db-inheritance
FIX: DataObject::db() doesn't respect overloaded db types (fixes #3620)
2014-11-12 13:41:03 +13:00
Loz Calver
85b4ba15fc FIX: DataObject::db() doesn't respect overloaded db types (fixes #3620) 2014-11-11 10:41:54 +00:00
g4b0
239ed66eaf Bugfix: fixed inheritance breaks filtering if relations are included (issue #3610) 2014-11-11 10:04:41 +01:00
spekulatius
14a1086b03 Update DataObject.php
Documentation fix:

Table at http://api.silverstripe.org/3.1/class-DataObject.html is displaying the data wrong. Current it says "protected A" instead of "protected ValidationResult" as it should be.
2014-11-09 21:19:39 +13:00
Pedro Rodrigues
d9fa6bd143 Explicit cast return of DBField->exists() 2014-11-07 00:16:12 +01:00
g4b0
213d5f60bf belongs_many_many are now translatable 2014-10-27 11:36:00 +01:00
JorisDebonnet
d5361dedec Moving NoHTML function from Text to StringField
This change will make the NoHTML function available for Varchar fields in particular.
2014-10-26 11:31:30 +00:00
Loz Calver
a77ca1995a Merge pull request #3521 from halkyon/bigsummary_plain_fix
BUG Text::BigSummary() fails with undefined $data when $plain = false
2014-10-25 23:30:36 +01:00
Loz Calver
570f261302 FIX: Tag-less cache backends error on flush 2014-10-15 11:41:15 +01:00
Loz Calver
c52e94e98e Fix DataQuery::applyRelation for multiple relations of the same class (fixes #3546) 2014-10-13 19:46:37 +01:00
Sean Harvey
776f6976c9 BUG Text::BigSummary() fails with undefined $data when $plain = false 2014-10-01 16:02:28 +13:00
Gabrijel Gavranović
cf456d6625 FIX use @param $colName in column call 2014-09-26 09:18:29 +12:00
Sean Harvey
409aebf0af Merge pull request #2515 from guttmann/html-text-absolutelink-placeholders
HTMLText AbsoluteLink parse placeholders
2014-09-25 16:07:41 +12:00
Ingo Schommer
fb8b22c292 Merge pull request #3402 from halkyon/plural_fix
BUG Fixing plural_name messing up singular words ending in "e" (#3251)
2014-09-18 21:56:56 +12:00
Stig Lindqvist
9f3506bf02 Merge pull request #3467 from halkyon/distinct_orm
Adding ability to change query distinct on DataList and DataQuery
2014-09-04 14:08:40 +12:00
Sean Harvey
151b7e9876 Adding ability to change query distinct on DataList and DataQuery 2014-09-04 13:51:43 +12:00
Stevie Mayhew
05379ff188 DataList spelling error
Minor spelling error in DataList
2014-09-04 09:16:13 +12:00
Sean Harvey
e93683bfca showqueries output incorrectly shows "ms" instead of "s" 2014-09-03 16:24:56 +12:00
Damian Mooyman
56d84d22a1 BUG MySQLDatabase performs queries on wrong DB connection when using connection $name != 'default' 2014-09-03 11:43:24 +12:00
Cam Spiers
298017c6d1 Fix deprecation warnings in internal SQLQuery usage 2014-08-28 14:26:17 +12:00
Will Rossiter
7993875f16 FIX: Sorting a DataQuery over a relation.
When sorting a DataQuery over a relation, the SQLQuery automatically included the sort column. The issue with the implement is that potentially the joined record has a field with the same name as the source record causing it to be overridden.

In the attached test case, without the patch the title will be set to 'Bar' rather than 'Foo'.

This patch aliases the sort column. Alternativally a patch would be to
2014-08-26 17:41:38 +12:00