From 5459df3053f243694d290e829f785e70f1c39547 Mon Sep 17 00:00:00 2001 From: Guy Sartorelli Date: Thu, 17 Oct 2024 13:24:26 +1300 Subject: [PATCH] ENH Update code to reflect changes to LeftAndMain --- src/Extensions/ShareDraftContentControllerExtension.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Extensions/ShareDraftContentControllerExtension.php b/src/Extensions/ShareDraftContentControllerExtension.php index c205f37..1aa114c 100644 --- a/src/Extensions/ShareDraftContentControllerExtension.php +++ b/src/Extensions/ShareDraftContentControllerExtension.php @@ -24,8 +24,8 @@ class ShareDraftContentControllerExtension extends Extension public function MakeShareDraftLink() { if ($member = Security::getCurrentUser()) { - if ($this->owner->hasMethod('CurrentPage') && $this->owner->CurrentPage()->canView($member)) { - return $this->owner->CurrentPage()->ShareTokenLink(); + if ($this->owner->hasMethod('currentRecord') && $this->owner->currentRecord()->canView($member)) { + return $this->owner->currentRecord()->ShareTokenLink(); } if ($this->owner->hasMethod('canView') && $this->owner->canView($member)) { return $this->owner->ShareTokenLink();