Skip to content

Commit 324ab90

Browse files
committed
Merge branch 'development'
2 parents 1e94be0 + a9f97f3 commit 324ab90

File tree

12 files changed

+66
-36
lines changed

12 files changed

+66
-36
lines changed

.travis.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ notifications:
99
env:
1010
global:
1111
# TARGET RELEASE VERSION: BUMP AS NEEDED
12-
- COLDBOX_VERSION=6.0.0
12+
- COLDBOX_VERSION=6.1.0
1313
- COLDBOX_PRERELEASE=false
1414
matrix:
1515
- ENGINE=lucee@5 # Build Entire Frameworks
@@ -21,14 +21,15 @@ branches:
2121
- development
2222
- master
2323

24-
dist: trusty
25-
26-
addons:
27-
apt:
28-
packages:
29-
- mysql-server-5.6
30-
- mysql-client-core-5.6
31-
- mysql-client-5.6
24+
dist: xenial
25+
services:
26+
- mysql
27+
#addons:
28+
# apt:
29+
# packages:
30+
# - mysql-server-5.6
31+
# - mysql-client-core-5.6
32+
# - mysql-client-5.6
3233

3334
before_install:
3435
# CommandBox Keys

system/core/collections/ScopeStorage.cfc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ component {
9191

9292
switch ( arguments.scope ) {
9393
case "session": {
94-
return ( isDefined( "session" ) ? session : {} );
94+
return ( getApplicationMetadata().sessionManagement ? session : {} );
9595
}
9696
case "application": {
9797
return ( isDefined( "application" ) ? application : {} );

system/core/util/Util.cfc

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,22 @@ The main ColdBox utility library, it is built with tags to allow for dumb ACF10
1313
* Builds the unique Session Key of a user request and returns it to you.
1414
*/
1515
string function getSessionIdentifier(){
16+
var isSessionDefined = getApplicationMetadata().sessionManagement;
17+
1618
// Check jsession id First
17-
if ( isDefined( "session" ) and structKeyExists( session, "sessionid" ) ) {
19+
if ( isSessionDefined && structKeyExists( session, "sessionid" ) ) {
1820
return session.sessionid;
1921
}
2022
// Check normal cfid and cftoken in cookie
21-
else if ( structKeyExists( cookie, "CFID" ) AND structKeyExists( cookie, "CFTOKEN" ) ) {
23+
else if ( structKeyExists( cookie, "CFID" ) && structKeyExists( cookie, "CFTOKEN" ) ) {
2224
return hash( cookie.cfid & cookie.cftoken );
2325
}
2426
// Check normal cfid and cftoken in URL
25-
else if ( structKeyExists( URL, "CFID" ) AND structKeyExists( URL, "CFTOKEN" ) ) {
27+
else if ( structKeyExists( URL, "CFID" ) && structKeyExists( URL, "CFTOKEN" ) ) {
2628
return hash( URL.cfid & URL.cftoken );
2729
}
2830
// check session URL Token
29-
else if ( isDefined( "session" ) and structKeyExists( session, "URLToken" ) ) {
31+
else if ( isSessionDefined && structKeyExists( session, "URLToken" ) ) {
3032
return session.URLToken;
3133
} else {
3234
throw(

system/exceptions/Whoops.cfm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,11 @@
7373
// Build ID
7474
if ( local.sessionScopeExists ) {
7575
local.fwString = "";
76-
if ( isDefined( "client" ) ) {
76+
if ( getApplicationMetadata().clientManagement ) {
7777
if ( structKeyExists( client, "cfid" ) ) fwString &= "CFID=" & client.CFID;
7878
if ( structKeyExists( client, "CFToken" ) ) fwString &= "<br/>CFToken=" & client.CFToken;
7979
}
80-
if ( isDefined( "session" ) ) {
80+
if ( getApplicationMetadata().sessionManagement ) {
8181
if ( structKeyExists( session, "cfid" ) ) fwString &= "CFID=" & session.CFID;
8282
if ( structKeyExists( session, "CFToken" ) ) fwString &= "<br/>CFToken=" & session.CFToken;
8383
if ( structKeyExists( session, "sessionID" ) ) fwString &= "<br/>JSessionID=" & session.sessionID;

system/logging/AbstractAppender.cfc

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ component accessors="true"{
269269
variables.lock( function(){
270270
if ( !variables.logListener.active ) {
271271
// Mark listener as activated
272-
out( "(#getName()#) ScheduleTask needs to be started..." );
272+
//out( "(#getName()#) ScheduleTask needs to be started..." );
273273
variables.logListener.active = true;
274274

275275
// Create the runnable Log Listener, Start it up baby!
@@ -281,7 +281,7 @@ component accessors="true"{
281281
loadAppContext = false
282282
);
283283

284-
out( "(#getName()#) ScheduleTask started" );
284+
//out( "(#getName()#) ScheduleTask started" );
285285
}
286286
} );
287287
}
@@ -304,7 +304,7 @@ component accessors="true"{
304304
};
305305

306306
// Init Message
307-
out( "- Starting (#getName()#) log listener with max life of #queueContext.maxIdle#ms", true );
307+
//out( "- Starting (#getName()#) log listener with max life of #queueContext.maxIdle#ms", true );
308308

309309
// Start Advice
310310
onLogListenerStart( queueContext );
@@ -346,9 +346,8 @@ component accessors="true"{
346346
onLogListenerEnd( queueContext );
347347

348348
// Advice
349-
out(
350-
"Stopping Log listener task for (#getName()#), it ran for #getTickCount() - queueContext.start#ms!"
351-
);
349+
//out( "Stopping Log listener task for (#getName()#), it ran for #getTickCount() - queueContext.start#ms!" );
350+
352351
// Stop log listener
353352
variables.lock( function(){
354353
variables.logListener.active = false;

system/logging/appenders/FileAppender.cfc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ component accessors="true" extends="coldbox.system.logging.AbstractAppender"{
183183
&&
184184
!isSimpleValue( arguments.queueContext.oFile )
185185
){
186-
out( "LogFile for #getName()# flushed to disk at #now()# using interval: #arguments.queueContext.flushInterval#", true );
186+
//out( "LogFile for #getName()# flushed to disk at #now()# using interval: #arguments.queueContext.flushInterval#", true );
187187
fileClose( arguments.queueContext.oFile );
188188
arguments.queueContext.oFile = "";
189189
arguments.queueContext.start = getTickCount();

system/web/Renderer.cfc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ component
113113
* @return Renderer
114114
*/
115115
function setExplicitView(
116-
required view,
116+
required string view,
117117
module = "",
118118
struct args = {}
119119
){
@@ -207,7 +207,7 @@ component
207207
arguments.args.append( explicitView.args, false );
208208

209209
// clear the explicit view now that it has been used
210-
setExplicitView( {} );
210+
getRequestContext().removePrivateValue( "_explicitView" );
211211
}
212212
// Render the view in the context
213213
else {

system/web/context/ExceptionBean.cfc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ component accessors="true" {
459459
list.append( "<tr>" );
460460

461461
// Null Checks
462-
if( isNull( arguments.scope[ i ] ) ){
462+
if ( !structKeyExists( arguments.scope , i ) || isNull( arguments.scope[ i ] ) ) {
463463
arguments.scope[ i ] = "<span style='color: red'><strong>Java Null</strong></span>";
464464
}
465465

@@ -471,6 +471,9 @@ component accessors="true" {
471471
} else if ( isSimpleValue( arguments.scope[ i ] ) ) {
472472
list.append( "<td width=""250"">" & i & "</td>" );
473473
list.append( "<td class=""overflow-scroll"">" & ( len( arguments.scope[ i ] ) ? arguments.scope[ i ] : "<em>---</em>" ) & "</td>" );
474+
} else if( isObject( arguments.scope[ i ] ) ) {
475+
list.append( "<td width=""250"">" & i & "</td>" );
476+
list.append( "<td class=""overflow-scroll""> [" & getMetaData( arguments.scope[ i ] ).name & "] Instance</td>" );
474477
} else {
475478
savecontent variable="local.myContent" {
476479
writeDump(
@@ -541,4 +544,4 @@ component accessors="true" {
541544
}
542545
}
543546

544-
}
547+
}

system/web/context/RequestContext.cfc

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1248,17 +1248,17 @@ component serializable="false" accessors="true" {
12481248
* Builds links to events or URL Routes
12491249
*
12501250
* @to The event or route path you want to create the link to
1251-
* @queryString The query string to append
1251+
* @queryString The query string to append which can be a regular query string string, or a struct of name-value pairs
12521252
* @translate Translate between . to / depending on the SES mode on to and queryString arguments. Defaults to true.
12531253
* @ssl Turn SSl on/off on URL creation, by default is SSL is enabled, we will use it.
12541254
* @baseURL If not using SES, you can use this argument to create your own base url apart from the default of index.cfm. Example: https://mysample.com/index.cfm
12551255
*/
12561256
string function buildLink(
12571257
to,
1258-
queryString = "",
1258+
queryString = "",
12591259
boolean translate = true,
12601260
boolean ssl,
1261-
baseURL = ""
1261+
baseURL = ""
12621262
){
12631263
// Is this a named route?
12641264
if( isStruct( arguments.to ) ){
@@ -1271,6 +1271,16 @@ component serializable="false" accessors="true" {
12711271
);
12721272
}
12731273

1274+
// Query String Struct to String
1275+
if( isStruct( arguments.queryString ) ){
1276+
arguments.queryString = arguments.queryString
1277+
.reduce( function( result, key, value ){
1278+
result.append( "#encodeForURL( key )#=#encodeForURL( value )#" );
1279+
return result;
1280+
}, [] )
1281+
.toList( "&" );
1282+
}
1283+
12741284
// Cleanups
12751285
arguments.to = trim( arguments.to );
12761286
arguments.baseURL = trim( arguments.baseURL );
@@ -1304,6 +1314,7 @@ component serializable="false" accessors="true" {
13041314

13051315
// Translate link or plain
13061316
if ( arguments.translate ) {
1317+
13071318
// Convert module into proper entry point
13081319
if ( listLen( arguments.to, ":" ) > 1 ) {
13091320
var mConfig = controller.getSetting( "modules" );
@@ -1313,7 +1324,8 @@ component serializable="false" accessors="true" {
13131324
}
13141325
}
13151326
arguments.to = replace( arguments.to, ".", "/", "all" );
1316-
// QuqeryString Conversions
1327+
1328+
// Conversions
13171329
if ( len( arguments.queryString ) ) {
13181330
if ( right( arguments.to, 1 ) neq "/" ) {
13191331
arguments.to = arguments.to & "/";

system/web/flash/ColdboxCacheFlash.cfc

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,20 +41,22 @@ component extends="coldbox.system.web.flash.AbstractFlashScope" accessors="true"
4141
*/
4242
function getFlashKey(){
4343
var prefix = "cbFlash:#variables.appName#";
44+
var isSessionDefined = getApplicationMetadata().sessionManagement;
45+
4446
// Check jsession id First
45-
if ( isDefined( "session" ) and structKeyExists( session, "sessionid" ) ) {
47+
if ( isSessionDefined && structKeyExists( session, "sessionid" ) ) {
4648
return "cbFlash:" & session.sessionid;
4749
}
4850
// Check normal cfid and cftoken in cookie
49-
else if ( structKeyExists( cookie, "CFID" ) AND structKeyExists( cookie, "CFTOKEN" ) ) {
51+
else if ( structKeyExists( cookie, "CFID" ) && structKeyExists( cookie, "CFTOKEN" ) ) {
5052
return prefix & hash( cookie.cfid & cookie.cftoken );
5153
}
5254
// Check normal cfid and cftoken in URL
53-
else if ( structKeyExists( URL, "CFID" ) AND structKeyExists( URL, "CFTOKEN" ) ) {
55+
else if ( structKeyExists( URL, "CFID" ) && structKeyExists( URL, "CFTOKEN" ) ) {
5456
return prefix & hash( URL.cfid & URL.cftoken );
5557
}
5658
// check session URL Token
57-
else if ( isDefined( "session" ) and structKeyExists( session, "URLToken" ) ) {
59+
else if ( isSessionDefined and structKeyExists( session, "URLToken" ) ) {
5860
return prefix & session.URLToken;
5961
} else {
6062
throw(

0 commit comments

Comments
 (0)