Improve PR #3038
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user