From adcaa52b40e111b6a2ac94d3c41a15fb6f89bb5a Mon Sep 17 00:00:00 2001 From: Timothy Warren Date: Wed, 29 Feb 2012 16:14:21 -0500 Subject: [PATCH] More directory re-arrangement --- index.php | 3 ++- LICENSE => sys/LICENSE | 0 {common => sys/common}/db_pdo.php | 0 {common => sys/common}/query_builder.php | 0 {common => sys/common}/settings.php | 4 ++-- {databases => sys/databases}/firebird.php | 0 {databases => sys/databases}/firebird_sql.php | 0 {databases => sys/databases}/mysql.php | 0 {databases => sys/databases}/mysql_sql.php | 0 {databases => sys/databases}/odbc.php | 0 {databases => sys/databases}/odbc_sql.php | 0 {databases => sys/databases}/pgsql.php | 0 {databases => sys/databases}/pgsql_sql.php | 0 {databases => sys/databases}/sqlite.php | 0 {databases => sys/databases}/sqlite_sql.php | 0 {images => sys/images}/firebird-logo-32.png | Bin {images => sys/images}/mysql-logo-32.png | Bin {images => sys/images}/postgresql-logo-32.png | Bin {images => sys/images}/sqlite-logo-32.png | Bin {windows => sys/windows}/add_db.php | 0 {windows => sys/windows}/main.php | 0 .../windows}/widgets/connection_sidebar.php | 0 {windows => sys/windows}/widgets/datagrid.php | 0 {windows => sys/windows}/widgets/db_info_widget.php | 0 tests/index.php | 4 ++-- 25 files changed, 6 insertions(+), 5 deletions(-) rename LICENSE => sys/LICENSE (100%) rename {common => sys/common}/db_pdo.php (100%) rename {common => sys/common}/query_builder.php (100%) rename {common => sys/common}/settings.php (96%) rename {databases => sys/databases}/firebird.php (100%) rename {databases => sys/databases}/firebird_sql.php (100%) rename {databases => sys/databases}/mysql.php (100%) rename {databases => sys/databases}/mysql_sql.php (100%) rename {databases => sys/databases}/odbc.php (100%) rename {databases => sys/databases}/odbc_sql.php (100%) rename {databases => sys/databases}/pgsql.php (100%) rename {databases => sys/databases}/pgsql_sql.php (100%) rename {databases => sys/databases}/sqlite.php (100%) rename {databases => sys/databases}/sqlite_sql.php (100%) rename {images => sys/images}/firebird-logo-32.png (100%) rename {images => sys/images}/mysql-logo-32.png (100%) rename {images => sys/images}/postgresql-logo-32.png (100%) rename {images => sys/images}/sqlite-logo-32.png (100%) rename {windows => sys/windows}/add_db.php (100%) rename {windows => sys/windows}/main.php (100%) rename {windows => sys/windows}/widgets/connection_sidebar.php (100%) rename {windows => sys/windows}/widgets/datagrid.php (100%) rename {windows => sys/windows}/widgets/db_info_widget.php (100%) 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)