diff options
author | alecpl <alec@alec.pl> | 2009-09-01 12:21:07 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2009-09-01 12:21:07 +0000 |
commit | add992381e1f1c465db8f4b1d8b2238ad533220a (patch) | |
tree | f53099565025b20761bb72a80f0af84ab1433d92 /plugins/password/drivers | |
parent | 940642edd048c3ca6e4d9303f81ac7956cc8c649 (diff) |
- add new_link=true to password_db_dsn (#1486067)
Diffstat (limited to 'plugins/password/drivers')
-rw-r--r-- | plugins/password/drivers/sql.php | 8 |
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'); |