diff --git a/module/bug/model.php b/module/bug/model.php index b29d5bc181..e944d9c8ef 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -36,25 +36,25 @@ class bugModel extends model if($isMobile) { $this->app->loadLang('qa'); - $pageNav = html::a(helper::createLink('qa', 'index'), $this->lang->qa->index) . $this->lang->colon; + $pageNav = html::a(helper::createLink('qa', 'index', '', '', '', $this->session->program), $this->lang->qa->index) . $this->lang->colon; } else { if($this->config->global->flow == 'full') { $this->app->loadLang('qa'); - $pageNav = '
' . html::a(helper::createLink('qa', 'index', 'locate=no'), $this->lang->qa->index, '', "class='btn'") . '
'; + $pageNav = '
' . html::a(helper::createLink('qa', 'index', 'locate=no', '', '', $this->session->program), $this->lang->qa->index, '', "class='btn'") . '
'; } else { if(common::hasPriv('bug', 'report')) { - $link = helper::createLink('bug', 'report', "productID=$productID&browseType=$browseType&branchID=$branch&moduleID=$moduleID"); + $link = helper::createLink('bug', 'report', "productID=$productID&browseType=$browseType&branchID=$branch&moduleID=$moduleID", '', '', $this->session->program); $pageActions .= html::a($link, " " . $this->lang->bug->report->common . '', '', "class='btn btn-link'"); } if(common::hasPriv('bug', 'export')) { - $link = helper::createLink('bug', 'export', "productID=$productID&orderBy=$orderBy"); + $link = helper::createLink('bug', 'export', "productID=$productID&orderBy=$orderBy", '', '', $this->session->program); $pageActions .= "
"; $pageActions .= ""; @@ -66,20 +66,20 @@ class bugModel extends model } if(common::hasPriv('bug', 'batchCreate')) { - $link = helper::createLink('bug', 'batchCreate', "productID=$productID&branch=$branch&projectID=0&moduleID=$moduleID"); + $link = helper::createLink('bug', 'batchCreate', "productID=$productID&branch=$branch&projectID=0&moduleID=$moduleID", '', '', $this->session->program); $pageActions .= html::a($link, "" . $this->lang->bug->batchCreate, '', "class='btn btn-secondary'"); } if(commonModel::isTutorialMode()) { $wizardParams = helper::safe64Encode("productID=$productID&branch=$branch&extra=moduleID=$moduleID"); - $link = helper::createLink('tutorial', 'wizard', "module=bug&method=create¶ms=$wizardParams"); + $link = helper::createLink('tutorial', 'wizard', "module=bug&method=create¶ms=$wizardParams", '', '', $this->session->program); $pageActions .= html::a($link, "" . $this->lang->bug->create, '', "class='btn btn-primary btn-bug-create'"); } else { if(common::hasPriv('bug', 'create')) { - $link = helper::createLink('bug', 'create', "productID=$productID&branch=$branch&extra=moduleID=$moduleID"); + $link = helper::createLink('bug', 'create', "productID=$productID&branch=$branch&extra=moduleID=$moduleID", '', '', $this->session->program); $pageActions .= html::a($link, "" . $this->lang->bug->create, '', "class='btn btn-primary'"); } } @@ -135,6 +135,7 @@ class bugModel extends model { $now = helper::now(); $bug = fixer::input('post') + ->setDefault('program', $this->session->program) ->setDefault('openedBy', $this->app->user->account) ->setDefault('openedDate', $now) ->setDefault('project,story,task', 0) @@ -285,6 +286,7 @@ class bugModel extends model } } + $bug->program = $this->session->program; $this->dao->insert(TABLE_BUG)->data($bug) ->autoCheck() ->batchCheck($this->config->bug->create->requiredFields, 'notempty') @@ -415,7 +417,7 @@ class bugModel extends model { echo(js::alert($this->lang->bug->projectAccessDenied)); $loginLink = $this->config->requestType == 'GET' ? "?{$this->config->moduleVar}=user&{$this->config->methodVar}=login" : "user{$this->config->requestFix}login"; - if(strpos($this->server->http_referer, $loginLink) !== false) die(js::locate(helper::createLink('bug', 'index'))); + if(strpos($this->server->http_referer, $loginLink) !== false) die(js::locate(helper::createLink('bug', 'index', '', '', '', $this->session->program))); die(js::locate('back')); } } @@ -2476,7 +2478,7 @@ class bugModel extends model } } - $bugLink = inlink('view', "bugID=$bug->id"); + $bugLink = helper::createLink('bug', 'view', "bugID=$bug->id", '', '', $this->session->program); $account = $this->app->user->account; $id = $col->id; if($col->show) @@ -2517,7 +2519,7 @@ class bugModel extends model case 'id': if($canBatchAction) { - echo html::checkbox('bugIDList', array($bug->id => '')) . html::a(helper::createLink('bug', 'view', "bugID=$bug->id"), sprintf('%03d', $bug->id)); + echo html::checkbox('bugIDList', array($bug->id => '')) . html::a(helper::createLink('bug', 'view', "bugID=$bug->id", '', '', $this->session->program), sprintf('%03d', $bug->id)); } else { @@ -2561,14 +2563,14 @@ class bugModel extends model if(isset($stories[$bug->story])) { $story = $stories[$bug->story]; - echo common::hasPriv('story', 'view') ? html::a(helper::createLink('story', 'view', "storyID=$story->id", 'html', true), $story->title, '', "class='iframe'") : $story->title; + echo common::hasPriv('story', 'view') ? html::a(helper::createLink('story', 'view', "storyID=$story->id", 'html', true, $this->session->program), $story->title, '', "class='iframe'") : $story->title; } break; case 'task': if(isset($tasks[$bug->task])) { $task = $tasks[$bug->task]; - echo common::hasPriv('task', 'view') ? html::a(helper::createLink('task', 'view', "taskID=$task->id", 'html', true), $task->name, '', "class='iframe'") : $task->name; + echo common::hasPriv('task', 'view') ? html::a(helper::createLink('task', 'view', "taskID=$task->id", 'html', true, $this->session->program), $task->name, '', "class='iframe'") : $task->name; } break; case 'type': @@ -2623,7 +2625,7 @@ class bugModel extends model } elseif($buildID and common::hasPriv('build', 'view')) { - echo html::a(helper::createLink('build', 'view', "buildID=$buildID"), $build, '', "title='$bug->openedBuild'"); + echo html::a(helper::createLink('build', 'view', "buildID=$buildID", '', '', $this->session->program), $build, '', "title='$bug->openedBuild'"); } else { @@ -2666,11 +2668,11 @@ class bugModel extends model break; case 'actions': $params = "bugID=$bug->id"; - common::printIcon('bug', 'confirmBug', $params, $bug, 'list', 'confirm', '', 'iframe', true); - common::printIcon('bug', 'resolve', $params, $bug, 'list', 'checked', '', 'iframe', true); - common::printIcon('bug', 'close', $params, $bug, 'list', '', '', 'iframe', true); - common::printIcon('bug', 'edit', $params, $bug, 'list'); - common::printIcon('bug', 'create', "product=$bug->product&branch=$bug->branch&extra=$params", $bug, 'list', 'copy'); + common::printIcon('bug', 'confirmBug', $params, $bug, 'list', 'confirm', '', 'iframe', true, '', '', $this->session->program); + common::printIcon('bug', 'resolve', $params, $bug, 'list', 'checked', '', 'iframe', true, '', '', $this->session->program); + common::printIcon('bug', 'close', $params, $bug, 'list', '', '', 'iframe', true, '', '', $this->session->program); + common::printIcon('bug', 'edit', $params, $bug, 'list', '', '', '', '', '', '', $this->session->program); + common::printIcon('bug', 'create', "product=$bug->product&branch=$bug->branch&extra=$params", $bug, 'list', 'copy', '', '', '', '', '', $this->session->program); break; } echo ''; @@ -2695,7 +2697,7 @@ class bugModel extends model $btnClass = $bug->assignedTo == 'closed' ? ' disabled' : ''; $btnClass = "iframe btn btn-icon-left btn-sm {$btnClass}"; - $assignToLink = helper::createLink('bug', 'assignTo', "bugID=$bug->id", '', true); + $assignToLink = helper::createLink('bug', 'assignTo', "bugID=$bug->id", '', true, $this->session->program); $assignToHtml = html::a($assignToLink, " {$assignedToText}", '', "class='$btnClass'"); echo !common::hasPriv('bug', 'assignTo', $bug) ? "{$assignedToText}" : $assignToHtml; @@ -2727,7 +2729,7 @@ class bugModel extends model if($id) { $name = $this->dao->select('title')->from(TABLE_BUG)->where('id')->eq($id)->fetch('title'); - if($name) $action->appendLink = html::a(zget($this->config->mail, 'domain', common::getSysURL()) . helper::createLink($action->objectType, 'view', "id=$id", 'html'), "#$id " . $name); + if($name) $action->appendLink = html::a(zget($this->config->mail, 'domain', common::getSysURL()) . helper::createLink($action->objectType, 'view', "id=$id", 'html', '', $this->session->program), "#$id " . $name); } } diff --git a/module/bug/view/browse.html.php b/module/bug/view/browse.html.php index 1adb46068f..e3b4972fd6 100644 --- a/module/bug/view/browse.html.php +++ b/module/bug/view/browse.html.php @@ -36,7 +36,7 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow echo $moduleName; if($moduleID) { - $removeLink = $browseType == 'bymodule' ? inlink('browse', "productID=$productID&branch=$branch&browseType=$browseType¶m=0&orderBy=$orderBy&recTotal=0&recPerPage={$pager->recPerPage}") : 'javascript:removeCookieByKey("bugModule")'; + $removeLink = $browseType == 'bymodule' ? $this->createLink('bug', 'browse', "productID=$productID&branch=$branch&browseType=$browseType¶m=0&orderBy=$orderBy&recTotal=0&recPerPage={$pager->recPerPage}", '', '', $this->session->program) : 'javascript:removeCookieByKey("bugModule")'; echo html::a($removeLink, "", '', "class='text-muted'"); } ?> @@ -62,13 +62,13 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow foreach($lang->bug->mySelects as $key => $value) { echo ''; - echo html::a($this->createLink('bug', 'browse', "productid=$productID&branch=$branch&browseType=$key"), $value); + echo html::a($this->createLink('bug', 'browse', "productid=$productID&branch=$branch&browseType=$key", '', '', $this->session->program), $value); } echo ''; } elseif($menuItem->name == 'QUERY') { - $searchBrowseLink = inlink('browse', "productID=$productID&branch=$branch&browseType=bySearch¶m=%s"); + $searchBrowseLink = $this->createLink('bug', 'browse', "productID=$productID&branch=$branch&browseType=bySearch¶m=%s", '', '', $this->session->program); $isBySearch = $browseType == 'bysearch'; include '../../common/view/querymenu.html.php'; } @@ -88,14 +88,14 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow foreach($lang->bug->moreSelects as $menuBrowseType => $label) { $active = $menuBrowseType == $browseType ? 'btn-active-text' : ''; - echo '
  • ' . html::a($this->createLink('bug', 'browse', "productid=$productID&branch=$branch&browseType=$menuBrowseType"), "{$label}", '', "class='btn btn-link $active'") . '
  • '; + echo '
  • ' . html::a($this->createLink('bug', 'browse', "productid=$productID&branch=$branch&browseType=$menuBrowseType", '', '', $this->session->program), "{$label}", '', "class='btn btn-link $active'") . '
  • '; } echo '
    '; } } else { - echo html::a($this->createLink('bug', 'browse', "productid=$productID&branch=$branch&browseType=$menuBrowseType"), $label, '', "class='btn btn-link $active'"); + echo html::a($this->createLink('bug', 'browse', "productid=$productID&branch=$branch&browseType=$menuBrowseType", '', '', $this->session->program), $label, '', "class='btn btn-link $active'"); } } ?> @@ -111,22 +111,22 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow createLink('bug', 'export', "productID=$productID&orderBy=$orderBy&browseType=$browseType") : '#'; + $link = common::hasPriv('bug', 'export') ? $this->createLink('bug', 'export', "productID=$productID&orderBy=$orderBy&browseType=$browseType", '', '', $this->session->program) : '#'; echo "
  • " . html::a($link, $lang->bug->export, '', $misc) . "
  • "; ?> " . $lang->bug->batchCreate, '', "class='btn btn-secondary'"); + common::printLink('bug', 'batchCreate', "productID=$productID&branch=$branch&projectID=0&moduleID=$moduleID", "" . $lang->bug->batchCreate, '', "class='btn btn-secondary'", '', '', '', $this->session->program); if(commonModel::isTutorialMode()) { $wizardParams = helper::safe64Encode("productID=$productID&branch=$branch&extra=moduleID=$moduleID"); - echo html::a($this->createLink('tutorial', 'wizard', "module=bug&method=create¶ms=$wizardParams"), "" . $lang->bug->create, '', "class='btn btn-primary btn-bug-create'"); + echo html::a($this->createLink('tutorial', 'wizard', "module=bug&method=create¶ms=$wizardParams", '', '', $this->session->program), "" . $lang->bug->create, '', "class='btn btn-primary btn-bug-create'"); } else { - common::printLink('bug', 'create', "productID=$productID&branch=$branch&extra=moduleID=$moduleID", "" . $lang->bug->create, '', "class='btn btn-primary'"); + common::printLink('bug', 'create', "productID=$productID&branch=$branch&extra=moduleID=$moduleID", "" . $lang->bug->create, '', "class='btn btn-primary'", '', '', '', $this->session->program); } ?> @@ -135,12 +135,12 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow if(commonModel::isTutorialMode()) { $wizardParams = helper::safe64Encode("productID=$productID&branch=$branch&extra=moduleID=$moduleID"); - $link = $this->createLink('tutorial', 'wizard', "module=bug&method=create¶ms=$wizardParams"); + $link = $this->createLink('tutorial', 'wizard', "module=bug&method=create¶ms=$wizardParams", '', '', $this->session->program); echo html::a($link, " {$lang->bug->create} ", '', "class='btn btn-primary btn-bug-create'"); } else { - $link = $this->createLink('bug', 'create', "productID=$productID&branch=$branch&extra=moduleID=$moduleID"); + $link = $this->createLink('bug', 'create', "productID=$productID&branch=$branch&extra=moduleID=$moduleID", '', '', $this->session->program); $disabled = ''; if(!common::hasPriv('bug', 'create')) { @@ -154,7 +154,7 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
  • > createLink('bug', 'batchCreate', "productID=$productID&branch=$branch&projectID=0&moduleID=$moduleID"); + $batchLink = $this->createLink('bug', 'batchCreate', "productID=$productID&branch=$branch&projectID=0&moduleID=$moduleID", '', '', $this->session->program); echo "
  • " . html::a($batchLink, "" . $lang->bug->batchCreate) . "
  • "; ?> @@ -175,7 +175,7 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
    - tree->manage, '', "class='btn btn-info btn-wide'");?> + tree->manage, '', "class='btn btn-info btn-wide'", '', '', '', $this->session->program);?>
    @@ -187,7 +187,7 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow

    bug->noBug;?> - createLink('bug', 'create', "productID=$productID&branch=$branch&extra=moduleID=$moduleID"), " " . $lang->bug->create, '', "class='btn btn-info'");?> + createLink('bug', 'create', "productID=$productID&branch=$branch&extra=moduleID=$moduleID", '', '', $this->session->program), " " . $lang->bug->create, '', "class='btn btn-info'");?>

    @@ -241,7 +241,7 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
    createLink('bug', 'batchEdit', "productID=$productID&branch=$branch"); + $actionLink = $this->createLink('bug', 'batchEdit', "productID=$productID&branch=$branch", '', '', $this->session->program); $misc = common::hasPriv('bug', 'batchEdit') ? "onclick=\"setFormAction('$actionLink')\"" : "disabled='disabled'"; echo html::commonButton($lang->edit, $misc); ?> @@ -249,15 +249,15 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
    @@ -87,7 +87,7 @@ js::set('flow', $config->global->flow);

    testcase->noCase;?> - createLink('caselib', 'createCase', "libID=$libID&moduleID=" . (isset($moduleID) ? $moduleID : 0)), " " . $lang->testcase->create, '', "class='btn btn-info'");?> + createLink('caselib', 'createCase', "libID=$libID&moduleID=" . (isset($moduleID) ? $moduleID : 0), '', '', $this->session->program), " " . $lang->testcase->create, '', "class='btn btn-info'");?>

    @@ -124,7 +124,7 @@ js::set('flow', $config->global->flow); - id => '')) . html::a($this->createLink('testcase', 'view', "caseID=$case->id&version=$case->version"), sprintf('%03d', $case->id));?> + id => '')) . html::a($this->createLink('testcase', 'view', "caseID=$case->id&version=$case->version", '', '', $this->session->program), sprintf('%03d', $case->id));?> id);?> @@ -132,7 +132,7 @@ js::set('flow', $config->global->flow); testcase->priList, $case->pri, $case->pri);?> module) echo "{$modulePairs[$case->module]} ";?> - createLink('testcase', 'view', "caseID=$case->id&version=$case->version");?> + createLink('testcase', 'view', "caseID=$case->id&version=$case->version", '', '', $this->session->program);?> title, null, "style='color: $case->color'");?> testcase->typeList[$case->type];?> @@ -144,7 +144,7 @@ js::set('flow', $config->global->flow); common::printIcon('testcase', 'edit', "caseID=$case->id", $case, 'list'); if(common::hasPriv('testcase', 'delete')) { - $deleteURL = $this->createLink('testcase', 'delete', "caseID=$case->id&confirm=yes"); + $deleteURL = $this->createLink('testcase', 'delete', "caseID=$case->id&confirm=yes", '', '', $this->session->program); echo html::a("javascript:ajaxDelete(\"$deleteURL\", \"caseList\", confirmDelete)", '', '', "title='{$lang->testcase->delete}' class='btn'"); } ?> @@ -158,7 +158,7 @@ js::set('flow', $config->global->flow);
    - createLink('testcase', 'batchEdit', "libID=$libID&branch=0&type=lib");?> + createLink('testcase', 'batchEdit', "libID=$libID&branch=0&type=lib", '', '', $this->session->program);?> edit, $misc);?> @@ -167,7 +167,7 @@ js::set('flow', $config->global->flow); createLink('testcase', 'batchDelete', "libID=$libID"); + $actionLink = $this->createLink('testcase', 'batchDelete', "libID=$libID", '', '', $this->session->program); $misc = "onclick=\"confirmBatchDelete('$actionLink')\""; echo "
  • " . html::a('#', $lang->delete, '', $misc) . "
  • "; } @@ -180,7 +180,7 @@ js::set('flow', $config->global->flow); unset($lang->testcase->reviewResultList['']); foreach($lang->testcase->reviewResultList as $key => $result) { - $actionLink = $this->createLink('testcase', 'batchReview', "result=$key"); + $actionLink = $this->createLink('testcase', 'batchReview', "result=$key", '', '', $this->session->program); echo '
  • ' . html::a('#', $result, '', "onclick=\"setFormAction('$actionLink', 'hiddenwin')\"") . '
  • '; } echo ''; @@ -195,7 +195,7 @@ js::set('flow', $config->global->flow); echo ''; diff --git a/module/jenkins/control.php b/module/jenkins/control.php index 67658f061f..3903400792 100644 --- a/module/jenkins/control.php +++ b/module/jenkins/control.php @@ -35,7 +35,7 @@ class jenkins extends control */ public function browse($orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1) { - if(common::hasPriv('jenkins', 'create')) $this->lang->modulePageActions = html::a(helper::createLink('jenkins', 'create'), " " . $this->lang->jenkins->create, '', "class='btn btn-primary'"); + if(common::hasPriv('jenkins', 'create')) $this->lang->modulePageActions = html::a(helper::createLink('jenkins', 'create', '', '', '', $this->session->program), " " . $this->lang->jenkins->create, '', "class='btn btn-primary'"); $this->app->loadClass('pager', $static = true); $pager = new pager($recTotal, $recPerPage, $pageID); diff --git a/module/job/view/browse.html.php b/module/job/view/browse.html.php index c54b21a591..adfd19385e 100644 --- a/module/job/view/browse.html.php +++ b/module/job/view/browse.html.php @@ -13,11 +13,11 @@
    @@ -41,7 +41,7 @@ $job):?> - createLink('job', 'view', "jobID={$job->id}", 'html', true), $job->name, '', "class='iframe' data-width='90%'") : $job->name;?> + createLink('job', 'view', "jobID={$job->id}", 'html', true, $this->session->program), $job->name, '', "class='iframe' data-width='90%'") : $job->name;?> repoName; ?> job->frameList, $job->frame);?> jkJob) . '@' . $job->jenkinsName;?> @@ -55,7 +55,7 @@ common::printIcon('compile', 'browse', "jobID=$id", '', 'list', 'history'); common::printIcon('job', 'edit', "jobID=$id", '', 'list', 'edit'); common::printIcon('job', 'exec', "jobID=$id", '', 'list', 'play', 'hiddenwin'); - if(common::hasPriv('job', 'delete')) echo html::a($this->createLink('job', 'delete', "jobID=$id"), '', 'hiddenwin', "title='{$lang->job->delete}' class='btn'"); + if(common::hasPriv('job', 'delete')) echo html::a($this->createLink('job', 'delete', "jobID=$id", '', '', $this->session->program), '', 'hiddenwin', "title='{$lang->job->delete}' class='btn'"); ?> diff --git a/module/release/model.php b/module/release/model.php index 4c456018b8..8e203d0ce9 100644 --- a/module/release/model.php +++ b/module/release/model.php @@ -132,6 +132,7 @@ class releaseModel extends model else { $build = new stdclass(); + $build->program = $this->session->program; $build->product = (int)$productID; $build->branch = (int)$branch; $build->name = $this->post->name; @@ -152,6 +153,7 @@ class releaseModel extends model if($this->post->build) $branch = $this->dao->select('branch')->from(TABLE_BUILD)->where('id')->eq($this->post->build)->fetch('branch'); $release = fixer::input('post') + ->add('program', $this->session->program) ->add('product', (int)$productID) ->add('branch', (int)$branch) ->setDefault('stories', '') diff --git a/module/release/view/browse.html.php b/module/release/view/browse.html.php index 04ae0ca01a..ecd378ed07 100644 --- a/module/release/view/browse.html.php +++ b/module/release/view/browse.html.php @@ -16,13 +16,13 @@
    @@ -31,7 +31,7 @@

    release->noRelease;?> - createLink('release', 'create', "productID=$product->id&branch=$branch"), " " . $lang->release->create, '', "class='btn btn-info'");?> + createLink('release', 'create', "productID=$product->id&branch=$branch", '', '', $this->session->program), " " . $lang->release->create, '', "class='btn btn-info'");?>

    @@ -53,14 +53,14 @@ - id"), sprintf('%03d', $release->id));?> + id", '', '', $this->session->program), sprintf('%03d', $release->id));?> marker ? " " : ''; - echo html::a(inlink('view', "release=$release->id"), $release->name) . $flagIcon; + echo html::a($this->createLink('release', 'view', "release=$release->id", '', '', $this->session->program), $release->name) . $flagIcon; ?> - project) ? $release->buildName : html::a($this->createLink('build', 'view', "buildID=$release->buildID"), $release->buildName);?> + project) ? $release->buildName : html::a($this->createLink('build', 'view', "buildID=$release->buildID", '', '', $this->session->program), $release->buildName);?> type != 'normal'):?> '>branch];?> @@ -71,17 +71,17 @@ id&type=story&link=true"), ' ', '', "class='btn' title='{$lang->release->linkStory}'"); - if(common::hasPriv('release', 'linkBug') and $config->global->flow != 'onlyStory') echo html::a(inlink('view', "releaseID=$release->id&type=bug&link=true"), ' ', '', "class='btn' title='{$lang->release->linkBug}'"); + if(common::hasPriv('release', 'linkStory')) echo html::a($this->createLink('release', 'view', "releaseID=$release->id&type=story&link=true", '', '', $this->session->program), ' ', '', "class='btn' title='{$lang->release->linkStory}'"); + if(common::hasPriv('release', 'linkBug') and $config->global->flow != 'onlyStory') echo html::a($this->createLink('release', 'view', "releaseID=$release->id&type=bug&link=true", '', '', $this->session->program), ' ', '', "class='btn' title='{$lang->release->linkBug}'"); if(common::hasPriv('release', 'changeStatus', $release)) { $changedStatus = $release->status == 'normal' ? 'terminate' : 'normal'; - echo html::a(inlink('changeStatus', "releaseID=$release->id&status=$changedStatus"), ' ', 'hiddenwin', "class='btn' title='{$lang->release->changeStatusList[$changedStatus]}'"); + echo html::a($this->createLink('release', 'changeStatus', "releaseID=$release->id&status=$changedStatus", '', '', $this->session->program), ' ', 'hiddenwin', "class='btn' title='{$lang->release->changeStatusList[$changedStatus]}'"); } - common::printIcon('release', 'edit', "release=$release->id", $release, 'list'); + common::printIcon('release', 'edit', "release=$release->id", $release, 'list', '', '', '', '', '', '', $this->session->program); if(common::hasPriv('release', 'delete', $release)) { - $deleteURL = $this->createLink('release', 'delete', "releaseID=$release->id&confirm=yes"); + $deleteURL = $this->createLink('release', 'delete', "releaseID=$release->id&confirm=yes", '', '', $this->session->program); echo html::a("javascript:ajaxDelete(\"$deleteURL\", \"releaseList\", confirmDelete)", '', '', "class='btn' title='{$lang->release->delete}'"); } ?> diff --git a/module/release/view/view.html.php b/module/release/view/view.html.php index d46696709e..ee2ae815be 100644 --- a/module/release/view/view.html.php +++ b/module/release/view/view.html.php @@ -16,7 +16,7 @@ release->confirmUnlinkBug)?>