From 0a97a3f82222d0c79ffd8b858fc909fc88c9a88e Mon Sep 17 00:00:00 2001 From: rabuzarus Date: Tue, 19 Jun 2018 18:27:54 +0200 Subject: [PATCH] Bugfix: hide savedsearch butten and subthread button for non local_users --- include/text.php | 2 +- view/theme/frio/theme.php | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/include/text.php b/include/text.php index 612100cb67..be8869fb84 100644 --- a/include/text.php +++ b/include/text.php @@ -984,7 +984,7 @@ function search($s, $id = 'search-box', $url = 'search', $save = false, $aside = '$action_url' => $url, '$search_label' => L10n::t('Search'), '$save_label' => $save_label, - '$savedsearch' => Feature::isEnabled(local_user(),'savedsearch'), + '$savedsearch' => local_user() && Feature::isEnabled(local_user(),'savedsearch'), '$search_hint' => L10n::t('@name, !forum, #tags, content'), '$mode' => $mode ]; diff --git a/view/theme/frio/theme.php b/view/theme/frio/theme.php index 4f5756caf9..9d2b77d1f1 100644 --- a/view/theme/frio/theme.php +++ b/view/theme/frio/theme.php @@ -346,7 +346,12 @@ function frio_display_item(App $a, &$arr) { // Add subthread to the item menu $subthread = []; - if (local_user() == $arr['item']['uid'] && $arr['item']['parent'] == $arr['item']['id'] && !$arr['item']['self']) { + if ( + local_user() + && local_user() == $arr['item']['uid'] + && $arr['item']['parent'] == $arr['item']['id'] + && !$arr['item']['self']) + { $subthread = [ 'menu' => 'follow_thread', 'title' => L10n::t('Follow Thread'),