protected function storemore() { if ($this->new) { if (!$this->mailbox_post_script()) { # return false; # TODO: should this be fatal? } if ($this->values['welcome_mail'] == true) { if (!$this->send_welcome_mail()) { # return false; # TODO: should this be fatal? } } if (!$this->create_mailbox_subfolders()) { $this->infomsg[] = Config::lang_f('pCreate_mailbox_result_succes_nosubfolders', $this->id); } } else { # edit mode # alias active status is updated in before_store() # postedit hook # TODO: implement a poststore() function? - would make handling of old and new values much easier... $old_mh = new MailboxHandler(); if (!$old_mh->init($this->id)) { $this->errormsg[] = $old_mh->errormsg[0]; } elseif (!$old_mh->view()) { $this->errormsg[] = $old_mh->errormsg[0]; } else { $oldvalues = $old_mh->result(); $this->values['maildir'] = $oldvalues['maildir']; if (isset($this->values['quota'])) { $quota = $this->values['quota']; } else { $quota = $oldvalues['quota']; } if (!$this->mailbox_post_script()) { # TODO: should this be fatal? } } } return true; # even if a hook failed, mark the overall operation as OK }