From 0345d0e4fba133770a5d38dabff962ed09988e91 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Wed, 21 Mar 2018 13:13:52 +0800 Subject: [PATCH 1/3] * merge update sql to zentao.sql. --- db/zentao.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/zentao.sql b/db/zentao.sql index b9e1f599fe..41e5df7beb 100644 --- a/db/zentao.sql +++ b/db/zentao.sql @@ -773,7 +773,7 @@ CREATE TABLE IF NOT EXISTS `zt_user` ( `account` char(30) NOT NULL default '', `password` char(32) NOT NULL default '', `role` char(10) NOT NULL default '', - `realname` char(30) NOT NULL default '', + `realname` char(100) NOT NULL default '', `nickname` char(60) NOT NULL default '', `commiter` varchar(100) NOT NULL, `avatar` char(30) NOT NULL default '', From 7e77a6d999575452db4ba8e42f02360d19c2f099 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Wed, 21 Mar 2018 13:23:22 +0800 Subject: [PATCH 2/3] * fix bug. --- module/doc/model.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/doc/model.php b/module/doc/model.php index 3209dcb5bf..5e5f21c44e 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -696,11 +696,11 @@ class docModel extends model if($type == 'product' or $type == 'project') { $table = $type == 'product' ? TABLE_PRODUCT : TABLE_PROJECT; - $libs = $this->dao->select('id,name,`order`')->from($table)->where('id')->in($idList)->page($pager, 'id')->orderBy('`order` desc, id desc')->fetchAll('id'); + $libs = $this->dao->select('id,name,`order`')->from($table)->where('id')->in($idList)->orderBy('`order` desc, id desc')->page($pager, 'id')->fetchAll('id'); } else { - $libs = $this->dao->select('id,name')->from(TABLE_DOCLIB)->where('id')->in($idList)->page($pager, 'id')->orderBy('`order`, id desc')->fetchAll('id'); + $libs = $this->dao->select('id,name')->from(TABLE_DOCLIB)->where('id')->in($idList)->orderBy('`order`, id desc')->page($pager, 'id')->fetchAll('id'); } return $libs; From 99dbec60618572f74ab132d179bbfa962a2faeae Mon Sep 17 00:00:00 2001 From: wumo Date: Wed, 21 Mar 2018 13:33:04 +0800 Subject: [PATCH 3/3] * Adjust codes. --- module/action/model.php | 2 +- module/build/control.php | 11 ++++++++++- module/productplan/view/browse.html.php | 9 ++++++--- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/module/action/model.php b/module/action/model.php index 7392802e49..1e8a2a9f92 100755 --- a/module/action/model.php +++ b/module/action/model.php @@ -32,7 +32,7 @@ class actionModel extends model */ public function create($objectType, $objectID, $actionType, $comment = '', $extra = '', $actor = '', $autoDelete = true) { - if(empty($comment)) return false; + if($actionType == 'commented' and empty($comment)) return false; $actor = $actor ? $actor : $this->app->user->account; $actionType = strtolower($actionType); if($actor == 'guest' and $actionType == 'logout') return false; diff --git a/module/build/control.php b/module/build/control.php index 21a79b3d9d..1ad5b16c9d 100644 --- a/module/build/control.php +++ b/module/build/control.php @@ -353,7 +353,16 @@ class build extends control { $builds = $this->build->getProjectBuildPairs($projectID, $productID, $branch, 'noempty,notrunk'); if($isJsonView) die(json_encode($builds)); - else die(html::select('build', $builds, $build, "class='form-control'")); + else + { + if(empty($builds)) + { + echo html::a($this->createLink('build', 'create', "projectID=$projectID "), $this->lang->build->create, '_blank'); + echo '  '; + echo html::a("javascript:loadProjectBuilds($projectID)", $this->lang->refresh); + } + die(html::select('build', $builds, $build, "class='form-control'")); + } } } diff --git a/module/productplan/view/browse.html.php b/module/productplan/view/browse.html.php index b5f68a6ecc..85e94f2e2c 100644 --- a/module/productplan/view/browse.html.php +++ b/module/productplan/view/browse.html.php @@ -44,7 +44,7 @@ recTotal}&recPerPage={$pager->recPerPage}"; ?> idAB);?> - productplan->title);?> + productplan->title);?> session->currentProductType != 'normal'):?> product->branch);?> @@ -54,8 +54,8 @@ productplan->bugs;?> productplan->hour;?> productplan->project;?> - productplan->desc;?> - actions;?> + productplan->desc;?> + actions;?> @@ -99,8 +99,11 @@ '>
+ + edit);?> +
show();?>