Adjust autoloader
This commit is contained in:
parent
93ddd7baec
commit
35b21c31a5
15
autoload.php
15
autoload.php
@ -50,15 +50,16 @@ if ( ! function_exists('do_include'))
|
|||||||
function query_autoload($class)
|
function query_autoload($class)
|
||||||
{
|
{
|
||||||
$class = strtolower($class);
|
$class = strtolower($class);
|
||||||
|
|
||||||
// Load Firebird separately
|
// Load Firebird separately
|
||||||
if ($class === 'firebird')
|
if (function_exists('fbird_connect') && $class === 'firebird')
|
||||||
{
|
{
|
||||||
|
array_map('do_include', glob(QDRIVER_PATH.'/firebird/*.php'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$class_path = QBASE_PATH . "classes/{$class}.php";
|
$class_path = QBASE_PATH . "classes/{$class}.php";
|
||||||
|
|
||||||
$driver_path = QDRIVER_PATH . "{$class}";
|
$driver_path = QDRIVER_PATH . "{$class}";
|
||||||
|
|
||||||
if (is_file($class_path))
|
if (is_file($class_path))
|
||||||
@ -77,12 +78,6 @@ function query_autoload($class)
|
|||||||
// Set up autoloader
|
// Set up autoloader
|
||||||
spl_autoload_register('query_autoload');
|
spl_autoload_register('query_autoload');
|
||||||
|
|
||||||
// Load Firebird driver, if applicable
|
|
||||||
if (function_exists('fbird_connect'))
|
|
||||||
{
|
|
||||||
array_map('do_include', glob(QDRIVER_PATH.'/firebird/*.php'));
|
|
||||||
}
|
|
||||||
|
|
||||||
// --------------------------------------------------------------------------
|
// --------------------------------------------------------------------------
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user