From e18fb54d657e6f955eca3260eed354fd23992e6f Mon Sep 17 00:00:00 2001 From: Nathan Glasl Date: Wed, 29 Jul 2015 13:30:29 +1000 Subject: [PATCH] Updating some minor class definitions. --- code/pages/MediaPage.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/pages/MediaPage.php b/code/pages/MediaPage.php index 02d3f51..44333a2 100644 --- a/code/pages/MediaPage.php +++ b/code/pages/MediaPage.php @@ -363,8 +363,8 @@ public function onBeforeWrite() { public function Link($action = null) { $parent = $this->getParent(); - if (!$parent) { - return ''; + if(!$parent) { + return null; } $date = ($parent->URLFormatting !== '-') ? $this->dbObject('Date')->Format($parent->URLFormatting) : ''; $link = $parent->Link() . "{$date}{$this->URLSegment}/"; @@ -381,8 +381,8 @@ public function Link($action = null) { public function AbsoluteLink($action = null) { $parent = $this->getParent(); - if (!$parent) { - return ''; + if(!$parent) { + return null; } $date = ($parent->URLFormatting !== '-') ? $this->dbObject('Date')->Format($parent->URLFormatting) : ''; $link = $parent->AbsoluteLink() . "{$date}{$this->URLSegment}/";