X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=inline;f=mod%2Ffriendica.php;h=28807b5b509f677fe589a5661ab6a35582ea5cf0;hb=4832bc74f55e7d3e6f66d281f5de3a071fe1e071;hp=52a064224a559ef15eb872754b5e2bcc51961b9e;hpb=c3139fa0fd49b0b4de4568d46a6946c75ccb2a62;p=friendica.git diff --git a/mod/friendica.php b/mod/friendica.php index 52a064224a..28807b5b50 100644 --- a/mod/friendica.php +++ b/mod/friendica.php @@ -18,10 +18,18 @@ function friendica_init(&$a) { $admin = false; } + $visible_plugins = array(); + if(is_array($a->plugins) && count($a->plugins)) { + $r = q("select * from addon where hidden = 0"); + if(count($r)) + foreach($r as $rr) + $visible_plugins[] = $rr['name']; + } + $data = Array( 'version' => FRIENDICA_VERSION, 'url' => z_root(), - 'plugins' => $a->plugins, + 'plugins' => $visible_plugins, 'register_policy' => $register_policy[$a->config['register_policy']], 'admin' => $admin, 'site_name' => $a->config['sitename'], @@ -54,9 +62,18 @@ function friendica_content(&$a) { $o .= '
'; - if(count($a->plugins)) { + $visible_plugins = array(); + if(is_array($a->plugins) && count($a->plugins)) { + $r = q("select * from addon where hidden = 0"); + if(count($r)) + foreach($r as $rr) + $visible_plugins[] = $rr['name']; + } + + + if(count($visible_plugins)) { $o .= '' . t('Installed plugins/addons/apps:') . '
'; - $sorted = $a->plugins; + $sorted = $visible_plugins; $s = ''; sort($sorted); foreach($sorted as $p) {