Ingo Schommer
f29d51f433
Merge remote-tracking branch 'origin/3.1'
...
Conflicts:
docs/en/reference/dataobject.md
lang/es.yml
2013-12-19 20:23:09 +01:00
Ingo Schommer
892b772d1c
Merge pull request #2616 from Zauberfisch/3.1
...
Check if remote class exists in DataObject->getRemoteJoinField()
2013-12-19 11:05:13 -08:00
Sean Harvey
8ea8789ba7
Merge pull request #2721 from froog/year_fix
...
FIX: Year.php getDefaultOptions now fixed, sets key as year. Also added YearTest unit test.
2013-12-18 21:55:48 -08:00
Sean Harvey
6fc9db6f0e
API DataObject::validate() visibility changed to public (issue #1659 )
...
DataObject::validate() is currently set to protected, but this means
you can't call validate() from outside the context of itself unless
you overload the method to use a public visibility and then call
parent::validate()
As it would turn out, most classes that overload this method already
set the visibility to public, so it would make sense the parent matches
that as well.
2013-12-19 16:36:39 +13:00
Jayden Seric
0b24d520f9
Update SQLQuery.php
...
Updated `SQLQuery` class code examples for functions `setOrderBy` and `addOrderBy` to use their new names.
2013-12-18 10:00:31 +11:00
Daniel Pickering
94c19e349a
FIX: Year.php getDefaultOptions now fixed, sets key as year. Also added YearTest unit test.
2013-12-16 03:29:29 +00:00
Ingo Schommer
c811556ea5
Removed debug code
2013-12-13 10:04:26 +01:00
Ingo Schommer
be5484b1d2
Leave original ValidationException intact in write()
...
If we want DataObject->validate() to be used instead of
the form layer, we should allow for validation errors
to be passed through unchanged to the controller layer
so we can present them to the user. The context of
which class is written should be apparent from the stacktrace
of the exception.
2013-12-11 00:41:05 +01:00
Will Rossiter
20e082d00e
Tidy up enum matching where classname is missing
2013-12-07 12:18:58 +13:00
Fred Condo
b88a0955a5
API: Support string descriptors for unique indexes in Versioned
...
- Document the format for descriptor arrays
- Implement the behaviour that developers have come to expect for
string descriptors of indexes
- Add test for handling of unique indexes (MySQL & sqlite3)
- Resolve #2403
Versioned needs to convert unique indexes to non-unique for its suffixed
tables, such as Foo_Live and Foo_versions. Because DataObject accepts
string descriptors such as array('UniqIDX' => 'unique (Uniq)') as well
as array-based descriptors, Versioned needs to recognize string
descriptors. This patch accomplishes that. Before, Versioned would fail
to convert string-described indexes to non-unique, resulting in run-time
errors when creating a new version of an object.
2013-12-06 10:02:44 -08:00
Ingo Schommer
6176d65bd2
Merge remote-tracking branch 'origin/3.1'
...
Conflicts:
forms/gridfield/GridFieldSortableHeader.php
model/DataList.php
model/fieldtypes/Enum.php
2013-12-02 20:49:34 +01:00
Will Rossiter
ed61dd848e
Separate out SS_Query and MySQLQuery from their Database classes
...
Coding conventions state one class per file (unless it uses an _ to indicate related classes.
2013-11-28 11:55:25 +13:00
Ingo Schommer
305fea8163
Merge pull request #2660 from icecaster/patch-1
...
Scaffolded Enum Search fields dont offer a null selection
2013-11-22 11:55:56 -08:00
Ingo Schommer
70207b0c98
Merge pull request #2626 from Zauberfisch/filterByCallback
...
filterByCallback added to SS_Filterable interface and implemented in ArrayList
2013-11-21 05:34:36 -08:00
Zauberfisch
d9b74874fc
added filterByCallback() to interface SS_Filterable and all implementing classes
2013-11-21 13:03:18 +00:00
Will Rossiter
0e89c4b6cd
API: Implement SS_Map::push() to append values.
...
FIX: SS_Map::count() not taking into account additional firstItems
2013-11-18 20:38:57 +13:00
Tim
2e369ecc53
FIX: scaffolded search field null selection by default
...
Enum search fields should default to having an empty string set
2013-11-13 15:13:27 +13:00
Andrew Short
bedf292612
Merge branch '3.1'
...
Conflicts:
docs/en/reference/execution-pipeline.md
lang/nl.yml
2013-11-11 18:18:25 +11:00
Zauberfisch
4b138cfe0b
Check if remote class exists in DataObject->getRemoteJoinField()
2013-11-09 22:43:30 +00:00
Damian Mooyman
c74f7e7640
BUG Fixes issue where items could be deleted from a has_many relation by an entirely unrelated HasManyList calling delete on that item.
2013-11-01 11:39:13 +13:00
Damian Mooyman
22f5f4d644
BUG Fix undefined index ID
2013-10-30 10:34:09 +13:00
Ingo Schommer
dfabd54bdb
Fixed support for single stage in Versioned
...
This used to work in 2.4, so is considered a regression.
To test, simply add a Versioned("Stage") extension to
some record in 2.4 vs. 3.1.
2013-10-24 17:09:17 +02:00
Ingo Schommer
ed6e45610f
Merge pull request #2572 from Zauberfisch/api-getRemoteJoinField-enhancement-2570
...
API: DataObject->getRemoteJoinField() no longer defaults to ParentID but throws an exception instead
2013-10-23 13:59:37 -07:00
Ingo Schommer
b56ca812dc
Merge remote-tracking branch 'origin/3.1'
...
Conflicts:
tests/security/MemberTest.php
2013-10-23 14:53:29 +02:00
colymba
46272ffb93
image cacheFilename checks for numeric strings
...
using JSON_NUMERIC_CHECK json_encode flag and avoid duplicate files
creation
2013-10-23 10:16:18 +03:00
Andrew Short
156bb87d57
FIX: Move stage choosing into a pre-request filter.
...
This ensures that the correct stage is selected, even if the request
does not come through the model as controller system. This fixes an
issue where custom controllers would always be on the "Stage" stage.
2013-10-23 18:29:13 +13:00
Ingo Schommer
6f41b6fae6
Merge pull request #2566 from NicoHaase/master
...
BUG: An enum field in the search panel model admin misses an option to not filter on that field
2013-10-22 06:43:36 -07:00
Nico Haase
ab10c2ecdc
BUG: An enum field in the search panel model admin misses an option to not filter on that field
2013-10-22 15:39:37 +02:00
Zauberfisch
32bb98b0d7
API: DataObject->getRemoteJoinField() no longer defaults to ParentID but throws an exception instead
2013-10-21 04:11:00 +00:00
Zauberfisch
8de1ce4a56
array check to ensure getRemoteJoinField() gets an array from Config::inst()->get($remoteClass, 'has_one') (related issue: #2570 )
2013-10-21 04:04:28 +00:00
Ingo Schommer
25b6175e67
Merge remote-tracking branch 'origin/3.1'
...
Conflicts:
.travis.yml
forms/FormField.php
2013-10-20 13:52:56 +02:00
Damian Mooyman
52f6581ecf
API Better declaration of DataObject field change levels.
...
Use of const named identifiers to represent each change level rather than numbers.
2013-10-17 12:55:58 +13:00
Ingo Schommer
1bcd4c9a6a
Merge pull request #2531 from ajshort/pull-5
...
Correct some incorrect PHPDoc definitions.
2013-10-13 01:36:16 -07:00
Andrew Short
c082dc3bd1
Correct some incorrect PHPDoc definitions.
2013-10-13 18:59:53 +11:00
Ingo Schommer
6e8ec778c3
Merge remote-tracking branch 'origin/3.1'
...
Conflicts:
admin/templates/Includes/LeftAndMain_Menu.ss
lang/en.yml
2013-10-07 16:19:40 +02:00
Ingo Schommer
795d3e4b3b
Merge remote-tracking branch 'origin/3.0' into 3.1
...
Conflicts:
dev/install/install.php5
docs/en/index.md
tests/core/CoreTest.php
2013-10-07 16:18:20 +02:00
Ingo Schommer
60fc7e5346
Merge remote-tracking branch 'origin/3.1'
2013-10-06 19:07:39 +02:00
Sean Harvey
8b2e1f2e7c
Merge pull request #2328 from chillu/pulls/versioned-archivemode-validation
...
Validate 'archiveDate' user data in Versioned
2013-10-03 14:33:22 -07:00
Damian Mooyman
afaf7f6b4e
BUG Sort column order maintained correctly when using expressions in SQLQuery and DataQuery
2013-10-03 14:20:31 +13:00
Ingo Schommer
f18ece11ca
Revert "Fixes silverstripe/silverstripe-framework#1910 : shortcodes not parsed in RSS feeds"
...
This reverts commit 306281ed44
.
Breaks HTMLTextTest
2013-09-30 22:40:47 +02:00
Ingo Schommer
b291f3d0cd
Merge pull request #2446 from jamesgoodmandia/rss-feed-placeholders
...
Fixes silverstripe/silverstripe-framework#1910 : shortcodes not parsed in...
2013-09-30 13:01:19 -07:00
Ingo Schommer
455e550d9a
Merge remote-tracking branch 'origin/3.1'
...
Conflicts:
docs/en/topics/testing/create-silverstripe-test.md
forms/Form.php
i18n/i18n.php
model/Image.php
2013-09-27 19:22:14 +02:00
Andrew Short
43fab1088a
Add a getter for the HasManyList foreign key.
2013-09-27 15:06:55 +10:00
James Goodman
306281ed44
Fixes silverstripe/silverstripe-framework#1910 : shortcodes not parsed in RSS feeds
2013-09-23 16:20:06 +12:00
Ingo Schommer
b9e205abbf
Allow <link/> in HTMLText->exists() ( fixes #850 )
2013-09-18 11:39:29 +02:00
Ingo Schommer
ba5984e2bf
Only compare array notations in SQLQuery->getOrderedJoins()
...
If more than two $from were added through SQLQuery->addFrom(),
the getOrderedJoins() comparison kicks in. It assumes all $from
parts are in array notation, which isn't always the case.
For legacy reasons, and because we don't have full API support,
you can still add literal joins through addFrom('INNER JOIN ...').
On PHP 5.3, the ordering comparison still works because it
allows array access in strings, with string rather than numeric indexes.
Thankfully that's no longer supported in PHP 5.4.
2013-09-17 22:08:48 +02:00
Russell Michell
3aaa12f114
FIX: Fixes #2398
...
- hasAmount() failed to return true for values <= 0.99 and >= 0.01
- Added unit tests
2013-09-13 12:21:21 +12:00
Ingo Schommer
03d1d58148
Merge remote-tracking branch 'origin/3.0' into 3.1
...
Conflicts:
admin/code/SecurityAdmin.php
css/AssetUploadField.css
docs/en/topics/configuration.md
security/PermissionRole.php
2013-09-12 17:33:36 +02:00
Ingo Schommer
c2b312d76f
Merge remote-tracking branch 'origin/3.1.0' into 3.1
2013-09-12 17:24:42 +02:00
Ingo Schommer
5e0315dc62
Safety note on DataObject::validation_enabled
2013-09-12 15:42:43 +02:00