mirror of
https://github.com/silverstripe/silverstripe-subsites
synced 2024-10-22 09:05:55 +00:00
ENHANCEMENT: Exclude bidirection links from the 'in addition' list on the related pages tab. (from r89844)
This commit is contained in:
parent
61d67accf7
commit
451bf37da9
@ -203,8 +203,12 @@ class SiteTreeSubsites extends SiteTreeDecorator {
|
|||||||
* Returns the RelatedPageLink objects that are reverse-associated with this page.
|
* Returns the RelatedPageLink objects that are reverse-associated with this page.
|
||||||
*/
|
*/
|
||||||
function ReverseRelated() {
|
function ReverseRelated() {
|
||||||
return DataObject::get('RelatedPageLink', 'RelatedPageID = ' . $this->owner->ID,'',
|
return DataObject::get('RelatedPageLink', "\"RelatedPageLink\".\"RelatedPageID\" = {$this->owner->ID}
|
||||||
"INNER JOIN \"SiteTree\" ON \"SiteTree\".\"ID\" = \"RelatedPageLink\".\"MasterPageID\""
|
AND R2.\"ID\" IS NULL", '',
|
||||||
|
"INNER JOIN \"SiteTree\" ON \"SiteTree\".\"ID\" = \"RelatedPageLink\".\"MasterPageID\"
|
||||||
|
LEFT JOIN \"RelatedPageLink\" AS R2 ON R2.MasterPageID = {$this->owner->ID}
|
||||||
|
AND R2.RelatedPageID = RelatedPageLink.MasterPageID
|
||||||
|
"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user