diff options
author | lpsolit%gmail.com <> | 2008-12-16 22:39:41 +0000 |
---|---|---|
committer | lpsolit%gmail.com <> | 2008-12-16 22:39:41 +0000 |
commit | e27e9b2054a33e3c67a106401f7f0adc7ecf879f (patch) | |
tree | a3186ce9fb8c5415a97eef8db23f62a8eb02c19e /search_plugin.cgi | |
parent | 638396bb1aaa8459d51527d45331418cc426373e (diff) | |
download | bugs-e27e9b2054a33e3c67a106401f7f0adc7ecf879f.tar bugs-e27e9b2054a33e3c67a106401f7f0adc7ecf879f.tar.gz bugs-e27e9b2054a33e3c67a106401f7f0adc7ecf879f.tar.bz2 bugs-e27e9b2054a33e3c67a106401f7f0adc7ecf879f.tar.xz bugs-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.cgi | 12 |
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()); |