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'
|
||||
warnings:
|
||||
methods:
|
||||
'SilverStripe\CMS\Model\SiteTree::getIsAddedToStage()':
|
||||
'SilverStripe\CMS\Model\SiteTree->getIsAddedToStage()':
|
||||
message: 'Moved to Versioned->isOnDraftOnly()'
|
||||
'SilverStripe\CMS\Model\SiteTree::getIsModifiedOnStage()':
|
||||
replacement: 'isOnDraftOnly'
|
||||
'SilverStripe\CMS\Model\SiteTree->getIsModifiedOnStage()':
|
||||
message: 'Moved to Versioned->isModifiedOnDraft()'
|
||||
'SilverStripe\CMS\Model\SiteTree::getExistsOnLive()':
|
||||
replacement: 'isModifiedOnDraft'
|
||||
'SilverStripe\CMS\Model\SiteTree->getExistsOnLive()':
|
||||
message: 'Removed in favour of isPublished()'
|
||||
replacement: 'isPublished'
|
||||
|
@ -773,8 +773,8 @@ class SiteTree extends DataObject implements PermissionProvider, i18nEntityProvi
|
||||
public function InSection($sectionName)
|
||||
{
|
||||
$page = Director::get_current_page();
|
||||
while ($page && $page->exists()) {
|
||||
if ($sectionName == $page->URLSegment) {
|
||||
while ($page instanceof SiteTree && $page->exists()) {
|
||||
if ($sectionName === $page->URLSegment) {
|
||||
return true;
|
||||
}
|
||||
$page = $page->Parent();
|
||||
|
@ -12,7 +12,6 @@ use SilverStripe\ORM\DataObject;
|
||||
use SilverStripe\ORM\ValidationResult;
|
||||
use SilverStripe\Security\Member;
|
||||
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.
|
||||
@ -366,7 +365,11 @@ class VirtualPage extends Page
|
||||
|
||||
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