* adjust for branch name by product name.

This commit is contained in:
wangyidong
2015-11-10 10:55:34 +08:00
parent 1df211fdaa
commit a0c97d7e01
13 changed files with 32 additions and 13 deletions
+2 -2
View File
@@ -51,8 +51,8 @@ class build extends control
$this->view->position[] = $this->lang->build->create;
$this->view->productGroups = $productGroups;
$this->view->products = $products;
$this->view->product = $productGroups[$productID];
$this->view->branches = $productGroups[$productID]->type == 'normal' ? array() : $this->loadModel('branch')->getPairs($productID);
$this->view->product = isset($productGroups[$productID]) ? $productGroups[$productID] : '';
$this->view->branches = (isset($productGroups[$productID]) and $productGroups[$productID]->type == 'normal') ? array() : $this->loadModel('branch')->getPairs($productID);
$this->view->projectID = $projectID;
$this->view->lastBuild = $this->build->getLast($projectID);
$this->view->users = $this->user->getPairs('nodeleted');