diff --git a/Bugzilla/Config/Integration.pm b/Bugzilla/Config/Integration.pm index 08a62e5ad..6c24a00b6 100644 --- a/Bugzilla/Config/Integration.pm +++ b/Bugzilla/Config/Integration.pm @@ -26,14 +26,8 @@ sub get_param_list }, { - name => 'viewvc_url', - type => 't', - default => '', - }, - - { - name => 'git_url', - type => 't', + name => 'look_in_urls', + type => 'l', default => '', }, diff --git a/show_bug.cgi b/show_bug.cgi index 68a030d47..9165218ae 100755 --- a/show_bug.cgi +++ b/show_bug.cgi @@ -156,6 +156,8 @@ $vars->{comment_indexes} = sub return [ map { [ $_->{count}, $_->{comment_id}, $_->{type} != CMT_WORKTIME && $_->{type} != CMT_BACKDATED_WORKTIME ? 1 : 0 ] } @$comments ]; }; +$vars->{look_in_urls} = [ map { [ split /:/, $_, 2 ] } grep { /^(?!\s*(#|$))/so } split /\n/, Bugzilla->params->{look_in_urls} ]; + Bugzilla->cgi->send_header($format->{ctype}); $template->process($format->{template}, $vars) || ThrowTemplateError($template->error()); diff --git a/skins/standard/params.css b/skins/standard/params.css index 4eec75261..2041a572a 100644 --- a/skins/standard/params.css +++ b/skins/standard/params.css @@ -59,3 +59,11 @@ dd { padding: .5em; font-size: small; } + +pre.cfg_example { + margin: 8px 0; + padding: 4px; + background: white; + float: left; + border: 1px solid gray; +} diff --git a/template/en/default/admin/params/integration.html.tmpl b/template/en/default/admin/params/integration.html.tmpl index 7bc745256..c5cd6af21 100644 --- a/template/en/default/admin/params/integration.html.tmpl +++ b/template/en/default/admin/params/integration.html.tmpl @@ -18,18 +18,15 @@ _ " \$EMAIL will be replaced by cleartext user email, so you should only never use it in public networks;" _ " \$MD5 will be replaced by MD5 hash of user email, just like it is required by real Gravatar service." _ " You can also disable avatar display by clearing this parameter.", - viewvc_url => - "ViewVC query URL for browsing bug-related commits. Bugzilla4Intranet links to ViewVC search page with full-text query 'bugXXX XXX'" - _ " which allows to show commits with the bug number in the commit message (like 'Bug XXX' or 'BugXXX').", - git_url => - "Git (GitBlit or other web UI) full-text query URL for browsing bug-related commits. '$q' in URL will be replaced by 'bugXXX XXX'" - _ " which allows to show commits with the bug number in the commit message (like 'Bug XXX' or 'BugXXX').", + look_in_urls => + "
VCS/Wiki/whatever query URLs for 'Look for bug in ...' links, one per line, separated by ':'.
" _ + "CVS/SVN: http://viewvc.local/?view=query&comment=bug\$BUG+\$BUG&comment_match=fulltext&querysort=date&date=all" _ + "
$BUG will be replaced with bug ID in these URLs.
", wiki_url => "Default MediaWiki URL for bug links. Bugzilla4Intranet links to <wiki_url>/Bug_XXX pages when this is non-empty.", mediawiki_urls => "Known MediaWiki URLs to be quoted in bug comments, one per line. Example:
" - _ "wikipedia http://en.wikipedia.org/wiki/" + _ "
wikipedia http://en.wikipedia.org/wiki/" _ "
Links like wikipedia:Article_name#Section"
_ " and wikipedia:[[Article name#Section]]
will be quoted"
_ " and lead to Section (optional) of Article name page in the Wikipedia.