This commit is contained in:
Frederic Guillot
2017-02-15 21:06:41 -05:00
parent 371115167c
commit 5e0cf1472e
4 changed files with 16 additions and 11 deletions

View File

@@ -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;
}
/**