- <cffunction name="fixURL" returntype="string" output="false" access="public" hint="Refreshes the page with the specified query string values removed, replaced, or added. New values can be specified with a query string, struct, or named arguments." bDocument="true">
- <cfargument name="url" type="string" required="false" default="#cgi.script_name#?#cgi.query_string#" hint="The url to use" />
- <cfargument name="removevalues" type="string" required="false" hint="List of values to remove from the query string. Prefix with '+' to remove these values in addition to the defaults." />
- <cfargument name="addvalues" type="any" required="false" hint="A query string or a struct of values, to add to the query string" />
- <cfargument name="ampDelim" type="string" required="false" default="&" hint="Delimiter to use for ampersands" />
- <cfargument name="charset" type="string" required="false" default="utf-8" hint="The character encoding in which the url values are encoded." />
-
- <cfset var key = "" />
-
-
- <cfif not structkeyexists(arguments,"removevalues")>
- <cfset arguments.removevalues = "furl,flushcache,bAjax,designmode,draftmode,showdraft,rebuild,updateapp,bShowTray,logout" />
- <cfelseif left(arguments.removevalues,1) eq "+">
- <cfset arguments.removevalues = "furl,flushcache,bAjax,designmode,draftmode,showdraft,rebuild,updateapp,bShowTray,logout,#mid(arguments.removevalues,2,len(arguments.removevalues))#">
- </cfif>
-
- <!--- Normalise FU --->
- <cfif findNoCase("furl=",arguments.url)>
- <cfset arguments.url = rereplacenocase(arguments.url,"^.*?/index.cfm",application.url.webroot & urldecode(rereplacenocase(arguments.url,"(.*(\?|#arguments.ampDelim#)furl\=)([^&]+)(.*)","\3"),'#charset#')) />
- </cfif>
This file has been truncated. show original