Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-13262

dl.webdav.save.to.single.version setting is broken

    Details

      Description

      In DLWebDAVStorageImpl There is the following code

      if (PropsValues.DL_WEBDAV_SAVE_TO_SINGLE_VERSION) {
      publishFileEntry(fileEntry);
      }

      And the publishFileEntry method looks like this

      protected void publishFileEntry(DLFileEntry fileEntry) throws Exception {
      DLFileVersion latestFileVersion =
      DLFileVersionLocalServiceUtil.getLatestFileVersion(
      fileEntry.getGroupId(), fileEntry.getFolderId(),
      fileEntry.getName());

      if (latestFileVersion.getStatus() ==
      WorkflowConstants.STATUS_APPROVED)

      { return; }

      ServiceContext serviceContext = new ServiceContext();

      serviceContext.setAddCommunityPermissions(
      isAddCommunityPermissions(fileEntry.getGroupId()));
      serviceContext.setAddGuestPermissions(true);

      DLFileEntryLocalServiceUtil.updateFileEntry(
      latestFileVersion.getUserId(), latestFileVersion.getGroupId(),
      latestFileVersion.getFolderId(), latestFileVersion.getName(),
      fileEntry.getTitle(), fileEntry.getTitle(),
      fileEntry.getDescription(), latestFileVersion.getDescription(),
      true, fileEntry.getExtraSettings(), null, 0, serviceContext);
      }

      however since 6.0.3 this does not publish the file anymore because updateFileEntry now looks like

      if (latestFileVersion.getStatus() !=
      WorkflowConstants.STATUS_APPROVED)

      { serviceContext.setWorkflowAction( WorkflowConstants.ACTION_SAVE_DRAFT); version = latestFileVersion.getVersion(); updatedFileVersion = true; updateFileVersion( user, latestFileVersion, sourceFileName, extension, title, description, changeLog, extraSettings, version, size, latestFileVersion.getStatus(), serviceContext.getModifiedDate(now), serviceContext); }

      eg. it publishes it as a draft

        Attachments

          Activity

            People

            Assignee:
            support-lep@liferay.com SE Support
            Reporter:
            jelmer Jelmer Kuperus (Inactive)
            Participants of an Issue:
            Recent user:
            Esther Sanz
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              9 years, 12 weeks ago

                Packages

                Version Package
                6.1.0 CE RC1
                --Sprint 11/12