summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/Template.pm10
1 files changed, 4 insertions, 6 deletions
diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm
index d6f665952..bea1639f3 100644
--- a/Bugzilla/Template.pm
+++ b/Bugzilla/Template.pm
@@ -281,12 +281,8 @@ sub get_attachment_link {
# If the attachment is a patch, try to link to the diff rather
# than the text, by default.
my $patchlink = "";
- if ($is_patch) {
- # Determine if PatchReader is installed
- my $patchviewer_installed = eval { require PatchReader; };
- if ($patchviewer_installed) {
- $patchlink = '&action=diff';
- }
+ if ($is_patch and Bugzilla->feature('patch_viewer')) {
+ $patchlink = '&action=diff';
}
# Whitespace matters here because these links are in <pre> tags.
@@ -745,6 +741,8 @@ sub create {
return \@bug_list;
},
+ 'feature_enabled' => sub { return Bugzilla->feature(@_); },
+
# These don't work as normal constants.
DB_MODULE => \&Bugzilla::Constants::DB_MODULE,
REQUIRED_MODULES =>