From 040eb58ae077e4561692d6425ce574d1660a37bb Mon Sep 17 00:00:00 2001 From: "alvarenga.milton" Date: Mon, 1 Apr 2019 21:45:55 -0300 Subject: [PATCH 1/4] Added warning style on default theme to use on Install page to highlight database not required, but optional --- themes/default/screen.css | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/themes/default/screen.css b/themes/default/screen.css index 97a8fb0..61af63f 100755 --- a/themes/default/screen.css +++ b/themes/default/screen.css @@ -169,6 +169,10 @@ label .icon { color: green; } +#dependencies .warning { + color: yellow; +} + select option { background: #242424; } textarea { @@ -817,4 +821,4 @@ table [class^="icon-"], [class*=" icon-"] { height: 25px; vertical-align: middle; width: 25px; -} \ No newline at end of file +} From cc599a1036bfca14db5a056c7d70110492aa5057 Mon Sep 17 00:00:00 2001 From: "alvarenga.milton" Date: Mon, 1 Apr 2019 21:48:13 -0300 Subject: [PATCH 2/4] Fixed syntax error on install/process.php and added sqlite option as database --- components/install/process.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/components/install/process.php b/components/install/process.php index 7777822..7c7fafa 100755 --- a/components/install/process.php +++ b/components/install/process.php @@ -98,11 +98,12 @@ if ( ! ( defined( "DBHOST" ) && defined( "DBNAME" ) && defined( "DBUSER" ) && de $aValidDBType = [ 'mysql' ,'postgresql' + ,'sqlite' ]; //Is selected database type valid? if(!in_array($dbtype,$aValidDBType)){ - die( "Invalid database. Please select one of ".implode(", "$aValidDBType)."." ); + die( "Invalid database. Please select one of ".implode(", ",$aValidDBType)."." ); } try { @@ -405,4 +406,4 @@ define("WSURL", BASE_URL . "/workspace"); saveFile( $config, $config_data ); echo( "success" ); -} \ No newline at end of file +} From 36eef86b414e9ceacb3201852d78d2747ae0aa80 Mon Sep 17 00:00:00 2001 From: "alvarenga.milton" Date: Mon, 1 Apr 2019 21:48:56 -0300 Subject: [PATCH 3/4] Changed install page to add options for databases --- components/install/view.php | 42 ++++++++++++++++++++++++++++++++----- 1 file changed, 37 insertions(+), 5 deletions(-) diff --git a/components/install/view.php b/components/install/view.php index 635a82d..80b61cb 100755 --- a/components/install/view.php +++ b/components/install/view.php @@ -49,6 +49,14 @@ $autocomplete = array( 'dbtype' => 'mysql', ); +//Valid databases Codiad is able to use +$aValidDBType = [ + 'mysql' + ,'postgresql' + ,'sqlite' +]; + + if (!empty($query)) { $params = explode('&', $query); foreach ($params as $param) { @@ -111,12 +119,21 @@ if ($newrelic) {
- "required", + "OpenSSL"=>"required", + "MBString"=>"required", + "MySQL"=>"", + "PGSQL"=>"", + "SQLite3"=>"" + ] as $dep=>$status) { if (extension_loaded(strtolower($dep))) { ?>
-
+ } else { + $class_name = ($status == 'required') ? 'error' : 'warning'; + ?> +
@@ -166,7 +183,20 @@ if ($newrelic) { - +
From e61dea9574cc789870e6664997feb6ba15d78acc Mon Sep 17 00:00:00 2001 From: "alvarenga.milton" Date: Mon, 1 Apr 2019 22:15:10 -0300 Subject: [PATCH 4/4] First stable release of Codiad Install supporting PostgreSQL --- components/install/process.php | 2 +- components/install/sql/{postgresql.sql => pgsql.sql} | 0 components/install/view.php | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) rename components/install/sql/{postgresql.sql => pgsql.sql} (100%) diff --git a/components/install/process.php b/components/install/process.php index bbb3e5b..5eaa186 100755 --- a/components/install/process.php +++ b/components/install/process.php @@ -96,7 +96,7 @@ if ( ! ( defined( 'DBHOST' ) && defined( 'DBNAME' ) && defined( 'DBUSER' ) && de //Valid databases Codiad is able to use $db_types = [ 'mysql', - 'postgresql', + 'pgsql', //'sqlite', ]; diff --git a/components/install/sql/postgresql.sql b/components/install/sql/pgsql.sql similarity index 100% rename from components/install/sql/postgresql.sql rename to components/install/sql/pgsql.sql diff --git a/components/install/view.php b/components/install/view.php index 8db4d3e..80904ae 100755 --- a/components/install/view.php +++ b/components/install/view.php @@ -52,7 +52,7 @@ $autocomplete = array( //Valid databases Codiad is able to use $aValidDBType = [ 'MySQL'=>'mysql' - ,'PostgreSQL'=>'postgresql' + ,'PostgreSQL'=>'pgsql' ,'SQLite'=>'sqlite' ];