-
- doing;?>
+ doing;?>
block->doingProject;?>
-
- finish;?>
+ finish;?>
block->finishProject;?>
diff --git a/module/block/view/scrumroadmapblock.html.php b/module/block/view/scrumroadmapblock.html.php
index dfc6b844e0..aeebb95ad4 100644
--- a/module/block/view/scrumroadmapblock.html.php
+++ b/module/block/view/scrumroadmapblock.html.php
@@ -10,25 +10,19 @@
* @link http://www.zentao.net
*/
?>
-' : '';?>
+' : '';
+?>
-
-
createLink('productplan', 'create', 'productID=' . $productID), ''. $lang->productplan->create, '', 'class="btn btn-mini" id="createPlanLink"');?>
-
+
From ffd197ad4e559a0ff81905065e1a8eab4eb2c571 Mon Sep 17 00:00:00 2001
From: tianshujie98
Date: Fri, 28 Aug 2020 08:51:47 +0800
Subject: [PATCH 4/5] *Fix comment.
---
module/design/control.php | 30 +++++++++++++------------
module/design/model.php | 46 ++++++++++++++++++++-------------------
2 files changed, 40 insertions(+), 36 deletions(-)
diff --git a/module/design/control.php b/module/design/control.php
index 7971e61e1b..f8d357aec1 100644
--- a/module/design/control.php
+++ b/module/design/control.php
@@ -11,11 +11,12 @@
*/
class design extends control
{
- /**
+ /**
* Browse designs.
*
* @param int $productID
- * @param string $type
+ * @param string $type all|HLDS|DDS|DBDS|ADS
+ * @param string $param
* @param string $orderBy
* @param int $recTotal
* @param int $recPerPage
@@ -27,15 +28,15 @@ class design extends control
{
$productID = $this->loadModel('product')->saveState($productID, $this->product->getPairs('nocode'));
+ $this->design->setProductMenu($productID);
+ $product = $this->loadModel('product')->getById($productID);
+ $program = $this->loadModel('project')->getById($product->program);
+
$queryID = ($type == 'bySearch') ? (int)$param : 0;
/* Build the search form. */
$actionURL = $this->createLink('design', 'browse', "productID=$productID&type=bySearch&queryID=myQueryID");
$this->design->buildSearchForm($queryID, $actionURL);
- $this->design->setProductMenu($productID);
- $product = $this->loadModel('product')->getById($productID);
- $program = $this->loadModel('project')->getById($product->program);
-
$this->app->session->set('designList', $this->app->getURI(true));
$this->app->loadClass('pager', $static = true);
@@ -65,8 +66,6 @@ class design extends control
* Create a design.
*
* @param int $productID
- * @param string $prevModule
- * @param int $prevID
* @access public
* @return void
*/
@@ -107,8 +106,9 @@ class design extends control
}
/**
- * Batch create
+ * Batch create designs.
*
+ * @param int $productID
* @access public
* @return void
*/
@@ -141,6 +141,7 @@ class design extends control
$this->view->users = $this->loadModel('user')->getPairs('noclosed');
$this->display();
}
+
/**
* View a design.
*
@@ -214,6 +215,7 @@ class design extends control
* Commit a design.
*
* @param int $designID
+ * @param int $repoID
* @param string $begin
* @param string $end
* @param int $recTotal
@@ -222,7 +224,7 @@ class design extends control
* @access public
* @return void
*/
- public function commit($designID, $repoID = 0, $begin = '', $end = '', $recTotal = 0, $recPerPage = 50, $pageID = 1)
+ public function commit($designID = 0, $repoID = 0, $begin = '', $end = '', $recTotal = 0, $recPerPage = 50, $pageID = 1)
{
$this->app->loadClass('pager', $static = true);
$pager = new pager($recTotal, $recPerPage, $pageID);
@@ -269,13 +271,13 @@ class design extends control
}
/**
- * Revision
+ * A version of the code base.
*
* @param int $repoID
* @access public
* @return void
*/
- public function revision($repoID)
+ public function revision($repoID = 0)
{
$repo = $this->dao->select('*')->from(TABLE_REPOHISTORY)->where('id')->eq($repoID)->fetch();
$repoURL = $this->createLink('repo', 'revision', "repoID=$repo->repo&revistion=$repo->revision");
@@ -290,7 +292,7 @@ class design extends control
* @access public
* @return void
*/
- public function delete($designID, $confirm = 'no')
+ public function delete($designID = 0, $confirm = 'no')
{
if($confirm == 'no')
{
@@ -310,7 +312,7 @@ class design extends control
* @access public
* @return void
*/
- public function assignTo($designID)
+ public function assignTo($designID = 0)
{
if($_POST)
{
diff --git a/module/design/model.php b/module/design/model.php
index 5b2ea4fbea..2b5b155db0 100644
--- a/module/design/model.php
+++ b/module/design/model.php
@@ -54,8 +54,9 @@ class designModel extends model
}
/**
- * Batch create
+ * Batch create designs.
*
+ * @param int $productID
* @access public
* @return bool
*/
@@ -93,7 +94,7 @@ class designModel extends model
* @access public
* @return bool
*/
- public function update($designID)
+ public function update($designID = 0)
{
$oldDesign = $this->getByID($designID);
$design = fixer::input('post')
@@ -141,7 +142,7 @@ class designModel extends model
* @access public
* @return void
*/
- public function linkCommit($designID, $repoID)
+ public function linkCommit($designID = 0, $repoID = 0)
{
$this->dao->delete()->from(TABLE_RELATION)->where('AType')->eq('design')->andWhere('AID')->eq($designID)->andWhere('BType')->eq('commit')->andWhere('relation')->eq('completedin')->exec();
$this->dao->delete()->from(TABLE_RELATION)->where('AType')->eq('commit')->andWhere('BID')->eq($designID)->andWhere('BType')->eq('design')->andWhere('relation')->eq('completedfrom')->exec();
@@ -177,7 +178,7 @@ class designModel extends model
}
/**
- * SetProductMenu
+ * Set product menu.
*
* @param int $productID
* @access public
@@ -195,13 +196,13 @@ class designModel extends model
}
/**
- * GetByID
+ * Get a design by id.
*
* @param int $designID
* @access public
* @return object
*/
- public function getByID($designID)
+ public function getByID($designID = 0)
{
$design = $this->dao->select('*')->from(TABLE_DESIGN)->where('id')->eq($designID)->fetch();
$design->files = $this->loadModel('file')->getByObject('design', $designID);
@@ -215,14 +216,14 @@ class designModel extends model
}
/**
- * GetDesignPairs
+ * Get design pairs.
*
* @param int $productID
- * @param string $type
+ * @param string $type all|HLDS|DDS|DBDS|ADS
* @access public
* @return object
*/
- public function getDesignPairs($productID = 0, $type = 'detailed')
+ public function getDesignPairs($productID = 0, $type = 'all')
{
$designs = $this->dao->select('id, name')->from(TABLE_DESIGN)
->where('product')->eq($productID)
@@ -235,13 +236,13 @@ class designModel extends model
}
/**
- * GetAffectedScope
+ * Get affected scope.
*
* @param int $design
* @access public
* @return object
*/
- public function getAffectedScope($design)
+ public function getAffectedScope($design = 0)
{
/* Get affected tasks. */
$design->tasks = $this->dao->select('*')->from(TABLE_TASK)
@@ -254,16 +255,17 @@ class designModel extends model
}
/**
- * GetList
+ * Get list.
*
* @param int $productID
- * @param int $type
- * @param int $orderBy
+ * @param string $type
+ * @param int $param
+ * @param string $orderBy
* @param int $pager
* @access public
* @return array
*/
- public function getList($productID, $type = 'all', $param = 0, $orderBy = 'id_desc', $pager = null)
+ public function getList($productID = 0, $type = 'all', $param = 0, $orderBy = 'id_desc', $pager = null)
{
if($type == 'bySearch')
{
@@ -292,7 +294,7 @@ class designModel extends model
}
/**
- * Get designs by search
+ * Get designs by search.
*
* @param string $queryID
* @param string $orderBy
@@ -341,7 +343,7 @@ class designModel extends model
* @access public
* @return void
*/
- public function buildSearchForm($queryID, $actionURL)
+ public function buildSearchForm($queryID = 0, $actionURL = '')
{
$this->config->design->search['actionURL'] = $actionURL;
$this->config->design->search['queryID'] = $queryID;
@@ -350,14 +352,14 @@ class designModel extends model
}
/**
- * Print assignedTo html
+ * Print assignedTo html.
*
- * @param int $design
- * @param int $users
+ * @param object $design
+ * @param array $users
* @access public
* @return string
*/
- public function printAssignedHtml($design, $users)
+ public function printAssignedHtml($design = '', $users = '')
{
$btnTextClass = '';
$assignedToText = zget($users, $design->assignedTo);
@@ -384,7 +386,7 @@ class designModel extends model
* @access public
* @return array|bool
*/
- public function assign($designID)
+ public function assign($designID = 0)
{
$oldDesign = $this->getByID($designID);
From 969e3cfb5dfb43711042146f42b763e09d8422dd Mon Sep 17 00:00:00 2001
From: leiyong <1549684884@qq.com>
Date: Fri, 28 Aug 2020 08:54:36 +0800
Subject: [PATCH 5/5] * Adjust code.
---
module/block/control.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/module/block/control.php b/module/block/control.php
index 650ae5512a..3aa3b85aa9 100644
--- a/module/block/control.php
+++ b/module/block/control.php
@@ -1284,7 +1284,7 @@ class block extends control
{
$this->view->summary = $this->dao->select('count(*) as total, count(if(status="doing", id, null)) as doing, count(if(status="closed", id, null)) as finish')->from(TABLE_PROJECT)
->where('program')->eq($this->session->program)
- ->where('deleted')->eq('0')
+ ->andWhere('deleted')->eq('0')
->fetch();
}