diff --git a/CHANGELOG b/CHANGELOG index fef9ed110..53de059a3 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -4,6 +4,8 @@ CHANGELOG Roundcube Webmail - Managesieve: Replace "Filter disabled" with "Filter enabled" (#7028) - Managesieve: Fix so modifier type select wasn't hidden after hiding modifier select on header change - Enigma: Add script to import keys from filesystem to the db storage (for multihost) +- Installer: Fix DB Write test on SQLite database ("database is locked" error) (#7064) +- Installer: Fix so SQLite DSN with a relative path to the database file works in Installer - Fix so type attribute on script tags is not used on HTML5 pages (#6975) - Fix unread count after purge on a folder that is not currently selected (#7051) - Fix bug where Enter key didn't work on messages list in "List" layout (#7052) diff --git a/installer/test.php b/installer/test.php index dbaabefbf..d18b6a949 100644 --- a/installer/test.php +++ b/installer/test.php @@ -189,6 +189,9 @@ if ($db_working) { // more database tests if ($db_working) { + // Using transactions to workaround SQLite bug (#7064) + $DB->startTransaction(); + // write test $insert_id = md5(uniqid()); $db_write = $DB->query("INSERT INTO " . $DB->quote_identifier($RCI->config['db_prefix'] . 'session') @@ -204,6 +207,9 @@ if ($db_working) { } echo '
'; + // Transaction end + $DB->rollbackTransaction(); + // check timezone settings $tz_db = 'SELECT ' . $DB->unixtimestamp($DB->now()) . ' AS tz_db'; $tz_db = $DB->query($tz_db); diff --git a/program/lib/Roundcube/rcube_db.php b/program/lib/Roundcube/rcube_db.php index 364df0c9a..4bd7fe70f 100644 --- a/program/lib/Roundcube/rcube_db.php +++ b/program/lib/Roundcube/rcube_db.php @@ -1258,6 +1258,15 @@ class rcube_db // remove problematic suffix (#7034) $parsed['database'] = preg_replace('/;.*$/', '', $parsed['database']); + + // Resolve relative path to the sqlite database file + // so for example it works with Roundcube Installer + if (!empty($parsed['phptype']) && !empty($parsed['database']) + && stripos($parsed['phptype'], 'sqlite') === 0 + && $parsed['database'][0] != '/' + ) { + $parsed['database'] = INSTALL_PATH . $parsed['database']; + } } return $parsed;