From: Michael Vogel Date: Mon, 24 Aug 2015 10:12:14 +0000 (+0200) Subject: Don't show search options in side bar. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=3bca2db11bf45fb132cc06185d57792b2bf44930;p=friendica.git Don't show search options in side bar. --- diff --git a/include/text.php b/include/text.php index f3e44b3ebc..9a65224af9 100644 --- a/include/text.php +++ b/include/text.php @@ -986,21 +986,26 @@ if(! function_exists('search')) { * @param string $url search url * @param boolean $savedsearch show save search button */ -function search($s,$id='search-box',$url='/search',$save = false) { +function search($s,$id='search-box',$url='/search',$save = false, $aside = true) { $a = get_app(); - return replace_macros(get_markup_template('searchbox.tpl'), array( - '$s' => $s, - '$id' => $id, - '$action_url' => $a->get_baseurl((stristr($url,'network')) ? true : false) . $url, - '$search_label' => t('Search'), - '$save_label' => t('Save'), - '$savedsearch' => feature_enabled(local_user(),'savedsearch'), - '$searchoption' => array( + + $values = array( + '$s' => $s, + '$id' => $id, + '$action_url' => $a->get_baseurl((stristr($url,'network')) ? true : false) . $url, + '$search_label' => t('Search'), + '$save_label' => t('Save'), + '$savedsearch' => feature_enabled(local_user(),'savedsearch'), + ); + + if (!$aside) + $values['$searchoption'] = array( t("Full Text"), t("Tags"), t("Contacts"), - t("Forums")) - )); + t("Forums")); + + return replace_macros(get_markup_template('searchbox.tpl'), $values); }} if(! function_exists('valid_email')) { diff --git a/mod/search.php b/mod/search.php index d5e0dfb208..d9a2852dd4 100644 --- a/mod/search.php +++ b/mod/search.php @@ -111,7 +111,7 @@ function search_content(&$a) { } - $o .= search($search,'search-box','/search',((local_user()) ? true : false)); + $o .= search($search,'search-box','/search',((local_user()) ? true : false), false); if(strpos($search,'#') === 0) { $tag = true; diff --git a/view/templates/searchbox.tpl b/view/templates/searchbox.tpl index b9a01752c0..9c1be50cf6 100644 --- a/view/templates/searchbox.tpl +++ b/view/templates/searchbox.tpl @@ -2,12 +2,14 @@
{{strip}} - + {{/if}} {{if $savedsearch}}