Commit Graph

359 Commits

Author SHA1 Message Date
Sean Harvey
9c2be0f025 Merge branch '3.0' 2012-09-17 15:16:52 +12:00
Ingo Schommer
b0fc1cb16a Merge branch '3.0.2' into 3.0 2012-09-12 11:05:50 +02:00
Hamish Friedlander
df5a9e087d FIX Cache ClassName enum so we dont query DB every call 2012-09-12 11:14:59 +12:00
Ingo Schommer
1088d044c5 Merge remote-tracking branch 'origin/3.0'
Conflicts:
	.travis.yml
2012-09-07 17:21:41 +02:00
Simon Welsh
a6f3e9f9eb Corrects replacement method name in deprecation notice. 2012-09-04 15:25:53 +12:00
Ingo Schommer
fb6efb9d21 BUG Calling extraStatics() with args (regression from fa37c448) 2012-09-02 13:55:35 +02:00
Sam Minnée
57ad36e11d Merge pull request #750 from silverstripe-rebelalliance/open/5971
FIX If ClassName read from DB doesnt exist, dont break
2012-08-29 22:48:31 -07:00
Hamish Friedlander
2f00884e79 FIX If ClassName read from DB doesnt exist, dont break
We know the subclass of a record by its ClassName value, but code changes
might have meant that class no longer exists. We used to just break,
but this patch overrides the apparent value of ClassName to be
one that exists in that situation
2012-08-30 11:02:50 +12:00
Ingo Schommer
f070f971cf BUG Allow custom getters in summaryFields() (fixes #7788)
Regression from ca1d38dffd
2012-08-29 13:42:29 +02:00
Simon Welsh
78fdcc580b API DataList->leftJoin()/innerJoin() args no longer escaped
The table name in the join was being escaped, though table
names aren't escaped anywhere else. This breaks
namespaced classes, which rely on unescaped backslashes.
2012-08-29 11:54:42 +02:00
Hamish Friedlander
cc2e250719 NEW Allow querying if a field exists on a table 2012-08-29 15:08:48 +12:00
Ingo Schommer
a8f335360b Merge remote-tracking branch 'origin/3.0' 2012-08-27 09:25:59 +02:00
Sean Harvey
674b52b4f7 Merge pull request #734 from silverstripe-rebelalliance/trac/7799
API Reverse config extra statics control flow
2012-08-26 14:24:05 -07:00
Sam Minnee
f1c021ff22 Merge branch '3.0' 2012-08-23 12:56:17 +12:00
Sam Minnee
87685eefdd BUGFIX: Fix Versioned's stage_unique mode on PostgreSQL. 2012-08-23 12:56:06 +12:00
Sam Minnee
824afffd2e Merge branch '3.0' 2012-08-23 12:39:41 +12:00
Sam Minnee
ed0341e82f BUGFIX: Ensure that subtracting a sorted DataList works. 2012-08-23 12:38:54 +12:00
Sam Minnee
296ee1fa0f BUGFIX: Add double quotes to index columns for more reliable DB-schema management. 2012-08-23 12:38:44 +12:00
Sam Minnee
dd302a68a7 BUGFIX: Ensure that all_versions are sorted explicitly for better cross-db behaviour. 2012-08-23 12:38:37 +12:00
Hamish Friedlander
fa37c448a5 API Reverse config extra statics control flow
Config system used to provide an add_static_source method, which was intended for
use by Extensions to add statics. But extensions for a class arent initialised
until at least one instance of that class is created, so before that the
Config system didnt include values from extensions

This patch reverses the control flow, so that the Config system explictly asks
each Object for its additional config sources via the new method
get_extra_config_sources. This method returns an array that can contain
string names of classes and also raw associative arrays.

The developer visible change is that Extension#add_to_class has been
deprecated. Instead there is a new method, get_extra_config, which has
the same method signature but needs to guarantee that it doesnt
cause side effects. Additionally there is no need to call
parent::get_extra_config - this is handled automatically.
2012-08-23 09:29:13 +12:00
Sam Minnée
e0e96343cf Merge pull request #729 from silverstripe-rebelalliance/trac/7717
FIX Hierarchy#liveChildren couldnt handle lots of pages
2012-08-20 20:59:41 -07:00
Hamish Friedlander
d0bc9c6d23 FIX Hierarchy#liveChildren couldnt handle lots of pages
Hierarchy#liveChildren was generating a list of all IDs of all pages
on staging. When a site had lots of pages, this basically killed the
tree.

Fix by adding new versioned mode, stage_unique, which uses a
subselect to only return items from a stage that are in no
other stage.
2012-08-21 15:52:12 +12:00
Sam Minnee
f9b1485640 Merge branch '3.0' 2012-08-21 14:38:19 +12:00
Damian Mooyman
f7ffb79542 FIXED: Compatibility fixes for MS SQL Server. Replaced back ticks (which are mysql specific) with double quotes 2012-08-21 13:46:19 +12:00
Ingo Schommer
4cc82e906b Merge remote-tracking branch 'origin/3.0' 2012-08-20 10:13:55 +02:00
Sam Minnée
47b56d4ef8 Merge pull request #716 from tractorcow/3.0-versioned-fixes
FIXED: Crashed caused by viewing versioned page
2012-08-19 19:02:24 -07:00
Damian Mooyman
0f09305e3d FIXED: Issue where temporary table would cause unpredictable behaviour. Temporary table functionality was substituted with subqueries in each use case.
ADDED: Test case for version archive functionality.
2012-08-20 13:24:28 +12:00
Ingo Schommer
29b62adec2 Merge branch 'augmentSQL-on-wrong-class' of git://github.com/creamarketing/sapphire into creamarketing-augmentSQL-on-wrong-class 2012-08-16 23:47:48 +02:00
Ingo Schommer
ea0554a466 Merge pull request #666 from silverstripe-droptables/versioned-param-order
BUG Correct wrong parameter order.
2012-08-16 14:03:16 -07:00
Ingo Schommer
4598cc02aa Merge pull request #659 from ajshort/instance-search-filters
BUG: Allow using instances for search filters.
2012-08-16 13:07:35 -07:00
Damian Mooyman
c55b018feb FIXED: Issue where versioned would join _versions tables on ID,Version instead of RecordID,Version 2012-08-10 13:54:29 +12:00
Damian Mooyman
22c5f3129c FIXED: Issue where viewing an archived version of a page caused invalid SQL to be generated. This would only occur with subclasses of Page. 2012-08-10 12:45:37 +12:00
Ingo Schommer
cac540d252 Merge branch '3.0' 2012-08-10 00:19:00 +02:00
Ingo Schommer
ca1d38dffd BUG Localize DataObject->summaryFields() 2012-08-10 00:14:02 +02:00
Ingo Schommer
fb7008627c Merge remote-tracking branch 'origin/3.0' 2012-08-09 10:47:44 +02:00
Juerg Rast
00a2edd9bc Wrong deprecation notice in DBField::create() 2012-08-04 19:14:16 +02:00
Niklas Forsdahl
76c5b56e81 BUG: augmentSQL always extended on base data class on query finalization
The augmentSQL DataExtension method is always extended on the base data
class of data objects in DataQuery::getFinilisedQuery(). This results
in augmentSQL not being called for extensions that are applied to non-
base data classes when finalizing the query.

For example, if Versioned was applied to class B which extends class A,
which in turn extends DataObject, then augmentSQL would be extended for
class A in DataQuery::getFinilisedQuery(). Since class A doesn't have
the Versioned extension in this example, it would not work for class B.

Fixed this by extending augmentSQL on the actual data class and not
on the base class.
2012-08-02 16:09:58 +03:00
Hamish Friedlander
3efdb5c981 Merge in changes from 3.0.1 final 2012-07-31 16:51:10 +12:00
Hamish Friedlander
367c49d6b1 API DataObject#relField now checks for method on model before property 2012-07-27 14:44:38 +12:00
Hamish Friedlander
95d0be636c Merge remote-tracking branch 'origin/3.0' 2012-07-25 11:44:53 +12:00
Mateusz Uzdowski
143ecebbfb BUG Correct wrong parameter order. 2012-07-24 14:17:12 +12:00
Hamish Friedlander
36c8fc2e93 Merge pull request #660 from silverstripe-rebelalliance/trac/7673
API Prep ArrayList, DataList, forForeignID for immutability in 3.1 per 7673
2012-07-22 21:30:53 -07:00
Hamish Friedlander
b7691077cf API Prep forForeignID for immutability in 3.1 per 7673 2012-07-23 10:31:47 +12:00
Hamish Friedlander
5fa18e9ab6 Merge pull request #652 from silverstripe-rebelalliance/trac/7482
BUG Fix issues with composite fields, as per Trac/7482
2012-07-22 15:14:30 -07:00
Andrew Short
c058f97edd BUG: Allow using instances for search filters.
Previously search filters could only be specified as strings, this
allows instances to be used so more complex filter configuration
can be used.
2012-07-23 02:11:35 +10:00
Hamish Friedlander
e8e4604457 API Prep DataList for immutability in 3.1 per 7673
DataList had several methods that should act on a copy and return
that copy, but was instead mutating the existing list.

We cant change this behaviour in the 3.0 line for backwards compt.
reasons, but this makes the desired behavior the default, and
makes disabling the mutation in 3.1 easier

It also introduces two new methods to deal with the common pattern
of wanting to modify the underlying dataQuery, which we want to be
able to reliably do in a way that always acts immutably. The main
method of these two is alterDataQuery
2012-07-20 15:58:18 +12:00
Hamish Friedlander
1ed41b8d67 API Prep ArrayList for immutability in 3.1 per 7673
ArrayList had several methods that should act on a copy and return
that copy, but was instead mutating the existing list.

We cant change this behaviour in the 3.0 line for backwards compt.
reasons, but this makes the desired behavior the default, and
makes disabling the mutation in 3.1 easier
2012-07-20 14:55:44 +12:00
Hamish Friedlander
c9b3430470 Update docs to indicate lists not mutable as per 7673 2012-07-20 14:51:12 +12:00
Ingo Schommer
3ae8b0b665 Merge remote-tracking branch 'origin/3.0' 2012-07-18 15:00:06 +02:00
Ingo Schommer
e0477321d3 Merge pull request #651 from willrossi/enumtidyup
API: Renamed EnumField::Lower() and EnumField::Upper() to LowerCase() and UpperCase()
2012-07-17 23:43:00 -07:00