Permalink
Browse files

Merge branch 'hotfix-10.10.12' into stable

  • Loading branch information...
DominicWatson committed Dec 6, 2018
2 parents 2a07865 + b96f0e3 commit 6003f12110c6c54e7bef2136d7549b86bfa4f26f
@@ -20,6 +20,8 @@ component extends="coldbox.system.web.services.RoutingService" accessors=true {
}
public void function onRequestCapture( event, interceptData ) {
_announceInterception( "prePresideRequestCapture", interceptData );
_checkRedirectDomains( argumentCollection=arguments );
_detectIncomingSite ( argumentCollection=arguments );
_setCustomTenants ( argumentCollection=arguments );
@@ -30,6 +32,8 @@ component extends="coldbox.system.web.services.RoutingService" accessors=true {
if ( !_routePresideSESRequest( argumentCollection=arguments ) ) {
super.onRequestCapture( argumentCollection=arguments );
}
_announceInterception( "postPresideRequestCapture", interceptData );
}
public void function onBuildLink( event, interceptData ) {
@@ -95,7 +99,11 @@ component extends="coldbox.system.web.services.RoutingService" accessors=true {
}
}
event.setSite( site );
interceptData.site = site;
_announceInterception( "onPresideDetectIncomingSite", interceptData );
event.setSite( interceptData.site );
}
private void function _setCustomTenants() {
@@ -115,6 +123,10 @@ component extends="coldbox.system.web.services.RoutingService" accessors=true {
var localeSlug = Trim( ListFirst( path, "/" ) );
var language = multilingualPresideObjectService.getDetectedRequestLanguage( localeSlug=localeSlug );
interceptData.language = language;
_announceInterception( "onPresideDetectLanguage", interceptData );
language = interceptData.language ?: QueryNew( "" );
if ( language.recordCount ) {
event.setLanguage( language.id );
event.setLanguageSlug( language.slug );
@@ -175,6 +187,8 @@ component extends="coldbox.system.web.services.RoutingService" accessors=true {
}
private boolean function _routePresideSESRequest( event, interceptData ) {
_announceInterception( "preRoutePresideSESRequest", interceptData );
var path = event.getCurrentPresideUrlPath();
for( var route in _getPresideRoutes() ){
@@ -183,10 +197,14 @@ component extends="coldbox.system.web.services.RoutingService" accessors=true {
_setEventName( event );
_announceInterception( "postRoutePresideSESRequest", interceptData );
return true;
}
}
_announceInterception( "postRoutePresideSESRequest", interceptData );
return false;
}
@@ -210,12 +228,15 @@ component extends="coldbox.system.web.services.RoutingService" accessors=true {
return;
}
var path = event.getCurrentUrl( includeQueryString=true );
var fullUrl = event.getSiteUrl() & path;
interceptData.path = event.getCurrentUrl( includeQueryString=true );
interceptData.fullUrl = event.getSiteUrl() & interceptData.path;
_announceInterception( "onPresideUrlRedirects", interceptData );
urlRedirectsService.redirectOnMatch(
path = path
, fullUrl = fullUrl
path = interceptData.path
, fullUrl = interceptData.fullUrl
);
}
@@ -231,7 +252,13 @@ component extends="coldbox.system.web.services.RoutingService" accessors=true {
if ( Len( Trim( qs ) ) ) {
redirectUrl &= "?" & qs;
}
getController().relocate( url=redirectUrl, statusCode=301 );
interceptData.redirectFromDomain = domain;
interceptData.redirectFromSite = redirectSite;
interceptData.redirectUrl = redirectUrl;
_announceInterception( "onPresideRedirectDomains", interceptData );
getController().relocate( url=interceptData.redirectUrl , statusCode=301 );
}
}
@@ -265,4 +292,8 @@ component extends="coldbox.system.web.services.RoutingService" accessors=true {
}
return CGI[ arguments.CGIElement ];
}
private void function _announceInterception() {
return variables.controller.getInterceptorService().processState( argumentCollection=arguments );
}
}
@@ -119,6 +119,14 @@ component {
interceptorSettings.customInterceptionPoints.append( "preSaveSystemConfig" );
interceptorSettings.customInterceptionPoints.append( "postSaveSystemConfig" );
interceptorSettings.customInterceptionPoints.append( "preSetUserSession" );
interceptorSettings.customInterceptionPoints.append( "prePresideRequestCapture" );
interceptorSettings.customInterceptionPoints.append( "postPresideRequestCapture" );
interceptorSettings.customInterceptionPoints.append( "onPresideDetectIncomingSite" );
interceptorSettings.customInterceptionPoints.append( "onPresideDetectLanguage" );
interceptorSettings.customInterceptionPoints.append( "onPresideUrlRedirects" );
interceptorSettings.customInterceptionPoints.append( "onPresideRedirectDomains" );
interceptorSettings.customInterceptionPoints.append( "preRoutePresideSESRequest" );
interceptorSettings.customInterceptionPoints.append( "postRoutePresideSESRequest" );
cacheBox = {
configFile = _discoverCacheboxConfigurator()
@@ -100,7 +100,7 @@ component extends="preside.system.base.AdminHandler" {
if ( ancestors.recordCount ) {
additionalNodeArgs.permission_context = ValueArray( ancestors.id );
additionalNodeArgs.permission_context.reverse();
additionalNodeArgs.permission_context = additionalNodeArgs.permission_context.reverse();
}
additionalNodeArgs.permission_context.prepend( parentId );
@@ -931,11 +931,12 @@ component {
var row = 1;
for( var submission in submissions ) {
var column = 4;
var column = 4;
var submittedBy = Len( submission.submitted_by ) ? $renderLabel( "website_user", submission.submitted_by ) : "";
row++;
spreadsheetLib.setCellValue( workbook, submission.id, row, 1, "string" );
spreadsheetLib.setCellValue( workbook, DateTimeFormat( submission.datecreated, "yyyy-mm-dd HH:nn:ss" ), row, 2, "string" );
spreadsheetLib.setCellValue( workbook, submission.submitted_by, row, 3, "string" );
spreadsheetLib.setCellValue( workbook, submittedBy, row, 3, "string" );
spreadsheetLib.setCellValue( workbook, submission.form_instance, row, 4, "string" );
if ( itemsToRender.len() ) {
@@ -42,8 +42,7 @@ component {
var siteAssetsUrl = settings.static.siteAssetsUrl ?: "/assets";
var rootURl = ( settings.static.rootUrl ?: "" );
sticker.addBundle( rootDirectory=sysAssetsPath , rootUrl=sysAssetsPath , config=settings )
.addBundle( rootDirectory=siteAssetsPath, rootUrl=rootUrl & siteAssetsUrl, config=settings );
sticker.addBundle( rootDirectory=sysAssetsPath , rootUrl=sysAssetsPath, config=settings );
for( var ext in settings.activeExtensions ) {
var stickerDirectory = ( ext.directory ?: "" ) & "/assets";
@@ -54,6 +53,8 @@ component {
}
}
sticker.addBundle( rootDirectory=siteAssetsPath, rootUrl=rootUrl & siteAssetsUrl, config=settings );
sticker.load();
_setSticker( sticker );

0 comments on commit 6003f12

Please sign in to comment.