| | |
| | | | program/include/rcube_imap_generic.php | |
| | | | | |
| | | | This file is part of the Roundcube Webmail client | |
| | | | Copyright (C) 2005-2010, Roundcube Dev. - Switzerland | |
| | | | Copyright (C) 2005-2010, The Roundcube Dev Team | |
| | | | Licensed under the GNU GPL | |
| | | | | |
| | | | PURPOSE: | |
| | |
| | | $auth_methods = $auth_caps; |
| | | } |
| | | // RFC 2595 (LOGINDISABLED) LOGIN disabled when connection is not secure |
| | | if (($key = array_search('LOGIN', $auth_methods)) !== false |
| | | && $this->getCapability('LOGINDISABLED') |
| | | ) { |
| | | unset($auth_methods[$key]); |
| | | $login_disabled = $this->getCapability('LOGINDISABLED'); |
| | | if (($key = array_search('LOGIN', $auth_methods)) !== false) { |
| | | if ($login_disabled) { |
| | | unset($auth_methods[$key]); |
| | | } |
| | | } |
| | | else if (!$login_disabled) { |
| | | $auth_methods[] = 'LOGIN'; |
| | | } |
| | | } |
| | | else { |
| | |
| | | */ |
| | | private function strToTime($date) |
| | | { |
| | | // support non-standard "GMTXXXX" literal |
| | | $date = preg_replace('/GMT\s*([+-][0-9]+)/', '\\1', $date); |
| | | // if date parsing fails, we have a date in non-rfc format. |
| | | // remove token from the end and try again |
| | | while ((($ts = @strtotime($date))===false) || ($ts < 0)) { |
| | | $d = explode(' ', $date); |
| | | array_pop($d); |
| | | if (!$d) { |
| | | break; |
| | | } |
| | | $date = implode(' ', $d); |
| | | } |
| | | |
| | | $ts = (int) $ts; |
| | | |
| | | $ts = (int) rcube_strtotime($date); |
| | | return $ts < 0 ? 0 : $ts; |
| | | } |
| | | |