Merge branch 'master' of https://github.com/easysoft/zentaopms
This commit is contained in:
@@ -59,7 +59,7 @@ $lang->admin->safe->weak = '常用弱口令';
|
||||
$lang->admin->safe->reason = '类型';
|
||||
$lang->admin->safe->checkWeak = '弱口令扫描';
|
||||
$lang->admin->safe->changeWeak = '修改弱口令密码';
|
||||
$lang->admin->safe->modifyPasswordFirstLogin = '首次登陆修改密码';
|
||||
$lang->admin->safe->modifyPasswordFirstLogin = '首次登录修改密码';
|
||||
|
||||
$lang->admin->safe->modeList[0] = '不检查';
|
||||
$lang->admin->safe->modeList[1] = '中';
|
||||
|
||||
@@ -27,9 +27,12 @@
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php $isOnlybody = helper::inOnlyBodyMode(); ?>
|
||||
<?php if(!$isOnlybody):?>
|
||||
<div class="btn-toolbar pull-right">
|
||||
<?php common::printLink('bug', 'create', "productID={$bug->product}&branch={$bug->branch}&extra=moduleID={$bug->module}", "<i class='icon icon-plus'></i>" . $lang->bug->create, '', "class='btn btn-primary'"); ?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<div id="mainContent" class="main-row">
|
||||
<div class="main-col col-8">
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<?php foreach($plans as $plan):?>
|
||||
<?php if(isset($plan->begin)):?>
|
||||
<li <?php if(date('Y-m-d') < $plan->begin) echo "class='active'";?>>
|
||||
<a href="<?php echo $this->createLink('plan', 'view', "planID={$plan->id}");?>">
|
||||
<a href="<?php echo $this->createLink('productplan', 'view', "planID={$plan->id}");?>">
|
||||
<span class="title"><?php echo $plan->title;?></span>
|
||||
<span class="date"><?php echo $plan->begin;?></span>
|
||||
</a>
|
||||
|
||||
@@ -41,9 +41,12 @@
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php $isOnlybody = helper::inOnlyBodyMode(); ?>
|
||||
<?php if(!$isOnlybody):?>
|
||||
<div class="btn-toolbar pull-right">
|
||||
<?php common::printLink('story', 'create', "productID={$story->product}&branch={$story->branch}&moduleID={$story->module}", "<i class='icon icon-plus'></i>" . $lang->story->create, '', "class='btn btn-primary'"); ?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<div id="mainContent" class="main-row">
|
||||
<div class="main-col col-8">
|
||||
|
||||
@@ -34,6 +34,8 @@
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
<?php $isOnlybody = helper::inOnlyBodyMode(); ?>
|
||||
<?php if(!$isOnlybody):?>
|
||||
<div class="btn-toolbar pull-right">
|
||||
<?php
|
||||
$checkObject = new stdclass();
|
||||
@@ -42,6 +44,7 @@
|
||||
if(common::hasPriv('task', 'create', $checkObject)) echo html::a($link, "<i class='icon icon-plus'></i> {$lang->task->create}", '', "class='btn btn-primary'");
|
||||
?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<div id="mainContent" class="main-row">
|
||||
<div class="main-col col-8">
|
||||
|
||||
@@ -1197,7 +1197,9 @@ class testcase extends control
|
||||
$productName = $this->dao->findById($productID)->from(TABLE_PRODUCT)->fetch('name');
|
||||
$browseType = isset($this->lang->testcase->featureBar['browse'][$browseType]) ? $this->lang->testcase->featureBar['browse'][$browseType] : '';
|
||||
|
||||
$this->view->fileName = $productName . $this->lang->dash . $browseType . $fileName;
|
||||
if($taskID) $taskName = $this->dao->findById($taskID)->from(TABLE_TESTTASK)->fetch('name');
|
||||
|
||||
$this->view->fileName = $productName . $this->lang->dash . ($taskID ? $taskName . $this->lang->dash : '') . $browseType . $fileName;
|
||||
$this->view->allExportFields = $this->config->testcase->exportFields;
|
||||
$this->view->customExport = true;
|
||||
$this->display();
|
||||
|
||||
@@ -44,9 +44,12 @@
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php $isOnlybody = helper::inOnlyBodyMode(); ?>
|
||||
<?php if(!$isOnlybody):?>
|
||||
<div class='btn-toolbar pull-right'>
|
||||
<?php common::printLink('testcase', 'create', "productID={$case->product}&branch={$case->branch}&moduleID={$case->module}", "<i class='icon icon-plus'></i>" . $lang->testcase->create, '', "class='btn btn-primary'"); ?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
|
||||
<div id="mainContent" class="main-row">
|
||||
|
||||
@@ -149,6 +149,21 @@ class upgrade extends control
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Consistency.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function consistency()
|
||||
{
|
||||
$alterSQL = $this->upgrade->checkConsistency();
|
||||
if(empty($alterSQL)) $this->locate(inlink('checkExtension'));
|
||||
|
||||
$this->view->alterSQL = $alterSQL;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Check extension.
|
||||
*
|
||||
|
||||
@@ -17,6 +17,7 @@ $lang->upgrade->tohome = 'Visit ZenTao';
|
||||
$lang->upgrade->license = 'Zentao is under Z PUBLIC LICENSE(ZPL) 1.2.';
|
||||
$lang->upgrade->warnning= 'Warning!';
|
||||
$lang->upgrade->checkExtension = 'Check Extension';
|
||||
$lang->upgrade->consistency = 'Check Consistency';
|
||||
$lang->upgrade->warnningContent = <<<EOT
|
||||
<p>Please backup your database before upgrading ZenTao!</p>
|
||||
<pre>
|
||||
@@ -44,5 +45,6 @@ $lang->upgrade->confirm = 'Confirm SQL';
|
||||
$lang->upgrade->sureExecute = 'Execute';
|
||||
$lang->upgrade->forbiddenExt = 'Extension is not compatible with the version. It has been deactivated:';
|
||||
$lang->upgrade->updateFile = 'File information has to be updated.';
|
||||
$lang->upgrade->noticeSQL = 'Check that your database is inconsistent with the standard and try to fix failure. Please perform the following SQL and refresh.';
|
||||
|
||||
include dirname(__FILE__) . '/version.php';
|
||||
|
||||
@@ -17,6 +17,7 @@ $lang->upgrade->tohome = '访问禅道';
|
||||
$lang->upgrade->license = '禅道项目管理软件已更换授权协议至 Z PUBLIC LICENSE(ZPL) 1.2';
|
||||
$lang->upgrade->warnning= '警告';
|
||||
$lang->upgrade->checkExtension = '检查插件';
|
||||
$lang->upgrade->consistency = '一致性检查';
|
||||
$lang->upgrade->warnningContent = <<<EOT
|
||||
<p>升级有危险,请先备份数据库,以防万一。</p>
|
||||
<pre>
|
||||
@@ -44,5 +45,6 @@ $lang->upgrade->confirm = '确认要执行的SQL语句';
|
||||
$lang->upgrade->sureExecute = '确认执行';
|
||||
$lang->upgrade->forbiddenExt = '以下插件与新版本不兼容,已经自动禁用:';
|
||||
$lang->upgrade->updateFile = '需要更新附件信息。';
|
||||
$lang->upgrade->noticeSQL = '检查到你的数据库跟标准不一致,尝试修复失败。请执行以下SQL语句,再刷新页面检查。';
|
||||
|
||||
include dirname(__FILE__) . '/version.php';
|
||||
|
||||
@@ -15,6 +15,12 @@ class upgradeModel extends model
|
||||
{
|
||||
static $errors = array();
|
||||
|
||||
/**
|
||||
* Construct
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
@@ -391,6 +397,65 @@ class upgradeModel extends model
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check consistency.
|
||||
*
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function checkConsistency()
|
||||
{
|
||||
$alterSQL = '';
|
||||
$standardSQL = $this->app->getAppRoot() . 'db' . DS . 'standard' . DS . 'zentao' . $this->config->installedVersion . '.sql';
|
||||
if(!file_exists($standardSQL)) return $alterSQL;
|
||||
|
||||
$handle = fopen($standardSQL, 'r');
|
||||
if($handle)
|
||||
{
|
||||
while(!feof($handle))
|
||||
{
|
||||
$line = trim(fgets($handle));
|
||||
if(strpos($line, 'CREATE TABLE ') !== false)
|
||||
{
|
||||
preg_match_all('/`([^`]*)`/', $line, $out);
|
||||
if(isset($out[1][0]))
|
||||
{
|
||||
$fields = array();
|
||||
$table = $out[1][0];
|
||||
$stmt = $this->dao->query("show fields from `{$table}`");
|
||||
while($row = $stmt->fetch()) $fields[$row->Field] = $row->Field;
|
||||
}
|
||||
}
|
||||
|
||||
if(!empty($fields))
|
||||
{
|
||||
if(preg_match('/^`([^`]*)` /', $line))
|
||||
{
|
||||
list($field) = explode(' ', $line);
|
||||
$field = trim($field, '`');
|
||||
if(!isset($fields[$field]))
|
||||
{
|
||||
$line = rtrim($line, ',');
|
||||
if(stripos($line, 'auto_increment') !== false) $line .= ' primary key';
|
||||
try
|
||||
{
|
||||
$this->dao->exec("ALTER TABLE `{$table}` ADD $line");
|
||||
}
|
||||
catch(PDOException $e)
|
||||
{
|
||||
$alterSQL .= "ALTER TABLE `{$table}` ADD $line;\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
fclose($handle);
|
||||
}
|
||||
|
||||
return $alterSQL;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Update ubb code in bug table and user Templates table to html.
|
||||
*
|
||||
@@ -835,7 +900,7 @@ class upgradeModel extends model
|
||||
{
|
||||
$this->dbh->exec($sql);
|
||||
}
|
||||
catch (PDOException $e)
|
||||
catch(PDOException $e)
|
||||
{
|
||||
$errorInfo = $e->errorInfo;
|
||||
$errorCode = $errorInfo[1];
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<div class='content'><?php echo $lang->upgrade->warnningContent;?></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='modal-footer'><?php echo html::linkButton($lang->upgrade->common, inlink('checkExtension'), 'self', '', 'btn btn-primary');?></div>
|
||||
<div class='modal-footer'><?php echo html::linkButton($lang->upgrade->common, inlink('consistency'), 'self', '', 'btn btn-primary');?></div>
|
||||
</div>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.lite.html.php';?>
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
/**
|
||||
* The checkExtension view file of upgrade module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Yidong Wang <yidong@cnezsoft.com>
|
||||
* @package upgrade
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.lite.html.php';?>
|
||||
<div class='container'>
|
||||
<form method='post'>
|
||||
<div class='modal-dialog'>
|
||||
<div class='modal-header'>
|
||||
<strong><?php echo $lang->upgrade->consistency;?></strong>
|
||||
</div>
|
||||
<div class='modal-body'>
|
||||
<h4><?php echo $lang->upgrade->noticeSQL;?></h4>
|
||||
<p class='text-danger code'><?php echo nl2br($alterSQL);?></p>
|
||||
</div>
|
||||
<div class='modal-footer'><?php echo html::a(inlink('consistency'), $this->lang->refresh, '', "class='btn'");?></div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.lite.html.php';?>
|
||||
@@ -25,6 +25,7 @@ class user extends control
|
||||
$this->loadModel('company')->setMenu();
|
||||
$this->loadModel('dept');
|
||||
$this->loadModel('todo');
|
||||
$this->app->loadModuleConfig($this->moduleName);//Finish task #5118.(Fix bug #2271)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user