Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Needham <needham.thomas@gmail.com>2012-04-08 22:52:31 +0400
committerTom Needham <needham.thomas@gmail.com>2012-04-08 22:52:31 +0400
commite5ebbacc9e951d1da82762daf67f993ee20e95cb (patch)
tree05386c16efa4f22a219a92ac6832c1015d3c44a5 /lib/migrate.php
parent5e314e8effb42b60d720de40fbf74591ae421534 (diff)
Fix sqlite version detection
Diffstat (limited to 'lib/migrate.php')
-rw-r--r--lib/migrate.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/migrate.php b/lib/migrate.php
index 2730d26a74a..a8a5e581c3a 100644
--- a/lib/migrate.php
+++ b/lib/migrate.php
@@ -496,10 +496,14 @@ class OC_Migrate{
$datadir = OC_Config::getValue( "datadirectory", OC::$SERVERROOT."/data" );
// DB type
- if( !is_callable( 'sqlite_open' ) || !class_exists( 'SQLite3' ) ){
+ if( class_exists( 'SQLite3' ) ){
+ $dbtype = 'sqlite3';
+ } else if( is_callable( 'sqlite_open' ) ){
+ $dbtype = 'sqlite';
+ } else {
OC_Log::write( 'migration', 'SQLite not found', OC_Log::ERROR );
return false;
- }
+ }
// Prepare options array
$options = array(
@@ -510,7 +514,7 @@ class OC_Migrate{
'quote_identifier' => true
);
$dsn = array(
- 'phptype' => 'sqlite3',
+ 'phptype' => $dbtype,
'database' => self::$dbpath,
'mode' => '0644'
);