Skip to content

Commit

Permalink
Use $g_search_title when advertising search engines
Browse files Browse the repository at this point in the history
Issue #11964
  • Loading branch information
dregad committed Aug 9, 2016
1 parent 1332b76 commit 81862b1
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions core/html_api.php
Expand Up @@ -205,8 +205,19 @@ function html_page_top1( $p_page_title = null ) {
}

# Advertise the availability of the browser search plug-ins.
echo "\t", '<link rel="search" type="application/opensearchdescription+xml" title="MantisBT: Text Search" href="' . string_sanitize_url( 'browser_search_plugin.php?type=text', true ) . '" />' . "\n";
echo "\t", '<link rel="search" type="application/opensearchdescription+xml" title="MantisBT: Issue Id" href="' . string_sanitize_url( 'browser_search_plugin.php?type=id', true ) . '" />' . "\n";
$t_title = config_get_global( 'search_title' );
$t_searches = array(
'text' => $t_title . ': ' . 'Text Search',
'id' => $t_title . ': ' . 'Issue Id Search',
);
foreach( $t_searches as $t_type => $t_label ) {
echo "\t",
'<link rel="search" type="application/opensearchdescription+xml" ',
'title="' . $t_label . '" ',
'href="' . string_sanitize_url( 'browser_search_plugin.php?type=' . $t_type, true ) .
'", />',
"\n";
}

html_head_javascript();
}
Expand Down

0 comments on commit 81862b1

Please sign in to comment.