1<?php 2//if we don't have a token, generate a new one and redirect 3if (!isset($_GET['t'])) { 4 $token = $this->model->authentication_tokenFactory->get_token($this->id()); 5 header('Location: ' . $this->url() . '&t=' . $token); 6} 7 8/** @var bez\mdl\Thread $thread */ 9$thread = $this->model->threadFactory->get_one($this->get_param('id')); 10$this->tpl->set('thread', $thread); 11 12$tasks = $this->model->taskFactory->get_all(array('thread_id' => $thread->id))->fetchAll(); 13$this->tpl->set('tasks', $tasks);