Abstract how we get default template; move template inclusion up top; clear template...
[squirrelmail.git] / functions / imap_general.php
index a4820491378a0bc77d75d5497ca6ec62705f9186..8d6d27ee218abf35964e7e5f28e610fc48636466 100755 (executable)
@@ -769,7 +769,7 @@ function sqimap_login ($username, $password, $imap_server_address, $imap_port, $
     }
 
     if (!isset($sqimap_capabilities)) {
-        sqgetglobalvar('sqimap_capabilities' , $capability , SQ_SESSION );
+        sqgetglobalvar('sqimap_capabilities' , $sqimap_capabilities , SQ_SESSION );
     }
 
     $host = $imap_server_address;
@@ -835,7 +835,7 @@ function sqimap_login ($username, $password, $imap_server_address, $imap_port, $
          *
          **/
         $tag=sqimap_session_id(false);
-        $sasl = (isset($capability['SASL-IR']) && $capability['SASL-IR']) ? true : false;
+        $sasl = (isset($sqimap_capabilities['SASL-IR']) && $sqimap_capabilities['SASL-IR']) ? true : false;
         $auth = base64_encode("$username\0$username\0$password");
         if ($sasl) {
             // IMAP Extension for SASL Initial Client Response
@@ -1306,5 +1306,3 @@ function map_yp_alias($username) {
    $yp = `ypmatch $username aliases`;
    return chop(substr($yp, strlen($username)+1));
 }
-
-?>
\ No newline at end of file