Commit Graph

480 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
torleif
75ec0c4791 Added tests that check comparisonClause()
AS requested by tractorcow: https://github.com/silverstripe/silverstripe-postgresql/pull/26

Tested on MySQL (succeeds as expected)  Tested on PostgreSQL (and fails as expected, but passes with patch). The fixes test only DataQueryTest related items for consistency, e.g. by avoiding DataObject calls.
2014-09-26 12:11:33 +12:00
Gabrijel Gavranović
cf456d6625 FIX use @param $colName in column call 2014-09-26 09:18:29 +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
Sean Harvey
151b7e9876 Adding ability to change query distinct on DataList and DataQuery 2014-09-04 13:51:43 +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
Sean Harvey
61c6dee057 BUG Fixing plural_name messing up singular words ending in "e" (#3251)
This would ideally be fixed with the ability to use an external library
like gettext, but that's an API change. This for now fixes the issue
where a singular like "Page" returns "Pags" for the plural name.
2014-08-20 14:55:40 +12:00
Devlin
4178f7beb0 test all generate methods and formatted image deletetions 2014-08-19 10:12:47 +02:00
Sean Harvey
5f1552b365 BUG Custom label set in summary_fields config gets overridden 2014-08-14 14:19:41 +12:00
John Milmine
0a36951ab1 adding exclamation mark and question mark to delimiters, made text work the same as HTML Text 2014-08-07 21:01:23 +10:00
Stig Lindqvist
333a2aa8f9 BUG: CMS tree filters doesn't count the correct number of children for deleted pages
This is a bug that combines Hierarchy, Versioned and LeftAndMain admins and CMSSiteTreeFilters.

This bug can be reproduced by having a large site tree with enough deleted pages in it so it doesn't
pre load all the children pages when initially opening an admin. Filter by either 'All pages including deleted'
or 'Deleted pages'. For CMS users it will look like deleted pages are gone.

The solution involves a couple of smaller fixes in both CMS and framework modules.

1) Ensure that 'numHistoricalChildren' are used instead of 'numChildren' when dealing with deleted pages
2) LeftAndMain::currentPage() deletes all the 'marking' cache previously built up by Hierarchy::markPartialTree()
3) Use Versioned::get_included_deleted() instead of raw DB queries against the DataObject tables when calculating parents in CMSSiteTreeFilter
2014-07-25 16:19:30 +12:00
Senorgeno
df6a8b6fb6 BUG #3282: Added ability to subselect with in left or inner join 2014-07-17 13:27:28 +12:00
Sean Harvey
d1d295056b Merge pull request #3265 from stevie-mayhew/images-force-resample
FEATURE allow force resampling on images
2014-07-07 11:27:16 +12:00
Stevie Mayhew
1d86fe4f52 FEATURE allow force resampling on images 2014-07-05 14:29:01 +12:00
Will Rossiter
2c741fec0c FIX Add support for compositedbfield within many_many_extraFields
Previously selectFromTable would simply try to select the composite field name. This expands the extraField name to include the children field names and uses CompositeDBField::writeToManipulation to generate the correct SQL for the queries.
2014-06-28 10:54:48 +12:00
Sean Harvey
0ee3a683a5 Better support for overloading start and destroy methods in Session
Move functionality from static start and destroy functions into instance
methods, allowing these to be overloaded. This works the same way as
calling Session::set() which then in turn calls inst_set()

Additionally use Injector to create the default Session instance to
allow the class to be swapped out.
2014-06-20 10:35:53 +12:00
Damian Mooyman
4c5de82625 Versioned no longer sets redundant session data 2014-06-11 16:42:22 +12:00
Simon Welsh
9b3bfb2e10 Merge pull request #3145 from tractorcow/pulls/3.1/fix-choose-stage
BUG Fix access to protected Session::current_session()
2014-05-24 11:07:40 +10:00
Damian Mooyman
4a34c364e6 BUG Fix access to protected Session::current_session()
Fixes #3144
2014-05-20 10:17:33 +12:00
Damian Mooyman
c24a2c2177 BUG ArrayList failing to respect the SS_Sortable interface
ref: CWPBUG-133
2014-05-15 14:25:23 +12:00
Hamish Friedlander
149b4e4356 Merge pull request #3019 from tractorcow/pulls/3.1-dataquery-tables
BUG Fix data query not always joining necessary tables
2014-05-06 15:26:26 +12:00
Damian Mooyman
ae573f829f BUG Fix Versioned stage not persisting in Session. Fixes #962
BUG Disabled disruptive test case in DirectorTest
API RequestProcessor and VersionedRequestFilter now both correctly implement RequestFilter
Better PHPDoc on RequestFilter and implementations
2014-05-06 14:11:44 +12:00
Damian Mooyman
a3c8a594ca BUG Fix data query not always joining necessary tables
Fixes #2846
2014-05-06 12:22:46 +12:00
Ingo Schommer
f2b2ee8a68 Merge pull request #3021 from tractorcow/pulls/3.1-htmltext-whitelist
BUG HTMLText whitelist considers text nodes
2014-05-05 13:23:52 +12:00
Damian Mooyman
91034d1341 BUG HTMLText whitelist considers text nodes
Minor improvement to #2853.
If a list of whitelisted elements are specified, text nodes no longer evade the whitelist
2014-04-29 11:52:16 +12:00
Damian Mooyman
8673b11cd9 BUG Fix ImageTest
Image test would erroneously reset the Image::$backend to null if the test was skipped, breaking subsequent test cases
2014-04-29 08:57:23 +12:00
Damian Mooyman
84d8022b32 BUG Fix Date and SS_DateTime::FormatFromSettings
This issue is caused by the odd default behaviour of Zend_Date, which attempts to parse yyyy-mm-dd format date and times as though they were yyyy-dd-mm.
2014-04-02 15:38:35 +13:00
Russell Michell
26f8341438 NEW Added FormatFromSettings(). Formats dates as per user preferences.
- Required for silverstripe-cms/issue/965.
- Separate implementations for Date and SS_Datetime.
2014-03-17 10:15:59 +13:00
Simon Welsh
90ba514cda Merge pull request #2917 from tractorcow/pulls/fix-lazyload-queryparams
BUG Fix DataObject / Versioned publishing issues
2014-03-15 21:45:42 +13:00
Simon Welsh
ccaca9a6aa Merge pull request #2916 from tractorcow/pulls/fix-classname-generation
BUG Prevent unnecessary reconstruction of ClassName field
2014-03-15 21:44:29 +13:00
Simon Erkelens
6676787176 ENHANCEMENT: Allow nested grouping of GroupedList 2014-03-15 19:20:28 +13:00
Simon Welsh
0e0597f8cd Merge branch '3.0' into 3.1
Conflicts:
	control/Director.php
	dev/Backtrace.php
	docs/en/installation/nginx.md
	model/HTMLValue.php
	tests/model/SQLQueryTest.php
2014-03-10 22:56:27 +13:00
Damian Mooyman
23f5f08eda BUG Fix DataObject::loadLazyFields discarding original query parameters
BUG Fix Versioned::writeToStage failing to write object with unchanged fields
2014-03-04 16:12:07 +13:00
Damian Mooyman
53b5adbcd9 BUG Prevent unnecessary reconstruction of ClassName field after default records are generated 2014-03-04 12:03:45 +13:00
Colin Richardson
7b13041449 Remove trailing dashes from URLSegment 2014-03-03 22:22:03 +00:00
Colin Richardson
1795b21df0 Remove redundant underscore and update the comment 2014-03-02 15:03:02 +00:00
Hamish Friedlander
d6630d240a NEW Allow specifying element whitelist in HTMLText fields 2014-02-18 14:02:04 +13:00
Sean Harvey
30e3904e4c Merge pull request #2845 from kinglozzer/1429-summary-searchable-fields
FIX: searchable_fields inheritance from summary_fields includes methods called on fields (fixes #1429)
2014-02-17 15:14:54 +13:00
Loz Calver
a91a4bbdc2 FIX: Searchable fields with dot notation can be inherited from summary_fields (fixes #1429) 2014-02-14 21:52:47 +00:00