Added a test to support unexistent plugin dir

This commit is contained in:
Marc MAURICE 2010-12-30 19:50:36 +01:00
parent 7592ce6b1d
commit 573eb02a9a

View file

@ -20,10 +20,13 @@
require 'config.php';
// load plugins
$plugins = scandir("plugins");
array_shift($plugins); array_shift($plugins); // remove . and ..
foreach ($plugins as $p) if (is_file("plugins/$p/functions.php"))
require "plugins/$p/functions.php";
$plugins = array();
if (is_dir("plugins")) {
$plugins = scandir("plugins");
array_shift($plugins); array_shift($plugins); // remove . and ..
foreach ($plugins as $p) if (is_file("plugins/$p/functions.php"))
require "plugins/$p/functions.php";
}
function plugins_include($phpFile)
{