mirror of
https://github.com/silverstripe/silverstripe-subsites
synced 2024-10-22 11:05:55 +02:00
fixing code analysis: removing unnecessary parenthesis
This commit is contained in:
parent
e7ad086641
commit
4fc13b19f7
@ -345,7 +345,7 @@ class LeftAndMainSubsites extends Extension
|
||||
{
|
||||
$page = DataObject::get_by_id(SiteTree::class, $data['ID']);
|
||||
$subsite = DataObject::get_by_id('Subsite', $data['CopyToSubsiteID']);
|
||||
$includeChildren = (isset($data['CopyToSubsiteWithChildren'])) ? $data['CopyToSubsiteWithChildren'] : false;
|
||||
$includeChildren = isset($data['CopyToSubsiteWithChildren']) ? $data['CopyToSubsiteWithChildren'] : false;
|
||||
|
||||
$newPage = $page->duplicateToSubsite($subsite->ID, $includeChildren);
|
||||
$response = $this->owner->getResponse();
|
||||
|
@ -140,7 +140,7 @@ class SubsitesVirtualPage extends VirtualPage
|
||||
|
||||
public function getCopyContentFromID_SubsiteID()
|
||||
{
|
||||
return ($this->CopyContentFromID) ? (int)$this->CopyContentFrom()->SubsiteID : (int)Session::get('SubsiteID');
|
||||
return $this->CopyContentFromID ? (int)$this->CopyContentFrom()->SubsiteID : (int)Session::get('SubsiteID');
|
||||
}
|
||||
|
||||
public function getVirtualFields()
|
||||
@ -204,7 +204,7 @@ class SubsitesVirtualPage extends VirtualPage
|
||||
// Veto the validation rules if its false. In this case, some logic
|
||||
// needs to be duplicated from parent to find out the exact reason the validation failed.
|
||||
if (!$isValid) {
|
||||
$IDFilter = ($this->ID) ? "AND \"SiteTree\".\"ID\" <> $this->ID" : null;
|
||||
$IDFilter = $this->ID ? "AND \"SiteTree\".\"ID\" <> $this->ID" : null;
|
||||
$parentFilter = null;
|
||||
|
||||
if (Config::inst()->get(SiteTree::class, 'nested_urls')) {
|
||||
|
Loading…
Reference in New Issue
Block a user