From c73ce7a9239f481da73fc5b18e1a99c753c1b5bd Mon Sep 17 00:00:00 2001 From: Velocity23 <34199284+Velocity23@users.noreply.github.com> Date: Thu, 7 Jan 2021 22:37:40 +1100 Subject: [PATCH 1/3] Fix Plugin and Application Issues --- install/Installer.php | 11 ----------- install/templates/init.php | 39 -------------------------------------- 2 files changed, 50 deletions(-) delete mode 100644 install/templates/init.php diff --git a/install/Installer.php b/install/Installer.php index f67b89a5..8f207210 100644 --- a/install/Installer.php +++ b/install/Installer.php @@ -63,17 +63,6 @@ public static function appendConfig($data = array()) fwrite($file, $currentConf); fclose($file); - // write init file - $newConf = file_get_contents(__DIR__.'/templates/init.php'); - $file = fopen(__DIR__.'/../core/init.php', 'w+'); - - if (!$file) { - return false; - } - - fwrite($file, $newConf); - fclose($file); - return true; } diff --git a/install/templates/init.php b/install/templates/init.php deleted file mode 100644 index 4511b418..00000000 --- a/install/templates/init.php +++ /dev/null @@ -1,39 +0,0 @@ -. -*/ - -/* -This is the main Flare configuration file. Please do not change anything in this unless you know what you are -doing! If updating, please backup this file prior to doing so. -*/ - -session_start(); - -spl_autoload_register(function($class) { - - require_once __DIR__.'/../classes/'.$class.'.php'; - -}); - -if (file_exists(__DIR__.'/config.php')) { - require_once __DIR__.'/config.php'; -} - -require_once __DIR__.'/../functions/escape.php'; -require_once __DIR__.'/../includes/menus.php'; - -if (file_exists('./config.php') && Config::get('mysql/host') != 'DB_HOST' && Cookie::exists(Config::get('remember/cookie_name')) && !Session::exists(Config::get('session/session_name'))) { - $hash = Cookie::get(Config::get('remember/cookie_name')); - $hashCheck = DB::getInstance()->get('sessions', array('hash', '=', $hash)); - - if ($hashCheck->count()) { - $user = new User($hashCheck->first()->user_id); - $user->login(); - } -} \ No newline at end of file From 83fb0fabd389d33a10be5cae86f994b04cc717a8 Mon Sep 17 00:00:00 2001 From: Velocity23 <34199284+Velocity23@users.noreply.github.com> Date: Fri, 8 Jan 2021 10:44:45 +1100 Subject: [PATCH 2/3] Fixed Importer --- update.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/update.php b/update.php index fad581f9..b477edd1 100644 --- a/update.php +++ b/update.php @@ -806,8 +806,9 @@ } $routes = Json::decode($routes); + $lastId = Route::lastId(); - $sql = "INSERT INTO routes (fltnum, dep, arr, duration, aircraftid) VALUES"; + $sql = "INSERT INTO routes (id, fltnum, dep, arr, duration) VALUES"; $params = array(); $j = 0; foreach ($routes as $item) { @@ -824,11 +825,12 @@ } $sql .= "\n(?, ?, ?, ?, ?),"; + array_push($params, $lastId + $j + 1); array_push($params, $item["fltnum"]); array_push($params, $item["dep"]); array_push($params, $item["arr"]); array_push($params, $item["duration"]); - array_push($params, $item["aircraftid"]); + Route::addAircraft($lastId + $j + 1, $item["aircraftid"]); $j++; } From baf26ac0450b2f23361e1bbb3b26878e08a90e2f Mon Sep 17 00:00:00 2001 From: Velocity23 <34199284+Velocity23@users.noreply.github.com> Date: Fri, 8 Jan 2021 10:50:22 +1100 Subject: [PATCH 3/3] Add version information --- updates.json | 12 ++++++++++++ version.json | 4 ++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/updates.json b/updates.json index 20c5dde6..82398255 100644 --- a/updates.json +++ b/updates.json @@ -297,5 +297,17 @@ "queries": [], "deletedFiles": [], "newFolders": [] + }, + { + "tag": "v1.1.2", + "name": "Version 1.1.2", + "date": "2021-01-08", + "notes": "Various Bug Fixes", + "prerelease": false, + "useUpdater": true, + "files": ["admin/repair.php", "core/init.php", "update.php"], + "queries": [], + "deletedFiles": [], + "newFolders": [] } ] diff --git a/version.json b/version.json index 9e1858bd..b51ab42f 100644 --- a/version.json +++ b/version.json @@ -1,5 +1,5 @@ { - "tag": "v1.1.1", - "name": "Version 1.1.1", + "tag": "v1.1.2", + "name": "Version 1.1.2", "prerelease": false }