+function get_url_action() {
+ global $page, $form, $isPage, $isForm;
+
+ if (get_action_type() === "page") {
+ return $page;
+ } elseif (get_action_type() === "form") {
+ return $form;
+ } elseif (get_action_type() === "empty") {
+ return "";
+ } elseif (get_action_type() === "unknown") {
+ die('Cannot get a valid action from URL parameters');
+ }
+}
+
+$url_action = get_url_action();
+$action = validate_url_action($url_action);