aboutsummaryrefslogtreecommitdiffstats
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
parent638396bb1aaa8459d51527d45331418cc426373e (diff)
downloadbugs-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
-rw-r--r--search_plugin.cgi12
-rw-r--r--template/en/default/search/search-plugin.xml.tmpl6
2 files changed, 16 insertions, 2 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());
diff --git a/template/en/default/search/search-plugin.xml.tmpl b/template/en/default/search/search-plugin.xml.tmpl
index fe870a85a..8564dca47 100644
--- a/template/en/default/search/search-plugin.xml.tmpl
+++ b/template/en/default/search/search-plugin.xml.tmpl
@@ -19,6 +19,10 @@
<ShortName>[% terms.Bugzilla %]</ShortName>
<Description>[% terms.Bugzilla %] Quick Search</Description>
<InputEncoding>UTF-8</InputEncoding>
-<Image width="16" height="16">data:image/x-icon;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAABGdBTUEAAK%2FINwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAALBSURBVHjaYnxckcEAA3%2F%2B%2FT%2F17LUcH%2Fevf%2F8U%2BHmYGBkZMABAALEgc%2B68%2F3T227cf2tJKKhJLt59n%2FfmbnYnZV1KEhYkJrgYggBghNrz78fPIi3d8uvKBIdb%2FOaWPnzitLc97%2Bc5rFXnhnVO3%2BslLwjUABBDIhnsfPl%2Fj53VO91FX4Gfgkjxw%2Fd%2F6Q49%2FWStqyAj%2B%2B88gZqn%2B9u5rYU52iAaAAGL69%2F%2F%2F2d9%2FYiMclGT4fv76%2BZ9DbO%2FeA39%2BfJHVcvj5l%2Bnh03e%2FWThOvnwLtwEgAAAxAM7%2FBPj8%2FRYkHQYHAf3%2F%2Fv%2F%2B%2Fv8BAVNTUPX18yorLNHE2S8mB%2FT2%2Bq7a4dvu8iUSDgAAAAKICRgUv3%2F8ZGKGeIvpz6eXBvq61lZWLMwMv%2F5zMP7%2FqSAjVFyZ%2FNvZftuT10DnAAQAMQDO%2FwQIBAPz5Or6%2Ff0CBQEAAgT99ubq38z2%2BwT18%2FAM%2F%2BkNDAv6%2FQMCAA1GVVrhMze5h4kCCORpkd9%2F3n74KiHO%2B%2BffX8b%2Ff7m%2BXWP985%2Bf5R%2BPLNdfoK%2F%2F%2Ffv39%2BePj2%2FkZYR0fe0BAgikQZGX%2B9b9FzLS%2FH%2F%2B%2FGVgYGRlZWNlA7nv7z9QuDP8%2B8nw%2FRXjn68Mv4Gu%2FAwQQCCni3FxPLn7nIGZGegfNhYmNjYWZnBMASOakZER6Eumf9%2FYGT4y%2FHx%2F%2BfBFgAAC2cDGzPT99WeGvwzvv%2Fx89vrr%2F39%2FJER4pcT5Gf4z%2FP37D2jtj9%2B%2FL918fmzrKSsWNoAAgiaN%2Fz9%2Fff%2F6S4CP8%2BWbz9vWHfv54aukpAAz0Og%2Ff%2F7%2F%2Bs36668cO3ugED9QJUAAQTUArf7%2F8x87D9vRjcejhPiZhAUYcACAAGI5%2FOHH9ddvXzAxmjz%2B8P8lw4fXn5l4eRlwA4AAYmaTkBFg%2FKvJwfbkwZuXN57y%2Fv%2F34stXGR4uRmxpGwgAAgwA4%2FkfrfCWvLQAAAAASUVORK5CYII%3D</Image>
+[% IF favicon %]
+ <Image width="16" height="16">data:image/x-icon;base64,[% favicon FILTER base64 %]</Image>
+[% ELSE %]
+ <Image width="16" height="16">data:image/x-icon;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAABGdBTUEAAK%2FINwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAALBSURBVHjaYnxckcEAA3%2F%2B%2FT%2F17LUcH%2Fevf%2F8U%2BHmYGBkZMABAALEgc%2B68%2F3T227cf2tJKKhJLt59n%2FfmbnYnZV1KEhYkJrgYggBghNrz78fPIi3d8uvKBIdb%2FOaWPnzitLc97%2Bc5rFXnhnVO3%2BslLwjUABBDIhnsfPl%2Fj53VO91FX4Gfgkjxw%2Fd%2F6Q49%2FWStqyAj%2B%2B88gZqn%2B9u5rYU52iAaAAGL69%2F%2F%2F2d9%2FYiMclGT4fv76%2BZ9DbO%2FeA39%2BfJHVcvj5l%2Bnh03e%2FWThOvnwLtwEgAAAxAM7%2FBPj8%2FRYkHQYHAf3%2F%2Fv%2F%2B%2Fv8BAVNTUPX18yorLNHE2S8mB%2FT2%2Bq7a4dvu8iUSDgAAAAKICRgUv3%2F8ZGKGeIvpz6eXBvq61lZWLMwMv%2F5zMP7%2FqSAjVFyZ%2FNvZftuT10DnAAQAMQDO%2FwQIBAPz5Or6%2Ff0CBQEAAgT99ubq38z2%2BwT18%2FAM%2F%2BkNDAv6%2FQMCAA1GVVrhMze5h4kCCORpkd9%2F3n74KiHO%2B%2BffX8b%2Ff7m%2BXWP985%2Bf5R%2BPLNdfoK%2F%2F%2Ffv39%2BePj2%2FkZYR0fe0BAgikQZGX%2B9b9FzLS%2FH%2F%2B%2FGVgYGRlZWNlA7nv7z9QuDP8%2B8nw%2FRXjn68Mv4Gu%2FAwQQCCni3FxPLn7nIGZGegfNhYmNjYWZnBMASOakZER6Eumf9%2FYGT4y%2FHx%2F%2BfBFgAAC2cDGzPT99WeGvwzvv%2Fx89vrr%2F39%2FJER4pcT5Gf4z%2FP37D2jtj9%2B%2FL918fmzrKSsWNoAAgiaN%2Fz9%2Fff%2F6S4CP8%2BWbz9vWHfv54aukpAAz0Og%2Ff%2F7%2F%2Bs36668cO3ugED9QJUAAQTUArf7%2F8x87D9vRjcejhPiZhAUYcACAAGI5%2FOHH9ddvXzAxmjz%2B8P8lw4fXn5l4eRlwA4AAYmaTkBFg%2FKvJwfbkwZuXN57y%2Fv%2F34stXGR4uRmxpGwgAAgwA4%2FkfrfCWvLQAAAAASUVORK5CYII%3D</Image>
+[% END %]
<Url type="text/html" method="GET" template="[% urlbase FILTER xml %]buglist.cgi?quicksearch={searchTerms}"/>
</OpenSearchDescription>