Skip to content
This repository has been archived by the owner on Jan 10, 2021. It is now read-only.

Commit

Permalink
Updating some minor class definitions.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathan Glasl committed Jul 29, 2015
1 parent 383046d commit e18fb54
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions code/pages/MediaPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -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}/";
Expand All @@ -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}/";
Expand Down

0 comments on commit e18fb54

Please sign in to comment.