Merge branch 'master' of https://gitlab.zcorp.cc/easycorp/zentaopms into importExport
This commit is contained in:
@@ -1182,11 +1182,14 @@ CREATE TABLE `zt_im_chat` (
|
||||
`ownedBy` varchar(30) NOT NULL DEFAULT '',
|
||||
`editedBy` varchar(30) NOT NULL DEFAULT '',
|
||||
`editedDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||
`mergedDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||
`lastActiveTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||
`lastMessage` int(11) unsigned NOT NULL DEFAULT '0',
|
||||
`lastMessageIndex` int(11) unsigned NOT NULL DEFAULT 0,
|
||||
`dismissDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||
`pinnedMessages` text NOT NULL,
|
||||
`mergedChats` text NOT NULL DEFAULT '',
|
||||
`adminInvite` enum('0','1') NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `gid` (`gid`),
|
||||
KEY `name` (`name`),
|
||||
|
||||
@@ -111,6 +111,23 @@
|
||||
35218 复制项目的交互样式优化
|
||||
35310 复制项目增加团队成员与权限复制
|
||||
36036 关闭审批后停用发起动作,再次开启审批未自动启用动作
|
||||
禅道客户端:
|
||||
34119 一键包集成喧喧网页端
|
||||
34460 优化会话中禅道链接卡片的跳转交互
|
||||
34667 完善XXD命令行应用给出的提示
|
||||
34668 修改docker入口脚本,确保owt中的rabbitmq正常启动
|
||||
34669 服务器地址不正确导致客户端登录失败后,尝试去掉路径后进行重试
|
||||
34670 完善音视频服务器端口配置和提示
|
||||
34671 优化音视频服务配置中“是否启用HTTPS”的设置
|
||||
34672 设计并增加离线部署SRS音视频的方案
|
||||
34673 没有麦克风时允许加入会议
|
||||
34848 解决服务器时间和客户端时间不一样的问题
|
||||
35087 研究喧喧和其他应用系统的多页面集成
|
||||
35088 删除服务器聊天记录的功能
|
||||
35268 通过服务端下载客户端后,登录时带入服务端地址
|
||||
35280 实现自动清理解散90天以上群数据的功能
|
||||
35294 后台检查XXC是否有新版时去掉XXB的版本判断
|
||||
35297 网络诊断时给出具体提示以引导用户
|
||||
修复的Bug
|
||||
22662 执行任务列表父子任务显示错乱
|
||||
24608 英文下批量编辑执行页面执行状态名称显示不全
|
||||
@@ -120,6 +137,19 @@
|
||||
25837 产品-计划的需求列表没有展示需求标题颜色
|
||||
25851 导入任务相关研发需求详情弹窗中样式问题
|
||||
25282 导入用户时,左右滚动条必须拖动到底部才显示
|
||||
25019 需要测试再进行详细确认:xxd以windows服务的形式启动(注意是在windows管理的服务里面点击启动),日志会存在C:\Windows\System32\log下
|
||||
25273 禅道卡片中的弹窗不展示
|
||||
25390 一张图片发送多人再撤回其中一张图,在其他窗口中图片显示已撤回
|
||||
25402 sendChatMessage返回值有问题
|
||||
25427 提示升级页面不显示了
|
||||
25526 后台没有被禁用的用户登录客户端时提示“账号被禁用”
|
||||
25603 喧喧一键安装包安装xxd错误
|
||||
25605 独立消息记录窗口中链接打不开
|
||||
25622 连续发送消息不给提示
|
||||
25628 客户端链接转任务跳转到地盘
|
||||
25630 消息记录点击两次喧喧直接崩溃了
|
||||
25644 产品计划卡片没显示内容
|
||||
25646 禅道客户端一、口、x遮挡成员按钮
|
||||
|
||||
2022-07-27 17.4
|
||||
完成的需求
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
<?php if($config->visions == ',lite,'):?>
|
||||
<?php $feedbackDatasources = $this->dao->select('id')->from(TABLE_WORKFLOWDATASOURCE)->where('code')->like('litefeedback%')->andWhere('vision')->eq('lite')->fetchPairs('id', 'id');?>
|
||||
<?php if($feedbackDatasources):?>
|
||||
<script>
|
||||
<?php foreach($feedbackDatasources as $id):?>
|
||||
$('#fieldOptionType option[value=<?php echo $id;?>]').remove();
|
||||
<?php endforeach;?>
|
||||
$('#fieldOptionType').trigger("chosen:updated");
|
||||
</script>
|
||||
<?php endif;?>
|
||||
<?php endif;?>
|
||||
@@ -245,10 +245,6 @@ $lang->action->desc->linkbug = '$date, <strong>$actor</strong> link bugs <st
|
||||
$lang->action->desc->unlinkstory = '$date, <strong>$actor</strong> remove stories <strong>$extra</strong> from plan.' . "\n";
|
||||
$lang->action->desc->unlinkbug = '$date, <strong>$actor</strong> remove bugs <strong>$extra</strong> from plan.' . "\n";
|
||||
|
||||
/* Used to describe the historical operation records of gantt. */
|
||||
$lang->action->desc->ganttdrag = '$date, <strong>$actor</strong> tasks dragged <strong>$extra</strong>.' . "\n";
|
||||
$lang->action->desc->ganttmove = '$date, <strong>$actor</strong> tasks sorted <strong>$extra</strong>.' . "\n";
|
||||
|
||||
/* Used to display dynamic information. */
|
||||
$lang->action->label = new stdclass();
|
||||
$lang->action->label->install = 'install ';
|
||||
@@ -386,7 +382,6 @@ $lang->action->label->unlinkstory = 'unlink stories from';
|
||||
$lang->action->label->unlinkbug = 'unlink bugs from';
|
||||
$lang->action->label->tolib = 'imported';
|
||||
$lang->action->label->updatetolib = 'updated';
|
||||
$lang->action->label->ganttdrag = 'dragged';
|
||||
$lang->action->label->ganttmove = 'sorted';
|
||||
|
||||
/* Dynamic information is grouped by object. */
|
||||
@@ -545,6 +540,7 @@ $lang->action->dynamicAction->task['undeleted'] = 'Restore Task';
|
||||
$lang->action->dynamicAction->task['hidden'] = 'Hide Task';
|
||||
$lang->action->dynamicAction->task['svncommited'] = 'SVN Commit';
|
||||
$lang->action->dynamicAction->task['gitcommited'] = 'GIT Commit';
|
||||
$lang->action->dynamicAction->task['ganttmove'] = 'Order';
|
||||
|
||||
$lang->action->dynamicAction->build['opened'] = 'Create Build';
|
||||
$lang->action->dynamicAction->build['edited'] = 'Edit Build';
|
||||
|
||||
@@ -245,10 +245,6 @@ $lang->action->desc->linkbug = '$date, <strong>$actor</strong> link bugs <st
|
||||
$lang->action->desc->unlinkstory = '$date, <strong>$actor</strong> remove stories <strong>$extra</strong> from plan.' . "\n";
|
||||
$lang->action->desc->unlinkbug = '$date, <strong>$actor</strong> remove bugs <strong>$extra</strong> from plan.' . "\n";
|
||||
|
||||
/* Used to describe the historical operation records of gantt. */
|
||||
$lang->action->desc->ganttdrag = '$date, <strong>$actor</strong> tasks dragged <strong>$extra</strong>.' . "\n";
|
||||
$lang->action->desc->ganttmove = '$date, <strong>$actor</strong> tasks sorted <strong>$extra</strong>.' . "\n";
|
||||
|
||||
/* Used to display dynamic information. */
|
||||
$lang->action->label = new stdclass();
|
||||
$lang->action->label->install = 'install ';
|
||||
@@ -386,7 +382,6 @@ $lang->action->label->unlinkstory = 'unlink stories from';
|
||||
$lang->action->label->unlinkbug = 'unlink bugs from';
|
||||
$lang->action->label->tolib = 'imported';
|
||||
$lang->action->label->updatetolib = 'updated';
|
||||
$lang->action->label->ganttdrag = 'dragged';
|
||||
$lang->action->label->ganttmove = 'sorted';
|
||||
|
||||
/* Dynamic information is grouped by object. */
|
||||
@@ -545,6 +540,7 @@ $lang->action->dynamicAction->task['undeleted'] = 'Restore Task';
|
||||
$lang->action->dynamicAction->task['hidden'] = 'Hide Task';
|
||||
$lang->action->dynamicAction->task['svncommited'] = 'SVN Commit';
|
||||
$lang->action->dynamicAction->task['gitcommited'] = 'GIT Commit';
|
||||
$lang->action->dynamicAction->task['ganttmove'] = 'Order';
|
||||
|
||||
$lang->action->dynamicAction->build['opened'] = 'Create Build';
|
||||
$lang->action->dynamicAction->build['edited'] = 'Edit Build';
|
||||
|
||||
@@ -245,10 +245,6 @@ $lang->action->desc->linkbug = '$date, <strong>$actor</strong> link bugs <st
|
||||
$lang->action->desc->unlinkstory = '$date, <strong>$actor</strong> remove stories <strong>$extra</strong> from plan.' . "\n";
|
||||
$lang->action->desc->unlinkbug = '$date, <strong>$actor</strong> remove bugs <strong>$extra</strong> from plan.' . "\n";
|
||||
|
||||
/* Used to describe the historical operation records of gantt. */
|
||||
$lang->action->desc->ganttdrag = '$date, <strong>$actor</strong> tasks dragged <strong>$extra</strong>.' . "\n";
|
||||
$lang->action->desc->ganttmove = '$date, <strong>$actor</strong> tasks sorted <strong>$extra</strong>.' . "\n";
|
||||
|
||||
/* Used to display dynamic information. */
|
||||
$lang->action->label = new stdclass();
|
||||
$lang->action->label->install = 'install ';
|
||||
@@ -386,7 +382,6 @@ $lang->action->label->unlinkstory = 'unlink stories from';
|
||||
$lang->action->label->unlinkbug = 'unlink bugs from';
|
||||
$lang->action->label->tolib = 'Importé';
|
||||
$lang->action->label->updatetolib = 'MàJ';
|
||||
$lang->action->label->ganttdrag = 'dragged';
|
||||
$lang->action->label->ganttmove = 'sorted';
|
||||
|
||||
/* Dynamic information is grouped by object. */
|
||||
@@ -545,6 +540,7 @@ $lang->action->dynamicAction->task['undeleted'] = 'Restaurer Tâche';
|
||||
$lang->action->dynamicAction->task['hidden'] = 'Masquer Tâche';
|
||||
$lang->action->dynamicAction->task['svncommited'] = 'Committer SVN';
|
||||
$lang->action->dynamicAction->task['gitcommited'] = 'Committer GIT';
|
||||
$lang->action->dynamicAction->task['ganttmove'] = 'Order';
|
||||
|
||||
$lang->action->dynamicAction->build['opened'] = 'Créer Build';
|
||||
$lang->action->dynamicAction->build['edited'] = 'Editer Build';
|
||||
|
||||
@@ -245,10 +245,6 @@ $lang->action->desc->linkbug = '$date, 由 <strong>$actor</strong> 关联BUG
|
||||
$lang->action->desc->unlinkstory = '$date, 由 <strong>$actor</strong> 从计划移除需求 <strong>$extra</strong>。' . "\n";
|
||||
$lang->action->desc->unlinkbug = '$date, 由 <strong>$actor</strong> 从计划移除BUG <strong>$extra</strong>。' . "\n";
|
||||
|
||||
/* 用来描述gantt chat相关操作记录。 */
|
||||
$lang->action->desc->ganttdrag = '$date, 由 <strong>$actor</strong> 拖动了任务 <strong>$extra</strong>。' . "\n";
|
||||
$lang->action->desc->ganttmove = '$date, 由 <strong>$actor</strong> 排序了任务 <strong>$extra</strong>。' . "\n";
|
||||
|
||||
/* 用来显示动态信息。*/
|
||||
$lang->action->label = new stdclass();
|
||||
$lang->action->label->install = '安装';
|
||||
@@ -386,7 +382,6 @@ $lang->action->label->unlinkstory = '移除需求从';
|
||||
$lang->action->label->unlinkbug = '移除BUG从';
|
||||
$lang->action->label->tolib = '导入了';
|
||||
$lang->action->label->updatetolib = '更新了';
|
||||
$lang->action->label->ganttdrag = '拖动了';
|
||||
$lang->action->label->ganttmove = '排序了';
|
||||
|
||||
/* 动态信息按照对象分组 */
|
||||
@@ -545,6 +540,7 @@ $lang->action->dynamicAction->task['undeleted'] = '还原任务';
|
||||
$lang->action->dynamicAction->task['hidden'] = '隐藏任务';
|
||||
$lang->action->dynamicAction->task['svncommited'] = 'SVN提交';
|
||||
$lang->action->dynamicAction->task['gitcommited'] = 'GIT提交';
|
||||
$lang->action->dynamicAction->task['ganttmove'] = '排序';
|
||||
|
||||
$lang->action->dynamicAction->build['opened'] = '创建版本';
|
||||
$lang->action->dynamicAction->build['edited'] = '编辑版本';
|
||||
|
||||
+14
-19
@@ -989,39 +989,43 @@ class actionModel extends model
|
||||
if($projectID == 'all') $authedProjects = (empty($aclViews) or (!empty($aclViews) and !empty($aclViews['project']))) ? $this->app->user->view->projects : '0';
|
||||
if($executionID == 'all') $authedExecutions = (empty($aclViews) or (!empty($aclViews) and !empty($aclViews['execution']))) ? $this->app->user->view->sprints : '0';
|
||||
|
||||
if(empty($authedProducts)) $authedProducts = '0';
|
||||
|
||||
if($productID == 'all' and $projectID == 'all')
|
||||
{
|
||||
$productCondition = '';
|
||||
foreach(explode(',', $authedProducts) as $product) $productCondition = empty($productCondition) ? "product LIKE '%,$product,%'" : "$productCondition OR product LIKE '%,$product,%'";
|
||||
foreach(explode(',', $authedProducts) as $product) $productCondition = empty($productCondition) ? "(execution = '0' and project = '0' and (product LIKE '%,$product,%'" : "$productCondition OR product LIKE '%,$product,%'";
|
||||
$productCondition .= '))';
|
||||
|
||||
$projectCondition = "project " . helper::dbIN($authedProjects);
|
||||
$executionCondition = isset($authedExecutions) ? "execution " . helper::dbIN($authedExecutions) : '';
|
||||
$projectCondition = "(execution = '0' and project != '0' and project " . helper::dbIN($authedProjects) . ')';
|
||||
$executionCondition = isset($authedExecutions) ? "(execution != 0 and execution " . helper::dbIN($authedExecutions) . ')' : '';
|
||||
}
|
||||
elseif($productID == 'all' and is_numeric($projectID))
|
||||
{
|
||||
$products = $this->loadModel('product')->getProductPairsByProject($projectID);
|
||||
$executions = $this->loadModel('execution')->getPairs($projectID);
|
||||
$executions = $this->loadModel('execution')->getPairs($projectID) + array(0 => 0);
|
||||
|
||||
$authedExecutions = isset($authedExecutions) ? array_intersect(array_keys($executions), explode(',', $authedExecutions)) : array_keys($executions);
|
||||
|
||||
$productCondition = '';
|
||||
foreach(array_keys($products) as $product) $productCondition = empty($productCondition) ? "product LIKE '%,$product,%'" : "$productCondition OR product LIKE '%,$product,%'";
|
||||
foreach(array_keys($products) as $product) $productCondition = empty($productCondition) ? "(execution = '0' and project = '0' and (product LIKE '%,$product,%'" : "$productCondition OR product LIKE '%,$product,%'";
|
||||
$productCondition .= '))';
|
||||
|
||||
$projectCondition = "project = $projectID";
|
||||
$executionCondition = "execution " . helper::dbIN($authedExecutions);
|
||||
$projectCondition = "(execution = '0' and project = '$projectID')";
|
||||
$executionCondition = "(execution != '0' and execution " . helper::dbIN($authedExecutions) . ')';
|
||||
}
|
||||
elseif(is_numeric($productID) and $projectID == 'all')
|
||||
{
|
||||
$this->loadModel('product');
|
||||
$projects = $this->product->getProjectPairsByProduct($productID);
|
||||
$executions = $this->product->getExecutionPairsByProduct($productID);
|
||||
$executions = $this->product->getExecutionPairsByProduct($productID) + array(0 => 0);
|
||||
|
||||
$authedProjects = array_intersect(array_keys($projects), explode(',', $authedProjects));
|
||||
$authedExecutions = isset($authedExecutions) ? array_intersect(array_keys($executions), explode(',', $authedExecutions)) : array_keys($executions);
|
||||
|
||||
$productCondition = "product like '%,$productID,%'";
|
||||
$projectCondition = 'project ' . helper::dbIN($authedProjects);
|
||||
$executionCondition = 'execution ' . helper::dbIN($authedExecutions);
|
||||
$projectCondition = "(execution = '0' and project != '0' and project " . helper::dbIN($authedProjects) . ')';
|
||||
$executionCondition = "(execution != '0' and execution " . helper::dbIN($authedExecutions) . ')';
|
||||
}
|
||||
|
||||
$condition = "((product =',0,' or product = '0' or product=',,') AND project = '0' AND execution = '0')";
|
||||
@@ -1222,17 +1226,8 @@ class actionModel extends model
|
||||
$relatedProjects = $relatedData['relatedProjects'];
|
||||
$requirements = $relatedData['requirements'];
|
||||
|
||||
$aclViews = isset($this->app->user->rights['acls']['views']) ? $this->app->user->rights['acls']['views'] : array();
|
||||
$authedProjects = (empty($aclViews) or (!empty($aclViews) and !empty($aclViews['project']))) ? ",{$this->app->user->view->projects}," : '';
|
||||
$authedExecutions = (empty($aclViews) or (!empty($aclViews) and !empty($aclViews['execution']))) ? ",{$this->app->user->view->sprints},": '';
|
||||
|
||||
foreach($actions as $i => $action)
|
||||
{
|
||||
if(($action->execution != '0' and strpos($authedExecutions, ",$action->execution,") === false) or ($action->execution == '0' and $action->project != '0' and strpos($authedProjects, ",$action->project,") === false))
|
||||
{
|
||||
unset($actions[$i]);
|
||||
continue;
|
||||
}
|
||||
/* Add name field to the actions. */
|
||||
$action->objectName = isset($objectNames[$action->objectType][$action->objectID]) ? $objectNames[$action->objectType][$action->objectID] : '';
|
||||
|
||||
|
||||
@@ -373,4 +373,84 @@ class admin extends control
|
||||
$this->view->title = $this->lang->admin->resetPWDSetting;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Show table engine.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function tableEngine()
|
||||
{
|
||||
$this->view->title = $this->lang->admin->tableEngine;
|
||||
$this->view->tableEngines = $this->loadModel('misc')->getTableEngines();
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Ajax change table engine.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function ajaxChangeTableEngine($tableName)
|
||||
{
|
||||
$response = array();
|
||||
$response['result'] = 'success';
|
||||
$response['message'] = '';
|
||||
|
||||
$tableEngines = $this->loadModel('misc')->getTableEngines();
|
||||
if(!isset($tableEngines[$tableName]))
|
||||
{
|
||||
$response['result'] = 'fail';
|
||||
return print(json_encode($response));
|
||||
}
|
||||
|
||||
if($tableEngines[$tableName] == 'InnoDB')
|
||||
{
|
||||
$response['message'] = sprintf($this->lang->admin->changeSuccess, $tableName);
|
||||
return print(json_encode($response));
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
/* Check process this table or not. */
|
||||
$dbProcesses = $this->dao->query("SHOW PROCESSLIST")->fetchAll();
|
||||
foreach($dbProcesses as $dbProcess)
|
||||
{
|
||||
if($dbProcess->db != $this->config->db->name) continue;
|
||||
if(strpos($dbProcess->Info, " {$tableName} ") !== false)
|
||||
{
|
||||
$response['message'] = sprintf($this->lang->upgrade->changingTable, $tableName);
|
||||
return print(json_encode($response));
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(PDOException $e){}
|
||||
|
||||
if(stripos($tableName, 'searchindex') !== false)
|
||||
{
|
||||
$mysqlVersion = $this->loadModel('install')->getMysqlVersion();
|
||||
if($mysqlVersion < 5.6)
|
||||
{
|
||||
$response['result'] = 'fail';
|
||||
$response['message'] = $this->lang->admin->errorInnodb;
|
||||
return print(json_encode($response));
|
||||
}
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
$sql = "ALTER TABLE `$tableName` ENGINE='InnoDB'";
|
||||
$this->dao->exec($sql);
|
||||
$response['message'] = sprintf($this->lang->admin->changeSuccess, $tableName);
|
||||
}
|
||||
catch(PDOException $e)
|
||||
{
|
||||
$response['result'] = 'fail';
|
||||
$response['message'] = sprintf($this->lang->admin->changeFail, $tableName, htmlspecialchars($e->getMessage()));
|
||||
}
|
||||
|
||||
return print(json_encode($response));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@ $lang->admin->captcha = 'Bestätigungscode';
|
||||
$lang->admin->getCaptcha = 'Bestätigungscode anfordern';
|
||||
$lang->admin->register = 'Register';
|
||||
$lang->admin->resetPWDSetting = 'Reset password Setting';
|
||||
$lang->admin->tableEngine = 'Table Engine';
|
||||
|
||||
$lang->admin->api = 'API';
|
||||
$lang->admin->log = 'Log';
|
||||
@@ -29,6 +30,15 @@ $lang->admin->setting = 'Einstellungen';
|
||||
$lang->admin->days = 'Gültige Tage';
|
||||
$lang->admin->resetPWDByMail = 'Reset the password via the email';
|
||||
|
||||
$lang->admin->changeEngine = "Change to InnoDB";
|
||||
$lang->admin->changingTable = 'Replacing data table %s engine...';
|
||||
$lang->admin->changeSuccess = 'The data table %s engine has been changed to InnoDB.';
|
||||
$lang->admin->changeFail = "Failed to replace table %s engine. Reason: <span class='text-red'>%s</span>。";
|
||||
$lang->admin->errorInnodb = 'Your MySQL does not support InnoDB data table engine.';
|
||||
$lang->admin->engineInfo = "The <strong>%s</strong> table engine is <strong>%s</strong>.";
|
||||
$lang->admin->engineSummary['hasMyISAM'] = "There are %s tables that are not InnoDB engines";
|
||||
$lang->admin->engineSummary['allInnoDB'] = "All tables are InnoDB engines";
|
||||
|
||||
$lang->admin->info = new stdclass();
|
||||
$lang->admin->info->version = 'Aktuelle Version ist %s. ';
|
||||
$lang->admin->info->links = 'You can visit links below';
|
||||
|
||||
@@ -22,6 +22,7 @@ $lang->admin->captcha = 'Verification Code';
|
||||
$lang->admin->getCaptcha = 'Send Verification Code';
|
||||
$lang->admin->register = 'Register';
|
||||
$lang->admin->resetPWDSetting = 'Reset password Setting';
|
||||
$lang->admin->tableEngine = 'Table Engine';
|
||||
|
||||
$lang->admin->api = 'API';
|
||||
$lang->admin->log = 'Log';
|
||||
@@ -29,6 +30,15 @@ $lang->admin->setting = 'Setting';
|
||||
$lang->admin->days = 'Valid Day';
|
||||
$lang->admin->resetPWDByMail = 'Reset the password via the email';
|
||||
|
||||
$lang->admin->changeEngine = "Change to InnoDB";
|
||||
$lang->admin->changingTable = 'Replacing data table %s engine...';
|
||||
$lang->admin->changeSuccess = 'The data table %s engine has been changed to InnoDB.';
|
||||
$lang->admin->changeFail = "Failed to replace table %s engine. Reason: <span class='text-red'>%s</span>。";
|
||||
$lang->admin->errorInnodb = 'Your MySQL does not support InnoDB data table engine.';
|
||||
$lang->admin->engineInfo = "The <strong>%s</strong> table engine is <strong>%s</strong>.";
|
||||
$lang->admin->engineSummary['hasMyISAM'] = "There are %s tables that are not InnoDB engines";
|
||||
$lang->admin->engineSummary['allInnoDB'] = "All tables are InnoDB engines";
|
||||
|
||||
$lang->admin->info = new stdclass();
|
||||
$lang->admin->info->version = 'Current Version is %s. ';
|
||||
$lang->admin->info->links = 'You can visit links below';
|
||||
|
||||
@@ -22,6 +22,7 @@ $lang->admin->captcha = 'Code de vérification';
|
||||
$lang->admin->getCaptcha = 'Obtenir le Code de vérification';
|
||||
$lang->admin->register = 'Register';
|
||||
$lang->admin->resetPWDSetting = 'Reset password Setting';
|
||||
$lang->admin->tableEngine = 'Table Engine';
|
||||
|
||||
$lang->admin->api = 'API';
|
||||
$lang->admin->log = 'Log';
|
||||
@@ -29,6 +30,15 @@ $lang->admin->setting = 'Paramétrage';
|
||||
$lang->admin->days = 'Durée de conservation';
|
||||
$lang->admin->resetPWDByMail = 'Reset the password via the email';
|
||||
|
||||
$lang->admin->changeEngine = "Change to InnoDB";
|
||||
$lang->admin->changingTable = 'Replacing data table %s engine...';
|
||||
$lang->admin->changeSuccess = 'The data table %s engine has been changed to InnoDB.';
|
||||
$lang->admin->changeFail = "Failed to replace table %s engine. Reason: <span class='text-red'>%s</span>。";
|
||||
$lang->admin->errorInnodb = 'Your MySQL does not support InnoDB data table engine.';
|
||||
$lang->admin->engineInfo = "The <strong>%s</strong> table engine is <strong>%s</strong>.";
|
||||
$lang->admin->engineSummary['hasMyISAM'] = "There are %s tables that are not InnoDB engines";
|
||||
$lang->admin->engineSummary['allInnoDB'] = "All tables are InnoDB engines";
|
||||
|
||||
$lang->admin->info = new stdclass();
|
||||
$lang->admin->info->version = 'La version actuelle est %s customisée. ';
|
||||
$lang->admin->info->links = 'Vous pouvez visiter les liens ci-dessous';
|
||||
|
||||
@@ -22,6 +22,7 @@ $lang->admin->captcha = '验证码';
|
||||
$lang->admin->getCaptcha = '获取验证码';
|
||||
$lang->admin->register = '登记';
|
||||
$lang->admin->resetPWDSetting = '重置密码设置';
|
||||
$lang->admin->tableEngine = '表引擎';
|
||||
|
||||
$lang->admin->api = '接口';
|
||||
$lang->admin->log = '日志';
|
||||
@@ -29,6 +30,15 @@ $lang->admin->setting = '设置';
|
||||
$lang->admin->days = '日志保存天数';
|
||||
$lang->admin->resetPWDByMail = '通过邮箱重置密码';
|
||||
|
||||
$lang->admin->changeEngine = "更换到InnoDB";
|
||||
$lang->admin->changingTable = '正在更换数据表%s引擎...';
|
||||
$lang->admin->changeSuccess = '已经更换数据表%s引擎为InnoDB。';
|
||||
$lang->admin->changeFail = "更换数据表%s引擎失败,原因:<span class='text-red'>%s</span>。";
|
||||
$lang->admin->errorInnodb = '您当前的数据库不支持使用InnoDB数据表引擎。';
|
||||
$lang->admin->engineInfo = "表<strong>%s</strong>的引擎是<strong>%s</strong>。";
|
||||
$lang->admin->engineSummary['hasMyISAM'] = "有%s个表不是InnoDB引擎";
|
||||
$lang->admin->engineSummary['allInnoDB'] = "所有的表都是InnoDB引擎了";
|
||||
|
||||
$lang->admin->info = new stdclass();
|
||||
$lang->admin->info->version = '当前系统的版本是%s,';
|
||||
$lang->admin->info->links = '您可以访问以下链接:';
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
<?php
|
||||
/**
|
||||
* The tableEngine view file of admin 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 admin
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='main-header'>
|
||||
<?php
|
||||
$MyISAMCount = 0;
|
||||
$engineListHtml = '';
|
||||
foreach($tableEngines as $tableName => $engine)
|
||||
{
|
||||
if($engine != 'InnoDB') $MyISAMCount ++;
|
||||
$engineListHtml .= "<li data-table='$tableName'>" . sprintf($lang->admin->engineInfo, $tableName, $engine) . "</li>\n";
|
||||
}
|
||||
?>
|
||||
<h2>
|
||||
<?php if($MyISAMCount > 0):?>
|
||||
<?php printf($lang->admin->engineSummary['hasMyISAM'], $MyISAMCount);?>
|
||||
<?php echo html::a('###', $lang->admin->changeEngine, '', "class='btn btn-sm changeEngine btn-primary' onclick='changeAllEngines()'");?>
|
||||
<?php else:?>
|
||||
<?php print($lang->admin->engineSummary['allInnoDB']);?>
|
||||
<?php endif;?>
|
||||
</h2>
|
||||
</div>
|
||||
<div>
|
||||
<ul id='engineBox'><?php echo $engineListHtml?></ul>
|
||||
</div>
|
||||
</div>
|
||||
<?php js::set('changingTable', $lang->admin->changingTable);?>
|
||||
<script>
|
||||
/**
|
||||
* Change all table engines.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function changeAllEngines()
|
||||
{
|
||||
var tables = [];
|
||||
var $engineBox = $('#engineBox');
|
||||
$engineBox.find('li').each(function()
|
||||
{
|
||||
tables.push($(this).attr('data-table'));
|
||||
});
|
||||
|
||||
$('.btn.changeEngine').hide();
|
||||
$engineBox.empty();
|
||||
$.each(tables, function(_, table)
|
||||
{
|
||||
changeEngine(table);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Change one engine.
|
||||
*
|
||||
* @param string $table
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function changeEngine(table)
|
||||
{
|
||||
var $engineBox = $('#engineBox');
|
||||
var link = createLink('admin', 'ajaxChangeTableEngine', 'table=' + table);
|
||||
|
||||
if($engineBox.find('[data-table=' + table + ']').length == 0) $engineBox.append("<div data-table='" + table + "'>" + changingTable.replace('%s', table) + "</div>");
|
||||
$.ajax(
|
||||
{
|
||||
type: "GET",
|
||||
url: link,
|
||||
success: function(response)
|
||||
{
|
||||
response = JSON.parse(response);
|
||||
$engineBox.find('[data-table=' + table + ']').html(response.message).addClass('text-success');
|
||||
},
|
||||
error: function()
|
||||
{
|
||||
changeEngine(table);
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
@@ -288,11 +288,12 @@ $lang->devops->rules = 'Rule';
|
||||
$lang->devops->settings = 'Setting Merge Request';
|
||||
$lang->devops->set = 'Set';
|
||||
|
||||
$lang->admin->system = 'System';
|
||||
$lang->admin->entry = 'Application';
|
||||
$lang->admin->data = 'Data';
|
||||
$lang->admin->cron = 'Cron';
|
||||
$lang->admin->buildIndex = 'Full Text Search';
|
||||
$lang->admin->system = 'System';
|
||||
$lang->admin->entry = 'Application';
|
||||
$lang->admin->data = 'Data';
|
||||
$lang->admin->cron = 'Cron';
|
||||
$lang->admin->buildIndex = 'Full Text Search';
|
||||
$lang->admin->tableEngine = 'Table Engine';
|
||||
|
||||
$lang->convert->importJira = 'Import Jira';
|
||||
|
||||
|
||||
@@ -288,11 +288,12 @@ $lang->devops->rules = 'Rule';
|
||||
$lang->devops->settings = 'Setting Merge Request';
|
||||
$lang->devops->set = 'Set';
|
||||
|
||||
$lang->admin->system = 'System';
|
||||
$lang->admin->entry = 'Application';
|
||||
$lang->admin->data = 'Data';
|
||||
$lang->admin->cron = 'Cron';
|
||||
$lang->admin->buildIndex = 'Full Text Search';
|
||||
$lang->admin->system = 'System';
|
||||
$lang->admin->entry = 'Application';
|
||||
$lang->admin->data = 'Data';
|
||||
$lang->admin->cron = 'Cron';
|
||||
$lang->admin->buildIndex = 'Full Text Search';
|
||||
$lang->admin->tableEngine = 'Table Engine';
|
||||
|
||||
$lang->convert->importJira = 'Import Jira';
|
||||
|
||||
|
||||
@@ -288,11 +288,12 @@ $lang->devops->rules = 'Rule';
|
||||
$lang->devops->settings = 'Setting Merge Request';
|
||||
$lang->devops->set = 'Set';
|
||||
|
||||
$lang->admin->system = 'System';
|
||||
$lang->admin->entry = 'Application';
|
||||
$lang->admin->data = 'Data';
|
||||
$lang->admin->cron = 'Cron';
|
||||
$lang->admin->buildIndex = 'Full Text Search';
|
||||
$lang->admin->system = 'System';
|
||||
$lang->admin->entry = 'Application';
|
||||
$lang->admin->data = 'Data';
|
||||
$lang->admin->cron = 'Cron';
|
||||
$lang->admin->buildIndex = 'Full Text Search';
|
||||
$lang->admin->tableEngine = 'Table Engine';
|
||||
|
||||
$lang->convert->importJira = 'Import Jira';
|
||||
|
||||
|
||||
@@ -568,6 +568,7 @@ $lang->admin->menu->system['subMenu']->safe = array('link' => "$lang->sec
|
||||
$lang->admin->menu->system['subMenu']->cron = array('link' => "{$lang->admin->cron}|cron|index", 'subModule' => 'cron');
|
||||
$lang->admin->menu->system['subMenu']->timezone = array('link' => "$lang->timezone|custom|timezone");
|
||||
$lang->admin->menu->system['subMenu']->buildIndex = array('link' => "{$lang->admin->buildIndex}|search|buildindex|");
|
||||
$lang->admin->menu->system['subMenu']->tableEngine = array('link' => "{$lang->admin->tableEngine}|admin|tableengine|");
|
||||
if(version_compare(phpversion(), 5.6) > 0) $lang->admin->menu->system['subMenu']->convertJira = array('link' => "{$lang->convert->importJira}|convert|convertjira|", 'subModule' => 'convert');
|
||||
|
||||
$lang->admin->dividerMenu = ',company,message,system,';
|
||||
|
||||
@@ -288,11 +288,12 @@ $lang->devops->rules = '指令';
|
||||
$lang->devops->settings = '合并请求设置';
|
||||
$lang->devops->set = '设置';
|
||||
|
||||
$lang->admin->system = '系统';
|
||||
$lang->admin->entry = '应用';
|
||||
$lang->admin->data = '数据';
|
||||
$lang->admin->cron = '定时';
|
||||
$lang->admin->buildIndex = '重建索引';
|
||||
$lang->admin->system = '系统';
|
||||
$lang->admin->entry = '应用';
|
||||
$lang->admin->data = '数据';
|
||||
$lang->admin->cron = '定时';
|
||||
$lang->admin->buildIndex = '重建索引';
|
||||
$lang->admin->tableEngine = '表引擎';
|
||||
|
||||
$lang->convert->importJira = '导入Jira数据';
|
||||
|
||||
|
||||
@@ -154,6 +154,7 @@ $lang->doc->allCollections = 'All Collections';
|
||||
$lang->doc->keywordsTips = 'Please use commas to separate multiple keywords.';
|
||||
$lang->doc->sortLibs = 'Sort Libs';
|
||||
$lang->doc->titlePlaceholder = 'Please enter the title';
|
||||
$lang->doc->confirm = 'Confirm';
|
||||
|
||||
global $config;
|
||||
/* Query condition list. */
|
||||
|
||||
@@ -154,6 +154,7 @@ $lang->doc->allCollections = 'All Collections';
|
||||
$lang->doc->keywordsTips = 'Please use commas to separate keywords.';
|
||||
$lang->doc->sortLibs = 'Sort Libs';
|
||||
$lang->doc->titlePlaceholder = 'Please enter the title';
|
||||
$lang->doc->confirm = 'Confirm';
|
||||
|
||||
global $config;
|
||||
/* Query condition list. */
|
||||
|
||||
@@ -154,6 +154,7 @@ $lang->doc->allCollections = 'All Collections';
|
||||
$lang->doc->keywordsTips = 'Please use commas to separate multiple keywords.';
|
||||
$lang->doc->sortLibs = 'Sort Libs';
|
||||
$lang->doc->titlePlaceholder = 'Veuillez saisir le titre';
|
||||
$lang->doc->confirm = 'Confirm';
|
||||
|
||||
global $config;
|
||||
/* Query condition list. */
|
||||
|
||||
@@ -154,6 +154,7 @@ $lang->doc->allCollections = '查看全部收藏文档';
|
||||
$lang->doc->keywordsTips = '多个关键字请用逗号分隔。';
|
||||
$lang->doc->sortLibs = '文档库排序';
|
||||
$lang->doc->titlePlaceholder = '请输入标题';
|
||||
$lang->doc->confirm = '确认';
|
||||
|
||||
global $config;
|
||||
/* 查询条件列表 */
|
||||
|
||||
@@ -46,12 +46,7 @@
|
||||
|
||||
#noticeAcl {margin-left: 10px; vertical-align: middle;}
|
||||
|
||||
#moreList {display: inline-block; padding: 7px;}
|
||||
#moreList .icon-more-circle {font-size: 20px;}
|
||||
#moreList ul.dropdown-menu {left: -77px;}
|
||||
|
||||
#backBtn {border: unset;}
|
||||
#backBtn i {font-size: 20px;}
|
||||
#basicInfoLink {border: unset;}
|
||||
|
||||
.modal-title {font-size: 14px !important; font-weight: 700 !important;}
|
||||
</style>
|
||||
@@ -64,16 +59,11 @@
|
||||
<table class='table table-form'>
|
||||
<tbody>
|
||||
<tr id='headerBox'>
|
||||
<td width='50px'><?php echo html::linkButton("<i class='icon icon-back-circle'></i>", $backLink, 'self', "id='backBtn'");?></td>
|
||||
<td width='90px'><?php echo html::a($backLink, '<i class="icon icon-back icon-sm"></i> ' . $lang->goback, '', "class='btn btn-secondary' id='backBtn'");?></td>
|
||||
<td class="doc-title" colspan='3'><?php echo html::input('title', '', "placeholder='{$lang->doc->titlePlaceholder}' class='form-control' required");?></td>
|
||||
<td class="text-right">
|
||||
<?php echo html::submitButton('', "data-placement='bottom'", 'btn btn-primary');?>
|
||||
<div id="moreList" class="dropdown dropdown-hover">
|
||||
<?php echo html::a('#', "<i class='icon icon-more-circle'></i>");?>
|
||||
<ul class="dropdown-menu">
|
||||
<li><?php echo html::a('#modalBasicInfo', $lang->doc->basicInfo, '', "data-toggle='modal' id='basicInfoLink'");?><li>
|
||||
</ul>
|
||||
</div>
|
||||
<?php echo html::a('#modalBasicInfo', "<i class='icon icon-cog-outline'></i> " . $lang->settings, '', "data-toggle='modal' id='basicInfoLink' class='btn'");?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -154,7 +144,7 @@
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan='3' class='text-center'><?php echo html::a('javascript:void(0)', $lang->close, '', "class='btn btn-primary btn-wide'");?></td>
|
||||
<td colspan='3' class='text-center'><?php echo html::a('javascript:void(0)', $lang->doc->confirm, '', "class='btn btn-primary btn-wide'");?></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
@@ -49,12 +49,7 @@
|
||||
|
||||
#noticeAcl {margin-left: 10px; vertical-align: middle;}
|
||||
|
||||
#moreList {display: inline-block; padding: 7px;}
|
||||
#moreList .icon-more-circle {font-size: 20px;}
|
||||
#moreList ul.dropdown-menu {left: -77px;}
|
||||
|
||||
#backBtn {border: unset;}
|
||||
#backBtn i {font-size: 20px;}
|
||||
#basicInfoLink {border: unset;}
|
||||
|
||||
.modal-title {font-size: 14px !important; font-weight: 700 !important;}
|
||||
</style>
|
||||
@@ -64,20 +59,11 @@
|
||||
<table class='table table-form'>
|
||||
<tbody>
|
||||
<tr id='headerBox'>
|
||||
<?php if($from == 'create'):?>
|
||||
<td width='50px'><?php echo html::linkButton("<i class='icon icon-back-circle'></i>", $backLink, 'self', "id='backBtn'");?></td>
|
||||
<?php else:?>
|
||||
<td width='50px'><?php echo html::backButton("<i class='icon icon-back-circle'></i>", "id='backBtn'", '');?></td>
|
||||
<?php endif;?>
|
||||
<td width='90px'><?php echo html::backButton("<i class='icon icon-back icon-sm'></i> " . $lang->goback, "id='backBtn'", 'btn btn-secondary');?></td>
|
||||
<td class="doc-title" colspan='3'><?php echo html::input('title', $doc->title, "placeholder='{$lang->doc->titlePlaceholder}' class='form-control' required");?></td>
|
||||
<td class="text-right">
|
||||
<?php echo html::submitButton('', "data-placement='bottom'", 'btn btn-primary');?>
|
||||
<div id="moreList" class="dropdown dropdown-hover">
|
||||
<?php echo html::a('#', "<i class='icon icon-more-circle'></i>");?>
|
||||
<ul class="dropdown-menu">
|
||||
<li><?php echo html::a('#modalBasicInfo', $lang->doc->basicInfo, '', "data-toggle='modal' id='basicInfoLink'");?><li>
|
||||
</ul>
|
||||
</div>
|
||||
<?php echo html::a('#modalBasicInfo', "<i class='icon icon-cog-outline'></i> " . $lang->settings, '', "data-toggle='modal' id='basicInfoLink' class='btn'");?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -155,7 +141,7 @@
|
||||
</tr>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan='3' class='text-center'><?php echo html::a('javascript:void(0)', $lang->close, '', "class='btn btn-primary btn-wide'");?></td>
|
||||
<td colspan='3' class='text-center'><?php echo html::a('javascript:void(0)', $lang->doc->confirm, '', "class='btn btn-primary btn-wide'");?></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
@@ -100,7 +100,7 @@ class executionModel extends model
|
||||
include $this->app->getModulePath('', 'execution') . 'lang/' . $this->app->getClientLang() . '.php';
|
||||
}
|
||||
|
||||
if(isset($execution->cal) and $execution->acl != 'private') unset($this->lang->execution->menu->settings['subMenu']->whitelist);
|
||||
if(isset($execution->acl) and $execution->acl != 'private') unset($this->lang->execution->menu->settings['subMenu']->whitelist);
|
||||
|
||||
if($execution and $execution->lifetime == 'ops')
|
||||
{
|
||||
@@ -396,7 +396,7 @@ class executionModel extends model
|
||||
$this->dao->insert(TABLE_EXECUTION)->data($sprint)
|
||||
->autoCheck($skipFields = 'begin,end')
|
||||
->batchcheck($this->config->execution->create->requiredFields, 'notempty')
|
||||
->checkIF((!empty($sprint->name) and $this->config->systemMode == 'new'), 'name', 'unique', "`type` in ('sprint','stage', 'kanban') and `project` = $sprintProject and `deleted` = '0'")
|
||||
->checkIF(!empty($sprint->name), 'name', 'unique', "`type` in ('sprint','stage', 'kanban') and `project` = $sprintProject and `deleted` = '0'")
|
||||
->checkIF(!empty($sprint->code), 'code', 'unique', "`type` in ('sprint','stage', 'kanban') and `deleted` = '0'")
|
||||
->checkIF($sprint->begin != '', 'begin', 'date')
|
||||
->checkIF($sprint->end != '', 'end', 'date')
|
||||
@@ -551,7 +551,7 @@ class executionModel extends model
|
||||
->checkIF($execution->begin != '', 'begin', 'date')
|
||||
->checkIF($execution->end != '', 'end', 'date')
|
||||
->checkIF($execution->end != '', 'end', 'ge', $execution->begin)
|
||||
->checkIF((!empty($execution->name) and $this->config->systemMode == 'new'), 'name', 'unique', "id != $executionID and type in ('sprint','stage', 'kanban') and `project` = $executionProject and `deleted` = '0'")
|
||||
->checkIF(!empty($execution->name), 'name', 'unique', "id != $executionID and type in ('sprint','stage', 'kanban') and `project` = $executionProject and `deleted` = '0'")
|
||||
->checkIF(!empty($execution->code), 'code', 'unique', "id != $executionID and type in ('sprint','stage', 'kanban') and `deleted` = '0'")
|
||||
->checkFlow()
|
||||
->where('id')->eq($executionID)
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<small><?php echo $lang->arrow . ' ' . $lang->execution->edit;?></small>
|
||||
</h2>
|
||||
</div>
|
||||
<?php echo html::hidden('project', $project->id);?>
|
||||
<?php if($config->systemMode == 'new') echo html::hidden('project', $project->id);?>
|
||||
<form class='load-indicator main-form form-ajax' method='post' target='hiddenwin' id='dataform'>
|
||||
<table class='table table-form'>
|
||||
<?php if($config->systemMode == 'new' and isset($project)):?>
|
||||
|
||||
@@ -1632,6 +1632,7 @@ $lang->resource->admin->sso = 'ssoAction';
|
||||
$lang->resource->admin->register = 'register';
|
||||
$lang->resource->admin->ztCompany = 'ztCompany';
|
||||
$lang->resource->admin->resetPWDSetting = 'resetPWDSetting';
|
||||
$lang->resource->admin->tableEngine = 'tableEngine';
|
||||
|
||||
$lang->admin->methodOrder[0] = 'index';
|
||||
$lang->admin->methodOrder[5] = 'checkDB';
|
||||
@@ -1641,6 +1642,7 @@ $lang->admin->methodOrder[20] = 'sso';
|
||||
$lang->admin->methodOrder[25] = 'register';
|
||||
$lang->admin->methodOrder[30] = 'ztCompany';
|
||||
$lang->admin->methodOrder[35] = 'resetPWDSetting';
|
||||
$lang->admin->methodOrder[40] = 'tableEngine';
|
||||
|
||||
/* Extension. */
|
||||
$lang->resource->extension = new stdclass();
|
||||
|
||||
@@ -187,7 +187,7 @@ $lang->misc->releaseDate['7.2.stable'] = '2015-05-22';
|
||||
$lang->misc->releaseDate['7.1.stable'] = '2015-03-07';
|
||||
$lang->misc->releaseDate['6.3.stable'] = '2014-11-07';
|
||||
|
||||
$lang->misc->feature->all['17.5'][] = array('title' => "Optimize ZenTao performance, the database engine is adjusted from MyISAM to InnoDB. Gantt chart is optimized and upgraded, and the Copy items of the Max version can replicate more information. Fix bugs.", 'desc' => '');
|
||||
$lang->misc->feature->all['17.5'][] = array('title' => "Provide efficient visual statistical tools. Optimize ZenTao performance, the database engine is adjusted from MyISAM to InnoDB. Gantt chart is optimized and upgraded, and the Copy items of the Max version can replicate more information. Fix bugs.", 'desc' => '');
|
||||
$lang->misc->feature->all['17.4'][] = array('title' => "Optimization of details Page visualization and jumping page logic. Improvement of Kanban function. Optimization of document creating and editing pages. Fix bugs.", 'desc' => '');
|
||||
$lang->misc->feature->all['17.3'][] = array('title' => "UI optimization of the modules such as statistics and background, the use case library will synchronize the function optimization information. Fix bugs.", 'desc' => '');
|
||||
$lang->misc->feature->all['17.2'][] = array('title' => "Adjust the display of agile project block; optimize the UI of programs, projects and tests; optimize the detailed experience. Fix bugs.", 'desc' => '');
|
||||
|
||||
@@ -187,7 +187,7 @@ $lang->misc->releaseDate['7.2.stable'] = '2015-05-22';
|
||||
$lang->misc->releaseDate['7.1.stable'] = '2015-03-07';
|
||||
$lang->misc->releaseDate['6.3.stable'] = '2014-11-07';
|
||||
|
||||
$lang->misc->feature->all['17.5'][] = array('title' => "Optimize ZenTao performance, the database engine is adjusted from MyISAM to InnoDB. Gantt chart is optimized and upgraded, and the Copy items of the Max version can replicate more information. Fix bugs.", 'desc' => '');
|
||||
$lang->misc->feature->all['17.5'][] = array('title' => "Provide efficient visual statistical tools. Optimize ZenTao performance, the database engine is adjusted from MyISAM to InnoDB. Gantt chart is optimized and upgraded, and the Copy items of the Max version can replicate more information. Fix bugs.", 'desc' => '');
|
||||
$lang->misc->feature->all['17.4'][] = array('title' => "Optimization of details Page visualization and jumping page logic. Improvement of Kanban function. Optimization of document creating and editing pages. Fix bugs.", 'desc' => '');
|
||||
$lang->misc->feature->all['17.3'][] = array('title' => "UI optimization of the modules such as statistics and background, the use case library will synchronize the function optimization information. Fix bugs.", 'desc' => '');
|
||||
$lang->misc->feature->all['17.2'][] = array('title' => "Adjust the display of agile project block; optimize the UI of programs, projects and tests; optimize the detailed experience. Fix bugs.", 'desc' => '');
|
||||
|
||||
@@ -187,7 +187,7 @@ $lang->misc->releaseDate['7.2.stable'] = '2015-05-22';
|
||||
$lang->misc->releaseDate['7.1.stable'] = '2015-03-07';
|
||||
$lang->misc->releaseDate['6.3.stable'] = '2014-11-07';
|
||||
|
||||
$lang->misc->feature->all['17.5'][] = array('title' => "Optimize ZenTao performance, the database engine is adjusted from MyISAM to InnoDB. Gantt chart is optimized and upgraded, and the Copy items of the Max version can replicate more information. Fix bugs.", 'desc' => '');
|
||||
$lang->misc->feature->all['17.5'][] = array('title' => "Provide efficient visual statistical tools. Optimize ZenTao performance, the database engine is adjusted from MyISAM to InnoDB. Gantt chart is optimized and upgraded, and the Copy items of the Max version can replicate more information. Fix bugs.", 'desc' => '');
|
||||
$lang->misc->feature->all['17.4'][] = array('title' => "Optimization of details Page visualization and jumping page logic. Improvement of Kanban function. Optimization of document creating and editing pages. Fix bugs.", 'desc' => '');
|
||||
$lang->misc->feature->all['17.3'][] = array('title' => "UI optimization of the modules such as statistics and background, the use case library will synchronize the function optimization information. Fix bugs.", 'desc' => '');
|
||||
$lang->misc->feature->all['17.2'][] = array('title' => "Adjust the display of agile project block; optimize the UI of programs, projects and tests; optimize the detailed experience. Fix bugs.", 'desc' => '');
|
||||
|
||||
@@ -187,7 +187,7 @@ $lang->misc->releaseDate['7.2.stable'] = '2015-05-22';
|
||||
$lang->misc->releaseDate['7.1.stable'] = '2015-03-07';
|
||||
$lang->misc->releaseDate['6.3.stable'] = '2014-11-07';
|
||||
|
||||
$lang->misc->feature->all['17.5'][] = array('title' => '优化禅道性能,数据库引擎从MyISAM调整为InnoDB。甘特图优化升级,旗舰版的复制项目可以复制任务等更多信息。修复Bug。', 'desc' => '');
|
||||
$lang->misc->feature->all['17.5'][] = array('title' => '提供高效的可视化统计工具。优化禅道性能,数据库引擎从MyISAM调整为InnoDB。甘特图优化升级,旗舰版的复制项目可以复制任务等更多信息。修复Bug。', 'desc' => '');
|
||||
$lang->misc->feature->all['17.4'][] = array('title' => '详情页面的视觉优化和部分页面跳转逻辑优化。看板功能完善。文档创建和编辑页面优化。修复Bug。', 'desc' => '');
|
||||
$lang->misc->feature->all['17.3'][] = array('title' => '统计、后台等模块的UI优化,用例库同步用例信息功能优化。修复Bug。', 'desc' => '');
|
||||
$lang->misc->feature->all['17.2'][] = array('title' => '调整敏捷项目区块的展示,项目集、项目和测试相关UI优化,细节体验优化。修复Bug。', 'desc' => '');
|
||||
|
||||
@@ -143,4 +143,19 @@ class miscModel extends model
|
||||
|
||||
return $weakSites;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get table and engine pairs.
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getTableEngines()
|
||||
{
|
||||
$tableEngines = array();
|
||||
$stmt = $this->dao->query("SHOW TABLE STATUS WHERE `Engine` is not null");
|
||||
while($table = $stmt->fetch()) $tableEngines[$table->Name] = $table->Engine;
|
||||
|
||||
return $tableEngines;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -680,7 +680,7 @@ class productModel extends model
|
||||
$programID = isset($product->program) ? $product->program : 0;
|
||||
$this->dao->insert(TABLE_PRODUCT)->data($product)->autoCheck()
|
||||
->batchCheck($this->config->product->create->requiredFields, 'notempty')
|
||||
->checkIF((!empty($product->name) and $this->config->systemMode == 'new'), 'name', 'unique', "`program` = $programID and `deleted` = '0'")
|
||||
->checkIF(!empty($product->name), 'name', 'unique', "`program` = $programID and `deleted` = '0'")
|
||||
->checkIF(!empty($product->code), 'code', 'unique', "`deleted` = '0'")
|
||||
->checkFlow()
|
||||
->exec();
|
||||
@@ -770,10 +770,10 @@ class productModel extends model
|
||||
|
||||
$this->lang->error->unique = $this->lang->error->repeat;
|
||||
$product = $this->loadModel('file')->processImgURL($product, $this->config->product->editor->edit['id'], $this->post->uid);
|
||||
$programID = isset($product->program) ? $product->program : '';
|
||||
$programID = isset($product->program) ? $product->program : 0;
|
||||
$this->dao->update(TABLE_PRODUCT)->data($product)->autoCheck()
|
||||
->batchCheck($this->config->product->edit->requiredFields, 'notempty')
|
||||
->checkIF((!empty($product->name) and $this->config->systemMode == 'new'), 'name', 'unique', "id != $productID and `program` = $programID and `deleted` = '0'")
|
||||
->checkIF(!empty($product->name), 'name', 'unique', "id != $productID and `program` = $programID and `deleted` = '0'")
|
||||
->checkIF(!empty($product->code), 'code', 'unique', "id != $productID and `deleted` = '0'")
|
||||
->checkFlow()
|
||||
->where('id')->eq($productID)
|
||||
|
||||
@@ -275,7 +275,7 @@ class programplan extends control
|
||||
|
||||
$this->loadModel('task')->updateEsDateByGantt($objectID, $_POST['type']);
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
// $this->loadModel('action')->create('task', $objectID, 'ganttDrag', '', $this->app->user->account);
|
||||
|
||||
return $this->send(array('result' => 'success'));
|
||||
}
|
||||
}
|
||||
@@ -296,8 +296,7 @@ class programplan extends control
|
||||
|
||||
$this->loadModel('task')->updateOrderByGantt();
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
$this->loadModel('action')->create('task', $taskID, 'ganttMove', '', $this->app->user->account);
|
||||
|
||||
$this->loadModel('action')->create('task', $taskID, 'ganttMove');
|
||||
return $this->send(array('result' => 'success'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,12 +70,17 @@ form {display: block; margin-top: 0em; margin-block-end: 1em;}
|
||||
<?php js::set('module', $app->rawModule);?>
|
||||
<?php js::set('method', $app->rawMethod);?>
|
||||
<?php js::set('ganttType', $ganttType);?>
|
||||
<?php js::set('showFields', $showFields);?>
|
||||
<?php js::set('showFields', $this->config->programplan->ganttCustom->ganttFields);?>
|
||||
<?php js::set('canGanttEdit', common::hasPriv('programplan', 'ganttEdit'));?>
|
||||
<div id='mainContent' class='main-content load-indicator' data-loading='<?php echo $lang->programplan->exporting;?>'>
|
||||
<div class="pull-right btn-toolbar">
|
||||
<?php $customLink = $this->createLink('custom', 'ajaxSaveCustomFields', 'module=programplan§ion=ganttCustom&key=ganttFields')?>
|
||||
<?php include '../../common/view/customfield.html.php';?>
|
||||
<?php
|
||||
if($this->app->getModuleName() == 'programplan')
|
||||
{
|
||||
$customLink = $this->createLink('custom', 'ajaxSaveCustomFields', 'module=programplan§ion=ganttCustom&key=ganttFields');
|
||||
include '../../common/view/customfield.html.php';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<form class="main-form form-ajax not-watch">
|
||||
<div class="example">
|
||||
@@ -475,12 +480,15 @@ $(function()
|
||||
|
||||
<?php
|
||||
$userList = array();
|
||||
foreach($users as $account => $realname)
|
||||
if(!empty($users))
|
||||
{
|
||||
$user = array();
|
||||
$user['key'] = $account;
|
||||
$user['label'] = $realname;
|
||||
$userList[] = $user;
|
||||
foreach($users as $account => $realname)
|
||||
{
|
||||
$user = array();
|
||||
$user['key'] = $account;
|
||||
$user['label'] = $realname;
|
||||
$userList[] = $user;
|
||||
}
|
||||
}
|
||||
?>
|
||||
gantt.serverList("userList", <?php echo json_encode($userList);?>);
|
||||
|
||||
@@ -2618,9 +2618,10 @@ class projectModel extends model
|
||||
public function setMenu($objectID)
|
||||
{
|
||||
global $lang;
|
||||
$project = $this->getByID($objectID);
|
||||
|
||||
$model = 'scrum';
|
||||
$model = 'scrum';
|
||||
$objectID = (empty($objectID) and $this->session->project) ? $this->session->project : $objectID;
|
||||
$project = $this->getByID($objectID);
|
||||
if($project and $project->model == 'waterfall') $model = $project->model;
|
||||
if($project and $project->model == 'kanban')
|
||||
{
|
||||
@@ -2657,7 +2658,6 @@ class projectModel extends model
|
||||
$this->lang->switcherMenu = $this->getSwitcher($objectID, $moduleName, $methodName);
|
||||
|
||||
$this->saveState($objectID, $this->getPairsByProgram());
|
||||
$project = $this->getById($objectID);
|
||||
|
||||
if(isset($project->acl) and $project->acl == 'open') unset($this->lang->project->menu->settings['subMenu']->whitelist);
|
||||
|
||||
|
||||
@@ -231,10 +231,11 @@ class search extends control
|
||||
$pager = new pager(0, $this->config->search->recPerPage, $pageID);
|
||||
$results = $this->search->getList($words, $type, $pager);
|
||||
|
||||
$typeCount = $this->search->getListCount('');
|
||||
$typeCount = $this->search->getListCount();
|
||||
$typeList = array('all' => $this->lang->search->modules['all']);
|
||||
foreach($typeCount as $objectType => $count)
|
||||
{
|
||||
if(!isset($this->lang->search->modules[$objectType])) continue;
|
||||
$typeList[$objectType] = $this->lang->search->modules[$objectType];
|
||||
}
|
||||
|
||||
|
||||
@@ -647,7 +647,7 @@ class searchModel extends model
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getListCount($keywords, $type = 'all')
|
||||
public function getListCount($keywords = '', $type = 'all')
|
||||
{
|
||||
list($words, $againstCond, $likeCondition, $allowedObject) = $this->getSqlParams($keywords, $type);
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
<?php echo html::a('javascript:;', "<i class='icon icon-product'></i><div class='product-name'>{$projectProducts[$productID]->name}</div><span class='caret'></span>", '', 'class="dropdown-toggle" data-toggle="dropdown"');?>
|
||||
<ul class="dropdown-menu">
|
||||
<?php foreach($projectProducts as $product): ?>
|
||||
<li><?php echo html::a($this->createLink('projectstory', 'track', "projectID={$this->session->project}&productID=$product->id"), $product->name);?></li>
|
||||
<li class= "<?php if($productID == $product->id) echo 'active';?>"><?php echo html::a($this->createLink('projectstory', 'track', "projectID={$this->session->project}&productID=$product->id"), $product->name);?></li>
|
||||
<?php endforeach;?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -438,10 +438,16 @@ class task extends control
|
||||
$customFields[$field] = $this->lang->task->$field;
|
||||
}
|
||||
|
||||
if($execution->lifetime == 'ops' or $execution->attribute == 'request' or $execution->attribute == 'review') unset($customFields['story']);
|
||||
$showFields = $this->config->task->custom->batchCreateFields;
|
||||
if($execution->lifetime == 'ops' or $execution->attribute == 'request' or $execution->attribute == 'review')
|
||||
{
|
||||
unset($customFields['story']);
|
||||
$showFields = str_replace(',story,', ',', ",$showFields,");
|
||||
$showFields = trim($showFields, ',');
|
||||
}
|
||||
|
||||
$this->view->customFields = $customFields;
|
||||
$this->view->showFields = $this->config->task->custom->batchCreateFields;
|
||||
$this->view->showFields = $showFields;
|
||||
|
||||
if($execution->type == 'kanban')
|
||||
{
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
.c-id {width: 50px;}
|
||||
.c-name {width: 150px;}
|
||||
.c-pri, .c-record, .c-left {width: 70px;}
|
||||
.c-reason {width: 100px;}
|
||||
.c-module, .c-assigned {width: 150px;}
|
||||
|
||||
+108
-70
@@ -3936,90 +3936,128 @@ class taskModel extends model
|
||||
$this->app->loadLang('project');
|
||||
$post = fixer::input('post')->get();
|
||||
$post->endDate = date('Y-m-d', strtotime('-1 day', strtotime($post->endDate)));
|
||||
$changeTable = $objectType == 'task' ? TABLE_TASK : TABLE_PROJECT;
|
||||
$actionType = $objectType == 'task' ? 'task' : 'execution';
|
||||
$oldObject = $this->dao->select('*')->from($changeTable)->where('id')->eq($objectID)->fetch();
|
||||
if($objectType == 'task')
|
||||
{
|
||||
$objectData = $this->dao->select('*')->from(TABLE_TASK)->where('id')->eq($objectID)->fetch();
|
||||
$parent = $objectData->parent;
|
||||
$project = $objectData->project;
|
||||
$execution = $objectData->execution;
|
||||
$stage = $this->dao->select('*')->from(TABLE_PROJECT)->where('id')->eq($execution)->andWhere('project')->eq($project)->fetch();
|
||||
|
||||
if($parent <= 0)
|
||||
{
|
||||
$parentData = $stage;
|
||||
|
||||
$start = $parentData->begin;
|
||||
$end = $parentData->end;
|
||||
}
|
||||
else
|
||||
{
|
||||
$parentData = $this->dao->select('*')->from(TABLE_TASK)->where('id')->eq($parent)->fetch();
|
||||
|
||||
$start = helper::isZeroDate($parentData->estStarted) ? '' : $parentData->estStarted;
|
||||
$end = helper::isZeroDate($parentData->deadline) ? '' : $parentData->deadline;
|
||||
}
|
||||
|
||||
if(helper::diffDate($start, $post->startDate) > 0)
|
||||
{
|
||||
$arg = !empty($parent) ? $this->lang->task->parent : $this->lang->project->stage;
|
||||
return dao::$errors = sprintf($this->lang->task->overEsStartDate, $arg, $arg);
|
||||
}
|
||||
|
||||
if(helper::diffDate($end, $post->endDate) < 0)
|
||||
{
|
||||
$arg = !empty($parent) ? $this->lang->task->parent : $this->lang->project->stage;
|
||||
return dao::$errors = sprintf($this->lang->task->overEsEndDate, $arg, $arg);
|
||||
}
|
||||
|
||||
$this->dao->update(TABLE_TASK)
|
||||
->set('estStarted')->eq($post->startDate)
|
||||
->set('deadline')->eq($post->endDate)
|
||||
->set('lastEditedBy')->eq($this->app->user->account)
|
||||
->where('id')->eq($objectID)
|
||||
->exec();
|
||||
$this->updateTaskEsDateByGantt($objectID, $objectType, $post);
|
||||
}
|
||||
elseif($objectType == 'plan')
|
||||
{
|
||||
$objectData = $this->dao->select('*')->from(TABLE_PROJECT)->where('id')->eq($objectID)->fetch();
|
||||
$parent = $objectData->parent;
|
||||
$project = $objectData->project;
|
||||
$this->updateExecutionEsDateByGantt($objectID, $objectType, $post);
|
||||
}
|
||||
|
||||
if(dao::isError()) return false;
|
||||
|
||||
$newObject = $this->dao->select('*')->from($changeTable)->where('id')->eq($objectID)->fetch();
|
||||
$changes = common::createChanges($oldObject, $newObject);
|
||||
$actionID = $this->loadModel('action')->create($actionType, $objectID, 'edited');
|
||||
if(!empty($changes)) $this->loadModel('action')->logHistory($actionID, $changes);
|
||||
|
||||
if(empty($parent))
|
||||
{
|
||||
$parentData = $this->dao->select('*')->from(TABLE_PROJECT)->where('id')->eq($project)->fetch();
|
||||
}
|
||||
else
|
||||
{
|
||||
$parentData = $this->dao->select('*')->from(TABLE_PROJECT)->where('id')->eq($parent)->fetch();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
$start = helper::isZeroDate($parentData->begin) ? '' : $parentData->begin;
|
||||
$end = helper::isZeroDate($parentData->end) ? '' : $parentData->end;
|
||||
/**
|
||||
* Update Task estimate date by gantt.
|
||||
*
|
||||
* @param int $objectID
|
||||
* @param string $objectType
|
||||
* @param object $postData
|
||||
* @access private
|
||||
* @return bool
|
||||
*/
|
||||
private function updateTaskEsDateByGantt($objectID, $objectType, $postData)
|
||||
{
|
||||
$objectData = $this->dao->select('*')->from(TABLE_TASK)->where('id')->eq($objectID)->fetch();
|
||||
$parent = $objectData->parent;
|
||||
$project = $objectData->project;
|
||||
$execution = $objectData->execution;
|
||||
$stage = $this->dao->select('*')->from(TABLE_PROJECT)->where('id')->eq($execution)->andWhere('project')->eq($project)->fetch();
|
||||
|
||||
if(helper::diffDate($start, $post->startDate) > 0)
|
||||
{
|
||||
$arg = !empty($parent) ? $this->lang->programplan->parent : $this->lang->project->common;
|
||||
return dao::$errors = sprintf($this->lang->task->overEsStartDate, $arg, $arg);
|
||||
}
|
||||
if($parent <= 0)
|
||||
{
|
||||
$parentData = $stage;
|
||||
|
||||
if(helper::diffDate($end, $post->endDate) < 0)
|
||||
{
|
||||
$arg = !empty($parent) ? $this->lang->programplan->parent : $this->lang->project->common;
|
||||
return dao::$errors = sprintf($this->lang->task->overEsEndDate, $arg, $arg);
|
||||
}
|
||||
|
||||
$this->dao->update(TABLE_PROJECT)
|
||||
->set('begin')->eq($post->startDate)
|
||||
->set('end')->eq($post->endDate)
|
||||
->set('lastEditedBy')->eq($this->app->user->account)
|
||||
->where('id')->eq($objectID)
|
||||
->exec();
|
||||
$start = $parentData->begin;
|
||||
$end = $parentData->end;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
$parentData = $this->dao->select('*')->from(TABLE_TASK)->where('id')->eq($parent)->fetch();
|
||||
|
||||
$start = helper::isZeroDate($parentData->estStarted) ? '' : $parentData->estStarted;
|
||||
$end = helper::isZeroDate($parentData->deadline) ? '' : $parentData->deadline;
|
||||
}
|
||||
|
||||
if(helper::diffDate($start, $postData->startDate) > 0)
|
||||
{
|
||||
$arg = !empty($parent) ? $this->lang->task->parent : $this->lang->project->stage;
|
||||
return dao::$errors = sprintf($this->lang->task->overEsStartDate, $arg, $arg);
|
||||
}
|
||||
|
||||
if(helper::diffDate($end, $postData->endDate) < 0)
|
||||
{
|
||||
$arg = !empty($parent) ? $this->lang->task->parent : $this->lang->project->stage;
|
||||
return dao::$errors = sprintf($this->lang->task->overEsEndDate, $arg, $arg);
|
||||
}
|
||||
|
||||
$this->dao->update(TABLE_TASK)
|
||||
->set('estStarted')->eq($postData->startDate)
|
||||
->set('deadline')->eq($postData->endDate)
|
||||
->set('lastEditedBy')->eq($this->app->user->account)
|
||||
->where('id')->eq($objectID)
|
||||
->exec();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update Execution estimate date by gantt.
|
||||
*
|
||||
* @param int $objectID
|
||||
* @param string $objectType
|
||||
* @param object $postData
|
||||
* @access private
|
||||
* @return bool
|
||||
*/
|
||||
private function updateExecutionEsDateByGantt($objectID, $objectType, $postData)
|
||||
{
|
||||
$objectData = $this->dao->select('*')->from(TABLE_PROJECT)->where('id')->eq($objectID)->fetch();
|
||||
$parent = $objectData->parent;
|
||||
$project = $objectData->project;
|
||||
|
||||
if(empty($parent))
|
||||
{
|
||||
$parentData = $this->dao->select('*')->from(TABLE_PROJECT)->where('id')->eq($project)->fetch();
|
||||
}
|
||||
else
|
||||
{
|
||||
$parentData = $this->dao->select('*')->from(TABLE_PROJECT)->where('id')->eq($parent)->fetch();
|
||||
}
|
||||
|
||||
$start = helper::isZeroDate($parentData->begin) ? '' : $parentData->begin;
|
||||
$end = helper::isZeroDate($parentData->end) ? '' : $parentData->end;
|
||||
|
||||
if(helper::diffDate($start, $postData->startDate) > 0)
|
||||
{
|
||||
$arg = !empty($parent) ? $this->lang->programplan->parent : $this->lang->project->common;
|
||||
return dao::$errors = sprintf($this->lang->task->overEsStartDate, $arg, $arg);
|
||||
}
|
||||
|
||||
if(helper::diffDate($end, $postData->endDate) < 0)
|
||||
{
|
||||
$arg = !empty($parent) ? $this->lang->programplan->parent : $this->lang->project->common;
|
||||
return dao::$errors = sprintf($this->lang->task->overEsEndDate, $arg, $arg);
|
||||
}
|
||||
|
||||
$this->dao->update(TABLE_PROJECT)
|
||||
->set('begin')->eq($postData->startDate)
|
||||
->set('end')->eq($postData->endDate)
|
||||
->set('lastEditedBy')->eq($this->app->user->account)
|
||||
->where('id')->eq($objectID)
|
||||
->exec();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -906,83 +906,6 @@ class upgrade extends control
|
||||
echo $this->dao->select('status')->from(TABLE_PROGRAM)->where('id')->eq($programID)->fetch('status');
|
||||
}
|
||||
|
||||
/**
|
||||
* Ajax change table engine.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function ajaxChangeTableEngine()
|
||||
{
|
||||
$response = array();
|
||||
$response['result'] = 'continue';
|
||||
$response['message'] = '';
|
||||
$response['nextMessage'] = '';
|
||||
|
||||
$stmt = $this->dao->query("SHOW TABLE STATUS WHERE `Engine` is not null AND `Engine` = 'MyISAM'");
|
||||
$table = $stmt->fetch();
|
||||
if(empty($table))
|
||||
{
|
||||
$response['result'] = 'finished';
|
||||
$response['message'] = $this->lang->upgrade->finishedChange;
|
||||
return print(json_encode($response));
|
||||
}
|
||||
|
||||
$nextTable = $stmt->fetch();
|
||||
if($nextTable and stripos($nextTable->Name, 'searchindex') !== false)
|
||||
{
|
||||
$mysqlVersion = $this->loadModel('install')->getMysqlVersion();
|
||||
if($mysqlVersion < 5.6) $nextTable = $stmt->fetch();
|
||||
}
|
||||
|
||||
$tableName = $table->Name;
|
||||
|
||||
$response['table'] = $tableName;
|
||||
|
||||
/* Check process this table or not. */
|
||||
$dbProcesses = $this->dao->query("SHOW PROCESSLIST")->fetchAll();
|
||||
foreach($dbProcesses as $dbProcess)
|
||||
{
|
||||
if($dbProcess->db != $this->config->db->name) continue;
|
||||
if(strpos($dbProcess->Info, " `{$tableName}` "))
|
||||
{
|
||||
$response['message'] = sprintf($this->lang->upgrade->changingTable, $response['table']);
|
||||
return print(json_encode($response));
|
||||
}
|
||||
}
|
||||
|
||||
if($nextTable)
|
||||
{
|
||||
$response['next'] = $nextTable->Name;
|
||||
if($response['next']) $response['nextMessage'] = sprintf($this->lang->upgrade->changingTable, $response['next']);
|
||||
}
|
||||
|
||||
if(stripos($tableName, 'searchindex') !== false)
|
||||
{
|
||||
/* Change fulltext index. */
|
||||
$stmt = $this->dao->query("show index from `$tableName`");
|
||||
$indexes = array();
|
||||
while($index = $stmt->fetch())
|
||||
{
|
||||
if($index->Index_type != 'FULLTEXT') continue;
|
||||
$indexes[$index->Key_name] = $index->Key_name;
|
||||
}
|
||||
|
||||
if(!isset($indexes['title_content'])) $this->dao->exec( "ALTER TABLE `{$tableName}` ADD FULLTEXT `title_content` (`title`, `content`)");
|
||||
if(isset($indexes['title'])) $this->dao->exec( "ALTER TABLE `{$tableName}` DROP INDEX `title`");
|
||||
if(isset($indexes['content'])) $this->dao->exec( "ALTER TABLE `{$tableName}` DROP INDEX `content`");
|
||||
|
||||
$mysqlVersion = $this->loadModel('install')->getMysqlVersion();
|
||||
if($mysqlVersion < 5.6) return print(json_encode($response));
|
||||
}
|
||||
|
||||
$sql = "ALTER TABLE `$tableName` ENGINE='InnoDB'";
|
||||
$this->dao->exec($sql);
|
||||
|
||||
$response['message'] = sprintf($this->lang->upgrade->finishedTable, $tableName);
|
||||
return print(json_encode($response));
|
||||
}
|
||||
|
||||
/**
|
||||
* Move Extent files.
|
||||
*
|
||||
|
||||
@@ -51,10 +51,6 @@ $lang->upgrade->sureExecute = 'Ausführen';
|
||||
$lang->upgrade->upgradingTips = 'The upgrade is in progress, please be patient. Do not refresh the page, blackout, or turn off your computer!';
|
||||
$lang->upgrade->forbiddenExt = 'Die Erweiterung ist nicht kompatibel mit der Upgradeversion. Sie wurde deaktiviert:';
|
||||
$lang->upgrade->updateFile = 'Updateinformation wurden hinzugefügt.';
|
||||
$lang->upgrade->changeEngine = 'The database engine needs to be modified.';
|
||||
$lang->upgrade->changingTable = 'Replacing data table %s engine...';
|
||||
$lang->upgrade->finishedTable = 'The data table %s engine has been changed to InnoDB.';
|
||||
$lang->upgrade->finishedChange = 'The replacement of the database engine is completed.';
|
||||
$lang->upgrade->noticeSQL = 'Your database is inconsistent with the standard and it failed to fix it. Please run the following SQL and refresh.';
|
||||
$lang->upgrade->afterDeleted = 'File is not deleted. Please refresh after you delete it.';
|
||||
$lang->upgrade->mergeProgram = 'Data Merge';
|
||||
@@ -134,6 +130,7 @@ $lang->upgrade->mergeByProject = "Independent {$lang->projectCommon}: You ca
|
||||
$lang->upgrade->mergeByMoreLink = "{$lang->projectCommon} that relates multiple {$lang->productCommon}: You can select several {$lang->projectCommon} and merge them into one large project, or merge them independently.";
|
||||
$lang->upgrade->mergeRepoTips = "Merge the selected version library under the selected product.";
|
||||
$lang->upgrade->needBuild4Add = 'Full text retrieval has been added in this upgrad. Please create an index.';
|
||||
$lang->upgrade->needChangeEngine = 'The table engine needs to be replaced in this upgrade, Please go [Admin->System->TableEngine] page to replace engine.';
|
||||
$lang->upgrade->errorEngineInnodb = 'Your MySQL version is too low to support InnoDB data table engine. Please modify it to MyISAM and try again.';
|
||||
$lang->upgrade->duplicateProject = "Project name in the same program cannot be duplicate. Please adjust the duplicate names.";
|
||||
$lang->upgrade->upgradeTips = "Historically deleted data cannot be upgraded, and restoration is not supported after the upgrade. Please be aware.";
|
||||
|
||||
@@ -51,10 +51,6 @@ $lang->upgrade->sureExecute = 'Execute';
|
||||
$lang->upgrade->upgradingTips = 'The upgrade is in progress, please be patient. Do not refresh the page, blackout, or turn off your computer!';
|
||||
$lang->upgrade->forbiddenExt = 'The extension is incompatible with the version. It has been deactivated:';
|
||||
$lang->upgrade->updateFile = 'File information has to be updated.';
|
||||
$lang->upgrade->changeEngine = 'The database engine needs to be modified.';
|
||||
$lang->upgrade->changingTable = 'Replacing data table %s engine...';
|
||||
$lang->upgrade->finishedTable = 'The data table %s engine has been changed to InnoDB.';
|
||||
$lang->upgrade->finishedChange = 'The replacement of the database engine is completed.';
|
||||
$lang->upgrade->noticeSQL = 'Your database is inconsistent with the standard and it failed to fix it. Please run the following SQL and refresh.';
|
||||
$lang->upgrade->afterDeleted = 'Please execute commands to delete the files. Please refresh after you delete them.';
|
||||
$lang->upgrade->mergeProgram = 'Data Merge';
|
||||
@@ -134,6 +130,7 @@ $lang->upgrade->mergeByProject = "Independent {$lang->projectCommon}: You ca
|
||||
$lang->upgrade->mergeByMoreLink = "{$lang->projectCommon} that relates multiple {$lang->productCommon}: You can select several {$lang->projectCommon} and merge them into one large project, or merge them independently.";
|
||||
$lang->upgrade->mergeRepoTips = "Merge the selected version library under the selected product.";
|
||||
$lang->upgrade->needBuild4Add = 'Full text retrieval has been added in this upgrade. Need create index. Please go [Admin->System->BuildIndex] page to build index.';
|
||||
$lang->upgrade->needChangeEngine = 'The table engine needs to be replaced in this upgrade, Please go [Admin->System->TableEngine] page to replace engine.';
|
||||
$lang->upgrade->errorEngineInnodb = 'Your MySQL does not support InnoDB data table engine. Please modify it to MyISAM and try again.';
|
||||
$lang->upgrade->duplicateProject = "Project name in the same program cannot be duplicate. Please adjust the duplicate names.";
|
||||
$lang->upgrade->upgradeTips = "Historically deleted data cannot be upgraded, and restoration is not supported after the upgrade. Please be aware.";
|
||||
|
||||
@@ -51,10 +51,6 @@ $lang->upgrade->sureExecute = 'Executez';
|
||||
$lang->upgrade->upgradingTips = 'La mise à jour est en cours, veuillez être patient. Ne pas actualiser la page ou éteindre votre ordinateur!';
|
||||
$lang->upgrade->forbiddenExt = 'Cette extension est incompatible avec la version. Elle a été désactivée :';
|
||||
$lang->upgrade->updateFile = "Le fichier information a besoin d'une mise à jour.";
|
||||
$lang->upgrade->changeEngine = 'The database engine needs to be modified.';
|
||||
$lang->upgrade->changingTable = 'Replacing data table %s engine...';
|
||||
$lang->upgrade->finishedTable = 'The data table %s engine has been changed to InnoDB.';
|
||||
$lang->upgrade->finishedChange = 'The replacement of the database engine is completed.';
|
||||
$lang->upgrade->noticeSQL = 'Votre base de donnée est inconsistente avec le standard et il y a eu un échec pour la corriger. Exécutez la commande SQL suivante et rafraichissez.';
|
||||
$lang->upgrade->afterDeleted = "Le fichier n'est pas supprimé. Recommencez après l'avoir supprimé.";
|
||||
$lang->upgrade->mergeProgram = 'Data Merge';
|
||||
@@ -134,6 +130,7 @@ $lang->upgrade->mergeByProject = "Independent {$lang->projectCommon}: You ca
|
||||
$lang->upgrade->mergeByMoreLink = "{$lang->projectCommon} that relates multiple {$lang->productCommon}: You can select several {$lang->projectCommon} and merge them into one large project, or merge them independently.";
|
||||
$lang->upgrade->mergeRepoTips = "Merge the selected version library under the selected product.";
|
||||
$lang->upgrade->needBuild4Add = 'Full text retrieval has been added in this upgrade. Need create index. Please go [Admin->System->BuildIndex] page to build index.';
|
||||
$lang->upgrade->needChangeEngine = 'The table engine needs to be replaced in this upgrade, Please go [Admin->System->TableEngine] page to replace engine.';
|
||||
$lang->upgrade->errorEngineInnodb = 'Your MySQL does not support InnoDB data table engine. Please modify it to MyISAM and try again.';
|
||||
$lang->upgrade->duplicateProject = "Project name in the same program cannot be duplicate. Please adjust the duplicate names.";
|
||||
$lang->upgrade->upgradeTips = "Historically deleted data cannot be upgraded, and restoration is not supported after the upgrade. Please be aware.";
|
||||
|
||||
@@ -51,10 +51,6 @@ $lang->upgrade->sureExecute = '确认执行';
|
||||
$lang->upgrade->upgradingTips = '正在升级中,请耐心等待,切勿刷新页面、断电、关机!';
|
||||
$lang->upgrade->forbiddenExt = '以下插件与新版本不兼容,已经自动禁用:';
|
||||
$lang->upgrade->updateFile = '需要更新附件信息。';
|
||||
$lang->upgrade->changeEngine = '需要修改数据库引擎。';
|
||||
$lang->upgrade->changingTable = '正在更换数据表%s引擎...';
|
||||
$lang->upgrade->finishedTable = '已经更换数据表%s引擎为InnoDB。';
|
||||
$lang->upgrade->finishedChange = '更换数据库引擎结束。';
|
||||
$lang->upgrade->noticeSQL = '检查到你的数据库跟标准不一致,尝试修复失败。请执行以下SQL语句,再刷新页面检查。';
|
||||
$lang->upgrade->afterDeleted = '请执行上面命令删除文件, 删除后刷新!';
|
||||
$lang->upgrade->mergeProgram = '数据迁移';
|
||||
@@ -134,6 +130,7 @@ $lang->upgrade->mergeByProject = "独立的{$lang->projectCommon}:可以
|
||||
$lang->upgrade->mergeByMoreLink = "关联多个{$lang->productCommon}的{$lang->projectCommon}:选择一个或多个{$lang->projectCommon}归并到一个项目集和项目中。";
|
||||
$lang->upgrade->mergeRepoTips = "将选中的版本库归并到所选产品下。";
|
||||
$lang->upgrade->needBuild4Add = '本次升级需要创建索引。请到 [后台->系统->重建索引] 页面,重新创建索引。';
|
||||
$lang->upgrade->needChangeEngine = '本次升级需要更换表引擎, [后台->系统->表引擎] 页面更换引擎。';
|
||||
$lang->upgrade->errorEngineInnodb = '您当前的数据库不支持使用InnoDB数据表引擎,请修改为MyISAM后重试。';
|
||||
$lang->upgrade->duplicateProject = "同一个项目集内项目名称不能重复,请调整重名的项目名称";
|
||||
$lang->upgrade->upgradeTips = "历史删除数据不参与升级,升级后将不支持还原,请知悉";
|
||||
|
||||
@@ -531,7 +531,17 @@ class upgradeModel extends model
|
||||
$this->processBugLinkBug();
|
||||
break;
|
||||
case '17_4':
|
||||
$this->rebuildFULLTEXT();
|
||||
$this->updateSearchIndex();
|
||||
if(!$executedXuanxuan)
|
||||
{
|
||||
$table = $this->config->db->prefix . 'im_chat';
|
||||
$exists = $this->checkFieldsExists($table, 'adminInvite');
|
||||
if(!$exists)
|
||||
{
|
||||
$this->dbh->query("ALTER TABLE $table ADD `adminInvite` enum('0','1') NOT NULL DEFAULT '0' AFTER `mergedChats`");
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -3198,25 +3208,25 @@ class upgradeModel extends model
|
||||
{
|
||||
$fromVersion = $this->config->installedVersion;
|
||||
$needProcess = array();
|
||||
if(strpos($fromVersion, 'max') === false and strpos($fromVersion, 'biz') === false and (strpos($fromVersion, 'pro') === false ? version_compare($fromVersion, '8.3', '<') : version_compare($fromVersion, 'pro5.4', '<'))) $needProcess['updateFile'] = true;
|
||||
if(strpos($fromVersion, 'max') === false and strpos($fromVersion, 'biz') === false and (strpos($fromVersion, 'pro') === false ? version_compare($fromVersion, '8.3', '<') : version_compare($fromVersion, 'pro5.4', '<'))) $needProcess['updateFile'] = 'process';
|
||||
if(strpos($fromVersion, 'max') === false and $this->config->systemMode == 'new')
|
||||
{
|
||||
if(strpos($fromVersion, 'pro') !== false)
|
||||
{
|
||||
if(version_compare($fromVersion, 'pro10.0', '<')) $needProcess['search'] = true;
|
||||
if(version_compare($fromVersion, 'pro10.0', '<')) $needProcess['search'] = 'notice';
|
||||
}
|
||||
elseif(strpos($fromVersion, 'biz') !== false)
|
||||
{
|
||||
if(version_compare($fromVersion, 'biz5.0', '<')) $needProcess['search'] = true;
|
||||
if(version_compare($fromVersion, 'biz5.0', '<')) $needProcess['search'] = 'notice';
|
||||
}
|
||||
elseif(version_compare($fromVersion, '15.0.rc1', '<'))
|
||||
{
|
||||
$needProcess['search'] = true;
|
||||
$needProcess['search'] = 'notice';
|
||||
}
|
||||
}
|
||||
|
||||
$openVersion = $this->getOpenVersion($fromVersion);
|
||||
if(version_compare($openVersion, '17_4', '<=')) $needProcess['changeEngine'] = true;
|
||||
if(version_compare($openVersion, '17_4', '<=')) $needProcess['changeEngine'] = 'notice';
|
||||
|
||||
return $needProcess;
|
||||
}
|
||||
@@ -7036,4 +7046,47 @@ class upgradeModel extends model
|
||||
|
||||
return !dao::isError();
|
||||
}
|
||||
|
||||
/**
|
||||
* Change FULLTEXT index for searchindex table.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function rebuildFULLTEXT()
|
||||
{
|
||||
try
|
||||
{
|
||||
$table = TABLE_SEARCHINDEX;
|
||||
$stmt = $this->dao->query("show index from $table");
|
||||
$indexes = array();
|
||||
while($index = $stmt->fetch())
|
||||
{
|
||||
if($index->Index_type != 'FULLTEXT') continue;
|
||||
$indexes[$index->Key_name] = $index->Key_name;
|
||||
}
|
||||
|
||||
if(!isset($indexes['title_content'])) $this->dao->exec( "ALTER TABLE {$table} ADD FULLTEXT `title_content` (`title`, `content`)");
|
||||
if(isset($indexes['title'])) $this->dao->exec( "ALTER TABLE {$table} DROP INDEX `title`");
|
||||
if(isset($indexes['content'])) $this->dao->exec( "ALTER TABLE {$table} DROP INDEX `content`");
|
||||
}
|
||||
catch(PDOException $e){}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check whether the field exists.
|
||||
*
|
||||
* @param string $table
|
||||
* @param string $field
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
public function checkFieldsExists($table, $field)
|
||||
{
|
||||
$result = $this->dbh->query("show columns from `$table` like '$field'");
|
||||
|
||||
return $result->rowCount() > 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,10 +35,10 @@ $(function()
|
||||
finishedShow();
|
||||
})
|
||||
<?php
|
||||
foreach($needProcess as $processKey => $value)
|
||||
foreach($needProcess as $processKey => $processType)
|
||||
{
|
||||
$value = $processKey == 'search' ? 'true' : 'false';
|
||||
echo 'var ' . $processKey . "Finish = $value;\n";
|
||||
if($processType == 'notice') continue;
|
||||
echo 'var ' . $processKey . "Finish = false;\n";
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -52,9 +52,9 @@ function initHideHome()
|
||||
{
|
||||
var hide = false;
|
||||
<?php
|
||||
foreach($needProcess as $processKey => $value)
|
||||
foreach($needProcess as $processKey => $processType)
|
||||
{
|
||||
if($processKey == 'search') continue;
|
||||
if($processType == 'notice') continue;
|
||||
echo "hide = true;\n";
|
||||
break;
|
||||
}
|
||||
@@ -76,8 +76,9 @@ function finishedShow()
|
||||
{
|
||||
var show = true;
|
||||
<?php
|
||||
foreach($needProcess as $processKey => $value)
|
||||
foreach($needProcess as $processKey => $processType)
|
||||
{
|
||||
if($processType == 'notice') continue;
|
||||
echo "if({$processKey}Finish == false) show = false;\n";
|
||||
}
|
||||
?>
|
||||
@@ -91,45 +92,8 @@ function finishedShow()
|
||||
<?php if(isset($needProcess['changeEngine'])):?>
|
||||
$(function()
|
||||
{
|
||||
$('.col-md-6:first').append("<div id='changeEngineBox' class='alert alert-info'><p><?php echo $lang->upgrade->changeEngine;?></p><div class='info'></div></div>");
|
||||
changeEngine();
|
||||
$('.col-md-6:first').append("<div class='alert alert-info'><p><?php echo $lang->upgrade->needChangeEngine;?></p></div>");
|
||||
})
|
||||
function changeEngine()
|
||||
{
|
||||
var link = '<?php echo inlink('ajaxChangeTableEngine')?>';
|
||||
var $infoBox = $('#changeEngineBox .info');
|
||||
$.ajax(
|
||||
{
|
||||
type: "GET",
|
||||
url: link,
|
||||
success: function(response)
|
||||
{
|
||||
response = JSON.parse(response);
|
||||
if(response == null)
|
||||
{
|
||||
changeEngineFinish = true;
|
||||
finishedShow();
|
||||
}
|
||||
else if(response.result == 'finished')
|
||||
{
|
||||
changeEngineFinish = true;
|
||||
$infoBox.prepend("<div class='text-success'>" + response.message + "</div>");
|
||||
finishedShow();
|
||||
}
|
||||
else
|
||||
{
|
||||
if($infoBox.find('.' + response.table).length == 0) $infoBox.prepend("<div class='text-success " + response.table + "'></div>");
|
||||
$infoBox.find('.' + response.table).html(response.message);
|
||||
if(response.next) $infoBox.prepend("<div class='text-success " + response.next + "'>" + response.nextMessage + "</div>");
|
||||
changeEngine();
|
||||
}
|
||||
},
|
||||
error: function()
|
||||
{
|
||||
changeEngine();
|
||||
}
|
||||
})
|
||||
}
|
||||
<?php endif;?>
|
||||
<?php if(isset($needProcess['updateFile'])):?>
|
||||
$(function()
|
||||
|
||||
@@ -796,6 +796,7 @@ class userModel extends model
|
||||
}
|
||||
|
||||
$this->dao->update(TABLE_USER)->data($user)->autoCheck()->where('id')->eq((int)$userID)->exec();
|
||||
$_SESSION['user']->password = $user->password;
|
||||
$this->app->user->password = $user->password;
|
||||
$this->app->user->modifyPassword = false;
|
||||
if(!dao::isError())
|
||||
|
||||
@@ -7,28 +7,11 @@ class caselibTest
|
||||
$this->objectModel = $tester->loadModel('caselib');
|
||||
}
|
||||
|
||||
/**
|
||||
* Set lib menu test.
|
||||
*
|
||||
* @param mixed $libraries
|
||||
* @param mixed $libID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function setLibMenuTest($libraries, $libID)
|
||||
{
|
||||
$objects = $this->objectModel->setLibMenu($libraries, $libID);
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
|
||||
return $objects;
|
||||
}
|
||||
|
||||
/**
|
||||
* Save lib state test.
|
||||
*
|
||||
* @param int $libID
|
||||
* @param array $libraries
|
||||
*
|
||||
* @param int $libID
|
||||
* @param array $libraries
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -43,9 +26,9 @@ class caselibTest
|
||||
|
||||
/**
|
||||
* Get by ID test.
|
||||
*
|
||||
* @param mixed $libID
|
||||
* @param mixed $setImgSize
|
||||
*
|
||||
* @param mixed $libID
|
||||
* @param mixed $setImgSize
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -60,8 +43,8 @@ class caselibTest
|
||||
|
||||
/**
|
||||
* Update test.
|
||||
*
|
||||
* @param mixed $libID
|
||||
*
|
||||
* @param mixed $libID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -78,9 +61,9 @@ class caselibTest
|
||||
|
||||
/**
|
||||
* Delete test.
|
||||
*
|
||||
* @param mixed $libID
|
||||
* @param string $table
|
||||
*
|
||||
* @param mixed $libID
|
||||
* @param string $table
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -97,7 +80,7 @@ class caselibTest
|
||||
|
||||
/**
|
||||
* Get libraries test.
|
||||
*
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -112,9 +95,9 @@ class caselibTest
|
||||
|
||||
/**
|
||||
* Get list test.
|
||||
*
|
||||
* @param string $orderBy
|
||||
* @param mixed $pager
|
||||
*
|
||||
* @param string $orderBy
|
||||
* @param mixed $pager
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -129,8 +112,8 @@ class caselibTest
|
||||
|
||||
/**
|
||||
* Create test.
|
||||
*
|
||||
* @param mixed $param
|
||||
*
|
||||
* @param mixed $param
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -149,13 +132,13 @@ class caselibTest
|
||||
|
||||
/**
|
||||
* Get libcases test.
|
||||
*
|
||||
* @param mixed $libID
|
||||
* @param mixed $browseType
|
||||
* @param int $queryID
|
||||
* @param int $moduleID
|
||||
* @param string $sort
|
||||
* @param mixed $pager
|
||||
*
|
||||
* @param mixed $libID
|
||||
* @param mixed $browseType
|
||||
* @param int $queryID
|
||||
* @param int $moduleID
|
||||
* @param string $sort
|
||||
* @param mixed $pager
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -168,47 +151,10 @@ class caselibTest
|
||||
return $objects;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build searchform test.
|
||||
*
|
||||
* @param mixed $libID
|
||||
* @param mixed $libraries
|
||||
* @param mixed $queryID
|
||||
* @param mixed $actionURL
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function buildSearchFormTest($libID, $libraries, $queryID, $actionURL)
|
||||
{
|
||||
$objects = $this->objectModel->buildSearchForm($libID, $libraries, $queryID, $actionURL);
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
|
||||
return $objects;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get liblink test.
|
||||
*
|
||||
* @param mixed $module
|
||||
* @param mixed $method
|
||||
* @param mixed $extra
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function getLibLinkTest($module, $method, $extra)
|
||||
{
|
||||
$objects = $this->objectModel->getLibLink($module, $method, $extra);
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
|
||||
return $objects;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create from import test.
|
||||
*
|
||||
* @param mixed $libID
|
||||
*
|
||||
* @param mixed $libID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -223,8 +169,8 @@ class caselibTest
|
||||
|
||||
/**
|
||||
* Batch create case test.
|
||||
*
|
||||
* @param mixed $libID
|
||||
*
|
||||
* @param mixed $libID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
|
||||
@@ -34,7 +34,7 @@ $total = $tester->dao->select('count(*) total')->from(TABLE_CASE)->where( 'lib')
|
||||
$cases = $tester->dao->select('*')->from(TABLE_CASE)->where( 'lib')->eq(201)->fetchAll('id');
|
||||
|
||||
r($total) && p() && e('12'); // 添加两条数据之后查询数据条数是否正确
|
||||
r($cases) && p('411:title,type') && e('测试导入添加1,performance'); // 添加数据之后查询新加用例的名称,用例类型
|
||||
r($cases) && p('412:title,type') && e('测试导入添加2,unit'); // 添加数据之后查询新加用例的名称,用例类型
|
||||
r($cases) && p('561:title,type') && e('测试导入添加1,performance'); // 添加数据之后查询新加用例的名称,用例类型
|
||||
r($cases) && p('562:title,type') && e('测试导入添加2,unit'); // 添加数据之后查询新加用例的名称,用例类型
|
||||
|
||||
$db->restoreDB();
|
||||
$db->restoreDB();
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/caselib.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=测试 caselibModel->buildSearchForm();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
测试设置的url参数 >> model/caselib/buildsearchform.php?m=caselib&f=browse&t=&libID=201&browseType=bySearch&queryID=myQueryID
|
||||
测试设置的queryID值是否正确 >> 10
|
||||
|
||||
*/
|
||||
|
||||
$caselib = new caselibTest();
|
||||
$libID = 201;
|
||||
$queryID = 10;
|
||||
$actionURL = helper::createLink('caselib', 'browse', "libID=$libID&browseType=bySearch&queryID=myQueryID");
|
||||
$libs = $tester->loadModel('caselib')->getLibraries();
|
||||
|
||||
$caselib->buildSearchFormTest($libID, $libs, $queryID, $actionURL);
|
||||
$search = $tester->config->testcase->search;
|
||||
|
||||
r($search) && p('actionURL') && e('model/caselib/buildsearchform.php?m=caselib&f=browse&t=&libID=201&browseType=bySearch&queryID=myQueryID'); //测试设置的url参数
|
||||
r($search) && p('queryID') && e('10'); //测试设置的queryID值是否正确
|
||||
@@ -26,8 +26,10 @@ $_POST = array(
|
||||
'type' => array(2 => 'performance', 3 => 'unit'),
|
||||
'stage' => array(2 => array(), 3 => array()),
|
||||
'keywords' => array(2 => 'keywords1', 3 => 'keywords2'),
|
||||
'status' => array(2 => '', 3 => ''),
|
||||
'desc' => array(2 => array(), 3 => array()),
|
||||
'precondition' => array(2 => '', 3 => ''),
|
||||
'isEndPage' => 1,
|
||||
'isEndPage' => 0,
|
||||
'pagerID' => 1
|
||||
);
|
||||
|
||||
@@ -37,7 +39,7 @@ $total = $tester->dao->select('count(*) total')->from(TABLE_CASE)->where( 'lib')
|
||||
$cases = $tester->dao->select('*')->from(TABLE_CASE)->where( 'lib')->eq(201)->fetchAll('id');
|
||||
|
||||
r($total) && p() && e('12'); //添加两条数据之后查询数据条数是否正确
|
||||
r($cases) && p('411:title,keywords') && e('测试导入添加1,keywords1'); //添加数据之后查询新加用例的名称,关键字
|
||||
r($cases) && p('412:title,keywords') && e('测试导入添加2,keywords2'); //添加数据之后查询新加用例的名称,关键字
|
||||
r($cases) && p('561:title,keywords') && e('测试导入添加1,keywords1'); //添加数据之后查询新加用例的名称,关键字
|
||||
r($cases) && p('562:title,keywords') && e('测试导入添加2,keywords2'); //添加数据之后查询新加用例的名称,关键字
|
||||
|
||||
$db->restoreDB();
|
||||
$db->restoreDB();
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/caselib.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=测试 caselibModel->getLibLink();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
测试参数情况1返回值 >> model/caselib/getliblink.php?m=caselib&f=browse&t=&libID=%s
|
||||
测试参数情况2返回值 >> model/caselib/getliblink.php?m=caselib&f=test&t=&libID=%s
|
||||
测试参数情况3返回值 >> model/caselib/getliblink.php?m=tree&f=&t=&libID=%s&type=caselib¤tModuleID=0
|
||||
测试参数情况4返回值 >> model/caselib/getliblink.php?m=caselib&f=browse&t=&libID=%s
|
||||
|
||||
*/
|
||||
|
||||
$caselib = new caselibTest();
|
||||
$link1 = $caselib->getLibLinkTest('caselib', 'create', '');
|
||||
$link2 = $caselib->getLibLinkTest('caselib', 'test', '');
|
||||
$link3 = $caselib->getLibLinkTest('tree', '', '');
|
||||
$link4 = $caselib->getLibLinkTest('', '', '');
|
||||
|
||||
r($link1) && p() && e('model/caselib/getliblink.php?m=caselib&f=browse&t=&libID=%s'); // 测试参数情况1返回值
|
||||
r($link2) && p() && e('model/caselib/getliblink.php?m=caselib&f=test&t=&libID=%s'); // 测试参数情况2返回值
|
||||
r($link3) && p() && e('model/caselib/getliblink.php?m=tree&f=&t=&libID=%s&type=caselib¤tModuleID=0'); // 测试参数情况3返回值
|
||||
r($link4) && p() && e('model/caselib/getliblink.php?m=caselib&f=browse&t=&libID=%s'); // 测试参数情况4返回值
|
||||
@@ -1,25 +0,0 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/caselib.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=测试 caselibModel->setLibMenu();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
修改下拉菜单之后返回值 >> 1
|
||||
|
||||
*/
|
||||
|
||||
$caselib = new caselibTest();
|
||||
$libs = $tester->loadModel('caselib')->getLibraries();
|
||||
$config->webRoot = 'model/caselib/';//ztest运行时候获取的不一致
|
||||
$info = $caselib->setLibMenuTest($libs, 201);
|
||||
|
||||
$menuStr = <<<EOT
|
||||
<div class='btn-group header-btn' id='swapper'><button data-toggle='dropdown' type='button' class='btn' id='currentItem' title='这是测试套件名称201'><span class='text'>这是测试套件名称201</span> <span class='caret' style='margin-top: 3px'></span></button><div id='dropMenu' class='dropdown-menu search-list' data-ride='searchList' data-url='model/caselib/setlibmenu.php?m=caselib&f=ajaxGetDropMenu&t=&objectID=201&module=caselib&method=browse'><div class="input-control search-box has-icon-left has-icon-right search-example"><input type="search" class="form-control search-input" /><label class="input-control-icon-left search-icon"><i class="icon icon-search"></i></label><a class="input-control-icon-right search-clear-btn"><i class="icon icon-close icon-sm"></i></a></div></div></div>
|
||||
EOT;
|
||||
r($tester->lang->switcherMenu == trim($menuStr)) && p() && e('1'); //修改下拉菜单之后返回值
|
||||
Reference in New Issue
Block a user