Skip to content

Commit

Permalink
PRESIDECMS-2853 dont use versioning and set date modified when there …
Browse files Browse the repository at this point in the history
…isn't any changes in the content
  • Loading branch information
pixl8-brayden committed Jun 21, 2024
1 parent 02b63f1 commit 091a3d6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions system/services/siteTree/SiteTreeService.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -847,11 +847,12 @@ component {
updated = pobj.updateData(
data = data
, id = arguments.id
, useVersioning = !arguments.skipVersioning
, versionNumber = versionNumber
, updateManyToManyRecords = true
, forceVersionCreation = arguments.forceVersionCreation ?: ( pageDataHasChanged || pageTypeDataHasChanged )
, isDraft = ( arguments.isDraft || pageDataHasChanged || pageTypeDataHasChanged ) ? arguments.isDraft : false
, useVersioning = ( pageDataHasChanged || pageTypeDataHasChanged ) ? !arguments.skipVersioning : false
, setDateModified = ( pageDataHasChanged || pageTypeDataHasChanged ) ? true : false
);

if ( _getPageTypesService().pageTypeExists( existingPage.page_type ) ) {
Expand All @@ -863,7 +864,8 @@ component {
, updateManyToManyRecords = true
, forceVersionCreation = arguments.forceVersionCreation ?: ( pageDataHasChanged || pageTypeDataHasChanged )
, isDraft = ( arguments.isDraft || pageDataHasChanged || pageTypeDataHasChanged ) ? arguments.isDraft : false
, useVersioning = !arguments.skipVersioning
, useVersioning = ( pageDataHasChanged || pageTypeDataHasChanged ) ? !arguments.skipVersioning : false
, setDateModified = ( pageDataHasChanged || pageTypeDataHasChanged ) ? true : false
);
} else {
var insertData = Duplicate( arguments );
Expand Down

0 comments on commit 091a3d6

Please sign in to comment.