From ca08397cc64d6dfeb04b2322968e1cb7b105fd25 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Wed, 22 Mar 2017 14:34:50 +0800 Subject: [PATCH] * fix bug #1037. --- module/common/lang/en.php | 2 +- module/common/lang/zh-cn.php | 2 +- module/mail/control.php | 16 +++++++++------- module/mail/view/index.html.php | 6 +++--- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/module/common/lang/en.php b/module/common/lang/en.php index 1ef71daeb2..038af7773b 100644 --- a/module/common/lang/en.php +++ b/module/common/lang/en.php @@ -328,7 +328,7 @@ $lang->user->menu = $lang->company->menu; /* 后台管理菜单设置。*/ $lang->admin = new stdclass(); $lang->admin->menu = new stdclass(); -$lang->admin->menu->index = array('link' => 'Homepage|admin|index'); +$lang->admin->menu->index = array('link' => 'Homepage|admin|index', 'alias' => 'register,certifytemail,certifyztmobile,ztcompany'); $lang->admin->menu->extension = array('link' => 'Extension|extension|browse', 'subModule' => 'extension'); $lang->admin->menu->custom = array('link' => 'Custom|custom|set', 'subModule' => 'custom'); $lang->admin->menu->mail = array('link' => 'Email|mail|index', 'subModule' => 'mail'); diff --git a/module/common/lang/zh-cn.php b/module/common/lang/zh-cn.php index 602eea9341..da46478077 100644 --- a/module/common/lang/zh-cn.php +++ b/module/common/lang/zh-cn.php @@ -328,7 +328,7 @@ $lang->user->menu = $lang->company->menu; /* 后台管理菜单设置。*/ $lang->admin = new stdclass(); $lang->admin->menu = new stdclass(); -$lang->admin->menu->index = array('link' => '首页|admin|index'); +$lang->admin->menu->index = array('link' => '首页|admin|index', 'alias' => 'register,certifytemail,certifyztmobile,ztcompany'); $lang->admin->menu->extension = array('link' => '插件|extension|browse', 'subModule' => 'extension'); $lang->admin->menu->custom = array('link' => '自定义|custom|set', 'subModule' => 'custom'); $lang->admin->menu->mail = array('link' => '发信|mail|index', 'subModule' => 'mail'); diff --git a/module/mail/control.php b/module/mail/control.php index c1bec5c708..04df3b2678 100755 --- a/module/mail/control.php +++ b/module/mail/control.php @@ -277,7 +277,7 @@ class mail extends control $this->view->title = $this->lang->mail->common . $this->lang->colon . $this->lang->mail->test; $this->view->position[] = html::a(inlink('index'), $this->lang->mail->common); $this->view->position[] = $this->lang->mail->test; - $this->view->users = $this->dao->select('account, CONCAT(realname, " ", email) AS email' )->from(TABLE_USER)->where('email')->ne('')->orderBy('account')->fetchPairs(); + $this->view->users = $this->dao->select('account, CONCAT(realname, " ", email) AS email' )->from(TABLE_USER)->where('email')->ne('')->andWhere('deleted')->eq(0)->orderBy('account')->fetchPairs(); $this->display(); } @@ -520,7 +520,7 @@ class mail extends control $this->view->title = $this->lang->mail->ztCloud; $this->view->position[] = html::a(inlink('index'), $this->lang->mail->common); $this->view->position[] = $this->lang->mail->ztCloud; - if(!empty($this->config->mail->ztcloud->secretKey)) + if(!empty($this->config->mail->ztcloud->secretKey) and !empty($this->config->global->community)) { $mailConfig = new stdclass(); $mailConfig->fromAddress = $this->config->mail->fromAddress; @@ -535,16 +535,18 @@ class mail extends control die($this->display()); } - if($this->cookie->ztCloudLicense != 'yes') - { - $this->view->step = 'license'; - die($this->display()); - } if(empty($this->config->global->ztPrivateKey) or $this->config->global->community == 'na' or empty($this->config->global->community)) { if(!empty($this->config->global->community) and $this->config->global->community != 'na') die(js::locate($this->createLink('admin', 'bind', 'from=mail'))); die(js::locate($this->createLink('admin', 'register', 'from=mail'))); } + + if($this->cookie->ztCloudLicense != 'yes') + { + $this->view->step = 'license'; + die($this->display()); + } + $result = $this->loadModel('admin')->getSecretKey(); if(empty($result))die(js::alert($this->lang->mail->connectFail) . js::locate($this->createLink('admin', 'register', "from=mail"))); if($result->result == 'fail' and empty($result->data)) die(js::alert($this->lang->mail->centifyFail) . js::locate($this->createLink('admin', 'register', "from=mail"))); diff --git a/module/mail/view/index.html.php b/module/mail/view/index.html.php index 09218b7163..fad3d328a7 100755 --- a/module/mail/view/index.html.php +++ b/module/mail/view/index.html.php @@ -21,12 +21,12 @@ include '../../common/view/header.html.php';
- - mail->smtp, '', "class='btn btn-sm w-120px'")?> - app->getClientLang() != 'en' and common::hasPriv('mail', 'ztCloud')):?> mail->ztCloud, '', "class='btn btn-sm w-120px'")?> + + mail->smtp, '', "class='btn btn-sm w-120px'")?> +