Prepare for merge
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
@@ -49,4 +49,5 @@ abstract class Event {
|
||||
|
||||
public abstract function getDescription(); /* : string */
|
||||
|
||||
public abstract function getColor(); /* : string */
|
||||
}
|
||||
|
@@ -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";
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -41,4 +41,8 @@ class AnimekveldEvent extends Event {
|
||||
];
|
||||
}
|
||||
|
||||
public function getColor() {
|
||||
return "#35a";
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -60,4 +60,8 @@ class BrettspillEvent extends Event {
|
||||
];
|
||||
}
|
||||
|
||||
public function getColor() {
|
||||
return "#000";
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -43,4 +43,8 @@ class NerdepitsaEvent extends Event {
|
||||
];
|
||||
}
|
||||
|
||||
public function getColor() {
|
||||
return "#c35";
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user