diff --git a/js/bug.js b/js/bug.js index a4c75d177..8f7468776 100644 --- a/js/bug.js +++ b/js/bug.js @@ -94,8 +94,10 @@ function addCollapseLink(id) function addReplyLink(num, id) { var e = document.getElementById('comment_act_'+id); + if (!e) return; + var s = '['; if (user_settings.quote_replies != 'off') { @@ -104,11 +106,16 @@ function addReplyLink(num, id) } s += ', clone to other'; s += '/same'; + // 4Intranet Bug 69514 - Clone to external product button if (bug_info.extprod) s += '/ext'; else if (bug_info.intprod) s += '/int'; + + if (window.bugLinkHook) + s += bugLinkHook(num, id); + s += ' product]'; e.innerHTML += s; } diff --git a/js/util.js b/js/util.js index d7358ddff..d433811a4 100644 --- a/js/util.js +++ b/js/util.js @@ -33,6 +33,16 @@ function htmlspecialchars(s) return s; } +window.http_build_query = function(data) +{ + var encoded = ''; + for (var i in data) + { + encoded = encoded+'&'+encodeURIComponent(i)+'='+(data[i] === false || data[i] === null ? '' : encodeURIComponent(data[i])); + } + return encoded.substr(1); +}; + // Checks if a specified value 'val' is in the specified array 'arr' function bz_isValueInArray(arr, val) { diff --git a/template/en/default/bug/show.html.tmpl b/template/en/default/bug/show.html.tmpl index 0403326ff..2edf0ef56 100644 --- a/template/en/default/bug/show.html.tmpl +++ b/template/en/default/bug/show.html.tmpl @@ -6,6 +6,8 @@ [% PROCESS "bug/show-header.html.tmpl" %] +[% Hook.process('bug_link_hook') %] + [% PROCESS bug/navigate.html.tmpl %] [% PROCESS bug/edit.html.tmpl %]