]> git.mxchange.org Git - friendica.git/blobdiff - mod/lockview.php
Added value to settings.config.php
[friendica.git] / mod / lockview.php
index 0d87e1551034d24739e867f79388d185f762cd10..35c4b043329ae4284250d95a398636407a3d5d8e 100644 (file)
@@ -3,7 +3,7 @@
  * @file mod/lockview.php
  */
 use Friendica\App;
-use Friendica\Core\Addon;
+use Friendica\Core\Hook;
 use Friendica\Core\L10n;
 use Friendica\Database\DBA;
 use Friendica\Model\Item;
@@ -19,11 +19,11 @@ function lockview_content(App $a)
        }
 
        if (!$item_id) {
-               killme();
+               exit();
        }
 
        if (!in_array($type, ['item','photo','event'])) {
-               killme();
+               exit();
        }
 
        $fields = ['uid', 'allow_cid', 'allow_gid', 'deny_cid', 'deny_gid'];
@@ -37,24 +37,25 @@ function lockview_content(App $a)
        }
 
        if (!DBA::isResult($item)) {
-               killme();
+               exit();
        }
 
-       Addon::callHooks('lockview_content', $item);
+       Hook::callAll('lockview_content', $item);
 
        if ($item['uid'] != local_user()) {
                echo L10n::t('Remote privacy information not available.') . '<br />';
-               killme();
+               exit();
        }
 
-       if ($item['private'] == 1
+       if (isset($item['private'])
+               && $item['private'] == 1
                && empty($item['allow_cid'])
                && empty($item['allow_gid'])
                && empty($item['deny_cid'])
                && empty($item['deny_gid']))
        {
                echo L10n::t('Remote privacy information not available.') . '<br />';
-               killme();
+               exit();
        }
 
        $allowed_users  = expand_acl($item['allow_cid']);
@@ -110,6 +111,6 @@ function lockview_content(App $a)
        }
 
        echo $o . implode(', ', $l);
-       killme();
+       exit();
 
 }