aboutsummaryrefslogtreecommitdiff
path: root/app/class/Controllertimeline.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/class/Controllertimeline.php')
-rw-r--r--app/class/Controllertimeline.php21
1 files changed, 5 insertions, 16 deletions
diff --git a/app/class/Controllertimeline.php b/app/class/Controllertimeline.php
index 8fc40d2..e856f40 100644
--- a/app/class/Controllertimeline.php
+++ b/app/class/Controllertimeline.php
@@ -9,9 +9,10 @@ class Controllertimeline extends Controller
*/
protected $eventmanager;
- public function __construct($render) {
+ public function __construct($render)
+ {
parent::__construct($render);
- $this->eventmanager = new Modeltimeline;
+ $this->eventmanager = new Modeltimeline();
}
public function desktop()
@@ -21,13 +22,11 @@ class Controllertimeline extends Controller
$groupedeventlist = $this->eventmanager->group($eventlist);
$this->showtemplate('timeline', ['eventlist' => $eventlist, 'groupedeventlist' => $groupedeventlist]);
-
}
public function add()
{
- if($this->user->level() >= Modeluser::EDITOR && !empty($_POST['message'])) {
-
+ if ($this->user->level() >= Modeluser::EDITOR && !empty($_POST['message'])) {
$event = new Event($_POST);
$event->stamp();
$event->setid($this->eventmanager->getlastfreeid());
@@ -38,21 +37,11 @@ class Controllertimeline extends Controller
public function clap()
{
- if(isset($_POST['id']) && isset($_POST['clap'])) {
+ if (isset($_POST['id']) && isset($_POST['clap'])) {
$event = $this->eventmanager->get(intval($_POST['id']));
$event->addclap();
$this->eventmanager->add($event);
}
$this->routedirect('timeline');
-
}
}
-
-
-
-
-
-
-
-
-?> \ No newline at end of file