diff --git a/source/java/org/alfresco/repo/web/scripts/calendar/CalendarEntryGet.java b/source/java/org/alfresco/repo/web/scripts/calendar/CalendarEntryGet.java index a789dd653c..e0b030730b 100644 --- a/source/java/org/alfresco/repo/web/scripts/calendar/CalendarEntryGet.java +++ b/source/java/org/alfresco/repo/web/scripts/calendar/CalendarEntryGet.java @@ -186,6 +186,7 @@ public class CalendarEntryGet extends AbstractCalendarWebScript } else if (params.get("BYSETPOS") != null) { + text.append("Occurs the "); text.append(weeks.get((Integer.parseInt(params.get("BYSETPOS")))) + " "); text.append(days.get(params.get("BYDAY"))); } diff --git a/source/java/org/alfresco/repo/webdav/AbstractMoveOrCopyMethod.java b/source/java/org/alfresco/repo/webdav/AbstractMoveOrCopyMethod.java index 16ac636ea7..9c04931f25 100644 --- a/source/java/org/alfresco/repo/webdav/AbstractMoveOrCopyMethod.java +++ b/source/java/org/alfresco/repo/webdav/AbstractMoveOrCopyMethod.java @@ -114,29 +114,27 @@ public abstract class AbstractMoveOrCopyMethod extends HierarchicalMethod try { destInfo = getDAVHelper().getNodeForPath(rootNodeRef, destPath, servletPath); - // ALF-7079 fix, if destInfo is working copy then content will be updated later - boolean isDestWorkingCopy = getNodeService().hasAspect(destInfo.getNodeRef(), ContentModel.ASPECT_WORKING_COPY); - if (!hasOverWrite() && !isDestWorkingCopy) + if (!destInfo.getNodeRef().equals(sourceInfo.getNodeRef())) { - if (logger.isDebugEnabled()) + // ALF-7079 fix, if destInfo is working copy then content will be updated later + boolean isDestWorkingCopy = getNodeService().hasAspect(destInfo.getNodeRef(), ContentModel.ASPECT_WORKING_COPY); + if (!hasOverWrite() && !isDestWorkingCopy) { - logger.debug("Destination exists but overwrite is not allowed"); + if (logger.isDebugEnabled()) + { + logger.debug("Destination exists but overwrite is not allowed"); + } + // it exists and we may not overwrite + throw new WebDAVServerException(HttpServletResponse.SC_PRECONDITION_FAILED); } - // it exists and we may not overwrite - throw new WebDAVServerException(HttpServletResponse.SC_PRECONDITION_FAILED); - } - // delete the destination node if it is not the same as the source node and not a working copy - if (!destInfo.getNodeRef().equals(sourceInfo.getNodeRef()) && !isDestWorkingCopy && - !isShuffleOperation(sourceInfo) && !isVersioned(destInfo)) - { - checkNode(destInfo); + // delete the destination node if it is not the same as the source node and not a working copy + if (!isDestWorkingCopy && !isShuffleOperation(sourceInfo) && !isVersioned(destInfo)) + { + checkNode(destInfo); - // attempting to move or copy onto another node - fileFolderService.delete(destInfo.getNodeRef()); - } - else - { - // it is a copy or move onto itself + // attempting to move or copy onto another node + fileFolderService.delete(destInfo.getNodeRef()); + } } } catch (FileNotFoundException e)