summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authorByron Jones <bjones@mozilla.com>2013-10-21 07:43:38 +0200
committerByron Jones <bjones@mozilla.com>2013-10-21 07:43:38 +0200
commit5d096b6f18c5e42f3246c9a652c276fabda5f6f3 (patch)
tree1f7592585d96dc0138e3cc434dd9a5ffa2d67eb1 /Bugzilla
parent717cad2171889a960136bfc663c624a5043b79a3 (diff)
downloadbugzilla-5d096b6f18c5e42f3246c9a652c276fabda5f6f3.tar.gz
bugzilla-5d096b6f18c5e42f3246c9a652c276fabda5f6f3.tar.xz
fix breakage caused by bug 922684
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/Util.pm9
1 files changed, 8 insertions, 1 deletions
diff --git a/Bugzilla/Util.pm b/Bugzilla/Util.pm
index 96dad8327..a030a92dd 100644
--- a/Bugzilla/Util.pm
+++ b/Bugzilla/Util.pm
@@ -36,7 +36,7 @@ use base qw(Exporter);
detaint_signed
html_quote url_quote xml_quote
css_class_quote html_light_quote
- i_am_cgi correct_urlbase remote_ip validate_ip
+ i_am_cgi i_am_webservice correct_urlbase remote_ip validate_ip
do_ssl_redirect_if_required use_attachbase
diff_arrays on_main_db
trim wrap_hard wrap_comment find_wrap_point
@@ -259,6 +259,13 @@ sub i_am_cgi {
return exists $ENV{'SERVER_SOFTWARE'} ? 1 : 0;
}
+sub i_am_webservice {
+ my $usage_mode = Bugzilla->usage_mode;
+ return $usage_mode == USAGE_MODE_XMLRPC
+ || $usage_mode == USAGE_MODE_JSON
+ || $usage_mode == USAGE_MODE_REST;
+}
+
# This exists as a separate function from Bugzilla::CGI::redirect_to_https
# because we don't want to create a CGI object during XML-RPC calls
# (doing so can mess up XML-RPC).