diff --git a/README.md b/README.md index 171b2c2..e83aab7 100755 --- a/README.md +++ b/README.md @@ -11,8 +11,8 @@ Features: * 100+ Native programming languages supported. * Auto Complete ( Trigger by CTRL + Space or Turn on Live Autocomplete ). * Auto Save. -* Built in updter. -* Collaborative Editing ( [via plugin](https://gitlab.com/xevidos/codiad-collaborative) ). +* Built in updater. +* Collaborative Editing ( [Via plugin](https://gitlab.com/xevidos/codiad-collaborative) ). * Multi Cursor. * Overscroll ( Ability to center bottom of code ). * PHP 7.2 Compatibility. @@ -37,7 +37,6 @@ Task List: * Add if file could not be saved 5 times close the open file. * Add multi level users. ( Projects for only certain groups, Permission levels ) * Add mobile compatibility. -* Clean up Collaborative compatibility. * Clean up update script. diff --git a/components/install/process.php b/components/install/process.php index b5f7c51..8a50495 100755 --- a/components/install/process.php +++ b/components/install/process.php @@ -235,10 +235,7 @@ ALTER TABLE `user_options` /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; "; - $result = mysqli_prepare( $connection, $sql ) or die( $error ); - - $result->bind_param( $bind, ...$bind_variables ); - $result->execute(); + $result = mysqli_multi_query( $connection, $sql ) or die( $error ); if( $connection->error ) { @@ -285,7 +282,7 @@ ALTER TABLE `user_options` $bind = "sss"; $sql = "INSERT INTO `projects`(`name`, `path`, `owner`) VALUES (?,?,?)"; $result = mysqli_prepare( $connection, $sql ) or die( $error ); - $result->bind_param( $bind, ...$bind_variables ); + $result->bind_param( $bind, ...$bind_vars ); $result->execute(); if( $connection->error ) { @@ -307,7 +304,7 @@ ALTER TABLE `user_options` $bind = "sssssssss"; $sql = "INSERT INTO `users`(`first_name`, `last_name`, `username`, `password`, `email`, `project`, `access`, `groups`, `token`) VALUES (?,?,?,PASSWORD(?),?,?,?,?,?)"; $result = mysqli_prepare( $connection, $sql ) or die( $error ); - $result->bind_param( $bind, ...$bind_variables ); + $result->bind_param( $bind, ...$bind_vars ); $result->execute(); if( $connection->error ) { @@ -369,7 +366,7 @@ date_default_timezone_set("' . $_POST['timezone'] . '"); //define("AUTH_PATH", "/path/to/customauth.php"); // Site Name -define("SITE_NAME", "' . $_POST['sitename'] . '"); +define("SITE_NAME", "' . $_POST['site_name'] . '"); // Database Information define( "DBHOST", "' . $_POST['dbhost'] . '" ); diff --git a/components/update/update.php b/components/update/update.php index 21e4bcf..7d75868 100755 --- a/components/update/update.php +++ b/components/update/update.php @@ -1,8 +1,8 @@ "codiad.settings.autosave", "value" => "true", ), - array( - "name" => "codiad.settings.plugin.sync", - "value" => "true", - ), - array( - "name" => "codiad.settings.plugin.sync", - "value" => "true", - ), ); /** @@ -182,11 +174,21 @@ class updater { mkdir($dest); } + $invalid_files = array( + '.', + '..', + 'backup', + 'codiad-master', + 'update.zip', + 'workspace', + ); + // Loop through the folder $dir = dir( $source ); while (false !== $entry = $dir->read()) { // Skip pointers - if ($entry == '.' || $entry == '..' || $entry == 'backup' || $entry == 'codiad-master' || $entry == 'workspace') { + if( in_array( $entry, $invalid_files ) ) { + continue; }