pluginhost: assume plugins.local exists

This commit is contained in:
Andrew Dolgov 2015-06-05 18:10:17 +03:00
parent b9634eb8b8
commit ca5d39e866

View file

@ -129,12 +129,10 @@ class PluginHost {
}
}
function load_all($kind, $owner_uid = false) {
$plugins = array_map("basename", array_filter(glob("plugins/*"), "is_dir"));
if (is_dir("plugins.local")) {
$plugins = array_merge($plugins, array_map("basename",
array_filter(glob("plugins.local/*"), "is_dir")));
}
$plugins = array_merge(glob("plugins/*"), glob("plugins.local/*"));
$plugins = array_filter($plugins, "is_dir");
$plugins = array_map("basename", $plugins);
asort($plugins);