tbrehm
2008-12-15 db5aa62b7faa2685f29215d4d08e13d28fd481a1
interface/web/mail/mail_get_edit.php
@@ -92,13 +92,21 @@
      } // end if user is not admin
      
      // Set the server ID according to the selected destination
      $tmp = $app->db->queryOneRecord("SELECT server_id FROM mail_user WHERE email = '".addslashes($this->dataRecord["destination"])."'");
      $tmp = $app->db->queryOneRecord("SELECT server_id FROM mail_user WHERE email = '".$app->db->quote($this->dataRecord["destination"])."'");
      $this->dataRecord["server_id"] = $tmp["server_id"];
      unset($tmp);
      
      parent::onSubmit();
   }
   
   function onAfterInsert() {
      global $app;
      $tmp = $app->db->queryOneRecord("SELECT sys_groupid FROM mail_user WHERE email = '".$app->db->quote($this->dataRecord["destination"])."'");
      $app->db->query("update mail_get SET sys_groupid = ".$tmp['sys_groupid']." WHERE mailget_id = ".$this->id);
   }
}
$page = new page_action;