Merge branch 'master' of https://gitlab.zcorp.cc/easycorp/zentaopms
This commit is contained in:
@@ -10,7 +10,7 @@ $('#pageNav .btn-group #dropMenu .table-col .list-group a[href*="showFiles"]').r
|
||||
</script>
|
||||
<?php endif;?>
|
||||
|
||||
<?php if(!empty($doc) and !$doc->deleted and $doc->version > 1 and common::hasPriv('doc', 'diff')):?>
|
||||
<?php if(!empty($doc) and !$doc->deleted and $doc->version > 1 and common::hasPriv('doc', 'diff') and $config->edition != 'open'):?>
|
||||
<?php
|
||||
$versions = array();
|
||||
$i = 1;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script>
|
||||
$('#mainMenu .btn-toolbar > a[href*="bug"], a[href*="testtask"], a[href*="testcase"], a[href*="issue"], a[href*="risk"], a[href*="requirement"]').remove();
|
||||
<?php if($this->config->edition != 'open'):?>
|
||||
$('#mainMenu .btn-toolbar > a:first').attr('href', createLink('user', 'todocalendar', 'userID=<?php echo $user->id?>'));
|
||||
<?php if($this->config->edition != 'open' and common::hasPriv('user', 'todocalendar')):?>
|
||||
$('#mainMenu .btn-toolbar > a:first[href*="todo"]').attr('href', createLink('user', 'todocalendar', 'userID=<?php echo $user->id?>'));
|
||||
<?php endif;?>
|
||||
</script>
|
||||
|
||||
@@ -516,12 +516,15 @@ class docModel extends model
|
||||
/* When file change then version add one. */
|
||||
$files = $this->loadModel('file')->getByObject('doc', $docID);
|
||||
$docFiles = array();
|
||||
foreach($files as $file)
|
||||
if($docContent)
|
||||
{
|
||||
$pathName = $this->file->getRealPathName($file->pathname);
|
||||
$file->webPath = $this->file->webPath . $pathName;
|
||||
$file->realPath = $this->file->savePath . $pathName;
|
||||
if(strpos(",{$docContent->files},", ",{$file->id},") !== false) $docFiles[$file->id] = $file;
|
||||
foreach($files as $file)
|
||||
{
|
||||
$pathName = $this->file->getRealPathName($file->pathname);
|
||||
$file->webPath = $this->file->webPath . $pathName;
|
||||
$file->realPath = $this->file->savePath . $pathName;
|
||||
if(strpos(",{$docContent->files},", ",{$file->id},") !== false) $docFiles[$file->id] = $file;
|
||||
}
|
||||
}
|
||||
|
||||
/* Check file change. */
|
||||
|
||||
@@ -171,7 +171,7 @@ js::set('hasTaskButton', $hasTaskButton);
|
||||
<?php if($canBatchCreateBug) echo '<li>' . html::a(helper::createLink('bug', 'batchCreate', "productID=$productID&branch=$branchID&executionID=$execution->id", '', true), $lang->bug->batchCreate, '', "class='iframe'") . '</li>';?>
|
||||
<?php if(($hasStoryButton or $hasBugButton) and $hasTaskButton) echo '<li class="divider"></li>';?>
|
||||
<?php if($canCreateTask) echo '<li>' . html::a(helper::createLink('task', 'create', "execution=$execution->id", '', true), $lang->task->create, '', "class='iframe'") . '</li>';?>
|
||||
<?php if($canImportBug) echo '<li>' . html::a(helper::createLink('execution', 'importBug', "executionID=$execution->id", '', true), $lang->execution->importBug, '', "class='ifram'") . '</li>';?>
|
||||
<?php if($canImportBug) echo '<li>' . html::a(helper::createLink('execution', 'importBug', "executionID=$execution->id", '', true), $lang->execution->importBug, '', "class='iframe' data-width=80%") . '</li>';?>
|
||||
<?php if($canBatchCreateTask) echo '<li>' . html::a(helper::createLink('task', 'batchCreate', "execution=$execution->id", '', true), $lang->execution->batchCreateTask, '', "class='iframe'") . '</li>';?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.lite.html.php';?>
|
||||
<?php include '../../common/view/chosen.html.php';?>
|
||||
<?php include $app->getModuleRoot() . 'common/view/header.lite.html.php';?>
|
||||
<?php include $app->getModuleRoot() . 'common/view/chosen.html.php';?>
|
||||
<?php $this->app->loadLang('file');?>
|
||||
<style>
|
||||
#customFields .panel {border: 1px solid #ddd; background: #fafafa; margin: 0;}
|
||||
@@ -331,4 +331,4 @@ if($isCustomExport)
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
<?php include '../../common/view/footer.lite.html.php';?>
|
||||
<?php include $app->getModuleRoot() . 'common/view/footer.lite.html.php';?>
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
<tr>
|
||||
<td>
|
||||
<?php
|
||||
if(common::hasPriv('user', 'view'))
|
||||
if(common::hasPriv('user', 'view') and common::hasPriv('my', 'team'))
|
||||
{
|
||||
$link = isset($deptUsers[$member->userID]) ? $this->createLink('user', 'view', "userID={$member->userID}") : "javascript: alert(noAccess);";
|
||||
echo html::a($link, $member->realname, '', 'data-app="system"');
|
||||
|
||||
@@ -40,12 +40,12 @@ class upgradeModel extends model
|
||||
|
||||
$openVersion = $fromVersion;
|
||||
$proInstalled = $bizInstalled = $maxInstalled = false;
|
||||
if($fromVersion[0] == 'p')
|
||||
if($fromVersion[0] == 'p')
|
||||
{
|
||||
$openVersion = $this->config->upgrade->proVersion[$fromVersion];
|
||||
$proInstalled = true;
|
||||
}
|
||||
elseif($fromVersion[0] == 'b')
|
||||
elseif($fromVersion[0] == 'b')
|
||||
{
|
||||
$openVersion = $this->config->upgrade->bizVersion[$fromVersion];
|
||||
$bizInstalled = true;
|
||||
@@ -5834,9 +5834,9 @@ class upgradeModel extends model
|
||||
/* Check whether the current file is encrypted. */
|
||||
if(strpos($line, "extension_loaded('ionCube Loader')") === false)
|
||||
{
|
||||
$maxFiles = file_get_contents('maxfiles.txt');
|
||||
$maxFiles = str_replace('/', DS, $maxFiles);
|
||||
if(strpos($maxFiles, $fileName) !== false) continue;
|
||||
$systemFiles = file_get_contents('systemfiles.txt');
|
||||
$systemFiles = str_replace('/', DS, $systemFiles);
|
||||
if(strpos($systemFiles, $fileName) !== false) continue;
|
||||
|
||||
$pluginFiles[$fileName] = $fileName;
|
||||
}
|
||||
@@ -5876,7 +5876,7 @@ class upgradeModel extends model
|
||||
}
|
||||
}
|
||||
copy($fromPath, $toPath);
|
||||
$this->replaceEXTFile($toPath);
|
||||
$this->replaceIncludePath($toPath);
|
||||
}
|
||||
|
||||
return $response;
|
||||
@@ -5914,18 +5914,37 @@ class upgradeModel extends model
|
||||
}
|
||||
|
||||
/**
|
||||
* Replace extent file.
|
||||
* Replace the load path of the file.
|
||||
*
|
||||
* @param string $filePath
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function replaceEXTFile($filePath)
|
||||
public function replaceIncludePath($filePath)
|
||||
{
|
||||
$content = file_get_contents($filePath);
|
||||
if(strpos(basename($filePath), 'html'))
|
||||
{
|
||||
$content = preg_replace("#(include )'((../){2,})([a-z]+/)#", '$1' . '$app->getModuleRoot() . ' . "'$4", $content);
|
||||
$content = preg_replace('#(include )(\'|")((../){2,})([a-z]+/)(?!ext/)([a-z]+/)#', '$1' . '$app->getModuleRoot() . ' . '"$5$6', $content);
|
||||
|
||||
$systemFiles = file_get_contents('systemfiles.txt');
|
||||
$systemFiles = str_replace('/', DS, $systemFiles);
|
||||
|
||||
preg_match_all('#(include )(\'|")(../){2,}[a-z]+/ext/[a-z]+/(([a-z]+[.]?)+)#', $content, $matches);
|
||||
foreach($matches[0] as $fileName)
|
||||
{
|
||||
$fileName = preg_replace("#(include )('|\")((../){2,})#", "", $fileName);
|
||||
if(strpos($systemFiles, $fileName) !== false)
|
||||
{
|
||||
$fileName = basename($fileName);
|
||||
$content = preg_replace('#(include )(\'|")((../){2,})([a-z]+/ext/view/' . $fileName . ')#', '$1' . '$app->appRoot . ' . '$2extension/max/$5', $content);
|
||||
}
|
||||
else
|
||||
{
|
||||
$fileName = basename($fileName);
|
||||
$content = preg_replace('#(include )(\'|")((../){2,})([a-z]+/ext/view/' . $fileName . ')#', '$1' . '$app->appRoot . ' . '$2extension/custom/$5', $content);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -16,11 +16,11 @@
|
||||
<form method='post'>
|
||||
<div class='panel-title text-center'>
|
||||
<?php
|
||||
if($this->config->edition == 'max')
|
||||
if($config->edition == 'max')
|
||||
{
|
||||
echo $lang->upgrade->toMAXGuide;
|
||||
}
|
||||
elseif($this->config->edition == 'biz')
|
||||
elseif($config->edition == 'biz')
|
||||
{
|
||||
echo $lang->upgrade->toBIZ5Guide;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user