template->in_wizard = true; } function renderDefault() { $uid = $this->user->id; $user = $this->database->get_user($uid); $mailings = $user->mailings; $openmailing = null; foreach($mailings as $mailing) { if(!$mailing->submitted && $mailing->incomplete) { if(!is_null($openmailing)) $this->redirect(':User:Mailings:', ['id' => false]); $openmailing = $mailing; } } if(is_null($openmailing)) $this->redirect(':Wizard:Create:', ['id' => false]); if(empty($openmailing->subject)) $this->redirect(':Wizard:Metadata:', ['id' => $openmailing->primary]); if(!$openmailing->addresslist) $this->redirect(':Wizard:MailingAddresslist:', ['id' => $openmailing->primary]); if(empty($openmailing->body)) $this->redirect(':Wizard:Body:', ['id' => $openmailing->primary]); $this->redirect(':Wizard:Create:', ['id' => false]); } }