trim non-existent/deprecated plugins from siteinfo plugin list

This commit is contained in:
zotlabs
2018-02-20 21:31:40 -08:00
parent ce8349662d
commit b6d34bffcc
2 changed files with 13 additions and 3 deletions

View File

@@ -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;
}