diff options
author | Michael Vogel <icarus@dabo.de> | 2012-04-07 18:35:29 +0200 |
---|---|---|
committer | Michael Vogel <icarus@dabo.de> | 2012-04-07 18:35:29 +0200 |
commit | cb05801a9031254f5882038de07a3ee4d5f89dd0 (patch) | |
tree | 186d9d1a4c591ec23e0e5bbebd08301143b5c157 /include/plugin.php | |
parent | 7308dbae282194356c2e95936aecc15ea059f356 (diff) | |
parent | 0fa3b7f348c3deeb85cb5f5f9bd35ba47b0e92ee (diff) | |
download | volse-hubzilla-cb05801a9031254f5882038de07a3ee4d5f89dd0.tar.gz volse-hubzilla-cb05801a9031254f5882038de07a3ee4d5f89dd0.tar.bz2 volse-hubzilla-cb05801a9031254f5882038de07a3ee4d5f89dd0.zip |
Merge commit 'upstream/master'
Diffstat (limited to 'include/plugin.php')
-rw-r--r--[-rwxr-xr-x] | include/plugin.php | 9 |
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; } }} |