Merge branch '3.7' into 3

This commit is contained in:
Robbie Averill 2018-06-22 18:46:34 +12:00
commit 3097bccadc
2 changed files with 38 additions and 33 deletions

View File

@ -2247,9 +2247,7 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
);
// "readonly"/viewing version that isn't the current version of the record
$stageOrLiveRecord = Versioned::get_one_by_stage($this->class, Versioned::current_stage(), array(
'"SiteTree"."ID"' => $this->ID
));
$stageOrLiveRecord = SiteTree::get()->byID($this->ID);
if($stageOrLiveRecord && $stageOrLiveRecord->Version != $this->Version) {
$moreOptions->push(FormAction::create('email', _t('CMSMain.EMAIL', 'Email')));
$moreOptions->push(FormAction::create('rollback', _t('CMSMain.ROLLBACK', 'Roll back to this version')));

View File

@ -1,32 +1,39 @@
{
"name": "silverstripe/cms",
"type": "silverstripe-module",
"description": "The SilverStripe Content Management System",
"homepage": "http://silverstripe.org",
"license": "BSD-3-Clause",
"keywords": ["silverstripe", "cms"],
"authors": [
{
"name": "SilverStripe",
"homepage": "http://silverstripe.com"
},
{
"name": "The SilverStripe Community",
"homepage": "http://silverstripe.org"
}
],
"require": {
"php": ">=5.3.3",
"composer/installers": "*",
"silverstripe/framework": "~3.4",
"silverstripe/reports": "~3.4",
"silverstripe/siteconfig": "~3.4"
},
"require-dev": {
"phpunit/phpunit": "^3 || ^4 || ^5"
},
"autoload": {
"classmap": ["tests/behat/", "code"]
},
"minimum-stability": "dev"
"name": "silverstripe/cms",
"type": "silverstripe-module",
"description": "The SilverStripe Content Management System",
"homepage": "http://silverstripe.org",
"license": "BSD-3-Clause",
"keywords": [
"silverstripe",
"cms"
],
"authors": [
{
"name": "SilverStripe",
"homepage": "http://silverstripe.com"
},
{
"name": "The SilverStripe Community",
"homepage": "http://silverstripe.org"
}
],
"require": {
"php": ">=5.3.3",
"composer/installers": "*",
"silverstripe/framework": "~3.4",
"silverstripe/reports": "~3.4",
"silverstripe/siteconfig": "~3.4"
},
"require-dev": {
"phpunit/phpunit": "^3 || ^4 || ^5"
},
"extra": [],
"autoload": {
"classmap": [
"tests/behat/",
"code"
]
},
"minimum-stability": "dev"
}