Exemplo n.º 1
0
 /**
  * save new site settings to the session
  */
 public function process()
 {
     list($success, $form) = $this->process_form(array('save_settings'));
     if ($success) {
         if ($new_settings = $this->get('new_user_settings', array())) {
             foreach ($new_settings as $name => $value) {
                 $this->user_config->set($name, $value);
             }
             Hm_Page_Cache::flush($this->session);
             Hm_Msgs::add('Settings saved');
             $this->session->record_unsaved('Site settings updated');
             $this->out('reload_folders', true, false);
         }
     }
 }
Exemplo n.º 2
0
 /**
  * Remove an IMAP server completely, used on the servers page
  */
 public function process()
 {
     if (isset($this->request->post['imap_delete'])) {
         list($success, $form) = $this->process_form(array('imap_server_id'));
         if ($success) {
             $res = Hm_IMAP_List::del($form['imap_server_id']);
             if ($res) {
                 $this->out('deleted_server_id', $form['imap_server_id']);
                 Hm_Msgs::add('Server deleted');
                 $this->session->record_unsaved('IMAP server deleted');
                 Hm_Page_Cache::flush($this->session);
             }
         } else {
             $this->out('old_form', $form);
         }
     }
 }