]> git.mxchange.org Git - friendica.git/commitdiff
Only offer forum search in local mode.
authorMichael Vogel <icarus@dabo.de>
Tue, 25 Aug 2015 03:54:50 +0000 (05:54 +0200)
committerMichael Vogel <icarus@dabo.de>
Tue, 25 Aug 2015 03:54:50 +0000 (05:54 +0200)
include/nav.php
include/text.php
view/templates/searchbox.tpl
view/theme/vier/templates/nav.tpl

index e1661644d180beb92592d3f1dd0cb1e4825d6bac..e7f51cc0c055b08c56ded311e5a27a7a7a4766a9 100644 (file)
@@ -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';
 
index 9a65224af9bfd4e3d8ae19b5f7b97c67734b6038..0002f074e96aea483d76d17c8da2e6e9735b3c52 100644 (file)
@@ -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);
 }}
index 9c1be50cf618b3c6b86023ef3b5dbdc0d5f359b8..4b1a51f877d7ba4159b88bbb2d184dc50070a2e4 100644 (file)
@@ -7,7 +7,7 @@
                        <option value="fulltext">{{$searchoption.0}}</option>
                        <option value="tags">{{$searchoption.1}}</option>
                        <option value="contacts">{{$searchoption.2}}</option>
-                       <option value="forums">{{$searchoption.3}}</option>
+                       {{if $searchoption.3}}<option value="forums">{{$searchoption.3}}</option>{{/if}}
                </select>
                {{/if}}
 
index 5483113f33b2bda14ffb35f451fc4fcd692de5ab..ef52e77894ae7f5ee6853a463c69dcb741fa892a 100644 (file)
@@ -76,7 +76,7 @@
                                                <option value="fulltext">{{$nav.searchoption.0}}</option>
                                                <option value="tags">{{$nav.searchoption.1}}</option>
                                                <option value="contacts">{{$nav.searchoption.2}}</option>
-                                               <option value="forums">{{$nav.searchoption.3}}</option>
+                                               {{if $nav.searchoption.3}}<option value="forums">{{$nav.searchoption.3}}</option>{{/if}}
                                        </select>
                                </form>
                        </li>