mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
Merge remote-tracking branch 'origin/4.1' into 4
This commit is contained in:
commit
90723a2f07
@ -150,9 +150,12 @@ excludedPaths:
|
|||||||
- '*/_config/legacy.yml'
|
- '*/_config/legacy.yml'
|
||||||
warnings:
|
warnings:
|
||||||
methods:
|
methods:
|
||||||
'SilverStripe\CMS\Model\SiteTree::getIsAddedToStage()':
|
'SilverStripe\CMS\Model\SiteTree->getIsAddedToStage()':
|
||||||
message: 'Moved to Versioned->isOnDraftOnly()'
|
message: 'Moved to Versioned->isOnDraftOnly()'
|
||||||
'SilverStripe\CMS\Model\SiteTree::getIsModifiedOnStage()':
|
replacement: 'isOnDraftOnly'
|
||||||
|
'SilverStripe\CMS\Model\SiteTree->getIsModifiedOnStage()':
|
||||||
message: 'Moved to Versioned->isModifiedOnDraft()'
|
message: 'Moved to Versioned->isModifiedOnDraft()'
|
||||||
'SilverStripe\CMS\Model\SiteTree::getExistsOnLive()':
|
replacement: 'isModifiedOnDraft'
|
||||||
|
'SilverStripe\CMS\Model\SiteTree->getExistsOnLive()':
|
||||||
message: 'Removed in favour of isPublished()'
|
message: 'Removed in favour of isPublished()'
|
||||||
|
replacement: 'isPublished'
|
||||||
|
@ -773,8 +773,8 @@ class SiteTree extends DataObject implements PermissionProvider, i18nEntityProvi
|
|||||||
public function InSection($sectionName)
|
public function InSection($sectionName)
|
||||||
{
|
{
|
||||||
$page = Director::get_current_page();
|
$page = Director::get_current_page();
|
||||||
while ($page && $page->exists()) {
|
while ($page instanceof SiteTree && $page->exists()) {
|
||||||
if ($sectionName == $page->URLSegment) {
|
if ($sectionName === $page->URLSegment) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
$page = $page->Parent();
|
$page = $page->Parent();
|
||||||
|
@ -12,7 +12,6 @@ use SilverStripe\ORM\DataObject;
|
|||||||
use SilverStripe\ORM\ValidationResult;
|
use SilverStripe\ORM\ValidationResult;
|
||||||
use SilverStripe\Security\Member;
|
use SilverStripe\Security\Member;
|
||||||
use SilverStripe\Versioned\Versioned;
|
use SilverStripe\Versioned\Versioned;
|
||||||
use SilverStripe\View\SSViewer;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Virtual Page creates an instance of a page, with the same fields that the original page had, but readonly.
|
* Virtual Page creates an instance of a page, with the same fields that the original page had, but readonly.
|
||||||
@ -366,7 +365,11 @@ class VirtualPage extends Page
|
|||||||
|
|
||||||
public function CMSTreeClasses()
|
public function CMSTreeClasses()
|
||||||
{
|
{
|
||||||
return parent::CMSTreeClasses() . ' VirtualPage-' . $this->CopyContentFrom()->ClassName;
|
$parentClass = sprintf(
|
||||||
|
' VirtualPage-%s',
|
||||||
|
Convert::raw2htmlid($this->CopyContentFrom()->ClassName)
|
||||||
|
);
|
||||||
|
return parent::CMSTreeClasses() . $parentClass;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user