Skip to content

Commit

Permalink
ENH Remove unnecessary condition
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli committed Aug 22, 2024
1 parent a53744b commit 1d64985
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Actions/NotifyUsersWorkflowAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ public function getContextFields(DataObject $target)
}

if ($target instanceof CMSPreviewable) {
$result['CMSLink'] = $target->CMSEditLink();
$result['CMSLink'] = $target->getCMSEditLink();
} elseif ($target->hasMethod('WorkflowLink')) {
$result['CMSLink'] = $target->WorkflowLink();
}
Expand Down
4 changes: 1 addition & 3 deletions src/Admin/AdvancedWorkflowAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -286,9 +286,7 @@ public function userObjects(Member $user, $fieldName)
// Title property..
$instance->setField('Title', $target->getField('Title'));
$instance->setField('LastEdited', $target->getField('LastEdited'));
if (method_exists($target, 'CMSEditLink')) {
$instance->setField('ObjectRecordLink', $target->CMSEditLink());
}
$instance->setField('ObjectRecordLink', $target->getCMSEditLink());

$list->push($instance);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Extensions/WorkflowApplicable.php
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ public function AbsoluteEditLink()
$CMSEditLink = null;

if ($this->owner instanceof CMSPreviewable) {
$CMSEditLink = $this->owner->CMSEditLink();
$CMSEditLink = $this->owner->getCMSEditLink();
} elseif ($this->owner->hasMethod('WorkflowLink')) {
$CMSEditLink = $this->owner->WorkflowLink();
}
Expand Down

0 comments on commit 1d64985

Please sign in to comment.