summaryrefslogtreecommitdiff
path: root/plugins/password/drivers/sql.php
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/password/drivers/sql.php')
-rw-r--r--plugins/password/drivers/sql.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/plugins/password/drivers/sql.php b/plugins/password/drivers/sql.php
index 3cac8d4dc..98e878a7d 100644
--- a/plugins/password/drivers/sql.php
+++ b/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');