Skip to content

Commit f2cabbe

Browse files
committed
Merge branch 'development'
2 parents 87b1efc + 8d14b6b commit f2cabbe

File tree

31 files changed

+212
-148
lines changed

31 files changed

+212
-148
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ notifications:
88
env:
99
global:
1010
# TARGET RELEASE VERSION: BUMP AS NEEDED
11-
- COLDBOX_VERSION=5.6.1
11+
- COLDBOX_VERSION=5.6.2
1212
matrix:
1313
- ENGINE=lucee@4.5 ANT_TARGET=build.all
1414
- ENGINE=lucee@5 ANT_TARGET=run-tests

system/Bootstrap.cfc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -652,6 +652,9 @@ component serializable="false" accessors="true"{
652652
* Process Stack trace for errors
653653
*/
654654
private function processStackTrace( str ){
655+
// Not using encodeForHTML() as it is too destructive and ruins whitespace chars and other stuff
656+
arguments.str = HTMLEditFormat( arguments.str );
657+
655658
var aMatches = REMatchNoCase( "\(([^\)]+)\)", arguments.str );
656659
for( var aString in aMatches ){
657660
arguments.str = replacenocase( arguments.str, aString, "<span class='highlight'>#aString#</span>", "all" );

system/cache/policies/AbstractEvictionPolicy.cfc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ component serializable=false implements="coldbox.system.cache.policies.IEviction
7676
var md = indexer.getObjectMetadata( item );
7777

7878
// Evict if not already marked for eviction or an eternal object.
79-
if( md.timeout gt 0 AND NOT md.isExpired ){
79+
if( md.timeout GT 0 AND NOT md.isExpired ){
8080

8181
// Evict The Object
8282
variables.cacheProvider.clear( item );

system/cache/providers/CFProvider.cfc

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -213,9 +213,10 @@ component
213213
*/
214214
struct function getStoreMetadataReport(){
215215
return getKeys()
216-
.map( function( item ){
217-
return getCachedObjectMetadata( item );
218-
});
216+
.reduce( function( item, result ){
217+
result[ item ] = getCachedObjectMetadata( item );
218+
return result;
219+
}, {} );
219220
}
220221

221222
/**
@@ -538,14 +539,7 @@ component
538539
**/
539540
private function validateConfiguration(){
540541
// Add in settings not discovered
541-
structAppend( variables.configuration, variables.DEFAULTS );
542-
// Validate configuration values, if they don't exist, then default them to DEFAULTS
543-
for( var key in variables.DEFAULTS ){
544-
if( NOT len( variables.configuration[ key ] ) ){
545-
variables.configuration[ key ] = variables.DEFAULTS[ key ];
546-
}
547-
}
548-
542+
structAppend( variables.configuration, variables.DEFAULTS, false );
549543
return this;
550544
}
551545

system/cache/providers/LuceeProvider.cfc

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,10 @@ component
112112
*/
113113
struct function getStoreMetadataReport(){
114114
return getKeys()
115-
.map( function( item ){
116-
return getCachedObjectMetadata( item );
117-
});
115+
.reduce( function( item, result ){
116+
result[ item ] = getCachedObjectMetadata( item );
117+
return result;
118+
}, {} );
118119
}
119120

120121
/**
@@ -421,14 +422,7 @@ component
421422
**/
422423
private function validateConfiguration(){
423424
// Add in settings not discovered
424-
structAppend( variables.configuration, variables.DEFAULTS );
425-
// Validate configuration values, if they don't exist, then default them to DEFAULTS
426-
for( var key in variables.DEFAULTS ){
427-
if( NOT len( variables.configuration[ key ] ) ){
428-
variables.configuration[ key ] = variables.DEFAULTS[ key ];
429-
}
430-
}
431-
425+
structAppend( variables.configuration, variables.DEFAULTS, false );
432426
return this;
433427
}
434428

system/cache/providers/lucee-lib/LuceeStats.cfc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ component implements="coldbox.system.cache.util.IStats" accessors="true"{
7171
/**
7272
* Get the total cache's hits
7373
*/
74-
numeric function getHits();
74+
numeric function getHits() {
7575
var props = cacheGetProperties( getCacheProvider().getConfiguration().cacheName );
7676
if( arrayLen( props ) and structKeyExists( props[ 1 ], "hit_count" ) ){
7777
return props[ 1 ].hit_count;

system/cache/report/monitor.cfm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Description :
1111
1212
ATTRIBUTES:
1313
- cacheBox : An instance reference to the cacheBox factory to report on
14-
- baseURL (optional='default') : An optional baseURL that will be used to post to this monitor on. Default is cgi.script_name
14+
- baseURL (optional='default') : An optional baseURL that will be used to post to this monitor on. Default is CGI.SCRIPT_NAME
1515
- skin (optional='default') : The skin to render the report in, it uses 'default' skin by default.
1616
----------------------------------------------------------------------->
1717

@@ -26,7 +26,7 @@ ATTRIBUTES:
2626
<!--- CacheBox Factory --->
2727
<cfparam name="attributes.cacheFactory" type="any" default="">
2828
<!--- BaseURL --->
29-
<cfparam name="attributes.baseURL" type="string" default="#cgi.script_name#">
29+
<cfparam name="attributes.baseURL" type="string" default="#CGI.SCRIPT_NAME#">
3030
<!--- Skin To Use --->
3131
<cfparam name="attributes.skin" type="string" default="default">
3232
<!--- Enable Monitor --->

system/cache/util/EventURLFacade.cfc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ component accessors="true"{
3636
// Get the original incoming context hash
3737
"incomingHash" = incomingHash,
3838
// Multi-Host support
39-
"cgihost" = cgi.http_host
39+
"cgihost" = CGI.HTTP_HOST
4040
};
4141

4242
// Incorporate Routed Structs
@@ -65,7 +65,7 @@ component accessors="true"{
6565
// Get the original incoming context hash according to incoming arguments
6666
"incomingHash" = hash( virtualRC.toString() ),
6767
// Multi-Host support
68-
"cgihost" = cgi.http_host
68+
"cgihost" = CGI.HTTP_HOST
6969
};
7070

7171
// return hash from cache key struct

0 commit comments

Comments
 (0)