From df4226866779f75eacab7f62da36b22dc21d5e44 Mon Sep 17 00:00:00 2001 From: cash Date: Sun, 22 Aug 2010 23:42:26 +0000 Subject: Merged r6812:6837 from 1.7 branch to trunk (skipping some changes to plugins like groups and wire) git-svn-id: http://code.elgg.org/elgg/trunk@6851 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/plugins.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'engine/lib/plugins.php') diff --git a/engine/lib/plugins.php b/engine/lib/plugins.php index 47a103dcd..c2427c655 100644 --- a/engine/lib/plugins.php +++ b/engine/lib/plugins.php @@ -99,11 +99,13 @@ function get_plugin_list() { $CONFIG->pluginlistcache = $plugins; return $plugins; } else { + // this only runs on install, otherwise uses serialized plugin order $plugins = array(); if ($handle = opendir($CONFIG->pluginspath)) { while ($mod = readdir($handle)) { - if (!in_array($mod,array('.','..','.svn','CVS')) && is_dir($CONFIG->pluginspath . "/" . $mod)) { + // must be directory and not begin with a . + if (substr($mod, 0, 1) !== '.' && is_dir($CONFIG->pluginspath . "/" . $mod)) { $plugins[] = $mod; } } @@ -162,7 +164,8 @@ function regenerate_plugin_list($pluginorder = FALSE) { // Add new plugins to the end if ($handle = opendir($CONFIG->pluginspath)) { while ($mod = readdir($handle)) { - if (!in_array($mod,array('.','..','.svn','CVS')) && is_dir($CONFIG->pluginspath . "/" . $mod)) { + // must be directory and not begin with a . + if (substr($mod, 0, 1) !== '.' && is_dir($CONFIG->pluginspath . "/" . $mod)) { if (!in_array($mod, $pluginorder)) { $max = $max + 10; $pluginorder[$max] = $mod; -- cgit v1.2.3