From 5e0cf1472ef0b019c9d50d61ba944e977e28b104 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Wed, 15 Feb 2017 21:06:41 -0500 Subject: Improve PR #3038 --- app/Model/ConfigModel.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'app/Model/ConfigModel.php') diff --git a/app/Model/ConfigModel.php b/app/Model/ConfigModel.php index b45199fd..7f48f34f 100644 --- a/app/Model/ConfigModel.php +++ b/app/Model/ConfigModel.php @@ -52,14 +52,13 @@ class ConfigModel extends SettingModel * Replace database file with uploaded one * * @access public - * @return boolean + * @param string $file + * @return bool */ public function uploadDatabase($file) { - $this->db->closeConnection(); - $result = file_put_contents(DB_FILENAME, gzdecode(file_get_contents($file))); - return $result == false? false: true; + return file_put_contents(DB_FILENAME, gzdecode(file_get_contents($file))) !== false; } /** -- cgit v1.2.3