]> git.mxchange.org Git - friendica.git/commitdiff
Merge pull request #5238 from annando/more-abstraction
authorHypolite Petovan <mrpetovan@gmail.com>
Tue, 19 Jun 2018 18:02:43 +0000 (14:02 -0400)
committerGitHub <noreply@github.com>
Tue, 19 Jun 2018 18:02:43 +0000 (14:02 -0400)
Even more replaced item calls ...

include/text.php
view/theme/frio/theme.php

index 16c0b41814f09daca9a521d3fa52c6e3279818a7..10f626458665c7beb19e2d23d970f924387e7857 100644 (file)
@@ -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
                ];
index 4f5756caf99aba834962e0d14d5dc6b23a237edd..9d2b77d1f1a2796436792f48c88afa964ee66317 100644 (file)
@@ -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'),