summaryrefslogtreecommitdiff
path: root/app/Model/ConfigModel.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2017-02-15 21:06:41 -0500
committerFrederic Guillot <fred@kanboard.net>2017-02-15 21:06:41 -0500
commit5e0cf1472ef0b019c9d50d61ba944e977e28b104 (patch)
tree8041c0b3e192bbdc50a0545bfa0b55a7d8366423 /app/Model/ConfigModel.php
parent371115167cfa6d490a308cd8d9e02578c53c2b65 (diff)
Improve PR #3038
Diffstat (limited to 'app/Model/ConfigModel.php')
-rw-r--r--app/Model/ConfigModel.php7
1 files changed, 3 insertions, 4 deletions
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;
}
/**