aboutsummaryrefslogtreecommitdiffstats
path: root/include/plugin.php
diff options
context:
space:
mode:
authorzottel <github@zottel.net>2012-04-08 10:33:32 +0200
committerzottel <github@zottel.net>2012-04-08 10:33:32 +0200
commitaaf5a81365b4cbcb3d1b9537b5544aeb5de66f4b (patch)
tree1d7e5f2b575b8836fefe76660f466cb176585d5c /include/plugin.php
parent64a1367525ac920721943a08adec1124657df70d (diff)
parente3b2ac0735c908357dafb8670339fd34d3e2e6c0 (diff)
downloadvolse-hubzilla-aaf5a81365b4cbcb3d1b9537b5544aeb5de66f4b.tar.gz
volse-hubzilla-aaf5a81365b4cbcb3d1b9537b5544aeb5de66f4b.tar.bz2
volse-hubzilla-aaf5a81365b4cbcb3d1b9537b5544aeb5de66f4b.zip
Merge remote branch 'upstream/master'
Diffstat (limited to 'include/plugin.php')
-rw-r--r--[-rwxr-xr-x]include/plugin.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/plugin.php b/include/plugin.php
index e37ae8435..8196e8756 100755..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);
+ return false;
}
}}