diff --git a/modules/contentbox/modules/contentbox-admin/modules/contentbox-filebrowser/handlers/Home.cfc b/modules/contentbox/modules/contentbox-admin/modules/contentbox-filebrowser/handlers/Home.cfc index 85b4702ea4..16976ad966 100644 --- a/modules/contentbox/modules/contentbox-admin/modules/contentbox-filebrowser/handlers/Home.cfc +++ b/modules/contentbox/modules/contentbox-admin/modules/contentbox-filebrowser/handlers/Home.cfc @@ -56,9 +56,9 @@ component extends="cbadmin.handlers.baseHandler" { // exit handlers prc.xehFBBrowser = "#prc.fbModEntryPoint#/filelisting"; prc.xehFBDownload = "#prc.fbModEntryPoint#/download"; + prc.xehFBUpload = "#prc.fbModEntryPoint#/upload"; prc.xehFBNewFolder = "#prc.fbModEntryPoint#/createfolder"; prc.xehFBRemove = "#prc.fbModEntryPoint#/remove"; - prc.xehFBUpload = "#prc.fbModEntryPoint#/upload"; prc.xehFBRename = "#prc.fbModEntryPoint#/rename"; // Detect Widget Mode. @@ -115,6 +115,7 @@ component extends="cbadmin.handlers.baseHandler" { // Exit handlers prc.xehFBDownload = "#prc.fbModEntryPoint#/download"; + prc.xehFBUpload = "#prc.fbModEntryPoint#/upload"; // Store directory roots and web root prc.fbDirRoot = prc.fbSettings.directoryRoot; @@ -379,6 +380,8 @@ component extends="cbadmin.handlers.baseHandler" { // param values event.paramValue( "path", "" ).paramValue( "manual", false ); + systemoutput( "path: [#rc.path#]", true ); + // clean incoming path for destination directory rc.path = cleanIncomingPath( urlDecode( trim( rc.path ) ) ); diff --git a/modules/contentbox/modules/contentbox-admin/modules/contentbox-filebrowser/views/home/filelisting.cfm b/modules/contentbox/modules/contentbox-admin/modules/contentbox-filebrowser/views/home/filelisting.cfm index 6c0e7dc52b..eeb79d7627 100644 --- a/modules/contentbox/modules/contentbox-admin/modules/contentbox-filebrowser/views/home/filelisting.cfm +++ b/modules/contentbox/modules/contentbox-admin/modules/contentbox-filebrowser/views/home/filelisting.cfm @@ -1,54 +1,54 @@ - /** - * -------------------------------------------------------------------------- - * CODLFUSION HELPER METHODS - * -------------------------------------------------------------------------- - */ - function $getBackPath( inPath ){ - arguments.inPath = replace( arguments.inPath, "\", "/", "all" ); - var backPath = listToArray( arguments.inPath, "/" ); - backPath.deleteAt( backPath.len() ); - return URLEncodedFormat( backPath.toList( "/" ) ); - } - function $getUrlRelativeToPath( required basePath, required filePath, encodeURL=false ){ - var URLOut = ""; - var strURLOut = "/"; - var arrPath = []; - var p = ""; - URLOut = replace( replacenocase( arguments.filePath, arguments.basePath, "/", "one" ), "\", "/", "all" ); - if ( arguments.encodeURL ){ - arrPath=listtoarray( URLOut, "/" ); - for( p in arrPath ){ - strURLOut = listAppend( strURLOut, replacenocase( urlencodedformat( p ), "%2e", ".", "all" ), "/" ); - } - URLOut = strURLOut; +/** + * -------------------------------------------------------------------------- + * CODLFUSION HELPER METHODS + * -------------------------------------------------------------------------- + */ +function $getBackPath( inPath ){ + arguments.inPath = replace( arguments.inPath, "\", "/", "all" ); + var backPath = listToArray( arguments.inPath, "/" ); + backPath.deleteAt( backPath.len() ); + return URLEncodedFormat( backPath.toList( "/" ) ); +} +function $getUrlRelativeToPath( required basePath, required filePath, encodeURL=false ){ + var URLOut = ""; + var strURLOut = "/"; + var arrPath = []; + var p = ""; + URLOut = replace( replacenocase( arguments.filePath, arguments.basePath, "/", "one" ), "\", "/", "all" ); + if ( arguments.encodeURL ){ + arrPath=listtoarray( URLOut, "/" ); + for( p in arrPath ){ + strURLOut = listAppend( strURLOut, replacenocase( urlencodedformat( p ), "%2e", ".", "all" ), "/" ); } - URLOut = replacenocase( URLOut, "//", "", "all" ); - return URLOut; + URLOut = strURLOut; } - function $getURLMediaPath( required fbDirRoot, required filePath ){ - var URLOut = replaceNoCase( arguments.filePath, arguments.fbDirRoot, "", "all" ); - if( len( URLOut ) ){ - // set our drive prefix and trim leading slashes on the path - URLOut = prc.fbSettings.mediaPath & "/" & prc.activeDisk.getName() & ":" & listToArray( URLOut, "/" ).toList( "/" ); - } - return URLOut; + URLOut = replacenocase( URLOut, "//", "", "all" ); + return URLOut; +} +function $getURLMediaPath( required fbDirRoot, required filePath ){ + var URLOut = replaceNoCase( arguments.filePath, arguments.fbDirRoot, "", "all" ); + if( len( URLOut ) ){ + // set our drive prefix and trim leading slashes on the path + URLOut = prc.fbSettings.mediaPath & "/" & prc.activeDisk.getName() & ":" & listToArray( URLOut, "/" ).toList( "/" ); } - function validQuickView( ext ){ - return ( listFindNoCase( "png,jpg,jpeg,bmp,gif", arguments.ext ) ? true : false ); - } - function getImageFile( ext ){ - switch( arguments.ext ){ - case "doc" : case "docx" : case "pages" : { return "word.png"; } - case "ppt" : case "pptx" : case "keynote" : { return "ppt.png"; } - case "xls" : case "xlsx" : case "numbers" : { return "xls.png"; } - case "pdf" : { return "pdf.png"; } - case "png": case "jpg" : case "jpeg" : case "gif" : case "bmp" : { return "Picture.png"; } - case "cfc": case "cfm" : case "cfml" : { return "coldfusion.png"; } - case "html" : case "htm" : case "aspx" : case "asp" : case "php" : case "rb" : case "py" : case "xml" :{ return "code.png"; } - default : return "file.png"; - } + return URLOut; +} +function validQuickView( ext ){ + return ( listFindNoCase( "png,jpg,jpeg,bmp,gif", arguments.ext ) ? true : false ); +} +function getImageFile( ext ){ + switch( arguments.ext ){ + case "doc" : case "docx" : case "pages" : { return "word.png"; } + case "ppt" : case "pptx" : case "keynote" : { return "ppt.png"; } + case "xls" : case "xlsx" : case "numbers" : { return "xls.png"; } + case "pdf" : { return "pdf.png"; } + case "png": case "jpg" : case "jpeg" : case "gif" : case "bmp" : { return "Picture.png"; } + case "cfc": case "cfm" : case "cfml" : { return "coldfusion.png"; } + case "html" : case "htm" : case "aspx" : case "asp" : case "php" : case "rb" : case "py" : case "xml" :{ return "code.png"; } + default : return "file.png"; } +}
@@ -255,6 +255,18 @@ #announce( "fb_postFileListing" )#
+ + +
+ + +