From: jangliss Date: Mon, 10 Mar 2003 18:01:45 +0000 (+0000) Subject: Weird locales seem to mess with uppercase i, and php seems to like to X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=fbb76d0ea54c7283a51ed3690353ba842f572ab4;p=squirrelmail.git Weird locales seem to mess with uppercase i, and php seems to like to convert function names according to locales... bad php, but not much we can do. Changed quoteIMAP to quoteimap to work around this for now. It's only used during login as far as I can find. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@4633 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/functions/imap_general.php b/functions/imap_general.php index b2880f87..f6dd5512 100755 --- a/functions/imap_general.php +++ b/functions/imap_general.php @@ -284,7 +284,7 @@ function sqimap_login ($username, $password, $imap_server_address, $imap_port, $ } } elseif ($imap_auth_mech == 'login') { // Original IMAP login code - $query = 'LOGIN "' . quoteIMAP($username) . '" "' . quoteIMAP($password) . '"'; + $query = 'LOGIN "' . quoteimap($username) . '" "' . quoteimap($password) . '"'; $read = sqimap_run_command ($imap_stream, $query, false, $response, $message); } elseif ($imap_auth_mech == 'plain') { /* Replace this with SASL PLAIN if it ever gets implemented */ diff --git a/functions/strings.php b/functions/strings.php index f6ba0500..0230be1b 100644 --- a/functions/strings.php +++ b/functions/strings.php @@ -406,7 +406,7 @@ function GenerateRandomString($size, $chars, $flags = 0) { return $String; } -function quoteIMAP($str) { +function quoteimap($str) { return ereg_replace('(["\\])', '\\\\1', $str); }