Skip to content

Commit

Permalink
Merge branch 'hotfix-10.7.22' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
DominicWatson committed Jan 13, 2017
2 parents 61d59e7 + e5240b2 commit 2b836eb
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 15 deletions.
2 changes: 1 addition & 1 deletion box.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name":"PresideCMS",
"version":"10.7.21",
"version":"10.7.22",
"author":"Pixl8 Interactive",
"createPackageDirectory":true,
"packageDirectory":"preside",
Expand Down
2 changes: 1 addition & 1 deletion box.json.no.deps
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name":"PresideCMS",
"version":"10.7.21",
"version":"10.7.22",
"author":"Pixl8 Interactive",
"createPackageDirectory":true,
"packageDirectory":"preside",
Expand Down
2 changes: 1 addition & 1 deletion support/build/build.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ build.number.remote.url=http://downloads.presidecms.com/presidecms/build.number

##############################
# MANUALLY UPDATE EACH VERSION
preside.version=10.7.21
preside.version=10.7.22
##############################
7 changes: 7 additions & 0 deletions system/coldboxModifications/cachebox/CacheProvider.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ component output=false extends="coldbox.system.cache.providers.CacheBoxColdBoxPr
return result;
}

public any function clearQuiet( required any objectKey ) output=false {
super.clearQuiet( argumentCollection=arguments );

request[ _requestKey ] = request[ _requestKey ] ?: {};
request[ _requestKey ].delete( arguments.objectKey );
}

public any function get( required string objectKey ) output=false {
request[ _requestKey ] = request[ _requestKey ] ?: {};

Expand Down
2 changes: 1 addition & 1 deletion system/preside-objects/assetManager/asset.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/
component extends="preside.system.base.SystemPresideObject" labelfield="title" output=false displayName="Asset" {

property name="asset_folder" relationship="many-to-one" required=true uniqueindexes="assetfolder|1";
property name="asset_folder" relationship="many-to-one" required=true uniqueindexes="assetfolder|1" onupdate="cascade-if-no-cycle-check";

property name="title" type="string" dbtype="varchar" maxLength=150 required=true uniqueindexes="assetfolder|2";
property name="storage_path" type="string" dbtype="varchar" maxLength=255 required=true uniqueindexes="assetpath";
Expand Down
4 changes: 2 additions & 2 deletions system/preside-objects/core/page.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ component extends="preside.system.base.SystemPresideObject" labelfield="title" o
property name="author" type="string" dbtype="varchar" maxLength="100" required=false;
property name="browser_title" type="string" dbtype="varchar" maxLength="100" required=false;
property name="description" type="string" dbtype="varchar" maxLength="255" required=false;
property name="embargo_date" type="date" dbtype="datetime" required=false control="datetimepicker";
property name="expiry_date" type="date" dbtype="datetime" required=false control="datetimepicker";
property name="embargo_date" type="date" dbtype="datetime" required=false control="datetimepicker" indexes="embargodate";
property name="expiry_date" type="date" dbtype="datetime" required=false control="datetimepicker" indexes="expirydate";
property name="access_restriction" type="string" dbtype="varchar" maxLength="7" required=false default="inherit" format="regex:(inherit|none|full|partial)" control="select" values="inherit,none,full,partial" labels="preside-objects.page:access_restriction.option.inherit,preside-objects.page:access_restriction.option.none,preside-objects.page:access_restriction.option.full,preside-objects.page:access_restriction.option.partial";
property name="iframe_restriction" type="string" dbtype="varchar" maxLength="10" required=false default="inherit" format="regex:(inherit|block|sameorigin|allow)" control="select" values="inherit,block,sameorigin,allow" labels="preside-objects.page:iframe_restriction.option.inherit,preside-objects.page:iframe_restriction.option.block,preside-objects.page:iframe_restriction.option.sameorigin,preside-objects.page:iframe_restriction.option.allow";
property name="full_login_required" type="boolean" dbtype="boolean" required=false default=false;
Expand Down
25 changes: 16 additions & 9 deletions system/services/siteTree/SiteTreeService.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -122,16 +122,24 @@ component {
, boolean allowDrafts = $getRequestContext().showNonLiveContent()

) {
var args = { filter="page.id = :id", filterParams={}, useCache=arguments.useCache, allowDraftVersions=arguments.allowDrafts };
var args = { filter="", filterParams={}, useCache=arguments.useCache, allowDraftVersions=arguments.allowDrafts };

if ( StructKeyExists( arguments, "id" ) ) {
args.filter = "page.id = :id";
args.filterParams.id = arguments.id;

} else if ( StructKeyExists( arguments, "slug" ) ) {
args.filterParams.id = getPageIdBySlug( argumentCollection=arguments );
if ( arePageSlugsMultilingual() ) {
args.filter = "page.id = :id";
args.filterParams.id = _getPageIdWithMultilingualSlug( argumentCollection=arguments );
} else {
args.filter = "page.slug = :slug and page._hierarchy_slug = :_hierarchy_slug" // this double match is for performance - the full slug cannot be indexed because of its potential size
args.filterParams = { slug = ListLast( arguments.slug, "/" ), _hierarchy_slug = arguments.slug }
}

} else if ( StructKeyExists( arguments, "systemPage" ) ) {
args.filterParams.id = getPageIdBySystemPageType( arguments.systemPage );
args.filter = "page.page_type = :page_type"
args.filterParams = { page_type = arguments.systemPage }

} else {
throw(
Expand Down Expand Up @@ -978,7 +986,7 @@ component {
for( var pageType in pageTypes ) {
var pageTypeId = pageType.getId();
if ( pageTypesService.isSystemPageType( pageTypeId ) && pageTypesService.isPageTypeAvailableToSiteTemplate( pageTypeId, site.template ?: "" ) ) {
var page = getPage( systemPage=pageTypeId );
var page = getPage( systemPage=pageTypeId, useCache=false );

if ( !page.recordCount ) {
_createSystemPage( pageType );
Expand Down Expand Up @@ -1323,13 +1331,12 @@ component {
var loginSvc = _getLoginService();

if ( Len( Trim( parentType ) ) && parentType != "none" ) {
var parent = getPage( systemPage=parentType );
var parent = getPage( systemPage=parentType, useCache=false );
if ( !parent.recordCount ) {
_createSystemPage( _getPageTypesService().getPageType( parentType ) );
parent = _createSystemPage( _getPageTypesService().getPageType( parentType ) );
} else {
parent = parent.id;
}
parent = getPage( systemPage=parentType );

parent = parent.id ?: "";
}

var addPageArgs = {
Expand Down

0 comments on commit 2b836eb

Please sign in to comment.