diff --git a/module/product/control.php b/module/product/control.php index 6f703d8474..dbe46a06ba 100644 --- a/module/product/control.php +++ b/module/product/control.php @@ -138,7 +138,7 @@ class product extends control $moduleID = ($browseType == 'bymodule') ? (int)$param : (($browseType == 'bysearch' or $browseType == 'bybranch') ? 0 : ($this->cookie->storyModule ? $this->cookie->storyModule : 0)); $queryID = ($browseType == 'bysearch') ? (int)$param : 0; - /* Set menu. */ + /* Set menu. The projectstory module does not execute. */ if($this->app->rawModule == 'product') { $this->lang->product->menu = $this->lang->product->viewMenu; @@ -152,11 +152,11 @@ class product extends control { setcookie('treeBranch', (int)$branch, 0, $this->config->webRoot, '', false, false); $browseType = 'unclosed'; - $moduleTree = $this->tree->getTreeMenu($productID, $viewType = 'story', $startModuleID = 0, array('treeModel', $createModuleLink), '', $branch, "¶m=$param&storyType=$storyType"); + $moduleTree = $this->tree->getTreeMenu($productID, 'story', $startModuleID = 0, array('treeModel', $createModuleLink), '', $branch, "¶m=$param&storyType=$storyType"); } else { - $moduleTree = $this->tree->getTreeMenu($productID, $viewType = 'story', $startModuleID = 0, array('treeModel', $createModuleLink), '', (int)$this->cookie->treeBranch, "¶m=$param&storyType=$storyType"); + $moduleTree = $this->tree->getTreeMenu($productID, 'story', $startModuleID = 0, array('treeModel', $createModuleLink), '', (int)$this->cookie->treeBranch, "¶m=$param&storyType=$storyType"); } if($browseType != 'bymodule' and $browseType != 'bybranch') $this->session->set('storyBrowseType', $browseType); @@ -201,7 +201,9 @@ class product extends control } /* Build search form. */ - $actionURL = $this->createLink('product', 'browse', "productID=$productID&branch=$branch&browseType=bySearch&queryID=myQueryID&storyType=$storyType"); + $rawModule = $this->app->rawModule; + $rawMethod = $this->app->rawMethod; + $actionURL = $this->createLink($rawModule, $rawMethod, "productID=$productID&branch=$branch&browseType=bySearch&queryID=myQueryID&storyType=$storyType"); $this->config->product->search['onMenuBar'] = 'yes'; $this->product->buildSearchForm($productID, $this->products, $queryID, $actionURL); @@ -213,7 +215,6 @@ class product extends control $this->view->position[] = $this->products[$productID]; $this->view->position[] = $this->lang->product->browse; $this->view->productID = $productID; - $this->view->program = $this->loadModel('project')->getById($this->session->PRJ); $this->view->product = $this->product->getById($productID); $this->view->productName = $this->products[$productID]; $this->view->moduleID = $moduleID; @@ -226,7 +227,7 @@ class product extends control $this->view->users = $this->user->getPairs('noletter|pofirst|nodeleted'); $this->view->orderBy = $orderBy; $this->view->browseType = $browseType; - $this->view->modules = $this->tree->getOptionMenu($productID, $viewType = 'story', 0, $branch); + $this->view->modules = $this->tree->getOptionMenu($productID, 'story', 0, $branch); $this->view->moduleID = $moduleID; $this->view->moduleName = $moduleID ? $this->tree->getById($moduleID)->name : $this->lang->tree->all; $this->view->branch = $branch; diff --git a/module/product/view/browse.html.php b/module/product/view/browse.html.php index 00090b9471..496cd02e60 100644 --- a/module/product/view/browse.html.php +++ b/module/product/view/browse.html.php @@ -32,7 +32,7 @@ $lang->story->create = $storyType == 'story' ? $lang->story->createStory : $lang echo $moduleName; if($moduleID) { - $removeLink = $browseType == 'bymodule' ? $this->createLink('product', 'browse', "productID=$productID&branch=$branch&browseType=$browseType¶m=0&storyType=$storyType&orderBy=$orderBy&recTotal=0&recPerPage={$pager->recPerPage}") : 'javascript:removeCookieByKey("storyModule")'; + $removeLink = $browseType == 'bymodule' ? $this->createLink($this->app->rawModule, $this->app->rawMethod, "productID=$productID&branch=$branch&browseType=$browseType¶m=0&storyType=$storyType&orderBy=$orderBy&recTotal=0&recPerPage={$pager->recPerPage}") : 'javascript:removeCookieByKey("storyModule")'; echo html::a($removeLink, "", '', "class='text-muted'"); } ?> @@ -63,20 +63,20 @@ $lang->story->create = $storyType == 'story' ? $lang->story->createStory : $lang foreach($lang->product->moreSelects as $key => $value) { $active = $key == $storyBrowseType ? 'btn-active-text' : ''; - echo '
  • ' . html::a($this->createLink('product', 'browse', "productID=$productID&branch=$branch&browseType=$key¶m=0&storyType=$storyType"), "{$value}", '', "class='btn btn-link $active'") . '
  • '; + echo '
  • ' . html::a($this->createLink($this->app->rawModule, $this->app->rawMethod, "productID=$productID&branch=$branch&browseType=$key¶m=0&storyType=$storyType"), "{$value}", '', "class='btn btn-link $active'") . '
  • '; } echo ''; } } elseif($menuItem->name == 'QUERY') { - $searchBrowseLink = $this->createLink('product', 'browse', "productID=$productID&branch=$branch&browseType=$menuBrowseType¶m=%s&storyType=$storyType"); + $searchBrowseLink = $this->createLink($this->app->rawModule, $this->app->rawMethod, "productID=$productID&branch=$branch&browseType=$menuBrowseType¶m=%s&storyType=$storyType"); $isBySearch = $this->session->storyBrowseType == 'bysearch'; include '../../common/view/querymenu.html.php'; } else { - echo html::a($this->createLink('product', 'browse', "productID=$productID&branch=$branch&browseType=$menuBrowseType¶m=0&storyType=$storyType"), "$menuItem->text" . ($menuItem->name == $this->session->storyBrowseType ? ' ' . $pager->recTotal . '' : ''), '', "id='{$menuItem->name}Tab' class='btn btn-link" . ($this->session->storyBrowseType == $menuItem->name ? ' btn-active-text' : '') . "'"); + echo html::a($this->createLink($this->app->rawModule, $this->app->rawMethod, "productID=$productID&branch=$branch&browseType=$menuBrowseType¶m=0&storyType=$storyType"), "$menuItem->text" . ($menuItem->name == $this->session->storyBrowseType ? ' ' . $pager->recTotal . '' : ''), '', "id='{$menuItem->name}Tab' class='btn btn-link" . ($this->session->storyBrowseType == $menuItem->name ? ' btn-active-text' : '') . "'"); } } ?> diff --git a/module/story/control.php b/module/story/control.php index 2e03d978ce..a170990f0b 100644 --- a/module/story/control.php +++ b/module/story/control.php @@ -1321,7 +1321,7 @@ class story extends control * @access public * @return void */ - public function track($pyoductID, $branch = 0, $recTotal = 0, $recPerPage = 20, $pageID = 1) + public function track($productID, $branch = 0, $recTotal = 0, $recPerPage = 20, $pageID = 1) { /* Set menu. The projectstory module does not execute. */ if($this->app->rawModule == 'story') diff --git a/module/tree/model.php b/module/tree/model.php index 98f966029e..1a7ec150b4 100644 --- a/module/tree/model.php +++ b/module/tree/model.php @@ -410,7 +410,11 @@ class treeModel extends model { $linkHtml = ($type == 'case' and !empty($extra)) ? '' . $branch . '' : $this->createBranchLink($type, $rootID, $branchID, $branch); $linkHtml = $manage ? html::a(inlink('browse', "root=$rootID&viewType=$type¤tModuleID=0&branch=$branchID"), $branch) : $linkHtml; - if($type == 'story' or $type == 'bug') $linkHtml = html::a(inlink('browse', "productID=$rootID&branch=$branchID&browseType=bybranch" . $extraParams), $branch, "", "id=branch" . $branchID); + if($type == 'story' or $type == 'bug') + { + $branchLink = helper::createLink($this->app->rawModule, $this->app->rawMethod, "productID=$rootID&branch=$branchID&browseType=bybranch" . $extraParams); + $linkHtml = html::a($branchLink, $branch, "", "id=branch" . $branchID); + } if($firstBranch and $product->type != 'normal') { $linkHtml = '' . $this->lang->product->branchName[$product->type] . '