diff --git a/index.php b/index.php index 050e17f..70a01d9 100644 --- a/index.php +++ b/index.php @@ -27,7 +27,8 @@ error_reporting(-1 & ~(E_STRICT)); date_default_timezone_set('GMT'); // Set the current directory as the base for included files -define('BASE_DIR', dirname(__FILE__)); +define('BASE_DIR', dirname(__FILE__).'/sys'); +define('SETTINGS_DIR', dirname(__FILE__)); // -------------------------------------------------------------------------- diff --git a/LICENSE b/sys/LICENSE similarity index 100% rename from LICENSE rename to sys/LICENSE diff --git a/common/db_pdo.php b/sys/common/db_pdo.php similarity index 100% rename from common/db_pdo.php rename to sys/common/db_pdo.php diff --git a/common/query_builder.php b/sys/common/query_builder.php similarity index 100% rename from common/query_builder.php rename to sys/common/query_builder.php diff --git a/common/settings.php b/sys/common/settings.php similarity index 96% rename from common/settings.php rename to sys/common/settings.php index a577179..7880c37 100644 --- a/common/settings.php +++ b/sys/common/settings.php @@ -38,7 +38,7 @@ class Settings { */ protected function __construct() { - $path = BASE_DIR.'/settings.json'; + $path = SETTINGS_DIR.'/settings.json'; if( ! is_file($path)) { @@ -64,7 +64,7 @@ class Settings { */ public function __destruct() { - file_put_contents(BASE_DIR . '/settings.json', json_encode($this->current)); + file_put_contents(SETTINGS_DIR . '/settings.json', json_encode($this->current)); } // -------------------------------------------------------------------------- diff --git a/databases/firebird.php b/sys/databases/firebird.php similarity index 100% rename from databases/firebird.php rename to sys/databases/firebird.php diff --git a/databases/firebird_sql.php b/sys/databases/firebird_sql.php similarity index 100% rename from databases/firebird_sql.php rename to sys/databases/firebird_sql.php diff --git a/databases/mysql.php b/sys/databases/mysql.php similarity index 100% rename from databases/mysql.php rename to sys/databases/mysql.php diff --git a/databases/mysql_sql.php b/sys/databases/mysql_sql.php similarity index 100% rename from databases/mysql_sql.php rename to sys/databases/mysql_sql.php diff --git a/databases/odbc.php b/sys/databases/odbc.php similarity index 100% rename from databases/odbc.php rename to sys/databases/odbc.php diff --git a/databases/odbc_sql.php b/sys/databases/odbc_sql.php similarity index 100% rename from databases/odbc_sql.php rename to sys/databases/odbc_sql.php diff --git a/databases/pgsql.php b/sys/databases/pgsql.php similarity index 100% rename from databases/pgsql.php rename to sys/databases/pgsql.php diff --git a/databases/pgsql_sql.php b/sys/databases/pgsql_sql.php similarity index 100% rename from databases/pgsql_sql.php rename to sys/databases/pgsql_sql.php diff --git a/databases/sqlite.php b/sys/databases/sqlite.php similarity index 100% rename from databases/sqlite.php rename to sys/databases/sqlite.php diff --git a/databases/sqlite_sql.php b/sys/databases/sqlite_sql.php similarity index 100% rename from databases/sqlite_sql.php rename to sys/databases/sqlite_sql.php diff --git a/images/firebird-logo-32.png b/sys/images/firebird-logo-32.png similarity index 100% rename from images/firebird-logo-32.png rename to sys/images/firebird-logo-32.png diff --git a/images/mysql-logo-32.png b/sys/images/mysql-logo-32.png similarity index 100% rename from images/mysql-logo-32.png rename to sys/images/mysql-logo-32.png diff --git a/images/postgresql-logo-32.png b/sys/images/postgresql-logo-32.png similarity index 100% rename from images/postgresql-logo-32.png rename to sys/images/postgresql-logo-32.png diff --git a/images/sqlite-logo-32.png b/sys/images/sqlite-logo-32.png similarity index 100% rename from images/sqlite-logo-32.png rename to sys/images/sqlite-logo-32.png diff --git a/windows/add_db.php b/sys/windows/add_db.php similarity index 100% rename from windows/add_db.php rename to sys/windows/add_db.php diff --git a/windows/main.php b/sys/windows/main.php similarity index 100% rename from windows/main.php rename to sys/windows/main.php diff --git a/windows/widgets/connection_sidebar.php b/sys/windows/widgets/connection_sidebar.php similarity index 100% rename from windows/widgets/connection_sidebar.php rename to sys/windows/widgets/connection_sidebar.php diff --git a/windows/widgets/datagrid.php b/sys/windows/widgets/datagrid.php similarity index 100% rename from windows/widgets/datagrid.php rename to sys/windows/widgets/datagrid.php diff --git a/windows/widgets/db_info_widget.php b/sys/windows/widgets/db_info_widget.php similarity index 100% rename from windows/widgets/db_info_widget.php rename to sys/windows/widgets/db_info_widget.php diff --git a/tests/index.php b/tests/index.php index c5bfff0..11b831c 100644 --- a/tests/index.php +++ b/tests/index.php @@ -31,11 +31,11 @@ function do_include($path) // Include core tests require_once("core.php"); -require_once("../common/db_pdo.php"); +require_once("../sys/common/db_pdo.php"); // Include db tests // Load db classes based on capability -$src_path = "../databases/"; +$src_path = "../sys/databases/"; $test_path = "./databases/"; foreach(pdo_drivers() as $d)