Updated readme, Fixed 500 error on install process, removed error reporting causing the update to say failed.

This commit is contained in:
xevidos 2018-12-14 12:30:04 -05:00
parent a50ddaaaf7
commit 8faec8dbe8
3 changed files with 20 additions and 22 deletions

View file

@ -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.

View file

@ -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'] . '" );

View file

@ -1,8 +1,8 @@
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
//ini_set('display_errors', 1);
//ini_set('display_startup_errors', 1);
//error_reporting(E_ALL);
require_once('../../common.php');
require_once('./class.update.php');
@ -118,14 +118,6 @@ class updater {
"name" => "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;
}