This commit is contained in:
wangyidong
2017-03-22 14:34:50 +08:00
parent 5eaa1d1b83
commit ca08397cc6
4 changed files with 14 additions and 12 deletions
+9 -7
View File
@@ -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")));