Skip to content

Commit

Permalink
Use configured favicon for OpenSearch entries
Browse files Browse the repository at this point in the history
Previously, we were using an hardcoded image file that was not matching
the new MantisBT icon.

This references the standard MantisBT favicon instead, and allows
administrators to customize their Browser Search with their own icon.

Fixes #11964
  • Loading branch information
dregad committed Aug 9, 2016
1 parent 8e50b7e commit 9a587dd
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
3 changes: 2 additions & 1 deletion browser_search_plugin.php
Expand Up @@ -37,6 +37,7 @@
$f_type = gpc_get_string( 'type', 'text' );

$t_path = config_get_global( 'path' );
$t_icon = $t_path . config_get_global( 'favicon_image' );
$t_searchform = $t_path . 'view_all_bug_page.php';

if( strtolower( $f_type ) == 'id' ) {
Expand All @@ -57,7 +58,7 @@
<ShortName><?php echo $t_shortname; ?></ShortName>
<Description><?php echo $t_description; ?></Description>
<InputEncoding>UTF-8</InputEncoding>
<Image width="16" height="16">data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%10%00%00%00%10%08%06%00%00%00%1F%F3%FFa%00%00%00%01sRGB%00%AE%CE%1C%E9%00%00%00%06bKGD%00%FF%00%FF%00%FF%A0%BD%A7%93%00%00%00%09pHYs%00%00%0D%12%00%00%0D%3A%01%E8%DD%99%DE%00%00%00%07tIME%07%D8%0A%1B%035%18L%0A%18d%00%00%02AIDAT8%CB%8D%93%BDOZa%18%C5%7F%7C(%97%8FF%CA%0DU%7B%5BCj%D0Z%E3%AA%12%1C%D4%85A%A2%5D%5C%1C%1C%8C%93%FF%83I%FF%13%07%12'0.%9A%90%88B%24%C6%0Ej4bJ%1A%8C%A2%40%FC%00%8C%20%22%B7p%3Bq%95R%9B%9E%E9%7D%CE%9Bs%F2%BC%E7y%5EM%A9%24%2B%3E_%9CX%2C%87%2C%D7x%0D%82%A0cb%C2A%20%90%40%10t%8C%8C%BC%C7%E3%F9%88%FE%EC%AC%402Y%F8%A7%18%C0%EBu%B0%B6v%06%40%B9%5Cec%E3%02%9DN%83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00%00%00%00IEND%AEB%60%82</Image>
<Image width="16" height="16" type="image/x-icon"><?php echo $t_icon; ?></Image>
<Url type="text/html" method="GET" template="<?php echo $t_url; ?>"></Url>';
<moz:SearchForm><?php echo $t_searchform; ?></moz:SearchForm>
</OpenSearchDescription>
4 changes: 3 additions & 1 deletion config_defaults_inc.php
Expand Up @@ -857,7 +857,9 @@
$g_admin_checks = ON;

/**
* Favicon image
* Favicon image.
* This icon should be of 'image/x-icon' MIME type, and its size 16x16 pixels.
* It is also used to decorate OpenSearch Browser search entries.
* @global string $g_favicon_image
*/
$g_favicon_image = 'images/favicon.ico';
Expand Down
7 changes: 6 additions & 1 deletion docbook/Admin_Guide/en-US/config/display.xml
Expand Up @@ -17,7 +17,12 @@
<varlistentry>
<term>$g_favicon_image</term>
<listitem>
<para>Path to the favorites icon relative to MantisBT root folder (default 'images/favicon.ico').</para>
<para>Path to the favorites icon relative to MantisBT root folder
This icon should be of <emphasis>image/x-icon</emphasis> MIME type,
and its size 16x16 pixels. It is also used to decorate
OpenSearch Browser search entries.
(default 'images/favicon.ico').
</para>
</listitem>
</varlistentry>
<varlistentry>
Expand Down

0 comments on commit 9a587dd

Please sign in to comment.