summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Config
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla/Config')
-rw-r--r--Bugzilla/Config/Common.pm18
-rw-r--r--Bugzilla/Config/DependencyGraph.pm9
2 files changed, 25 insertions, 2 deletions
diff --git a/Bugzilla/Config/Common.pm b/Bugzilla/Config/Common.pm
index 64c7ebcbb..5872ae1e1 100644
--- a/Bugzilla/Config/Common.pm
+++ b/Bugzilla/Config/Common.pm
@@ -24,7 +24,7 @@ use parent qw(Exporter);
qw(check_multi check_numeric check_regexp check_url check_group
check_sslbase check_priority check_severity check_platform
check_opsys check_shadowdb check_urlbase check_webdotbase
- check_user_verify_class check_ip
+ check_user_verify_class check_ip check_font_file
check_mail_delivery_method check_notification check_utf8
check_bug_status check_smtp_auth check_theschwartz_available
check_maxattachmentsize check_email check_smtp_ssl
@@ -242,6 +242,20 @@ sub check_webdotbase {
return "";
}
+sub check_font_file {
+ my ($font) = @_;
+ $font = trim($font);
+ return '' unless $font;
+
+ if ($font !~ /\.ttf$/) {
+ return "The file must point to a TrueType font file (its extension must be .ttf)"
+ }
+ if (! -f $font) {
+ return "The file '$font' cannot be found. Make sure you typed the full path to the file"
+ }
+ return '';
+}
+
sub check_user_verify_class {
# doeditparams traverses the list of params, and for each one it checks,
# then updates. This means that if one param checker wants to look at
@@ -479,6 +493,8 @@ Checks that the value is a valid regexp
=item check_webdotbase
+=item check_font_file
+
=item get_param_list
=item check_maxattachmentsize
diff --git a/Bugzilla/Config/DependencyGraph.pm b/Bugzilla/Config/DependencyGraph.pm
index 42f34e30e..51836405c 100644
--- a/Bugzilla/Config/DependencyGraph.pm
+++ b/Bugzilla/Config/DependencyGraph.pm
@@ -22,7 +22,14 @@ sub get_param_list {
type => 't',
default => 'http://www.research.att.com/~north/cgi-bin/webdot.cgi/%urlbase%',
checker => \&check_webdotbase
- } );
+ },
+
+ {
+ name => 'font_file',
+ type => 't',
+ default => '',
+ checker => \&check_font_file
+ });
return @param_list;
}