userFilesPath = config.userFilesPath; if ( userFilesPath eq "" ) { userFilesPath = "/userfiles/"; } // make sure the user files path is correctly formatted userFilesPath = replace(userFilesPath, "\", "/", "ALL"); userFilesPath = replace(userFilesPath, '//', '/', 'ALL'); if ( right(userFilesPath,1) NEQ "/" ) { userFilesPath = userFilesPath & "/"; } if ( left(userFilesPath,1) NEQ "/" ) { userFilesPath = "/" & userFilesPath; } // make sure the current folder is correctly formatted url.currentFolder = replace(url.currentFolder, "\", "/", "ALL"); url.currentFolder = replace(url.currentFolder, '//', '/', 'ALL'); if ( right(url.currentFolder,1) neq "/" ) { url.currentFolder = url.currentFolder & "/"; } if ( left(url.currentFolder,1) neq "/" ) { url.currentFolder = "/" & url.currentFolder; } if (find("/",getBaseTemplatePath())) { fs = "/"; } else { fs = "\"; } // Get the base physical path to the web root for this application. The code to determine the path automatically assumes that // the "FCKeditor" directory in the http request path is directly off the web root for the application and that it's not a // virtual directory or a symbolic link / junction. Use the serverPath config setting to force a physical path if necessary. if ( len(config.serverPath) ) { serverPath = config.serverPath; if ( right(serverPath,1) neq fs ) { serverPath = serverPath & fs; } } else { serverPath = replaceNoCase(getBaseTemplatePath(),replace(cgi.script_name,"/",fs,"all"),"") & replace(userFilesPath,"/",fs,"all"); } // map the user files path to a physical directory userFilesServerPath = serverPath & url.type & replace(url.currentFolder,"/",fs,"all");