From f695a617a3796784fececff5daa4fc3d6e913ccc Mon Sep 17 00:00:00 2001 From: zhaoke Date: Tue, 18 Apr 2023 16:48:41 +0800 Subject: [PATCH 1/9] * Fix execution bug when add zahost. --- module/zahost/model.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/module/zahost/model.php b/module/zahost/model.php index 18a3a5face..b04ed74f11 100644 --- a/module/zahost/model.php +++ b/module/zahost/model.php @@ -139,6 +139,8 @@ class zahostModel extends model { $address = str_replace(array('https://', 'http://'), '', $address); + if(!validater::checkDomain($address) && !validater::checkIP($address)) return false; + if ($this->ping($address)) return true; foreach(array(80, 443, $this->config->zahost->defaultPort) as $port) From 283ae4d6e99e7ad35c2436301b49f0880f45d1cc Mon Sep 17 00:00:00 2001 From: zhaoke Date: Wed, 19 Apr 2023 13:09:26 +0800 Subject: [PATCH 2/9] * Remove unused code. --- module/zahost/model.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/module/zahost/model.php b/module/zahost/model.php index b04ed74f11..18a3a5face 100644 --- a/module/zahost/model.php +++ b/module/zahost/model.php @@ -139,8 +139,6 @@ class zahostModel extends model { $address = str_replace(array('https://', 'http://'), '', $address); - if(!validater::checkDomain($address) && !validater::checkIP($address)) return false; - if ($this->ping($address)) return true; foreach(array(80, 443, $this->config->zahost->defaultPort) as $port) From 690b95977e182f80320f4d5dade19e88f0e2c182 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Sun, 23 Apr 2023 13:06:00 +0800 Subject: [PATCH 3/9] * Fix SQL error. --- db/update18.3.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/update18.3.sql b/db/update18.3.sql index a0c678ecdf..f36f58fabe 100644 --- a/db/update18.3.sql +++ b/db/update18.3.sql @@ -944,7 +944,7 @@ CHANGE `extra` `extra` char(30) NOT NULL DEFAULT ''; ALTER TABLE `zt_release` CHANGE `project` `project` varchar(255) NOT NULL DEFAULT '0', CHANGE `leftBugs` `leftBugs` text NULL; -CHANGE ``notify `notify` varchar(255) NOT NULL default ''; +CHANGE `notify` `notify` varchar(255) NOT NULL default ''; ALTER TABLE `zt_researchplan` CHANGE `editedBy` `editedBy` varchar(30) NOT NULL DEFAULT '', From 611a8a3eff8e078375ded2a26afc167e1f01a5c9 Mon Sep 17 00:00:00 2001 From: hufangzhou Date: Mon, 24 Apr 2023 15:31:47 +0800 Subject: [PATCH 4/9] * Modify the package view is default manage priv view. --- module/group/control.php | 2 +- module/group/view/browse.html.php | 2 +- module/group/view/privbygroup.html.php | 2 +- module/group/view/privbypackage.html.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/module/group/control.php b/module/group/control.php index 6539e1abd1..a15dc6ce82 100644 --- a/module/group/control.php +++ b/module/group/control.php @@ -197,7 +197,7 @@ class group extends control * @access public * @return void */ - public function managePriv($type = 'byGroup', $param = 0, $menu = '', $version = '') + public function managePriv($type = 'byPackage', $param = 0, $menu = '', $version = '') { if($type == 'byGroup' or $type == 'byPackage') $groupID = $param; diff --git a/module/group/view/browse.html.php b/module/group/view/browse.html.php index 157896ad68..d204c463a5 100644 --- a/module/group/view/browse.html.php +++ b/module/group/view/browse.html.php @@ -54,7 +54,7 @@ ";?> id", $group, 'list', 'eye');?> - id", $group, 'list', 'lock');?> + id", $group, 'list', 'lock');?> id", $group, 'list', 'persons', '', "iframe", true, "data-width='90%'");?> id", $group, 'list', '', '', "iframe", true, "data-width='550'");?> id", $group, 'list', '', '', "iframe", true, "data-width='550'");?> diff --git a/module/group/view/privbygroup.html.php b/module/group/view/privbygroup.html.php index 4212d5d786..e548c04c1d 100644 --- a/module/group/view/privbygroup.html.php +++ b/module/group/view/privbygroup.html.php @@ -80,8 +80,8 @@
- ", '', "class='btn btn-icon switchBtn text-primary'");?> ", '', "class='btn btn-icon switchBtn'");?> + ", '', "class='btn btn-icon switchBtn text-primary'");?>
diff --git a/module/group/view/privbypackage.html.php b/module/group/view/privbypackage.html.php index 589bb65416..277187041d 100644 --- a/module/group/view/privbypackage.html.php +++ b/module/group/view/privbypackage.html.php @@ -80,8 +80,8 @@
- ", '', "class='btn btn-icon switchBtn'");?> ", '', "class='btn btn-icon switchBtn text-primary'");?> + ", '', "class='btn btn-icon switchBtn'");?>
From e5dfb8bd9de8c5b141827254a2362b1ed6328e23 Mon Sep 17 00:00:00 2001 From: liumengyi Date: Mon, 24 Apr 2023 15:44:57 +0800 Subject: [PATCH 5/9] * Fix bug #34644. --- module/group/model.php | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/module/group/model.php b/module/group/model.php index fe69978400..2af18b22d2 100644 --- a/module/group/model.php +++ b/module/group/model.php @@ -1602,9 +1602,8 @@ class groupModel extends model { $modules = $this->getPrivManagerPairs('module', $view); $modules = array_keys($modules); - $modules = implode(',', $modules); - $privs = $this->dao->select("t1.id, t1.module, t1.method, CONCAT(t1.module, '-', t1.method) AS action, IF(t3.type = 'module', 0, t1.parent) as parent, t1.order, t2.`key`, t2.`value`, t2.desc, IF(t3.type = 'module', t3.code, t4.code) as parentCode, IF(t3.type = 'module', 999, INSTR('$modules', t4.code)) as moduleOrder")->from(TABLE_PRIV)->alias('t1') + $privs = $this->dao->select("t1.id, t1.module, t1.method, CONCAT(t1.module, '-', t1.method) AS action, IF(t3.type = 'module', 0, t1.parent) as parent, t1.order, t2.`key`, t2.`value`, t2.desc, IF(t3.type = 'module', t3.code, t4.code) as parentCode")->from(TABLE_PRIV)->alias('t1') ->leftJoin(TABLE_PRIVLANG)->alias('t2')->on('t1.id=t2.objectID') ->leftJoin(TABLE_PRIVMANAGER)->alias('t3')->on('t1.parent=t3.id') ->leftJoin(TABLE_PRIVMANAGER)->alias('t4')->on('t3.parent=t4.id') @@ -1623,10 +1622,12 @@ class groupModel extends model ->markRight(2) ->andWhere('t1.edition')->like("%,{$this->config->edition},%") ->andWhere('t1.vision')->like("%,{$this->config->vision},%") - ->orderBy("moduleOrder asc, t3.order asc, `order` asc") + ->orderBy("t3.order asc, `order` asc") ->page($pager) - ->fetchAll('action'); - return $privs; + ->fetchGroup('parentCode', 'action'); + + $privList = array(); foreach($modules as $module) $privList = array_merge($privList, zget($privs, $module, array())); + return $privList; } /** @@ -2209,8 +2210,7 @@ class groupModel extends model { $modulePairs = $this->getPrivManagerPairs('module'); $modules = array_keys($modulePairs); - $modules = implode(',', $modules); - $relatedPrivs = $this->dao->select("t1.relationPriv,t1.type,t2.parent,t2.module,t2.method,t2.`order`,t3.`key`,t3.value, IF(t4.type = 'module', 999, INSTR('$modules', t5.code)) as moduleOrder")->from(TABLE_PRIVRELATION)->alias('t1') + $privs = $this->dao->select("t1.relationPriv,t1.type,t2.parent,t2.module,t2.method,t2.`order`,t3.`key`,t3.value, IF(t4.type = 'module', t4.code, t5.code) as parentCode")->from(TABLE_PRIVRELATION)->alias('t1') ->leftJoin(TABLE_PRIV)->alias('t2')->on('t1.relationPriv=t2.id') ->leftJoin(TABLE_PRIVLANG)->alias('t3')->on('t1.relationPriv=t3.objectID') ->leftJoin(TABLE_PRIVMANAGER)->alias('t4')->on('t2.parent=t4.id') @@ -2238,8 +2238,11 @@ class groupModel extends model ->andWhere('t5.type')->eq('view') ->beginIF(!empty($view) and $view != 'general')->andWhere('t1.module')->in($modules)->fi() ->markRight(2) - ->orderBy('moduleOrder asc, t2.`order`_asc, t1.`type` desc') - ->fetchAll('relationPriv'); + ->orderBy('t2.`order`_asc, t1.`type` desc') + ->fetchGroup('parentCode', 'relationPriv'); + + $relatedPrivs = array(); + foreach($modules as $module) $relatedPrivs = array_merge($relatedPrivs, zget($privs, $module, array())); $privList = empty($type) ? array('depend' => array(), 'recommend' => array()) : array($type => array()); if(empty($relatedPrivs)) return $privList; From 5cb292635af79bb36d1378826566a78bb9fa115a Mon Sep 17 00:00:00 2001 From: tianshujie Date: Mon, 24 Apr 2023 15:51:40 +0800 Subject: [PATCH 6/9] * Fix bug #34691. --- module/block/view/productdocblock.html.php | 25 +++++++++++++++----- module/block/view/projectdocblock.html.php | 27 ++++++++++++++++------ module/doc/control.php | 2 +- 3 files changed, 40 insertions(+), 14 deletions(-) diff --git a/module/block/view/productdocblock.html.php b/module/block/view/productdocblock.html.php index d9c493f333..2a69c671a9 100644 --- a/module/block/view/productdocblock.html.php +++ b/module/block/view/productdocblock.html.php @@ -61,6 +61,8 @@ html[lang="de"] .block-productdoc .c-user{width: 105px;} .block-productdoc .table .c-title > .draft {background-color:rgba(129, 102, 238, 0.12); color:#8166EE;} + +