Selaa lähdekoodia

Brain-damage in sqimap_create_stream(). Can't believe I let myself commit this function in such poor shape, and further that nobody else caught it until now ;)

sqimap_create_stream() was not as generalized as it should have been - it was still using $imap_server and $use_imap_tls, etc.  Now obeying passed params as it should.
tassium 21 vuotta sitten
vanhempi
commit
efc02d8258
1 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. 2 2
      functions/imap_general.php

+ 2 - 2
functions/imap_general.php

@@ -567,10 +567,10 @@ function sqimap_read_data ($imap_stream, $tag_uid, $handle_errors,
 function sqimap_create_stream($server,$port,$tls=false) {
 function sqimap_create_stream($server,$port,$tls=false) {
     global $username, $use_imap_tls;
     global $username, $use_imap_tls;
 
 
-    if ($use_imap_tls == true) {
+    if ($tls == true) {
         if ((check_php_version(4,3)) and (extension_loaded('openssl'))) {
         if ((check_php_version(4,3)) and (extension_loaded('openssl'))) {
             /* Use TLS by prefixing "tls://" to the hostname */
             /* Use TLS by prefixing "tls://" to the hostname */
-            $server = 'tls://' . $imap_server_address;
+            $server = 'tls://' . $server;
         } else {
         } else {
             require_once(SM_PATH . 'functions/display_messages.php');
             require_once(SM_PATH . 'functions/display_messages.php');
             $string = "Unable to connect to IMAP server!<br>TLS is enabled, but this " .
             $string = "Unable to connect to IMAP server!<br>TLS is enabled, but this " .