Prepare for merge

This commit is contained in:
2018-02-24 16:53:17 +01:00
43 changed files with 711 additions and 460 deletions

View File

@@ -54,12 +54,12 @@ class DBActivity implements Activity {
public function getNextEventFrom(DateTimeImmutable $date) {
$query = 'SELECT name,start,stop,organiser,location,description FROM events WHERE start > :date ORDER BY start ASC LIMIT 1';
$query = 'SELECT id,name,start,stop,organiser,location,description FROM events WHERE start > :date ORDER BY start ASC LIMIT 1';
return $this->retrieve($date, $query);
}
public function getPreviousEventFrom(DateTimeImmutable $date) {
$query = 'SELECT name,start,stop,organiser,location,description FROM events WHERE start < :date ORDER BY start DESC LIMIT 1';
$query = 'SELECT id,name,start,stop,organiser,location,description FROM events WHERE start < :date ORDER BY start DESC LIMIT 1';
return $this->retrieve($date, $query);
}

View File

@@ -49,4 +49,5 @@ abstract class Event {
public abstract function getDescription(); /* : string */
public abstract function getColor(); /* : string */
}

View File

@@ -49,11 +49,15 @@ class SimpleEvent extends Event {
}
public function getDescription() {
return $this->descr;
return array_map(function ($item) {return "<p>".$item;}, $this->descr);
}
public function isDBEvent() {
return $this->isDBEvent;
}
public function getColor() {
return "#3b7";
}
}

View File

@@ -41,4 +41,8 @@ class AnimekveldEvent extends Event {
];
}
public function getColor() {
return "#35a";
}
}

View File

@@ -60,4 +60,8 @@ class BrettspillEvent extends Event {
];
}
public function getColor() {
return "#000";
}
}

View File

@@ -43,4 +43,8 @@ class NerdepitsaEvent extends Event {
];
}
public function getColor() {
return "#c35";
}
}