mirror of
https://github.com/moparisthebest/davmail
synced 2024-12-13 11:12:22 -05:00
Caldav: use i18n calendar name as display name for iCal
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1488 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
cb5530fcea
commit
0649996caf
@ -437,7 +437,12 @@ public class CaldavConnection extends AbstractConnection {
|
|||||||
}
|
}
|
||||||
if (request.hasProperty("displayname")) {
|
if (request.hasProperty("displayname")) {
|
||||||
if (subFolder == null || subFolder.length() == 0) {
|
if (subFolder == null || subFolder.length() == 0) {
|
||||||
response.appendProperty("D:displayname", request.getLastPath());
|
// use i18n calendar name as display name
|
||||||
|
String displayname = request.getLastPath();
|
||||||
|
if ("calendar".equals(displayname)) {
|
||||||
|
displayname = folder.displayName;
|
||||||
|
}
|
||||||
|
response.appendProperty("D:displayname", displayname);
|
||||||
} else {
|
} else {
|
||||||
response.appendProperty("D:displayname", subFolder);
|
response.appendProperty("D:displayname", subFolder);
|
||||||
}
|
}
|
||||||
@ -638,7 +643,7 @@ public class CaldavConnection extends AbstractConnection {
|
|||||||
public void patchCalendar(CaldavRequest request) throws IOException {
|
public void patchCalendar(CaldavRequest request) throws IOException {
|
||||||
String displayname = request.getProperty("displayname");
|
String displayname = request.getProperty("displayname");
|
||||||
String folderPath = request.getFolderPath();
|
String folderPath = request.getFolderPath();
|
||||||
if (displayname != null && !folderPath.equalsIgnoreCase("/users/"+session.getEmail()+"/calendar")) {
|
if (displayname != null && !folderPath.equalsIgnoreCase("/users/" + session.getEmail() + "/calendar")) {
|
||||||
String targetPath = request.getParentFolderPath() + '/' + displayname;
|
String targetPath = request.getParentFolderPath() + '/' + displayname;
|
||||||
if (!targetPath.equals(folderPath)) {
|
if (!targetPath.equals(folderPath)) {
|
||||||
session.moveFolder(folderPath, targetPath);
|
session.moveFolder(folderPath, targetPath);
|
||||||
|
Loading…
Reference in New Issue
Block a user