Added a test to support unexistent plugin dir
This commit is contained in:
parent
7592ce6b1d
commit
573eb02a9a
1 changed files with 7 additions and 4 deletions
|
@ -20,10 +20,13 @@
|
|||
require 'config.php';
|
||||
|
||||
// load plugins
|
||||
$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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue