Skip to content

Commit

Permalink
Adjust autoloader
Browse files Browse the repository at this point in the history
  • Loading branch information
timw4mail committed May 29, 2012
1 parent 93ddd7b commit 35b21c3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,16 @@ function do_include($path)
function query_autoload($class)
{
$class = strtolower($class);

// Load Firebird separately
if ($class === 'firebird')
if (function_exists('fbird_connect') && $class === 'firebird')
{
array_map('do_include', glob(QDRIVER_PATH.'/firebird/*.php'));
return;
}

$class_path = QBASE_PATH . "classes/{$class}.php";

$driver_path = QDRIVER_PATH . "{$class}";

if (is_file($class_path))
Expand All @@ -77,12 +78,6 @@ function query_autoload($class)
// Set up autoloader
spl_autoload_register('query_autoload');

// Load Firebird driver, if applicable
if (function_exists('fbird_connect'))
{
array_map('do_include', glob(QDRIVER_PATH.'/firebird/*.php'));
}

// --------------------------------------------------------------------------

/**
Expand Down
Binary file modified tests/db_files/FB_TEST_DB.FDB
Binary file not shown.

0 comments on commit 35b21c3

Please sign in to comment.