From 485c099fe4c1d43b00434dfd2b1422bf6e634fb8 Mon Sep 17 00:00:00 2001 From: xevidos Date: Tue, 11 Dec 2018 18:50:15 -0500 Subject: [PATCH] Fixed issues with non empty folder. --- components/update/update.php | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/components/update/update.php b/components/update/update.php index 183061d..b02e4f0 100755 --- a/components/update/update.php +++ b/components/update/update.php @@ -4,7 +4,6 @@ ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); -require_once('../../config.php'); require_once('../../common.php'); require_once('./class.update.php'); @@ -127,13 +126,21 @@ class updater { function convert() { + require_once('../../common.php'); + require_once('../sql/class.sql.php'); require_once('../settings/class.settings.php'); require_once('../project/class.project.php'); require_once('../user/class.user.php'); + + $user_settings_file = DATA . "/settings.php"; + $projects_file = DATA . "/projects.php"; + $users_file = DATA . "/users.php"; + $Settings = new Settings(); $Project = new Project(); $User = new User(); - $connection = $Settings->connect(); + + $connection = $Settings->connect(); $sql = " -- phpMyAdmin SQL Dump @@ -279,11 +286,6 @@ ALTER TABLE `user_options` $result = mysqli_prepare( $connection, $sql ) or die( $error ); $result->bind_param( $bind, ...$bind_variables ); $result->execute(); - - if( $connection->error ) { - - $return = formatJSEND( "error", $connection->error ); - } if( file_exists( $user_settings_file ) ) { @@ -467,6 +469,12 @@ ALTER TABLE `user_options` $this->path . "/.travis.yml", $this->path . "/codiad-master/.travis.yml", + + $this->path . "/.gitignore", + $this->path . "/codiad-master/.gitignore", + + $this->path . "/.gitlab-ci.yml", + $this->path . "/codiad-master/.gitlab-ci.yml" ); foreach( $file_conflictions as $file ) { @@ -776,4 +784,4 @@ if( isset( $_GET["action"] ) && $_GET["action"] !== '' ) { codiad.update.init(); - + \ No newline at end of file