diff options
author | redmatrix <git@macgirvin.com> | 2016-06-20 20:34:19 -0700 |
---|---|---|
committer | redmatrix <git@macgirvin.com> | 2016-06-20 20:34:19 -0700 |
commit | ed166608670c5b5d237c43bd0d672502d5b624f5 (patch) | |
tree | ffdbb34528414abde4bbcc6b8b4d3414990c416f /Zotlabs | |
parent | 9c9d6363af22eeec7f38856302abb3251cb78a10 (diff) | |
download | volse-hubzilla-ed166608670c5b5d237c43bd0d672502d5b624f5.tar.gz volse-hubzilla-ed166608670c5b5d237c43bd0d672502d5b624f5.tar.bz2 volse-hubzilla-ed166608670c5b5d237c43bd0d672502d5b624f5.zip |
code optimisation
Diffstat (limited to 'Zotlabs')
-rw-r--r-- | Zotlabs/Module/Siteinfo.php | 26 |
1 files changed, 5 insertions, 21 deletions
diff --git a/Zotlabs/Module/Siteinfo.php b/Zotlabs/Module/Siteinfo.php index f6b34d0c8..a15e2896d 100644 --- a/Zotlabs/Module/Siteinfo.php +++ b/Zotlabs/Module/Siteinfo.php @@ -27,27 +27,11 @@ class Siteinfo extends \Zotlabs\Web\Controller { else { $version = $commit = ''; } - $visible_plugins = array(); - if(is_array(\App::$plugins) && count(\App::$plugins)) { - $r = q("select * from addon where hidden = 0"); - if(count($r)) - foreach($r as $rr) - $visible_plugins[] = $rr['aname']; - } - $plugins_list = ''; - if(count($visible_plugins)) { - $plugins_text = t('Installed plugins/addons/apps:'); - $sorted = $visible_plugins; - $s = ''; - sort($sorted); - foreach($sorted as $p) { - if(strlen($p)) { - if(strlen($s)) $s .= ', '; - $s .= $p; - } - } - $plugins_list .= $s; - } + + $plugins_list = implode(', ',visible_plugin_list()); + + if($plugins_list) + $plugins_text = t('Installed plugins/addons/apps:'); else $plugins_text = t('No installed plugins/addons/apps'); |