* Compatible with php5.3.
This commit is contained in:
@@ -1595,7 +1595,7 @@ class bugModel extends model
|
||||
if($day == $days -1) $startDate = date('Y-m-d', $time) . ' 00:00:00';
|
||||
}
|
||||
|
||||
$dateFields = ['openedDate', 'resolvedDate', 'closedDate'];
|
||||
$dateFields = array('openedDate', 'resolvedDate', 'closedDate');
|
||||
$staticData = array();
|
||||
foreach($dateFields as $field)
|
||||
{
|
||||
|
||||
@@ -1038,7 +1038,8 @@ class commonModel extends model
|
||||
{
|
||||
foreach($lang->my->$moduleLinkList as $key => $linkList)
|
||||
{
|
||||
$method = explode('-', $key)[1];
|
||||
$moduleMethodList = explode('-', $key);
|
||||
$method = $moduleMethodList[1];
|
||||
if(common::hasPriv($currentModule, $method))
|
||||
{
|
||||
$display = true;
|
||||
|
||||
@@ -195,7 +195,11 @@ class projectrelease extends control
|
||||
|
||||
/* Get release and build. */
|
||||
$release = $this->projectrelease->getById((int)$releaseID);
|
||||
if(!$this->session->project) $this->session->set('project', explode(',', $release->project)[0], 'project');
|
||||
if(!$this->session->project)
|
||||
{
|
||||
$releaseProject = explode(',', $release->project);
|
||||
$this->session->set('project', $releaseProject[0], 'project');
|
||||
}
|
||||
|
||||
$this->commonAction($this->session->project, $release->product, $release->branch);
|
||||
$bindBuilds = $this->build->getByList($release->build);
|
||||
@@ -554,7 +558,11 @@ class projectrelease extends control
|
||||
$this->session->set('storyList', inlink('view', "releaseID=$releaseID&type=story&link=true¶m=" . helper::safe64Encode("&browseType=$browseType&queryID=$param")), $this->app->tab);
|
||||
|
||||
$release = $this->projectrelease->getByID($releaseID);
|
||||
if(!$this->session->project) $this->session->set('project', explode(',', $release->project)[0], 'project');
|
||||
if(!$this->session->project)
|
||||
{
|
||||
$releaseProject = explode(',', $release->project);
|
||||
$this->session->set('project', $releaseProject[0], 'project');
|
||||
}
|
||||
|
||||
$builds = $this->loadModel('build')->getByList($release->build);
|
||||
$project = $this->loadModel('project')->getByID($this->session->project);
|
||||
@@ -690,7 +698,11 @@ class projectrelease extends control
|
||||
$this->session->set('bugList', inlink('view', "releaseID=$releaseID&type=$type&link=true¶m=" . helper::safe64Encode("&browseType=$browseType&queryID=$param")), 'qa');
|
||||
/* Set menu. */
|
||||
$release = $this->projectrelease->getByID($releaseID);
|
||||
if(!$this->session->project) $this->session->set('project', explode(',', $release->project)[0], 'project');
|
||||
if(!$this->session->project)
|
||||
{
|
||||
$releaseProject = explode(',', $release->project);
|
||||
$this->session->set('project', $releaseProject[0], 'project');
|
||||
}
|
||||
|
||||
$builds = $this->loadModel('build')->getByList($release->build);
|
||||
$project = $this->loadModel('project')->getByID($this->session->project);
|
||||
|
||||
@@ -3643,6 +3643,7 @@ class taskModel extends model
|
||||
if(!empty($task->team))
|
||||
{
|
||||
global $app;
|
||||
$myself = new self();
|
||||
if($task->mode == 'linear')
|
||||
{
|
||||
if($action == 'assignto' and strpos('done,cencel,closed', $task->status) === false) return false;
|
||||
@@ -3650,14 +3651,14 @@ class taskModel extends model
|
||||
{
|
||||
if($task->assignedTo != $app->user->account) return false;
|
||||
|
||||
$currentTeam = (new self())->getTeamByAccount($task->team, $app->user->account);
|
||||
$currentTeam = $myself->getTeamByAccount($task->team, $app->user->account);
|
||||
if($currentTeam and $currentTeam->status == 'wait') return true;
|
||||
}
|
||||
if($action == 'finish' and $task->assignedTo != $app->user->account) return false;
|
||||
}
|
||||
elseif($task->mode == 'multi')
|
||||
{
|
||||
$currentTeam = (new self())->getTeamByAccount($task->team, $app->user->account);
|
||||
$currentTeam = $myself->getTeamByAccount($task->team, $app->user->account);
|
||||
if($action == 'start' and strpos('wait,doing', $task->status) !== false and $currentTeam and $currentTeam->status == 'wait') return true;
|
||||
if($action == 'finish' and (empty($currentTeam) or $currentTeam->status == 'done')) return false;
|
||||
}
|
||||
|
||||
@@ -1840,7 +1840,8 @@ class testcaseModel extends model
|
||||
}
|
||||
else
|
||||
{
|
||||
$libCaseID = array_keys($libCases[$caseID])[0];
|
||||
$libCaseList = array_keys($libCases[$caseID]);
|
||||
$libCaseID = $libCaseList[0];
|
||||
|
||||
$libCase->lastEditedBy = $this->app->user->account;
|
||||
$libCase->lastEditedDate = helper::now();
|
||||
|
||||
@@ -6332,7 +6332,8 @@ class upgradeModel extends model
|
||||
{
|
||||
$dirPath = dirname($filePath);
|
||||
$dir = str_replace($this->app->appRoot . 'extension' . DS . 'custom' .DS , '', $dirPath);
|
||||
$moduleName = explode(DS, $dir)[0];
|
||||
$dirList = explode(DS, $dir);
|
||||
$moduleName = $dirList[0];
|
||||
|
||||
$content = str_replace("include '../../control.php';", "helper::importControl('$moduleName');", $content);
|
||||
$content = str_replace("helper::import('../../control.php');", "helper::importControl('$moduleName');", $content);
|
||||
|
||||
@@ -10,7 +10,7 @@ $config->zahost->edit->requiredFields = 'name,hostType,cpuCores,memory,diskSize,
|
||||
|
||||
$config->zahost->imageListUrl = 'https://pkg.qucheng.com/zenagent/list.json';
|
||||
|
||||
$config->zahost->cpuCoreList = [1 => 1, 2 => 2, 4 => 4, 6 => 6, 8 => 8, 10 => 10, 12 => 12, 16 => 16, 24 => 24, 32 => 32, 64 => 64];
|
||||
$config->zahost->cpuCoreList = array(1 => 1, 2 => 2, 4 => 4, 6 => 6, 8 => 8, 10 => 10, 12 => 12, 16 => 16, 24 => 24, 32 => 32, 64 => 64);
|
||||
|
||||
$config->zahost->initBash = 'curl -sSL https://pkg.qucheng.com/zenagent/zagent.sh | bash /dev/stdin -k %s -z %s';
|
||||
|
||||
|
||||
@@ -59,12 +59,12 @@ $lang->zahost->init->next = "Next";
|
||||
$lang->zahost->init->initFailNotice = "Fail,Execute the installation service command on the host or <a href='https://github.com/easysoft/zenagent/' target='_blank'>See Help</a>.";
|
||||
$lang->zahost->init->initSuccessNotice = "Succeed,%s and %s。";
|
||||
|
||||
$lang->zahost->init->serviceStatus = [
|
||||
$lang->zahost->init->serviceStatus = array(
|
||||
"kvm" => 'not_install',
|
||||
"nginx" => 'not_install',
|
||||
"novnc" => 'not_install',
|
||||
"websockify" => 'not_install',
|
||||
];
|
||||
);
|
||||
$lang->zahost->init->title = "Initialize Host";
|
||||
$lang->zahost->init->descTitle = "Follow these steps to complete the initialization on the host:";
|
||||
$lang->zahost->init->initDesc = "Execute the init script on the host: %s %s <br>- Click check service status button.";
|
||||
|
||||
@@ -59,12 +59,12 @@ $lang->zahost->init->next = "Next";
|
||||
$lang->zahost->init->initFailNotice = "Fail,Execute the installation service command on the host or <a href='https://github.com/easysoft/zenagent/' target='_blank'>See Help</a>.";
|
||||
$lang->zahost->init->initSuccessNotice = "Succeed,%s and %s。";
|
||||
|
||||
$lang->zahost->init->serviceStatus = [
|
||||
$lang->zahost->init->serviceStatus = array(
|
||||
"kvm" => 'not_install',
|
||||
"nginx" => 'not_install',
|
||||
"novnc" => 'not_install',
|
||||
"websockify" => 'not_install',
|
||||
];
|
||||
);
|
||||
$lang->zahost->init->title = "Initialize Host";
|
||||
$lang->zahost->init->descTitle = "Follow these steps to complete the initialization on the host:";
|
||||
$lang->zahost->init->initDesc = "Execute the init script on the host: %s %s <br>- Click check service status button.";
|
||||
|
||||
@@ -59,12 +59,12 @@ $lang->zahost->init->next = "Next";
|
||||
$lang->zahost->init->initFailNotice = "Fail,Execute the installation service command on the host or <a href='https://github.com/easysoft/zenagent/' target='_blank'>See Help</a>.";
|
||||
$lang->zahost->init->initSuccessNotice = "Succeed,%s and %s。";
|
||||
|
||||
$lang->zahost->init->serviceStatus = [
|
||||
$lang->zahost->init->serviceStatus = array(
|
||||
"kvm" => 'not_install',
|
||||
"nginx" => 'not_install',
|
||||
"novnc" => 'not_install',
|
||||
"websockify" => 'not_install',
|
||||
];
|
||||
);
|
||||
$lang->zahost->init->title = "Initialize Host";
|
||||
$lang->zahost->init->descTitle = "Follow these steps to complete the initialization on the host:";
|
||||
$lang->zahost->init->initDesc = "Execute the init script on the host: %s %s <br>- Click check service status button.";
|
||||
|
||||
@@ -59,12 +59,12 @@ $lang->zahost->init->next = "下一步";
|
||||
$lang->zahost->init->initFailNotice = "服务未就绪,在宿主机上执行安装服务命令或<a href='https://github.com/easysoft/zenagent/' target='_blank'>查看帮助</a>.";
|
||||
$lang->zahost->init->initSuccessNotice = "服务已就绪,您可以在%s后%s。";
|
||||
|
||||
$lang->zahost->init->serviceStatus = [
|
||||
$lang->zahost->init->serviceStatus = array(
|
||||
"kvm" => 'not_install',
|
||||
"nginx" => 'not_install',
|
||||
"novnc" => 'not_install',
|
||||
"websockify" => 'not_install',
|
||||
];
|
||||
);
|
||||
$lang->zahost->init->title = "初始化宿主机";
|
||||
$lang->zahost->init->descTitle = "请根据引导完成宿主机上的初始化: ";
|
||||
$lang->zahost->init->initDesc = "- 在宿主机上执行命令:%s %s <br>- 点击检测服务状态。";
|
||||
|
||||
@@ -138,10 +138,10 @@ $lang->zanode->init->initSuccessNoticeTitle = "The service is ready, and it take
|
||||
$lang->zanode->init->initFailNoticeTitle = "Initialization failed, check the init script execution log and try the following two solutions:";
|
||||
$lang->zanode->init->initFailNoticeDesc = "1. Re-execute the script <br/>2. Review the initialization FAQ";
|
||||
|
||||
$lang->zanode->init->serviceStatus = [
|
||||
$lang->zanode->init->serviceStatus = array(
|
||||
"ZenAgent" => 'not_install',
|
||||
"ZTF" => 'not_install',
|
||||
];
|
||||
);
|
||||
$lang->zanode->init->title = "Initialize Node";
|
||||
$lang->zanode->init->descTitle = "Follow these steps to complete the initialization on the node:";
|
||||
$lang->zanode->init->initDesc = "Execute the init script on the node: %s %s <br>- Click check service status button.";
|
||||
|
||||
@@ -142,10 +142,10 @@ $lang->zanode->init->initSuccessNoticeTitle = "The service is ready, and it take
|
||||
$lang->zanode->init->initFailNoticeTitle = "Initialization failed, check the init script execution log and try the following two solutions:";
|
||||
$lang->zanode->init->initFailNoticeDesc = "1. Re-execute the script <br/>2. Review the initialization FAQ";
|
||||
|
||||
$lang->zanode->init->serviceStatus = [
|
||||
$lang->zanode->init->serviceStatus = array(
|
||||
"ZenAgent" => 'not_install',
|
||||
"ZTF" => 'not_install',
|
||||
];
|
||||
);
|
||||
$lang->zanode->init->title = "Initialize Node";
|
||||
$lang->zanode->init->descTitle = "Follow these steps to complete the initialization on the node:";
|
||||
$lang->zanode->init->initDesc = "Execute the init script on the node: %s %s <br>- Click check service status button.";
|
||||
|
||||
@@ -138,10 +138,10 @@ $lang->zanode->init->initSuccessNoticeTitle = "The service is ready, and it take
|
||||
$lang->zanode->init->initFailNoticeTitle = "Initialization failed, check the init script execution log and try the following two solutions:";
|
||||
$lang->zanode->init->initFailNoticeDesc = "1. Re-execute the script <br/>2. Review the initialization FAQ";
|
||||
|
||||
$lang->zanode->init->serviceStatus = [
|
||||
$lang->zanode->init->serviceStatus = array(
|
||||
"ZenAgent" => 'not_install',
|
||||
"ZTF" => 'not_install',
|
||||
];
|
||||
);
|
||||
$lang->zanode->init->title = "Initialize Node";
|
||||
$lang->zanode->init->descTitle = "Follow these steps to complete the initialization on the node:";
|
||||
$lang->zanode->init->initDesc = "Execute the init script on the node: %s %s <br>- Click check service status button.";
|
||||
|
||||
@@ -143,10 +143,10 @@ $lang->zanode->init->initSuccessNoticeTitle = "服务已就绪,还需两步即
|
||||
$lang->zanode->init->initFailNoticeTitle = "初始化失败,请查看初始化脚本执行日志并尝试以下两种解决方案:";
|
||||
$lang->zanode->init->initFailNoticeDesc = "1、 重新执行脚本 <br/>2、 查看初始化常见问题";
|
||||
|
||||
$lang->zanode->init->serviceStatus = [
|
||||
$lang->zanode->init->serviceStatus = array(
|
||||
"ZenAgent" => 'not_install',
|
||||
"ZTF" => 'not_install',
|
||||
];
|
||||
);
|
||||
$lang->zanode->init->title = "初始化执行节点";
|
||||
$lang->zanode->init->descTitle = "请根据引导完成执行节点上的初始化: ";
|
||||
$lang->zanode->init->initDesc = "- 在执行节点上执行命令:%s %s <br>- 点击检测服务状态。";$lang->zanode->init->statusTitle = "服务状态";
|
||||
|
||||
Reference in New Issue
Block a user