From 18082c3b01d1c15b236f78259d0f7e0f487e211d Mon Sep 17 00:00:00 2001 From: ben Date: Mon, 20 Oct 2008 11:37:24 +0000 Subject: Important fix for deleted plugins. git-svn-id: https://code.elgg.org/elgg/trunk@2282 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/plugins.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'engine/lib') diff --git a/engine/lib/plugins.php b/engine/lib/plugins.php index 83a81a81b..b78418243 100644 --- a/engine/lib/plugins.php +++ b/engine/lib/plugins.php @@ -182,13 +182,15 @@ if (sizeof($plugins)) foreach($plugins as $mod) { if (is_plugin_enabled($mod)) { - if (!@include($CONFIG->pluginspath . $mod . "/start.php")) - throw new PluginException(sprintf(elgg_echo('PluginException:MisconfiguredPlugin'), $mod)); - if (is_dir($CONFIG->pluginspath . $mod . "/views/default")) { - autoregister_views("",$CONFIG->pluginspath . $mod . "/views/default",$CONFIG->pluginspath . $mod . "/views/"); - } - if (is_dir($CONFIG->pluginspath . $mod . "/languages")) { - register_translations($CONFIG->pluginspath . $mod . "/languages/"); + if (file_exists($CONFIG->pluginspath . $mod)) { + if (!@include($CONFIG->pluginspath . $mod . "/start.php")) + throw new PluginException(sprintf(elgg_echo('PluginException:MisconfiguredPlugin'), $mod)); + if (is_dir($CONFIG->pluginspath . $mod . "/views/default")) { + autoregister_views("",$CONFIG->pluginspath . $mod . "/views/default",$CONFIG->pluginspath . $mod . "/views/"); + } + if (is_dir($CONFIG->pluginspath . $mod . "/languages")) { + register_translations($CONFIG->pluginspath . $mod . "/languages/"); + } } } } -- cgit v1.2.3