From 8b5ccd302bd1497de721a25e4ce086bebf95173f Mon Sep 17 00:00:00 2001 From: tbrehm <t.brehm@ispconfig.org> Date: Sun, 08 Jun 2008 15:32:42 -0400 Subject: [PATCH] Fixed a problem with the logout when the php session has ended. --- interface/web/mail/mail_get_edit.php | 17 ++++++++++++----- 1 files changed, 12 insertions(+), 5 deletions(-) diff --git a/interface/web/mail/mail_get_edit.php b/interface/web/mail/mail_get_edit.php index 1d07266..de97422 100644 --- a/interface/web/mail/mail_get_edit.php +++ b/interface/web/mail/mail_get_edit.php @@ -41,11 +41,8 @@ require_once('../../lib/config.inc.php'); require_once('../../lib/app.inc.php'); -// Checking module permissions -if(!stristr($_SESSION["s"]["user"]["modules"],$_SESSION["s"]["module"]["name"])) { - header("Location: ../index.php"); - exit; -} +//* Check permissions for module +$app->auth->check_module_permissions('mail'); // Loading classes $app->uses('tpl,tform,tform_actions'); @@ -53,6 +50,16 @@ class page_action extends tform_actions { + function onSubmit() { + global $app, $conf; + + // 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"])."'"); + $this->dataRecord["server_id"] = $tmp["server_id"]; + unset($tmp); + + parent::onSubmit(); + } } -- Gitblit v1.9.1