aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2008-12-16 22:39:41 +0000
committerlpsolit%gmail.com <>2008-12-16 22:39:41 +0000
commite27e9b2054a33e3c67a106401f7f0adc7ecf879f (patch)
treea3186ce9fb8c5415a97eef8db23f62a8eb02c19e /search_plugin.cgi
parentBug 468728: The 'allowemailchange' parameter should default to 1 (diff)
downloadbugzilla-e27e9b2054a33e3c67a106401f7f0adc7ecf879f.tar.gz
bugzilla-e27e9b2054a33e3c67a106401f7f0adc7ecf879f.tar.bz2
bugzilla-e27e9b2054a33e3c67a106401f7f0adc7ecf879f.zip
Bug 461534: search_plugin.cgi should get icon from images/favicon.ico - Patch by Rob Siklos <robzilla2@siklos.ca> r/a=LpSolit
Diffstat (limited to 'search_plugin.cgi')
-rw-r--r--search_plugin.cgi12
1 files changed, 11 insertions, 1 deletions
diff --git a/search_plugin.cgi b/search_plugin.cgi
index 5048f7ce6..4dfe8fa9f 100644
--- a/search_plugin.cgi
+++ b/search_plugin.cgi
@@ -20,14 +20,24 @@ use lib qw(. lib);
use Bugzilla;
use Bugzilla::Error;
+use Bugzilla::Constants;
Bugzilla->login();
my $cgi = Bugzilla->cgi;
my $template = Bugzilla->template;
+my $vars = {};
# Return the appropriate HTTP response headers.
print $cgi->header('application/xml');
-$template->process("search/search-plugin.xml.tmpl")
+# Get the contents of favicon.ico
+my $filename = bz_locations()->{'libpath'} . "/images/favicon.ico";
+if (open(IN, $filename)) {
+ local $/;
+ binmode IN;
+ $vars->{'favicon'} = <IN>;
+ close IN;
+}
+$template->process("search/search-plugin.xml.tmpl", $vars)
|| ThrowTemplateError($template->error());