aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-04-06 05:21:42 -0700
committerfriendica <info@friendica.com>2012-04-06 05:21:42 -0700
commitecabe1d505464577fdc3d3ff0090371c8ca0cf1e (patch)
tree28442b76b1c8fec40235445d62b01c182f770b5f /include
parent533e215a9636888675fc89f92eb9d556db180f1e (diff)
downloadvolse-hubzilla-ecabe1d505464577fdc3d3ff0090371c8ca0cf1e.tar.gz
volse-hubzilla-ecabe1d505464577fdc3d3ff0090371c8ca0cf1e.tar.bz2
volse-hubzilla-ecabe1d505464577fdc3d3ff0090371c8ca0cf1e.zip
ignore removed plugins
Diffstat (limited to 'include')
-rw-r--r--include/plugin.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/include/plugin.php b/include/plugin.php
index 25fd32b4f..8196e8756 100644
--- a/include/plugin.php
+++ b/include/plugin.php
@@ -17,7 +17,12 @@ function uninstall_plugin($plugin){
}}
if (! function_exists('install_plugin')){
-function install_plugin($plugin){
+function install_plugin($plugin) {
+
+ // silently fail if plugin was removed
+
+ if(! file_exists('addon/' . $plugin . '/' . $plugin . '.php'))
+ return false;
logger("Addons: installing " . $plugin);
$t = @filemtime('addon/' . $plugin . '/' . $plugin . '.php');
@include_once('addon/' . $plugin . '/' . $plugin . '.php');
@@ -32,9 +37,11 @@ function install_plugin($plugin){
intval($t),
$plugin_admin
);
+ return true;
}
else {
-// logger("Addons: FAILED installing " . $plugin);
+ logger("Addons: FAILED installing " . $plugin);
+ return false;
}
}}