Skip to content

Commit

Permalink
fix conditionals for Boxlang detection which affect Testbox CFC execu…
Browse files Browse the repository at this point in the history
…tion results
  • Loading branch information
jclausen committed Jan 10, 2025
1 parent 5faa9cb commit bbd6dd6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion system/modules/HTMLHelper/models/HTMLHelper.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -2937,7 +2937,7 @@ component
private string function prepareBaseLink( boolean noBaseURL = false, src ){
var baseURL = replaceNoCase(
requestService.getContext().getSESbaseURL(),
findNoCase( ".cfm", cgi.script_name ) ? "index.cfm" : "index.bxm",
findNoCase( ".bx", cgi.script_name ) ? "index.bxm" : "index.cfm",
""
);
// return if base is eempty
Expand Down
8 changes: 4 additions & 4 deletions system/web/routing/Router.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ component
****************************************************************/

property
name ="cachebox"
name ="cachebox"
inject ="cachebox"
delegate="getCache";
property
name ="controller"
inject ="coldbox"
inject ="coldbox"
delegate="relocate,runEvent,runRoute";
property name="flash" inject="coldbox:flash";
property name="logBox" inject="logbox";
Expand Down Expand Up @@ -194,7 +194,7 @@ component
* This is ONLY called by the routing services and only ONCE in the Application Life-Cycle
*/
function startup(){
var frontController = findNoCase( ".cfm", cgi.script_name ) ? "index.cfm" : "index.bxm";
var frontController = findNoCase( ".bx", cgi.script_name ) ? "index.bxm" : "index.cfm";

// Verify baseUrl is still empty to default it for operation
if ( !len( variables.baseUrl ) ) {
Expand Down Expand Up @@ -2074,7 +2074,7 @@ component
* Composes the base routing path with no host or protocol
*/
string function composeRoutingPath(){
var base = findNoCase( ".cfm", cgi.script_name ) ? "index.cfm" : "index.bxm";
var base = findNoCase( ".bx", cgi.script_name ) ? "index.bxm" : "index.cfm";
return variables.controller.getSetting( "RoutingAppMapping" ) & // routing app mapping
( variables.fullRewrites ? "" : base ); // full or controller routing
}
Expand Down

0 comments on commit bbd6dd6

Please sign in to comment.