From 9665abb8ed0480d5a6b94d0e2dd1ff9cc6e096cd Mon Sep 17 00:00:00 2001
From: wangyidong
Date: Thu, 17 Sep 2015 15:34:25 +0800
Subject: [PATCH] * adjust for mail.
---
module/mail/control.php | 11 ++++++----
module/mail/lang/en.php | 4 ++++
module/mail/lang/zh-cn.php | 8 +++++--
module/mail/view/detect.html.php | 1 -
module/mail/view/index.html.php | 34 +++++++++++++++++++++++++++++
module/mail/view/sendcloud.html.php | 2 +-
6 files changed, 52 insertions(+), 8 deletions(-)
create mode 100755 module/mail/view/index.html.php
diff --git a/module/mail/control.php b/module/mail/control.php
index af1ddbf260..5afc8ceab7 100755
--- a/module/mail/control.php
+++ b/module/mail/control.php
@@ -22,7 +22,7 @@ class mail extends control
parent::__construct($moduleName, $methodName);
/* Task #1967. check the function of fsocket. */
- if(!function_exists('fsockopen'))
+ if(isset($this->config->mail->mta) and $this->config->mail->mta != 'sendcloud' and !function_exists('fsockopen'))
{
echo js::alert($this->lang->mail->nofsocket);
die(js::locate('back'));
@@ -40,9 +40,12 @@ class mail extends control
if($this->config->mail->turnon)
{
if($this->config->mail->mta == 'sendcloud') $this->locate(inlink('sendcloud'));
- $this->locate(inlink('edit'));
+ if($this->config->mail->mta == 'smtp') $this->locate(inlink('edit'));
}
- $this->locate(inlink('detect'));
+ $this->view->title = $this->lang->mail->common . $this->lang->colon . $this->lang->mail->index;
+ $this->view->position[] = html::a(inlink('index'), $this->lang->mail->common);
+ $this->view->position[] = $this->lang->mail->index;
+ $this->display();
}
/**
@@ -275,7 +278,7 @@ class mail extends control
public function reset()
{
$this->dao->delete('*')->from(TABLE_CONFIG)->where('module')->eq('mail')->exec();
- $this->locate(inlink('detect'));
+ $this->locate(inlink('index'));
}
/**
diff --git a/module/mail/lang/en.php b/module/mail/lang/en.php
index 7e4e155c5d..f11e9e33ce 100755
--- a/module/mail/lang/en.php
+++ b/module/mail/lang/en.php
@@ -28,6 +28,9 @@ $lang->mail->charset = 'Charset';
$lang->mail->accessKey = 'accessKey';
$lang->mail->secretKey = 'secretKey';
+$lang->mail->selectMTA = 'Select MTA';
+$lang->mail->smtp = 'SMTP';
+
$lang->mail->syncedUser = 'Synced user';
$lang->mail->unsyncUser = 'Unsync user';
$lang->mail->sync = 'Sync';
@@ -80,3 +83,4 @@ $lang->mail->sendCloudHelp = <<Letter, The nickname of Notice SendCloud contact must to be consistent with the email. You may not succeed in sending.
EOD;
$lang->mail->sendCloudSuccess = 'Success';
+$lang->mail->closeSendCloud = 'Close SendCloud';
diff --git a/module/mail/lang/zh-cn.php b/module/mail/lang/zh-cn.php
index 032b8eb46e..c0ee47974e 100755
--- a/module/mail/lang/zh-cn.php
+++ b/module/mail/lang/zh-cn.php
@@ -10,7 +10,7 @@ $lang->mail->browse = '邮件列表';
$lang->mail->delete = '删除邮件';
$lang->mail->sendCloud = 'SendCloud发信';
$lang->mail->batchDelete = '批量删除';
-$lang->mail->sendcloudUser = 'SendCloud 联系人';
+$lang->mail->sendcloudUser = '同步联系人';
$lang->mail->turnon = '是否打开';
$lang->mail->async = '异步发送';
@@ -28,6 +28,9 @@ $lang->mail->charset = '编码';
$lang->mail->accessKey = 'accessKey';
$lang->mail->secretKey = 'secretKey';
+$lang->mail->selectMTA = '请选择发信方式:';
+$lang->mail->smtp = 'SMTP发信';
+
$lang->mail->syncedUser = '已经同步';
$lang->mail->unsyncUser = '未同步';
$lang->mail->sync = '同步';
@@ -77,6 +80,7 @@ $lang->mail->sendCloudFail = '操作失败,原因:';
$lang->mail->sendCloudHelp = <<1、Notice SendCloud是SendCloud的团队通知服务。具体可以到notice.sendcloud.net查看
2、accessKey和secretKey可以到登陆后的"设置"页面查看。发信人地址和名称也在"设置"页面设置。
-3、发信时,Notice SendCloud联系人里面的昵称要跟邮箱一致,否则无法成功发信。可以到[SendCloud 联系人]页面,将禅道用户同步到SendCloud联系人中
+3、发信时,Notice SendCloud联系人里面的昵称要跟邮箱一致,否则无法成功发信。可以到[同步联系人]页面,将禅道用户同步到SendCloud联系人中
EOD;
$lang->mail->sendCloudSuccess = '操作成功';
+$lang->mail->closeSendCloud = '关闭SendCloud';
diff --git a/module/mail/view/detect.html.php b/module/mail/view/detect.html.php
index 2a3c6b41e6..9f9cdfb2f7 100755
--- a/module/mail/view/detect.html.php
+++ b/module/mail/view/detect.html.php
@@ -18,7 +18,6 @@ include '../../common/view/header.html.php';
mail->common;?>
mail->detect;?>
- app->getClientLang() != 'en') common::printLink('mail', 'sendCloud', '', $lang->mail->sendCloud, '', "class='btn btn-primary'")?>