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

Commit

Permalink
Cleaning up a class definition.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathan Glasl committed Aug 24, 2016
1 parent 2727422 commit 7a5c027
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion code/pages/MediaPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -232,9 +232,10 @@ public function getCMSFields() {

public function validate() {

$parent = $this->getParent();

// The URL segment will conflict with a year/month/day/media format when numeric.

$parent = $this->getParent();
if(is_numeric($this->URLSegment) || !($parent instanceof MediaHolder) || ($parent->MediaTypeID != $this->MediaTypeID)) {

// Customise a validation error message.
Expand Down

0 comments on commit 7a5c027

Please sign in to comment.