mirror of
https://github.com/friendica/friendica
synced 2024-11-19 23:03:41 +00:00
Merge pull request #5242 from rabuzarus/20180619_-fix_some_elements_shouldnt_be_visitable_for_visitors
Bugfix: hide savedsearch button and subthread button for non local_users
This commit is contained in:
commit
a566d50e91
2 changed files with 7 additions and 2 deletions
|
@ -984,7 +984,7 @@ function search($s, $id = 'search-box', $url = 'search', $save = false, $aside =
|
||||||
'$action_url' => $url,
|
'$action_url' => $url,
|
||||||
'$search_label' => L10n::t('Search'),
|
'$search_label' => L10n::t('Search'),
|
||||||
'$save_label' => $save_label,
|
'$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'),
|
'$search_hint' => L10n::t('@name, !forum, #tags, content'),
|
||||||
'$mode' => $mode
|
'$mode' => $mode
|
||||||
];
|
];
|
||||||
|
|
|
@ -346,7 +346,12 @@ function frio_display_item(App $a, &$arr)
|
||||||
{
|
{
|
||||||
// Add subthread to the item menu
|
// Add subthread to the item menu
|
||||||
$subthread = [];
|
$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 = [
|
$subthread = [
|
||||||
'menu' => 'follow_thread',
|
'menu' => 'follow_thread',
|
||||||
'title' => L10n::t('Follow Thread'),
|
'title' => L10n::t('Follow Thread'),
|
||||||
|
|
Loading…
Reference in a new issue