aboutsummaryrefslogtreecommitdiffstats
path: root/include/plugin.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-02-20 21:31:40 -0800
committerzotlabs <mike@macgirvin.com>2018-02-20 21:31:40 -0800
commitb6d34bffccc42a9367d1108144824970946532e8 (patch)
tree2ce9bb2545d9e762a69033f858d741c010c3c0a8 /include/plugin.php
parentce8349662d8c9e309f3faf57114acddb67eb11b7 (diff)
downloadvolse-hubzilla-b6d34bffccc42a9367d1108144824970946532e8.tar.gz
volse-hubzilla-b6d34bffccc42a9367d1108144824970946532e8.tar.bz2
volse-hubzilla-b6d34bffccc42a9367d1108144824970946532e8.zip
trim non-existent/deprecated plugins from siteinfo plugin list
Diffstat (limited to 'include/plugin.php')
-rwxr-xr-xinclude/plugin.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/include/plugin.php b/include/plugin.php
index f452d8342..62d443ab8 100755
--- a/include/plugin.php
+++ b/include/plugin.php
@@ -245,8 +245,18 @@ function plugins_sync() {
* @return array
*/
function visible_plugin_list() {
+
$r = q("select * from addon where hidden = 0 order by aname asc");
- return(($r) ? ids_to_array($r,'aname') : array());
+ $x = (($r) ? ids_to_array($r,'aname') : array());
+ $y = [];
+ if($x) {
+ foreach($x as $xv) {
+ if(is_dir('addon/' . $xv)) {
+ $y[] = $xv;
+ }
+ }
+ }
+ return $y;
}