summaryrefslogtreecommitdiff
path: root/roundcubemail/plugins/password/drivers/sql.php
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2009-09-01 12:21:07 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2009-09-01 12:21:07 +0000
commiteccdc88369276f7f941927b3589fd75dd03ee128 (patch)
treec964888aeef3da559b91fe967b9eae048623b55d /roundcubemail/plugins/password/drivers/sql.php
parent8da9d553601786fe0530ae38988992205184e1e8 (diff)
- add new_link=true to password_db_dsn (#1486067)
git-svn-id: https://svn.roundcube.net/trunk@2901 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/plugins/password/drivers/sql.php')
-rw-r--r--roundcubemail/plugins/password/drivers/sql.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/roundcubemail/plugins/password/drivers/sql.php b/roundcubemail/plugins/password/drivers/sql.php
index 3cac8d4dc..98e878a7d 100644
--- a/roundcubemail/plugins/password/drivers/sql.php
+++ b/roundcubemail/plugins/password/drivers/sql.php
@@ -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@alec.pl>
*
*/
@@ -18,6 +18,12 @@ function password_save($curpass, $passwd)
$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');