Program ID instead of Schedule ID, convert next and recent to DateTime
This commit is contained in:
@@ -7,7 +7,7 @@ class Program extends Model {
|
||||
public $name;
|
||||
public $description;
|
||||
public $email;
|
||||
public $isSpecial;
|
||||
public $priority;
|
||||
|
||||
// TODO: Implementeren
|
||||
public $hosts;
|
||||
@@ -15,9 +15,14 @@ class Program extends Model {
|
||||
|
||||
public function __construct($data) {
|
||||
parent::__construct($data);
|
||||
if($this->schedule && $this->schedule->next && $this->schedule->next->time) {
|
||||
parent::ConvertToDateTime($this->schedule->next->time);
|
||||
}
|
||||
|
||||
if(!isset($data->isSpecial) && isset($data->priority)) {
|
||||
$this->isSpecial = ($data->priority < 2);
|
||||
if($this->schedule && $this->schedule->recent) {
|
||||
foreach($this->schedule->recent as &$recent) {
|
||||
parent::ConvertToDateTime($recent->time);
|
||||
}
|
||||
}
|
||||
|
||||
if(($mailComma = strpos($data->email, ',')) !== false) {
|
||||
|
||||
Reference in New Issue
Block a user