Here's a little patch to change the phx_c variable name, eg to "go", or "fuseaction" :o)
Add lines at #25:
// Change this to change the URL variable name used for actions. // It replaces "phx_c" in http://localhost/?phx_c=dosomething // eg "go" becomes http://localhost/?go=dosomething $phx["var"] = "phx_c";
Change line: $phx["path"] = (isset($_REQUEST["phx_c"])&&(strlen($_REQUEST["phx_c"])>0)) ? $_REQUEST["phx_c"] : "phx.index"; to $phx["path"] = (isset($_REQUEST[$phx["var"]])&&(strlen($_REQUEST[$phx["var"]])>0)) ? $_REQUEST[$phx["var"]] : "phx.index";
Change line: return ($query_string=="") ? "./?phx_c=" . $command : "./?phx_c=" . $command . "&" . $query_string; to: return ($query_string=="") ? "./?".$phx["var"]."=" . $command : "./?".$phx["var"]."=" . $command . "&" . $query_string;
This change ought to be added to 1.3, its simple but adds a good deal of flexibility to the system.
Damien
Thanks, this is good
Log in to post a comment.
Here's a little patch to change the phx_c variable name, eg to "go", or "fuseaction" :o)
Add lines at #25:
// Change this to change the URL variable name used for actions.
// It replaces "phx_c" in http://localhost/?phx_c=dosomething
// eg "go" becomes http://localhost/?go=dosomething
$phx["var"] = "phx_c";
Change line:
$phx["path"] = (isset($_REQUEST["phx_c"])&&(strlen($_REQUEST["phx_c"])>0)) ? $_REQUEST["phx_c"] : "phx.index";
to
$phx["path"] = (isset($_REQUEST[$phx["var"]])&&(strlen($_REQUEST[$phx["var"]])>0)) ? $_REQUEST[$phx["var"]] : "phx.index";
Change line:
return ($query_string=="") ? "./?phx_c=" . $command : "./?phx_c=" . $command . "&" . $query_string;
to:
return ($query_string=="") ? "./?".$phx["var"]."=" . $command : "./?".$phx["var"]."=" . $command . "&" . $query_string;
This change ought to be added to 1.3, its simple but adds a good deal of flexibility to the system.
Damien
Thanks, this is good