diff options
author | Hugues Hiegel <root@paranoid> | 2014-08-05 16:44:07 +0200 |
---|---|---|
committer | Hugues Hiegel <root@paranoid> | 2014-08-05 16:44:07 +0200 |
commit | f91f8533678c388b879d9e999a6bcc9e22ad7e19 (patch) | |
tree | c0099e25a932399d6cd1066607a42e7fe220b977 /plugins/password/drivers/sql.php | |
parent | ec116d33c22b371328c8557158736e3d2ee479a8 (diff) |
lot of stuff
Diffstat (limited to 'plugins/password/drivers/sql.php')
-rw-r--r-- | plugins/password/drivers/sql.php | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/plugins/password/drivers/sql.php b/plugins/password/drivers/sql.php index 7a51dfe44..8c8dc87b5 100644 --- a/plugins/password/drivers/sql.php +++ b/plugins/password/drivers/sql.php @@ -34,9 +34,8 @@ class rcube_sql_password $db = $rcmail->get_dbh(); } - if ($db->is_error()) { + if ($err = $db->is_error()) return PASSWORD_ERROR; - } // crypted password if (strpos($sql, '%c') !== FALSE) { @@ -118,7 +117,7 @@ class rcube_sql_password // hashed passwords if (preg_match('/%[n|q]/', $sql)) { if (!extension_loaded('hash')) { - rcube::raise_error(array( + raise_error(array( 'code' => 600, 'type' => 'php', 'file' => __FILE__, 'line' => __LINE__, @@ -165,14 +164,14 @@ class rcube_sql_password // convert domains to/from punnycode if ($rcmail->config->get('password_idn_ascii')) { - $domain_part = rcube_utils::idn_to_ascii($domain_part); - $username = rcube_utils::idn_to_ascii($username); - $host = rcube_utils::idn_to_ascii($host); + $domain_part = rcube_idn_to_ascii($domain_part); + $username = rcube_idn_to_ascii($username); + $host = rcube_idn_to_ascii($host); } else { - $domain_part = rcube_utils::idn_to_utf8($domain_part); - $username = rcube_utils::idn_to_utf8($username); - $host = rcube_utils::idn_to_utf8($host); + $domain_part = rcube_idn_to_utf8($domain_part); + $username = rcube_idn_to_utf8($username); + $host = rcube_idn_to_utf8($host); } // at least we should always have the local part @@ -185,7 +184,7 @@ class rcube_sql_password if (!$db->is_error()) { if (strtolower(substr(trim($sql),0,6)) == 'select') { - if ($db->fetch_array($res)) + if ($result = $db->fetch_array($res)) return PASSWORD_SUCCESS; } else { // This is the good case: 1 row updated |