Skip to content

Commit

Permalink
Check if a static filter is used for autosuggestions and omit the
Browse files Browse the repository at this point in the history
parameter f in the serviceurl otherwise
  • Loading branch information
tkempf committed Aug 25, 2015
1 parent 5f2085e commit 7adc050
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/mod_finder/tmpl/default.php
Expand Up @@ -125,10 +125,10 @@
if ($params->get('show_autosuggest', 1))
{
JHtml::_('script', 'media/jui/js/jquery.autocomplete.min.js', false, false, false, false, true);

$filter = ($params->get('searchfilter')!='') ? '&f=' . $params->get('searchfilter') : '';
$script .= "
var suggest = jQuery('#mod-finder-searchword').autocomplete({
serviceUrl: '" . JRoute::_('index.php?option=com_finder&task=suggestions.suggest&format=json&tmpl=component&f=' . $params->get('searchfilter'), false) . "',
serviceUrl: '" . JRoute::_('index.php?option=com_finder&task=suggestions.suggest&format=json&tmpl=component' .$filter , false) . "',
paramName: 'q',
minChars: 1,
maxHeight: 400,
Expand Down

0 comments on commit 7adc050

Please sign in to comment.