[Svn] r3887 - in trunk/roundcubemail: . bin installer

trac at roundcube.net trac at roundcube.net
Tue Aug 10 08:32:51 CEST 2010


Author: alec
Date: 2010-08-10 01:32:50 -0500 (Tue, 10 Aug 2010)
New Revision: 3887

Modified:
   trunk/roundcubemail/CHANGELOG
   trunk/roundcubemail/bin/update.sh
   trunk/roundcubemail/installer/test.php
Log:
- Fix path to SQL files when using pgsql/mysqli/sqlsrv drivers (#1486902)


Modified: trunk/roundcubemail/CHANGELOG
===================================================================
--- trunk/roundcubemail/CHANGELOG	2010-08-09 13:31:48 UTC (rev 3886)
+++ trunk/roundcubemail/CHANGELOG	2010-08-10 06:32:50 UTC (rev 3887)
@@ -2,6 +2,7 @@
 ===========================
 
 - Improve handling of single-part messages with bogus BODYSTRUCTURE (#1486898)
+- Fix path to SQL files when using pgsql/mysqli/sqlsrv drivers (#1486902)
 
 RELEASE 0.4
 -----------

Modified: trunk/roundcubemail/bin/update.sh
===================================================================
--- trunk/roundcubemail/bin/update.sh	2010-08-09 13:31:48 UTC (rev 3886)
+++ trunk/roundcubemail/bin/update.sh	2010-08-10 06:32:50 UTC (rev 3887)
@@ -114,7 +114,8 @@
       $success = false;
     }
     else if ($RCI->db_schema_check($DB, false)) {
-      $updatefile = INSTALL_PATH . 'SQL/' . $DB->db_provider . '.update.sql';
+      $db_map = array('pgsql' => 'postgres', 'mysqli' => 'mysql', 'sqlsrv' => 'mssql');
+      $updatefile = INSTALL_PATH . 'SQL/' . (isset($db_map[$DB->db_provider]) ? $db_map[$DB->db_provider] : $DB->db_provider) . '.update.sql';
       echo "WARNING: Database schema needs to be updated!\n";
       echo "Open $updatefile and execute all queries that are superscribed with the currently installed version number\n";
       $success = false;

Modified: trunk/roundcubemail/installer/test.php
===================================================================
--- trunk/roundcubemail/installer/test.php	2010-08-09 13:31:48 UTC (rev 3886)
+++ trunk/roundcubemail/installer/test.php	2010-08-10 06:32:50 UTC (rev 3887)
@@ -166,7 +166,8 @@
     }
     else if ($RCI->db_schema_check($DB, $update = !empty($_POST['updatedb']))) {
         $RCI->fail('DB Schema', "Database schema differs");
-        $updatefile = INSTALL_PATH . 'SQL/' . $DB->db_provider . '.update.sql';
+        $db_map = array('pgsql' => 'postgres', 'mysqli' => 'mysql', 'sqlsrv' => 'mssql');
+        $updatefile = INSTALL_PATH . 'SQL/' . (isset($db_map[$DB->db_provider]) ? $db_map[$DB->db_provider] : $DB->db_provider) . '.update.sql';
         echo '<p class="warning">Please manually execute the SQL statements from '.$updatefile.' on your database.<br/>';
         echo 'See comments in the file and execute queries that are superscribed with the currently installed version number.</p>';
         $db_working = false;

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



More information about the Svn mailing list