From da3ce6e3923acb04344d1acb755c536a24713fdf Mon Sep 17 00:00:00 2001 From: tianshujie Date: Mon, 24 Apr 2023 20:05:06 +0800 Subject: [PATCH 1/3] * Fix bug #34762. --- module/project/model.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/module/project/model.php b/module/project/model.php index 1c14cdb5ab..6ceeb87ee9 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -139,6 +139,8 @@ class projectModel extends model } } + setcookie('lastProject', (int)$this->session->project, $this->config->cookieLife, $this->config->webRoot, '', $this->config->cookieSecure, true); + return $this->session->project; } From 5de561dc41be8dcb25ba8a953183ff01b890d5e7 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Mon, 24 Apr 2023 20:31:52 +0800 Subject: [PATCH 2/3] * Fix bug #34760. --- module/api/control.php | 4 ++-- module/doc/model.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/module/api/control.php b/module/api/control.php index 8d6119d57e..b338cac69b 100755 --- a/module/api/control.php +++ b/module/api/control.php @@ -167,7 +167,7 @@ class api extends control if(!strpos($this->server->http_referer, 'space') and !strpos($this->server->http_referer, 'api')) setCookie("docSpaceParam", '', $this->config->cookieLife, $this->config->webRoot, '', false, true); /* Get all api doc libraries. */ - $libs = $this->doc->getApiLibs($libID); + $libs = $this->doc->getApiLibs($libID, $this->objectType, $this->objectID); $api = $this->api->getLibById($apiID, $version, $release); if($api) { @@ -183,7 +183,7 @@ class api extends control } /* Crumbs links array. */ - $lib = zget($libs, $libID); + $lib = zget($libs, $libID); $type = $lib->product ? 'product' : ($lib->project ? 'project' : 'unlink'); $methodName = $type != 'unlink' ? $type . 'Space' : 'index'; diff --git a/module/doc/model.php b/module/doc/model.php index 95d3d5f976..7a6611d5a6 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -47,13 +47,13 @@ class docModel extends model $libs = $this->dao->select('*')->from(TABLE_DOCLIB) ->where('deleted')->eq(0) ->andWhere('type')->eq('api') - ->beginIF(!empty($appendLib))->orWhere('id')->eq($appendLib)->fi() - ->beginIF(!empty($objectType) && $objectID > 0 and $objectType != 'nolink')->andWhere($objectType)->eq($objectID)->fi() + ->beginIF(!empty($objectType) and $objectID > 0 and $objectType != 'nolink')->andWhere($objectType)->eq($objectID)->fi() ->beginIF($objectType == 'nolink') ->andWhere('product')->eq(0) ->andWhere('project')->eq(0) ->andWhere('execution')->eq(0) ->fi() + ->beginIF(!empty($appendLib))->orWhere('id')->eq($appendLib)->fi() ->orderBy('order_asc, id_asc') ->fetchAll('id'); From 18f0a9e65ce2c8cf7b65ebe54a6165caf3ee9ce8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E8=BE=B0=E8=BD=A9?= Date: Mon, 24 Apr 2023 20:41:18 +0800 Subject: [PATCH 3/3] * Modify dataview -> chart. --- module/upgrade/model.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/module/upgrade/model.php b/module/upgrade/model.php index 8054ed6250..f64c21a549 100644 --- a/module/upgrade/model.php +++ b/module/upgrade/model.php @@ -9127,12 +9127,13 @@ class upgradeModel extends model if(!$sql) return array(); $this->loadModel('dataview'); + $this->loadModel('chart'); $columns = $this->dataview->getColumns($sql); $columnFields = array(); foreach($columns as $column => $type) $columnFields[$column] = $column; - $tableAndFields = $this->dataview->getTables($sql); + $tableAndFields = $this->chart->getTables($sql); $tables = $tableAndFields['tables']; $fields = $tableAndFields['fields'];