diff --git a/common/classes/Track.php b/common/classes/Track.php index ced4269..005acb7 100644 --- a/common/classes/Track.php +++ b/common/classes/Track.php @@ -15,21 +15,22 @@ class Track extends Model { parent::__construct($data); parent::ConvertToDateTime($this->start); parent::ConvertToDateTime($this->ends); + $isLayout = $this->isLayout(); } private static $IDENTS = ['UURSLUITER' => 'Nieuws', 'NIEUWSOPEN ' => 'Nieuws', 'ANWB' => 'Verkeersinformatie', 'REGIO' => 'Regionieuws', 'CB' => 'Reclame']; public function isLayout() { - if(strlen($this->itemCode) > 0 && ($this->itemCode[0] == 'V')) { - foreach(self::$IDENTS as $ident => $display) { - if(substr($this->itemCode, 0, strlen($ident)) == $ident || substr($this->title, 0, strlen($ident)) == $ident) { - $this->title = $display; - $this->artist = ""; - $this->itemCode = '_' . $this->itemCode; - return false; - } - } + foreach(self::$IDENTS as $ident => $display) { + if(substr($this->itemCode, 0, strlen($ident)) == $ident || substr($this->title, 0, strlen($ident)) == $ident) { + $this->title = $display; + $this->artist = ""; + $this->itemCode = '_' . $this->itemCode; + return false; + } + } + if(strlen($this->itemCode) > 0 && ($this->itemCode[0] == 'V')) { return true; }