template->in_wizard = true; } function renderDefault() { if ($this->mailingid) { $uid = $this->user->id; $user = $this->database->get_user($uid); $mailings = $user->getMailings($this->mailingid); if (count($mailings)==0) { // No such mailing, or not your mailing // TODO: misschien foutmelding? Voor nu doorsturen naar create $this->redirect('Create:'); } $mailing = array_pop($mailings); $summary = []; if ($mailing->addresslist) { $summary['addresslist'] = $mailing->addresslist->name; } $summary['addressapproved'] = $mailing->addressapproved; $this->template->mailing = $mailing; $this->template->summary = $summary; } else { // Not in the process of a mailing $this->redirect("Create:"); } } }