Merge branch 'master' of https://github.com/easysoft/zentaopms
This commit is contained in:
+1
-1
@@ -17,7 +17,7 @@ if(!function_exists('getWebRoot')){function getWebRoot(){}}
|
||||
|
||||
/* Basic settings. */
|
||||
$config = new config();
|
||||
$config->version = '6.2'; // The version of zentaopms. Don't change it.
|
||||
$config->version = '6.3'; // The version of zentaopms. Don't change it.
|
||||
$config->charset = 'UTF-8'; // The charset of zentaopms.
|
||||
$config->cookieLife = time() + 2592000; // The cookie life time.
|
||||
$config->timezone = 'Asia/Shanghai'; // The time zone setting, for more see http://www.php.net/manual/en/timezones.php
|
||||
|
||||
@@ -706,8 +706,9 @@ class router
|
||||
$this->clientLang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, strpos($_SERVER['HTTP_ACCEPT_LANGUAGE'], ','));
|
||||
}
|
||||
|
||||
/* the value of $_SERVER['HTTP_ACCEPT_LANGUAGE'] is like 'zh-Hans-CN,zh-Hans;' in ie10 and ie11. */
|
||||
if(!empty($this->clientLang)) $this->clientLang = preg_replace('/^zh-\w+-(cn|tw)$/i', 'zh-$1', $this->clientLang);
|
||||
/* Fix clientLang for ie >= 10. https://www.drupal.org/node/365615. */
|
||||
if(stripos($this->clientLang, 'hans')) $this->clientLang = 'zh-cn';
|
||||
if(stripos($this->clientLang, 'hant')) $this->clientLang = 'zh-tw';
|
||||
}
|
||||
if(!empty($this->clientLang))
|
||||
{
|
||||
|
||||
@@ -125,7 +125,7 @@ class SMTP {
|
||||
}
|
||||
|
||||
// connect to the smtp server
|
||||
$this->smtp_conn = @fsockopen($host, // the host of the server
|
||||
$this->smtp_conn = fsockopen($host, // the host of the server
|
||||
$port, // the port to use
|
||||
$errno, // error number if any
|
||||
$errstr, // error message if any
|
||||
@@ -385,7 +385,7 @@ class SMTP {
|
||||
|
||||
$max_line_length = 998; // used below; set here for ease in change
|
||||
|
||||
while(list(,$line) = @each($lines)) {
|
||||
while(list(,$line) = each($lines)) {
|
||||
$lines_out = null;
|
||||
if($line == "" && $in_headers) {
|
||||
$in_headers = false;
|
||||
@@ -414,7 +414,7 @@ class SMTP {
|
||||
$lines_out[] = $line;
|
||||
|
||||
// send the lines to the server
|
||||
while(list(,$line_out) = @each($lines_out)) {
|
||||
while(list(,$line_out) = each($lines_out)) {
|
||||
if(strlen($line_out) > 0)
|
||||
{
|
||||
if(substr($line_out, 0, 1) == ".") {
|
||||
@@ -794,7 +794,7 @@ class SMTP {
|
||||
*/
|
||||
private function get_lines() {
|
||||
$data = "";
|
||||
while($str = @fgets($this->smtp_conn,515)) {
|
||||
while($str = fgets($this->smtp_conn,515)) {
|
||||
if($this->do_debug >= 4) {
|
||||
echo "SMTP -> get_lines(): \$data was \"$data\"" . $this->CRLF . '<br />';
|
||||
echo "SMTP -> get_lines(): \$str is \"$str\"" . $this->CRLF . '<br />';
|
||||
@@ -811,4 +811,4 @@ class SMTP {
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
* @author liqwei <liqwei@liqwei.com>
|
||||
*/
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'SMTP 错误:登录失败。\n请检查您设置的用户名密码是否正确。\n有的系统登录用户名是完整的邮箱地址。';
|
||||
$PHPMAILER_LANG['connect_host'] = 'SMTP 错误:无法连接到 SMTP 主机,请确认禅道机器:\n1. 能ping通smtp服务器。如果不能ping通,请查看网络状态,或查看域名解析是否正确,或联系网管;\n2. 使用telnet 命令能够连接到smtp的发信端口;\n3. 如果上述步骤都是通的,windows请检查防火墙和杀毒软件设置,linux请关闭selnux或者执行"setsebool httpd_can_sendmail true"允许apache可以发信。';
|
||||
$PHPMAILER_LANG['authenticate'] = "SMTP 错误:登录失败。\n请检查您设置的用户名密码是否正确。\n有的系统登录用户名是完整的邮箱地址。";
|
||||
$PHPMAILER_LANG['connect_host'] = "SMTP 错误:无法连接到 SMTP 主机,请确认禅道机器:\n1. 能ping通smtp服务器。如果不能ping通,请查看网络状态,或查看域名解析是否正确,或联系网管;\n2. 使用telnet 命令能够连接到smtp的发信端口;\n3. 如果上述步骤都是通的,windows请检查防火墙和杀毒软件设置,linux请关闭selnux或者执行\"setsebool httpd_can_sendmail true\"允许apache可以发信。";
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP 错误:数据不被接受。';
|
||||
//$P$PHPMAILER_LANG['empty_message'] = 'Message body empty';
|
||||
$PHPMAILER_LANG['encoding'] = '未知编码: ';
|
||||
|
||||
@@ -1236,13 +1236,13 @@ class PHPMailer {
|
||||
$file = tempnam('', 'mail');
|
||||
file_put_contents($file, $body); //TODO check this worked
|
||||
$signed = tempnam("", "signed");
|
||||
if (@openssl_pkcs7_sign($file, $signed, "file://".$this->sign_cert_file, array("file://".$this->sign_key_file, $this->sign_key_pass), NULL)) {
|
||||
@unlink($file);
|
||||
@unlink($signed);
|
||||
if (openssl_pkcs7_sign($file, $signed, "file://".$this->sign_cert_file, array("file://".$this->sign_key_file, $this->sign_key_pass), NULL)) {
|
||||
unlink($file);
|
||||
unlink($signed);
|
||||
$body = file_get_contents($signed);
|
||||
} else {
|
||||
@unlink($file);
|
||||
@unlink($signed);
|
||||
unlink($file);
|
||||
unlink($signed);
|
||||
throw new phpmailerException($this->Lang("signing").openssl_error_string());
|
||||
}
|
||||
} catch (phpmailerException $e) {
|
||||
@@ -1343,7 +1343,7 @@ class PHPMailer {
|
||||
*/
|
||||
public function AddAttachment($path, $name = '', $encoding = 'base64', $type = 'application/octet-stream') {
|
||||
try {
|
||||
if ( !@is_file($path) ) {
|
||||
if ( !is_file($path) ) {
|
||||
throw new phpmailerException($this->Lang('file_access') . $path, self::STOP_CONTINUE);
|
||||
}
|
||||
$filename = basename($path);
|
||||
@@ -1782,7 +1782,7 @@ class PHPMailer {
|
||||
*/
|
||||
public function AddEmbeddedImage($path, $cid, $name = '', $encoding = 'base64', $type = 'application/octet-stream') {
|
||||
|
||||
if ( !@is_file($path) ) {
|
||||
if ( !is_file($path) ) {
|
||||
$this->SetError($this->Lang('file_access') . $path);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@
|
||||
<tr class='text-center'>
|
||||
<td>%s</td>
|
||||
<td class='text-left' style='overflow:visible'><?php echo html::select("modules[%s]", $moduleOptionMenu, $moduleID, "class='form-control'");?></td>
|
||||
<td class='text-left' style='overflow:visible'><?php echo html::select("projects[%s]", $projects, $projectID, "class='form-control' onchange='loadProjectBuilds($productID, this.value, %s)'");?></td>
|
||||
<td class='text-left' style='overflow:visible'><?php echo html::select("projects[%s]", $projects, $projectID, "class='form-control' onchange='loadProjectBuilds($productID, this.value, \"%s\")'");?></td>
|
||||
<td class='text-left' style='overflow:visible' id='buildBox%s'><?php echo html::select("openedBuilds[%s][]", $builds, '', "class='form-control' multiple");?></td>
|
||||
<td><?php echo html::input("titles[%s]", '', 'class=form-control');?></td>
|
||||
<td>
|
||||
|
||||
@@ -9,7 +9,7 @@ $lang->custom->value = 'Value';
|
||||
$lang->custom->object['story'] = 'Story';
|
||||
$lang->custom->object['task'] = 'Task';
|
||||
$lang->custom->object['bug'] = 'Bug';
|
||||
$lang->custom->object['testcase'] = 'Test case';
|
||||
$lang->custom->object['testcase'] = 'Case';
|
||||
$lang->custom->object['testtask'] = 'Build';
|
||||
$lang->custom->object['todo'] = 'Todo';
|
||||
$lang->custom->object['user'] = 'User';
|
||||
|
||||
@@ -9,7 +9,7 @@ $lang->custom->value = '值';
|
||||
$lang->custom->object['story'] = '需求';
|
||||
$lang->custom->object['task'] = '任务';
|
||||
$lang->custom->object['bug'] = 'Bug';
|
||||
$lang->custom->object['testcase'] = '测试用例';
|
||||
$lang->custom->object['testcase'] = '用例';
|
||||
$lang->custom->object['testtask'] = '版本';
|
||||
$lang->custom->object['todo'] = '待办';
|
||||
$lang->custom->object['user'] = '用户';
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
#resultWin{width:100%; height:200px; border:none}
|
||||
#resultWin{width:100%; height:230px; border:none}
|
||||
div .f-right{font-weight:normal; color:red; padding-left:5px}
|
||||
|
||||
@@ -44,4 +44,4 @@ $lang->mail->sendmailTips = 'Tips: system will not send mail to current user.'
|
||||
$lang->mail->needConfigure = "I can not find the configuration, please configure it first.";
|
||||
$lang->mail->nofsocket = 'The fsocket correlation function is disabled, not letter! Please enlarge the setting of allow_url_fopen to On in php.ini and open the extension of openssl. Restart apache.';
|
||||
$lang->mail->noOpenssl = 'Please open the extension of openssl when use tls. Restart apache.';
|
||||
$lang->mail->noCurl = 'Please open the extension of curl when use tls. Restart apache.';
|
||||
$lang->mail->noCurl = 'Please open the extension of curl when use tls and ssl. Restart apache.';
|
||||
|
||||
@@ -43,5 +43,4 @@ $lang->mail->successSended = '成功发送!';
|
||||
$lang->mail->sendmailTips = '提示:系统不会为当前操作者发信。';
|
||||
$lang->mail->needConfigure = '无法找到邮件配置信息,请先配置邮件发送参数。';
|
||||
$lang->mail->nofsocket = 'fsocket相关函数被禁用,不能发信!请在php.ini中修改allow_url_fopen为On,打开openssl扩展。 保存并重新启动apache。';
|
||||
$lang->mail->noOpenssl = 'tls加密,请打开openssl扩展。 保存并重新启动apache。';
|
||||
$lang->mail->noCurl = 'tls加密,请打开curl扩展。 保存并重新启动apache。';
|
||||
$lang->mail->noOpenssl = 'ssl和tls加密,请打开openssl扩展。 保存并重新启动apache。';
|
||||
|
||||
@@ -287,7 +287,7 @@ class mailModel extends model
|
||||
}
|
||||
catch (phpmailerException $e)
|
||||
{
|
||||
$this->errors[] = trim(strip_tags($e->errorMessage()));
|
||||
$this->errors[] = nl2br(trim(strip_tags($e->errorMessage()))) . '<br />' . ob_get_contents();
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
|
||||
@@ -10,10 +10,12 @@
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php if(isset($error)):?>
|
||||
<div class='alert alert-warning with-icon'><i class='icon-frown'></i><div class='content'><?php echo str_replace('\n', '<br>', join('', $error));?></div></div>
|
||||
<?php include '../../common/view/header.lite.html.php';?>
|
||||
<div class='alert alert-warning with-icon'><i class='icon-frown'></i><div class='content'><?php echo join('', $error);?></div></div>
|
||||
<?php include '../../common/view/footer.lite.html.php';?>
|
||||
<?php else:?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div class='container mw-700px'>
|
||||
<div id='titlebar'>
|
||||
<div class='heading'>
|
||||
@@ -36,7 +38,7 @@
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<table class='table table-form'><tr><td><iframe id='resultWin'></iframe></td></tr></table>
|
||||
<table class='table table-form'><tr><td><iframe id='resultWin' name='resultWin'></iframe></td></tr></table>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -85,22 +85,20 @@
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class='text-center'>%s</td>
|
||||
<td style='overflow:visible'><?php echo html::select("module[%s]", $modules, $module, "class='form-control' onchange='setStories(this.value, $project->id, %s)'")?></td>
|
||||
<td style='overflow:visible'><?php echo html::select("module[%s]", $modules, $module, "class='form-control' onchange='setStories(this.value, $project->id, \"%s\")'")?></td>
|
||||
<td style='overflow: visible'>
|
||||
<div class='input-group'>
|
||||
<?php echo html::select("story[%s]", $stories, $currentStory, "class='form-control' onchange='setStoryRelated(%s)'");?>
|
||||
<span class='input-group-btn'>
|
||||
<a href='javascript:copyStoryTitle(%s)' class='btn' title='<?php echo $lang->task->copyStoryTitle; ?>'><i class='icon-angle-right'></i></a>
|
||||
</span>
|
||||
<?php echo html::select("story[%s]", $stories, $currentStory, "class='form-control' onchange='setStoryRelated(\"%s\")'");?>
|
||||
<span class='input-group-btn'>
|
||||
<a href='javascript:copyStoryTitle("%s")' class='btn' title='<?php echo $lang->task->copyStoryTitle; ?>'><i class='icon-angle-right'></i></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
<td><?php echo html::input("name[%s]", '', 'class=form-control');?></td>
|
||||
<td><?php echo html::select("type[%s]", $lang->task->typeList, $type, 'class=form-control');?></td>
|
||||
<td style='overflow:visible'><?php echo html::select("assignedTo[%s]", $members, $member, "class='form-control'");?></td>
|
||||
<td><?php echo html::input("estimate[%s]", '', 'class=form-control text-center');?></td>
|
||||
<td>
|
||||
<?php echo html::textarea("desc[%s]", '', "rows='1' class='form-control autosize'");?>
|
||||
</td>
|
||||
<td><?php echo html::textarea("desc[%s]", '', "rows='1' class='form-control autosize'");?></td>
|
||||
<td><?php echo html::select("pri[%s]", (array)$lang->task->priList, $pri, 'class=form-control');?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
@@ -83,3 +83,4 @@ $lang->upgrade->fromVersions['5_3'] = '5.3';
|
||||
$lang->upgrade->fromVersions['6_0_beta1'] = '6.0.beta1';
|
||||
$lang->upgrade->fromVersions['6_0'] = '6.0';
|
||||
$lang->upgrade->fromVersions['6_1'] = '6.1';
|
||||
$lang->upgrade->fromVersions['6_2'] = '6.2';
|
||||
|
||||
@@ -83,3 +83,4 @@ $lang->upgrade->fromVersions['5_3'] = '5.3';
|
||||
$lang->upgrade->fromVersions['6_0_beta1'] = '6.0.beta1';
|
||||
$lang->upgrade->fromVersions['6_0'] = '6.0';
|
||||
$lang->upgrade->fromVersions['6_1'] = '6.1';
|
||||
$lang->upgrade->fromVersions['6_2'] = '6.2';
|
||||
|
||||
@@ -112,6 +112,7 @@ class upgradeModel extends model
|
||||
$this->fixDataIndex();
|
||||
case '6_1':
|
||||
$this->execSQL($this->getUpgradeFile('6.1'));
|
||||
case '6_2':
|
||||
|
||||
default: if(!$this->isError()) $this->setting->updateVersion($this->config->version);
|
||||
}
|
||||
@@ -174,6 +175,7 @@ class upgradeModel extends model
|
||||
case '6_0_beta1': $confirmContent .= file_get_contents($this->getUpgradeFile('6.0.beta1'));
|
||||
case '6_0': $confirmContent .= file_get_contents($this->getUpgradeFile('6.0'));
|
||||
case '6_1': $confirmContent .= file_get_contents($this->getUpgradeFile('6.1'));
|
||||
case '6_2':
|
||||
}
|
||||
return str_replace('zt_', $this->config->db->prefix, $confirmContent);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user