[Svn] r2449 - in trunk/roundcubemail: . installer program/include

trac at roundcube.net trac at roundcube.net
Sat May 2 22:11:45 CEST 2009


Author: alec
Date: 2009-05-02 15:11:45 -0500 (Sat, 02 May 2009)
New Revision: 2449

Modified:
   trunk/roundcubemail/INSTALL
   trunk/roundcubemail/installer/config.php
   trunk/roundcubemail/program/include/rcube_mdb2.php
Log:
- some hints to use sqlite db (#1485821)


Modified: trunk/roundcubemail/INSTALL
===================================================================
--- trunk/roundcubemail/INSTALL	2009-05-02 19:19:39 UTC (rev 2448)
+++ trunk/roundcubemail/INSTALL	2009-05-02 20:11:45 UTC (rev 2449)
@@ -70,9 +70,8 @@
 
 * SQLite
 --------
-Sqlite requires specifically php5 (sqlite in php4 currently doesn't
-work with roundcube), and you need sqlite 2 (preferably 2.8) to setup
-the sqlite db (sqlite 3.x also doesn't work at the moment). Here is
+You need sqlite 2 (preferably 2.8) to setup the sqlite db 
+(sqlite 3.x also doesn't work at the moment). Here is
 an example how you can setup the sqlite.db for roundcube:
 
 # sqlite -init SQL/sqlite.initial.sql sqlite.db

Modified: trunk/roundcubemail/installer/config.php
===================================================================
--- trunk/roundcubemail/installer/config.php	2009-05-02 19:19:39 UTC (rev 2448)
+++ trunk/roundcubemail/installer/config.php	2009-05-02 20:11:45 UTC (rev 2449)
@@ -269,7 +269,7 @@
 echo $input_dbhost->show($RCI->is_post ? $_POST['_dbhost'] : $dsnw['hostspec']);
 echo '<label for="cfgdbhost">Database server (omit for sqlite)</label><br />';
 echo $input_dbname->show($RCI->is_post ? $_POST['_dbname'] : $dsnw['database']);
-echo '<label for="cfgdbname">Database name</label><br />';
+echo '<label for="cfgdbname">Database name (use a path and filename for sqlite)</label><br />';
 echo $input_dbuser->show($RCI->is_post ? $_POST['_dbuser'] : $dsnw['username']);
 echo '<label for="cfgdbuser">Database user name (needs write permissions)(omit for sqlite)</label><br />';
 echo $input_dbpass->show($RCI->is_post ? $_POST['_dbpass'] : $dsnw['password']);

Modified: trunk/roundcubemail/program/include/rcube_mdb2.php
===================================================================
--- trunk/roundcubemail/program/include/rcube_mdb2.php	2009-05-02 19:19:39 UTC (rev 2448)
+++ trunk/roundcubemail/program/include/rcube_mdb2.php	2009-05-02 20:11:45 UTC (rev 2449)
@@ -585,7 +585,9 @@
     $data = file_get_contents($file_name);
 
     if (strlen($data))
-      sqlite_exec($dbh->connection, $data);
+      if (!sqlite_exec($dbh->connection, $data, $error) || MDB2::isError($dbh)) 
+        raise_error(array('code' => 500, 'type' => 'db',
+	    'line' => __LINE__, 'file' => __FILE__, 'message' => $error), TRUE, FALSE); 
     }
 
 

_______________________________________________
http://lists.roundcube.net/mailman/listinfo/svn



More information about the Svn mailing list