Merge branch '15.0.beta3' of https://gitlab.zcorp.cc/easycorp/zentaopms into 15.0.beta3
This commit is contained in:
@@ -117,7 +117,7 @@
|
||||
</tr>
|
||||
<?php if($product->type != 'normal'):?>
|
||||
<tr>
|
||||
<th><?php echo sprintf($lang->product->branch, $lang->product->branchName[$product->name]);?></th>
|
||||
<th><?php echo sprintf($lang->product->branch, $lang->product->branchName[$product->type]);?></th>
|
||||
<td><?php if(!common::printLink('bug', 'browse', "productID=$bug->product&branch=$bug->branch", $branchName)) echo $branchName;?></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
<div class='btn-group'>
|
||||
<button type='button' class='btn dropdown-toggle' data-toggle='dropdown' title="<?php echo $this->lang->more;?>"><i class='icon-more-alt'></i></button>
|
||||
<ul class='dropdown-menu pull-right text-center' role='menu'>
|
||||
<?php common::printIcon('project', 'manageProducts', "projectID=$project->id&projectID=$project->parent", $project, 'list', 'link', '', '', false, "data-group='project'", '', $project->id);?>
|
||||
<?php common::printIcon('project', 'manageProducts', "projectID=$project->id&programID=$project->parent", $project, 'list', 'link', '', '', false, "data-group='project'", '', $project->id);?>
|
||||
<?php common::printIcon('project', 'whitelist', "projectID=$project->id&projectID=$project->parent&module=project", $project, 'list', 'shield-check', '', '', false, "data-group='project'", '', $project->id);?>
|
||||
<?php if(common::hasPriv('project','delete')) echo html::a($this->createLink("project", "delete", "projectID=$project->id"), "<i class='icon-trash'></i>", 'hiddenwin', "class='btn' title='{$this->lang->project->delete}' data-group='my'");?>
|
||||
</ul>
|
||||
|
||||
@@ -1575,6 +1575,10 @@ class productModel extends model
|
||||
{
|
||||
$link = helper::createLink($module, 'report', "productID=%s" . ($branch ? "&branch=%s" : '&branch=0') . "&extra=$extra");
|
||||
}
|
||||
elseif($module == 'testtask')
|
||||
{
|
||||
$link = helper::createLink($module, 'browse', "productID=%s" . ($branch ? "&branch=%s" : '&branch=0') . "&extra=$extra");
|
||||
}
|
||||
elseif($module == 'bug' && $method == 'view')
|
||||
{
|
||||
$link = helper::createLink('bug', 'browse', "productID=%s" . ($branch ? "&branch=%s" : '&branch=0') . "&extra=$extra");
|
||||
|
||||
@@ -237,6 +237,7 @@ class repoModel extends model
|
||||
$data = fixer::input('post')
|
||||
->setIf($this->post->SCM == 'Gitlab', 'password', $this->post->gitlabToken)
|
||||
->setIf($this->post->SCM == 'Gitlab', 'client', $this->post->gitlabHost)
|
||||
->setIf($this->post->SCM == 'Gitlab', 'extra', $this->post->gitlabProject)
|
||||
->skipSpecial('path,client,account,password')
|
||||
->setDefault('product', '')
|
||||
->join('product', ',')
|
||||
|
||||
@@ -20,7 +20,7 @@ if(isset($entry)) $pathInfo .= '&type=file';
|
||||
<tr>
|
||||
<th class='w-40px'></th>
|
||||
<th class='w-80px'><?php echo $lang->repo->revisionA?></th>
|
||||
<?php if($repo->SCM == 'Git'):?>
|
||||
<?php if($repo->SCM != 'Subversion'):?>
|
||||
<th class='w-70px'><?php echo $lang->repo->commit?></th>
|
||||
<?php endif;?>
|
||||
<th class='w-80px'><?php echo $lang->repo->time?></th>
|
||||
@@ -37,8 +37,8 @@ if(isset($entry)) $pathInfo .= '&type=file';
|
||||
<label></label>
|
||||
</div>
|
||||
</td>
|
||||
<td class='versions'><span class="revision"><?php echo html::a($this->repo->createLink('revision', "repoID=$repoID&objectID=$objectID&revision={$log->revision}" . $pathInfo), $repo->SCM == 'Git' ? substr($log->revision, 0, 10) : $log->revision, '', "data-app='{$this->app->openApp}'");?></span></td>
|
||||
<?php if($repo->SCM == 'Git'):?>
|
||||
<td class='versions'><span class="revision"><?php echo html::a($this->repo->createLink('revision', "repoID=$repoID&objectID=$objectID&revision={$log->revision}" . $pathInfo), $repo->SCM != 'Subversion' ? substr($log->revision, 0, 10) : $log->revision, '', "data-app='{$this->app->openApp}'");?></span></td>
|
||||
<?php if($repo->SCM != 'Subversion'):?>
|
||||
<td><?php echo $log->commit?></td>
|
||||
<?php endif;?>
|
||||
<td><?php echo substr($log->time, 0, 10);?></td>
|
||||
|
||||
@@ -69,7 +69,7 @@ css::import($jsRoot . 'misc/highlight/styles/github.css');
|
||||
<thead>
|
||||
<tr>
|
||||
<td class='w-70px'><?php echo $lang->repo->revision?></td>
|
||||
<?php if($repo->SCM == 'Git'):?>
|
||||
<?php if($repo->SCM != 'Subversion'):?>
|
||||
<td class='w-50px'><?php echo $lang->repo->commit?></td>
|
||||
<?php endif;?>
|
||||
<td class='w-100px'><?php echo $lang->repo->committer?></td>
|
||||
@@ -85,9 +85,9 @@ css::import($jsRoot . 'misc/highlight/styles/github.css');
|
||||
{
|
||||
$rowspan = $blame['lines'];
|
||||
echo '<td rowspan="' . $rowspan . '" class="info" title="' . $blame['revision'] . '">';
|
||||
echo $repo->SCM == 'Git' ? substr($blame['revision'], 0, 10) : $blame['revision'];
|
||||
echo $repo->SCM != 'Subversion' ? substr($blame['revision'], 0, 10) : $blame['revision'];
|
||||
echo '</td>';
|
||||
if($repo->SCM == 'Git') echo '<td rowspan="' . $rowspan . '" class="info">' . zget($historys, $blame['revision'], '') . '</td>';
|
||||
if($repo->SCM != 'Subversion') echo '<td rowspan="' . $rowspan . '" class="info">' . zget($historys, $blame['revision'], '') . '</td>';
|
||||
echo '<td rowspan="' . $rowspan . '" class="info">' . $blame['committer'] . '</td>';
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
echo html::a($link, $info->name, '', "title='{$info->name}' data-app={$app->openApp}");
|
||||
?>
|
||||
</td>
|
||||
<td align='center'><?php echo $repo->SCM == 'Git' ? substr($info->revision, 0, 10) : $info->revision;?></td>
|
||||
<td align='center'><?php echo $repo->SCM == 'Subversion' ? $info->revision : substr($info->revision, 0, 10);?></td>
|
||||
<td><?php echo substr($info->date, 0, 10)?></td>
|
||||
<td><?php echo $info->committer?></td>
|
||||
<?php $comment = htmlspecialchars($info->comment, ENT_QUOTES);?>
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
echo '/' . ' ' . html::a($this->repo->createLink('browse', "repoID=$repoID&branchID=$branchID&objectID=$objectID&path=" . $this->repo->encodePath($postPath)), trim($pathName, '/'), '', "data-app='{$app->openApp}'");
|
||||
}
|
||||
echo '/' . ' ' . $fileName;
|
||||
if(strpos($repo->SCM, 'Git') !== false)
|
||||
if(strpos($repo->SCM, 'Subversion') === false)
|
||||
{
|
||||
$oldRevision = $oldRevision == '^' ? "$newRevision" : $oldRevision;
|
||||
echo " <span class='label label-info'>" . substr($oldRevision, 0, 10) . " : " . substr($newRevision, 0, 10) . ' (' . $historys[$oldRevision] . ' : ' . $historys[$newRevision] . ')</span>';
|
||||
@@ -155,7 +155,7 @@
|
||||
</div>
|
||||
<div class='revisions hidden'>
|
||||
<?php
|
||||
if(strpos($repo->SCM, 'Git') !== false)
|
||||
if(strpos($repo->SCM, 'Subversion') === false)
|
||||
{
|
||||
$oldRevision = $oldRevision == '^' ? "$newRevision" : $oldRevision;
|
||||
echo " <span class='label label-info'>" . substr($oldRevision, 0, 10) . " : " . substr($newRevision, 0, 10) . ' (' . $historys[$oldRevision] . ' : ' . $historys[$newRevision] . ')</span>';
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
</tr>
|
||||
<tr class='gitlab hide'>
|
||||
<th><?php echo $lang->repo->gitlabProject;?></th>
|
||||
<td><?php echo html::select('gitlabProject', $projects, '', "class='form-control chosen'");?>
|
||||
<td><?php echo html::select('gitlabProject', $projects, $repo->extra, "class='form-control chosen'");?>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->repo->name; ?></th>
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
<tr>
|
||||
<th class='w-40px'></th>
|
||||
<th class='w-110px'><?php echo $lang->repo->revision?></th>
|
||||
<?php if($repo->SCM == 'Git'):?>
|
||||
<?php if($repo->SCM != 'Subversion'):?>
|
||||
<th class='w-90px'><?php echo $lang->repo->commit?></th>
|
||||
<?php endif;?>
|
||||
<th class='w-150px'><?php echo $lang->repo->date?></th>
|
||||
@@ -71,7 +71,7 @@
|
||||
</div>
|
||||
</td>
|
||||
<td class='versions'><?php echo html::a($this->repo->createLink('revision', "repoID=$repoID&objectID=$objectID&revision=" . $log->revision), substr($log->revision, 0, 10), '', "data-app='{$app->openApp}'");?></td>
|
||||
<?php if($repo->SCM == 'Git'):?>
|
||||
<?php if($repo->SCM != 'Subversion'):?>
|
||||
<td><?php echo $log->commit?></td>
|
||||
<?php endif;?>
|
||||
<td><?php echo $log->time;?></td>
|
||||
|
||||
@@ -23,7 +23,7 @@ $typeInfo = $type == 'file' ? '&type=file' : '';
|
||||
<?php echo html::a($browseLink, "<i class='icon icon-back'></i>" . $lang->goback, '', "class='btn btn-link' data-app='{$app->openApp}'");?>
|
||||
<div class="divider"></div>
|
||||
<div class="page-title">
|
||||
<?php echo $lang->repo->revisionA . ' ' . ($repo->SCM == 'Git' ? $this->repo->getGitRevisionName($revision, $log->commit) : $revision);?>
|
||||
<?php echo $lang->repo->revisionA . ' ' . ($repo->SCM == 'Subversion' ? $revision : $this->repo->getGitRevisionName($revision, $log->commit));?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -63,7 +63,7 @@ $typeInfo = $type == 'file' ? '&type=file' : '';
|
||||
<th><?php echo $lang->repo->revisionA?></th>
|
||||
<td><?php echo $log->revision?></td>
|
||||
</tr>
|
||||
<?php if($repo->SCM == 'Git'):?>
|
||||
<?php if($repo->SCM != 'Subversion'):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->repo->commit?></th>
|
||||
<td><?php echo $log->commit?></td>
|
||||
|
||||
@@ -100,7 +100,7 @@ class testtask extends control
|
||||
/* Set menu. */
|
||||
$productID = $this->product->saveState($productID, $this->products);
|
||||
if($branch === '') $branch = (int)$this->cookie->preBranch;
|
||||
$this->loadModel('qa')->setMenu($this->products, $productID, $branch);
|
||||
$this->loadModel('qa')->setMenu($this->products, $productID, $branch, $type);
|
||||
|
||||
/* Load pager. */
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
|
||||
@@ -1475,7 +1475,7 @@ class upgradeModel extends model
|
||||
|
||||
$this->saveLogs('Run Method ' . __FUNCTION__);
|
||||
$mysqlVersion = $this->loadModel('install')->getMysqlVersion();
|
||||
$ignoreCode = '|1050|1060|1091|1061|';
|
||||
$ignoreCode = '|1050|1054|1060|1091|1061|';
|
||||
|
||||
/* Read the sql file to lines, remove the comment lines, then join theme by ';'. */
|
||||
$sqls = explode("\n", file_get_contents($sqlFile));
|
||||
|
||||
+15
-2
@@ -765,12 +765,25 @@ class user extends control
|
||||
*/
|
||||
public function login($referer = '', $from = '')
|
||||
{
|
||||
/* Check if you can operating on the folder. */
|
||||
$canModifyDIR = true;
|
||||
if($this->user->checkTmp() === false)
|
||||
{
|
||||
$canModifyDIR = false;
|
||||
$floderPath = $this->app->tmpRoot;
|
||||
}
|
||||
elseif(!is_dir($this->app->dataRoot) or substr(base_convert(@fileperms($this->app->dataRoot),10,8),-4) != '0777')
|
||||
{
|
||||
$canModifyDIR = false;
|
||||
$floderPath = $this->app->dataRoot;
|
||||
}
|
||||
|
||||
if(!$canModifyDIR)
|
||||
{
|
||||
echo "<html><head><meta charset='utf-8'></head>";
|
||||
echo "<body><table align='center' style='width:700px; margin-top:100px; border:1px solid gray; font-size:14px;'><tr><td style='padding:8px'>";
|
||||
echo "<div style='margin-bottom:8px;'>不能创建临时目录,请确认目录<strong style='color:#ed980f'>{$this->app->tmpRoot}</strong>是否存在并有操作权限。</div>";
|
||||
echo "<div>Can't create tmp directory, make sure the directory <strong style='color:#ed980f'>{$this->app->tmpRoot}</strong> exists and has permission to operate.</div>";
|
||||
echo "<div style='margin-bottom:8px;'>不能创建临时目录,请确认目录<strong style='color:#ed980f'>{$floderPath}</strong>是否存在并有操作权限。</div>";
|
||||
echo "<div>Can't create tmp directory, make sure the directory <strong style='color:#ed980f'>{$floderPath}</strong> exists and has permission to operate.</div>";
|
||||
die("</td></tr></table></body></html>");
|
||||
}
|
||||
$this->setReferer($referer);
|
||||
|
||||
Reference in New Issue
Block a user