From e27e9b2054a33e3c67a106401f7f0adc7ecf879f Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Tue, 16 Dec 2008 22:39:41 +0000 Subject: Bug 461534: search_plugin.cgi should get icon from images/favicon.ico - Patch by Rob Siklos r/a=LpSolit --- search_plugin.cgi | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'search_plugin.cgi') 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'} = ; + close IN; +} +$template->process("search/search-plugin.xml.tmpl", $vars) || ThrowTemplateError($template->error()); -- cgit v1.2.3-24-g4f1b