Merge branch 'release/21.7.2' into dev/community-lang
This commit is contained in:
@@ -3827,7 +3827,7 @@ class ztSessionHandler implements SessionHandlerInterface
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function getSessionFile(string $id): string
|
||||
public function getSessionFile($id): string
|
||||
{
|
||||
if(!empty($this->sessionFile)) return $this->sessionFile;
|
||||
if(!preg_match('/^\w+$/', $id)) return false;
|
||||
@@ -3847,7 +3847,7 @@ class ztSessionHandler implements SessionHandlerInterface
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
public function open(string $savePath, string $sessionName): bool
|
||||
public function open($savePath, $sessionName): bool
|
||||
{
|
||||
$this->sessSavePath = $savePath;
|
||||
$this->sessionName = $sessionName;
|
||||
@@ -3872,7 +3872,7 @@ class ztSessionHandler implements SessionHandlerInterface
|
||||
* @access public
|
||||
* @return string|false
|
||||
*/
|
||||
public function read(string $id): string|false
|
||||
public function read($id): string|false
|
||||
{
|
||||
$sessFile = $this->getSessionFile($id);
|
||||
if(!$sessFile) return false;
|
||||
@@ -3888,7 +3888,7 @@ class ztSessionHandler implements SessionHandlerInterface
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
public function write(string $id, string $sessData): bool
|
||||
public function write($id, $sessData): bool
|
||||
{
|
||||
$sessFile = $this->getSessionFile($id);
|
||||
if(!$sessFile) return true;
|
||||
@@ -3907,7 +3907,7 @@ class ztSessionHandler implements SessionHandlerInterface
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
public function destroy(string $id): bool
|
||||
public function destroy($id): bool
|
||||
{
|
||||
$sessFile = $this->getSessionFile($id);
|
||||
if(file_exists($sessFile)) unlink($sessFile);
|
||||
@@ -3922,7 +3922,7 @@ class ztSessionHandler implements SessionHandlerInterface
|
||||
* @access public
|
||||
* @return int|false
|
||||
*/
|
||||
public function gc(int $maxlifeTime): int|false
|
||||
public function gc($maxlifeTime): int|false
|
||||
{
|
||||
$time = time();
|
||||
$count = 0;
|
||||
|
||||
+12
-2
@@ -202,12 +202,22 @@ class doc extends control
|
||||
}
|
||||
else
|
||||
{
|
||||
$data = (array)zget($blockData->content, 'data', array());
|
||||
if($type == 'task')
|
||||
{
|
||||
foreach($data as $taskID => $task)
|
||||
{
|
||||
$task->canView = $this->execution->checkPriv($task->execution);
|
||||
$data[$taskID] = $task;
|
||||
}
|
||||
}
|
||||
|
||||
$this->app->loadClass('pager', true);
|
||||
|
||||
$this->view->idList = (array)zget($blockData->content, 'idList', array());
|
||||
$this->view->cols = (array)zget($blockData->content, 'cols', array());
|
||||
$this->view->data = (array)zget($blockData->content, 'data', array());
|
||||
$this->view->pager = new pager(count($this->view->data), 10);
|
||||
$this->view->data = $data;
|
||||
$this->view->pager = new pager(count($data), 10);
|
||||
}
|
||||
|
||||
$this->view->type = $type;
|
||||
|
||||
@@ -280,6 +280,18 @@ window.renderCell = function(result, info)
|
||||
if(info.row.data.reviewedDate == '0000-00-00') info.row.data.reviewedDate = '';
|
||||
}
|
||||
|
||||
if(blockType == 'task')
|
||||
{
|
||||
if(result)
|
||||
{
|
||||
if(info.col.name == 'name' && !info.row.data.canView)
|
||||
{
|
||||
result.shift();
|
||||
result.push({html: info.row.data.name});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
};
|
||||
|
||||
|
||||
@@ -471,6 +471,7 @@ class executionZen extends execution
|
||||
$lastProduct = '';
|
||||
foreach($tasks as $taskID => $task)
|
||||
{
|
||||
$task->status = $this->processStatus('testtask', $task);
|
||||
$task->rowspan = 0;
|
||||
if($lastProduct !== $task->product)
|
||||
{
|
||||
|
||||
@@ -1736,6 +1736,7 @@ class projectZen extends project
|
||||
$lastProduct = '';
|
||||
foreach($tasks as $taskID => $task)
|
||||
{
|
||||
$task->status = $this->processStatus('testtask', $task);
|
||||
$task->rowspan = 0;
|
||||
if($lastProduct !== $task->product)
|
||||
{
|
||||
|
||||
@@ -115,6 +115,8 @@ class testtask extends control
|
||||
$users = $this->loadModel('user')->getPairs('noclosed|noletter');
|
||||
foreach($testtasks as $testtask)
|
||||
{
|
||||
$testtask->status = $this->processStatus('testtask', $testtask);
|
||||
|
||||
if(empty($testtask->members)) continue;
|
||||
|
||||
$members = array();
|
||||
|
||||
@@ -243,7 +243,7 @@ class tree extends control
|
||||
if($showProduct)
|
||||
{
|
||||
$product = $this->loadModel('product')->getById($module->root);
|
||||
$this->view->branches = $product->type != 'normal' ? $this->loadModel('branch')->getPairs($module->root, 'withClosed') : array();
|
||||
$this->view->branches = $product->type != 'normal' ? $this->loadModel('branch')->getPairs($module->root, 'withClosed') : array(0);
|
||||
$this->view->product = $product;
|
||||
$this->view->products = $this->product->getPairs('', $product->program);
|
||||
if($product->shadow) $showProduct = false;
|
||||
|
||||
@@ -11147,6 +11147,7 @@ class upgradeModel extends model
|
||||
/* 历史版本的文档模板中,文章显示链接,点击链接查看文章的具体内容。*/
|
||||
/* In the historical version of the template, the article displays a link. Click on the link to view the content of the article. */
|
||||
$articleLink = helper::createLink('baseline', 'view', "articleID={$template->id}");
|
||||
$articleLink = $this->config->requestType == 'GET' ? str_replace('upgrade.php?', 'index.php?', $articleLink) : $articleLink;
|
||||
$templateHtml .= "<a class='iframe' href='{$articleLink}' data-toggle='modal' data-size='lg'>{$template->title}</a><br>";
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user