mirror of
https://github.com/silverstripe/silverstripe-subsites
synced 2024-10-22 11:05:55 +02:00
MINOR always show the subsite dropdown, (from r88892)
This commit is contained in:
parent
3dc406dcf0
commit
d4dbeb17f5
@ -10,13 +10,9 @@ class SubsitesVirtualPage extends VirtualPage {
|
||||
function getCMSFields() {
|
||||
$fields = parent::getCMSFields();
|
||||
|
||||
$subsites = Subsite::getSubsitesForMember();
|
||||
if(!$subsites) $subsites = new DataObjectSet();
|
||||
if(Subsite::hasMainSitePermission()) {
|
||||
$subsites = DataObject::get('Subsite');
|
||||
$subsites->push(new ArrayData(array('Title' => 'Main site', 'ID' => 0)));
|
||||
}
|
||||
|
||||
if($subsites->Count()) {
|
||||
$subsiteSelectionField = new DropdownField(
|
||||
"CopyContentFromID_SubsiteID",
|
||||
"Subsite",
|
||||
@ -28,7 +24,6 @@ class SubsitesVirtualPage extends VirtualPage {
|
||||
$subsiteSelectionField,
|
||||
'CopyContentFromID'
|
||||
);
|
||||
}
|
||||
|
||||
// Setup the linking to the original page.
|
||||
$pageSelectionField = new SubsitesTreeDropdownField(
|
||||
|
Loading…
Reference in New Issue
Block a user