1
0
mirror of https://github.com/moparisthebest/davmail synced 2024-08-13 16:53:51 -04:00

LDAP: another gallookup detection fix to improve address completion in thunderbird

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1419 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2010-09-03 12:54:21 +00:00
parent 93dfeac99c
commit 9aaa99213b

View File

@ -336,6 +336,9 @@ public class DavExchangeSession extends ExchangeSession {
// iCal search, do not call gallookup
} else if (returningAttributes.contains("apple-serviceslocator")) {
return false;
// Lightning search, no need to gallookup
} else if ("sn".equals(searchAttributeName)) {
return returningAttributes.contains("sn");
// search attribute is gallookup attribute, need to fetch value for isMatch
} else if (GALLOOKUP_ATTRIBUTES.contains(searchAttributeName)) {
return true;
@ -431,8 +434,8 @@ public class DavExchangeSession extends ExchangeSession {
/**
* Exchange 2003: get mailPath from welcome page
*
* @param method
* @return
* @param method current http method
* @return mail path from body
*/
protected String getMailpathFromWelcomePage(HttpMethod method) {
String welcomePageMailPath = null;
@ -821,7 +824,7 @@ public class DavExchangeSession extends ExchangeSession {
String lowerCaseValue = value.toLowerCase();
String actualValue = contact.get(attributeName);
Operator actualOperator = operator;
// patch for iCal search without galLookup
// patch for iCal or Lightning search without galLookup
if (actualValue == null && ("givenName".equals(attributeName) || "sn".equals(attributeName))) {
actualValue = contact.get("cn");
actualOperator = Operator.Like;
@ -2001,7 +2004,7 @@ public class DavExchangeSession extends ExchangeSession {
while (reader.hasNext()) {
reader.next();
if (XMLStreamUtil.isStartTag(reader, "e")
&& "18-timezone".equals( XMLStreamUtil.getAttributeValue(reader, "k"))) {
&& "18-timezone".equals(XMLStreamUtil.getAttributeValue(reader, "k"))) {
String value = XMLStreamUtil.getAttributeValue(reader, "v");
if (value != null && value.startsWith("18-")) {
timezoneName = value.substring(3);