[Svn] r2901 - trunk/roundcubemail/plugins/password/drivers

trac at roundcube.net trac at roundcube.net
Tue Sep 1 14:21:08 CEST 2009


Author: alec
Date: 2009-09-01 07:21:07 -0500 (Tue, 01 Sep 2009)
New Revision: 2901

Modified:
   trunk/roundcubemail/plugins/password/drivers/sql.php
Log:
- add new_link=true to password_db_dsn (#1486067)


Modified: trunk/roundcubemail/plugins/password/drivers/sql.php
===================================================================
--- trunk/roundcubemail/plugins/password/drivers/sql.php	2009-09-01 11:47:46 UTC (rev 2900)
+++ trunk/roundcubemail/plugins/password/drivers/sql.php	2009-09-01 12:21:07 UTC (rev 2901)
@@ -5,7 +5,7 @@
  *
  * Driver for passwords stored in SQL database
  *
- * @version 1.0
+ * @version 1.1
  * @author Aleksander 'A.L.E.C' Machniak <alec at alec.pl>
  *
  */
@@ -18,6 +18,12 @@
         $sql = 'SELECT update_passwd(%c, %u)';
 
     if ($dsn = $rcmail->config->get('password_db_dsn')) {
+	// #1486067: enable new_link option
+	if (is_array($dsn) && empty($dsn['new_link']))
+	    $dsn['new_link'] = true;
+	else if (!is_array($dsn) && !preg_match('/\?new_link=true/', $dsn))
+	  $dsn .= '?new_link=true';
+
         $db = new rcube_mdb2($dsn, '', FALSE);
         $db->set_debug((bool)$rcmail->config->get('sql_debug'));
         $db->db_connect('w');

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



More information about the Svn mailing list