Simplified module inclusion
This commit is contained in:
parent
cde1fbf83f
commit
b9b71a96c1
@ -14,18 +14,18 @@ if ( ! class_exists('gtk'))
|
|||||||
die("Please load the php-gtk2 module in your php.ini\r\n");
|
die("Please load the php-gtk2 module in your php.ini\r\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Wrapper workaround for PHP < 5.4
|
||||||
|
function do_include($path)
|
||||||
|
{
|
||||||
|
require_once($path);
|
||||||
|
}
|
||||||
|
|
||||||
$dir = dirname(__FILE__);
|
$dir = dirname(__FILE__);
|
||||||
|
|
||||||
// Load modules
|
// Load modules
|
||||||
{
|
{
|
||||||
|
array_map('do_include', glob("{$dir}/databases/*.php"));
|
||||||
$requires = glob("{$dir}/databases/*.php");
|
array_map('do_include', glob("{$dir}/windows/*.php"));
|
||||||
$requires = array_merge($requires, glob("{$dir}/windows/*.php"));
|
|
||||||
|
|
||||||
for($i=0, $count=count($requires); $i<$count; $i++)
|
|
||||||
{
|
|
||||||
require_once($requires[$i]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create the main window
|
// Create the main window
|
||||||
|
Reference in New Issue
Block a user