trim non-existent/deprecated plugins from siteinfo plugin list
This commit is contained in:
parent
ce8349662d
commit
b6d34bffcc
@ -1605,10 +1605,10 @@ function get_site_info() {
|
|||||||
'commit' => $commit,
|
'commit' => $commit,
|
||||||
'plugins' => $visible_plugins,
|
'plugins' => $visible_plugins,
|
||||||
'register_policy' => $register_policy[get_config('system','register_policy')],
|
'register_policy' => $register_policy[get_config('system','register_policy')],
|
||||||
'invitation_only' => intval(get_config('system','invitation_only')),
|
'invitation_only' => (bool) intval(get_config('system','invitation_only')),
|
||||||
'directory_mode' => $directory_mode[get_config('system','directory_mode')],
|
'directory_mode' => $directory_mode[get_config('system','directory_mode')],
|
||||||
'language' => get_config('system','language'),
|
'language' => get_config('system','language'),
|
||||||
'rss_connections' => intval(get_config('system','feed_contacts')),
|
'rss_connections' => (bool) intval(get_config('system','feed_contacts')),
|
||||||
'expiration' => $site_expire,
|
'expiration' => $site_expire,
|
||||||
'default_service_restrictions' => $service_class,
|
'default_service_restrictions' => $service_class,
|
||||||
'locked_features' => $locked_features,
|
'locked_features' => $locked_features,
|
||||||
|
@ -245,8 +245,18 @@ function plugins_sync() {
|
|||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
function visible_plugin_list() {
|
function visible_plugin_list() {
|
||||||
|
|
||||||
$r = q("select * from addon where hidden = 0 order by aname asc");
|
$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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user