diff --git a/include/nav.php b/include/nav.php index e1661644d..e7f51cc0c 100644 --- a/include/nav.php +++ b/include/nav.php @@ -121,8 +121,10 @@ function nav_info(&$a) { $nav['searchoption'] = array( t("Full Text"), t("Tags"), - t("Contacts"), - t("Forums")); + t("Contacts")); + + if (get_config('system','poco_local_search')) + $nav['searchoption'][] = t("Forums"); $gdirpath = 'directory'; diff --git a/include/text.php b/include/text.php index 9a65224af..0002f074e 100644 --- a/include/text.php +++ b/include/text.php @@ -998,12 +998,15 @@ function search($s,$id='search-box',$url='/search',$save = false, $aside = true) '$savedsearch' => feature_enabled(local_user(),'savedsearch'), ); - if (!$aside) + if (!$aside) { $values['$searchoption'] = array( t("Full Text"), t("Tags"), - t("Contacts"), - t("Forums")); + t("Contacts")); + + if (get_config('system','poco_local_search')) + $values['$searchoption'][] = t("Forums"); + } return replace_macros(get_markup_template('searchbox.tpl'), $values); }} diff --git a/view/templates/searchbox.tpl b/view/templates/searchbox.tpl index 9c1be50cf..4b1a51f87 100644 --- a/view/templates/searchbox.tpl +++ b/view/templates/searchbox.tpl @@ -7,7 +7,7 @@ - + {{if $searchoption.3}}{{/if}} {{/if}} diff --git a/view/theme/vier/templates/nav.tpl b/view/theme/vier/templates/nav.tpl index 5483113f3..ef52e7789 100644 --- a/view/theme/vier/templates/nav.tpl +++ b/view/theme/vier/templates/nav.tpl @@ -76,7 +76,7 @@ - + {{if $nav.searchoption.3}}{{/if}}