Merged 5.2.N (5.2.1) to HEAD (5.2)

124228 amorarasu: Merged 5.1.N (5.1.2) to 5.2.N (5.2.1)
      124145 amorarasu: Merged 5.0.N (5.0.4) to 5.1.N (5.1.2)
         124106 rmunteanu: Merged V4.2-BUG-FIX (4.2.7) to 5.0.N (5.0.4)
            124105 amorarasu: Merged V4.1-BUG-FIX (4.1.11) to V4.2-BUG-FIX (4.2.7)
               123915 rmunteanu: Merged V4.1.7 (4.1.7.18) to V4.1-BUG-FIX (4.1.11)
                  MNT-15801 : onContentUpdate policies not working for updates via webdav
                     - Reverted changes made for MNT-11185 and MNT-10966 , reverts that will fix MNT-15746
                     - Changed fix for MNT-5882 by adding the ASPECT_NO_CONTENT after the content is updated, this way preventing MNT-10966 from reproducing


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@127744 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2016-06-03 16:00:17 +00:00
parent 0d9da4a92c
commit 00776fedf8
2 changed files with 9 additions and 33 deletions

View File

@@ -2988,6 +2988,15 @@ public class ContentDiskDriver2 extends AlfrescoDiskDriver implements ExtendedD
lockKeeper.removeLock(target);
if(nodeService.hasAspect(target, ContentModel.ASPECT_NO_CONTENT))
{
if(logger.isDebugEnabled())
{
logger.debug("removed no content aspect");
}
nodeService.removeAspect(target, ContentModel.ASPECT_NO_CONTENT);
}
if(tempFile.isChanged())
{
tempFile.flushFile();
@@ -3085,16 +3094,6 @@ public class ContentDiskDriver2 extends AlfrescoDiskDriver implements ExtendedD
writer.setMimetype(mimetype);
writer.setEncoding(encoding);
writer.putContent(tempFile.getFile());
// remove ASPECT_NO_CONTENT after content is present
if(nodeService.hasAspect(target, ContentModel.ASPECT_NO_CONTENT))
{
if(logger.isDebugEnabled())
{
logger.debug("removed no content aspect");
}
nodeService.removeAspect(target, ContentModel.ASPECT_NO_CONTENT);
}
} // if content changed
}
}