mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-07-11 23:57:07 -04:00
Modify special case for SQLite
This commit is contained in:
@@ -191,8 +191,14 @@ class FreshRSS_DatabaseDAO extends Minz_ModelPdo {
|
||||
$nbEntries = $entryDAO->countUnreadRead();
|
||||
if (!empty($nbEntries['all'])) {
|
||||
$error = 'Error: Destination database already contains some entries!';
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ($this->bd->dbType() === 'sqlite') {
|
||||
//For importing to SQLite, we can just copy the SQLite source (issues when using another PDO)
|
||||
copy($filename, join_path(DATA_PATH, 'users', $this->current_user, 'db.sqlite'));
|
||||
goto done;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
$error = 'Invalid copy mode!';
|
||||
@@ -202,12 +208,6 @@ class FreshRSS_DatabaseDAO extends Minz_ModelPdo {
|
||||
goto done;
|
||||
}
|
||||
|
||||
if ($this->bd->dbType() === 'sqlite') {
|
||||
//For importing to SQLite, we cannot have two PDO instances at the same time but we can just copy the SQLite source
|
||||
copy($filename, join_path(DATA_PATH, 'users', $this->current_user, 'db.sqlite'));
|
||||
goto done;
|
||||
}
|
||||
|
||||
$sqlite = null;
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user