mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Merge 3.4 into 3.5
This commit is contained in:
commit
b1b3a6ee13
19
docs/en/04_Changelogs/3.4.3.md
Normal file
19
docs/en/04_Changelogs/3.4.3.md
Normal file
@ -0,0 +1,19 @@
|
||||
# 3.4.3
|
||||
|
||||
<!--- Changes below this line will be automatically regenerated -->
|
||||
|
||||
## Change Log
|
||||
|
||||
### Bugfixes
|
||||
|
||||
* 2016-12-21 [f314b86](https://github.com/silverstripe/silverstripe-framework/commit/f314b86ad804b021cda255e4645e99e8d971fa8a) Temp disable shortcode SPLIT behaviour due to crash (#6436) (Damian Mooyman)
|
||||
* 2016-12-18 [222ee6b](https://github.com/silverstripe/silverstripe-framework/commit/222ee6bde270712fee60c1b796a65f7b7dd4979f) ed a pagination bug (PingMetal)
|
||||
* 2016-12-16 [c007e85](https://github.com/silverstripe/silverstripe-framework/commit/c007e85d1b9a1affd0ea7646b6a8c37d78b4450c) Suppress HtmlEditorField casting (Damian Mooyman)
|
||||
* 2016-12-08 [5248be9](https://github.com/silverstripe/silverstripe-framework/commit/5248be92268e343dc0bacafd4c15de0c79d1f592) Handle fields with square brackets (Daniel Hensby)
|
||||
* 2016-12-05 [2181e3b](https://github.com/silverstripe/silverstripe-framework/commit/2181e3b86b3663352efdfb2e3896081b1e0ae4db) Fix localisation issues (Damian Mooyman)
|
||||
* 2016-12-05 [224b2a4](https://github.com/silverstripe/silverstripe-cms/commit/224b2a4cbad768f27a19b14c2b9ce53efa619619) Fix localisation issues in CMS (Damian Mooyman)
|
||||
* 2016-11-29 [9ec1d35](https://github.com/silverstripe/silverstripe-framework/commit/9ec1d35f2bd09bee50d3a3629d9589f8871abd98) Fix behat tests unable to capture HTML editor fields (Damian Mooyman)
|
||||
* 2016-11-24 [a4760b8](https://github.com/silverstripe/silverstripe-framework/commit/a4760b8ee409c2c96a0e77445debf931259cb9aa) Fixed issue where a shortcode's location would not get set to split when using the class leftAlone (UndefinedOffset)
|
||||
* 2016-11-23 [03b4e6e](https://github.com/silverstripe/silverstripe-framework/commit/03b4e6ea3201736c62a73e301489fe6a65a01a0f) Tests shouldnt set date or time format to null (Daniel Hensby)
|
||||
* 2016-11-22 [b2503ac](https://github.com/silverstripe/silverstripe-cms/commit/b2503ac004f5e99d2041732dea702735128ecf1e) content authors unable to duplicate top-level pages (fixes #1685) (Loz Calver)
|
||||
* 2016-11-04 [dd9ade4](https://github.com/silverstripe/silverstripe-framework/commit/dd9ade429454b1053ab5c2003663eeb66b5866d6) UploadField incorrectly setting max upload size (Daniel Hensby)
|
17
docs/en/04_Changelogs/rc/3.4.3-rc1.md
Normal file
17
docs/en/04_Changelogs/rc/3.4.3-rc1.md
Normal file
@ -0,0 +1,17 @@
|
||||
# 3.4.3-rc1
|
||||
|
||||
<!--- Changes below this line will be automatically regenerated -->
|
||||
|
||||
## Change Log
|
||||
|
||||
### Bugfixes
|
||||
|
||||
* 2016-12-16 [c007e85](https://github.com/silverstripe/silverstripe-framework/commit/c007e85d1b9a1affd0ea7646b6a8c37d78b4450c) Suppress HtmlEditorField casting (Damian Mooyman)
|
||||
* 2016-12-08 [5248be9](https://github.com/silverstripe/silverstripe-framework/commit/5248be92268e343dc0bacafd4c15de0c79d1f592) Handle fields with square brackets (Daniel Hensby)
|
||||
* 2016-12-05 [2181e3b](https://github.com/silverstripe/silverstripe-framework/commit/2181e3b86b3663352efdfb2e3896081b1e0ae4db) Fix localisation issues (Damian Mooyman)
|
||||
* 2016-12-05 [224b2a4](https://github.com/silverstripe/silverstripe-cms/commit/224b2a4cbad768f27a19b14c2b9ce53efa619619) Fix localisation issues in CMS (Damian Mooyman)
|
||||
* 2016-11-29 [9ec1d35](https://github.com/silverstripe/silverstripe-framework/commit/9ec1d35f2bd09bee50d3a3629d9589f8871abd98) Fix behat tests unable to capture HTML editor fields (Damian Mooyman)
|
||||
* 2016-11-24 [a4760b8](https://github.com/silverstripe/silverstripe-framework/commit/a4760b8ee409c2c96a0e77445debf931259cb9aa) Fixed issue where a shortcode's location would not get set to split when using the class leftAlone (UndefinedOffset)
|
||||
* 2016-11-23 [03b4e6e](https://github.com/silverstripe/silverstripe-framework/commit/03b4e6ea3201736c62a73e301489fe6a65a01a0f) Tests shouldnt set date or time format to null (Daniel Hensby)
|
||||
* 2016-11-22 [b2503ac](https://github.com/silverstripe/silverstripe-cms/commit/b2503ac004f5e99d2041732dea702735128ecf1e) content authors unable to duplicate top-level pages (fixes #1685) (Loz Calver)
|
||||
* 2016-11-04 [dd9ade4](https://github.com/silverstripe/silverstripe-framework/commit/dd9ade429454b1053ab5c2003663eeb66b5866d6) UploadField incorrectly setting max upload size (Daniel Hensby)
|
@ -531,7 +531,9 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity
|
||||
*/
|
||||
public function duplicate($doWrite = true) {
|
||||
$className = $this->class;
|
||||
$clone = new $className( $this->toMap(), false, $this->model );
|
||||
$map = $this->toMap();
|
||||
unset($map['Created']);
|
||||
$clone = new $className( $map, false, $this->model );
|
||||
$clone->ID = 0;
|
||||
|
||||
$clone->invokeWithExtensions('onBeforeDuplicate', $this, $doWrite);
|
||||
|
@ -11,10 +11,11 @@ class DataObjectDuplicationTest extends SapphireTest {
|
||||
);
|
||||
|
||||
public function testDuplicate() {
|
||||
SS_Datetime::set_mock_now('2016-01-01 01:01:01');
|
||||
$orig = new DataObjectDuplicateTestClass1();
|
||||
$orig->text = 'foo';
|
||||
$orig->write();
|
||||
|
||||
SS_Datetime::set_mock_now('2016-01-02 01:01:01');
|
||||
$duplicate = $orig->duplicate();
|
||||
$this->assertInstanceOf('DataObjectDuplicateTestClass1', $duplicate,
|
||||
'Creates the correct type'
|
||||
@ -28,6 +29,8 @@ class DataObjectDuplicationTest extends SapphireTest {
|
||||
$this->assertEquals(2, DataObjectDuplicateTestClass1::get()->Count(),
|
||||
'Only creates a single duplicate'
|
||||
);
|
||||
$this->assertEquals(SS_Datetime::now()->Nice(), $duplicate->dbObject('Created')->Nice());
|
||||
$this->assertNotEquals($orig->dbObject('Created')->Nice(), $duplicate->dbObject('Created')->Nice());
|
||||
}
|
||||
|
||||
public function testDuplicateHasOne() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user