diff --git a/classes/Db/Abstract.php b/classes/db/abstract.php similarity index 100% rename from classes/Db/Abstract.php rename to classes/db/abstract.php diff --git a/classes/Db/Interface.php b/classes/db/interface.php similarity index 100% rename from classes/Db/Interface.php rename to classes/db/interface.php diff --git a/classes/Db/Mysql.php b/classes/db/mysql.php similarity index 100% rename from classes/Db/Mysql.php rename to classes/db/mysql.php diff --git a/classes/Db/Pgsql.php b/classes/db/pgsql.php similarity index 100% rename from classes/Db/Pgsql.php rename to classes/db/pgsql.php diff --git a/include/classloader.php b/include/classloader.php new file mode 100644 index 000000000..4b8b3738e --- /dev/null +++ b/include/classloader.php @@ -0,0 +1,15 @@ + diff --git a/include/db.php b/include/db.php index 28718fb02..020fd08a4 100644 --- a/include/db.php +++ b/include/db.php @@ -1,13 +1,9 @@ quote($str); } -?> \ No newline at end of file +?> diff --git a/include/functions.php b/include/functions.php index 4dc286eb6..caea2576a 100644 --- a/include/functions.php +++ b/include/functions.php @@ -5,19 +5,7 @@ $fetch_last_error = false; $pluginhost = false; - function __autoload($class) { - $class_file1 = str_replace("_", "/", basename($class)); // PSR-0 - $class_file2 = str_replace("_", "/", strtolower(basename($class))); - - $file1 = dirname(__FILE__)."/../classes/$class_file1.php"; - $file2 = dirname(__FILE__)."/../classes/$class_file2.php"; - - if (file_exists($file1)) { - require $file1; - } elseif (file_exists($file2)) { - require $file2; - } - } + require_once "classloader.php"; mb_internal_encoding("UTF-8"); date_default_timezone_set('UTC'); @@ -3903,4 +3891,4 @@ return in_array($interface, class_implements($class)); } -?> \ No newline at end of file +?>