From 121931ccc43cbe3b59ae3e9caaa3d27a2c64e6a7 Mon Sep 17 00:00:00 2001 From: Alex Glover Date: Fri, 23 Nov 2012 22:55:32 -0500 Subject: [PATCH 1/2] adding global variable to get full original uri --- ext.freeway.php | 1 + 1 file changed, 1 insertion(+) diff --git a/ext.freeway.php b/ext.freeway.php index eba8963..48b8d24 100755 --- a/ext.freeway.php +++ b/ext.freeway.php @@ -121,6 +121,7 @@ function store_original_uri(){ $count = $i + 1; $this->EE->config->_global_vars['freeway_' . $count] = $value; } + $this->EE->config->_global_vars['freeway_original_uri'] = $this->original_uri; $this->log('Original URI', $this->original_uri); } From 17f3f4813e6445376f624ccdd0d0b1113fa71c7d Mon Sep 17 00:00:00 2001 From: Alex Glover Date: Fri, 23 Nov 2012 22:59:34 -0500 Subject: [PATCH 2/2] added hook for pre parse --- ext.freeway.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ext.freeway.php b/ext.freeway.php index 48b8d24..b079d75 100755 --- a/ext.freeway.php +++ b/ext.freeway.php @@ -173,6 +173,14 @@ function uri_matches_pattern(){ function parse_new_uri_from_route(){ + // -------------------------------------------- + // freeway_pre_parse_uri hook + // -------------------------------------------- + if ($this->EE->extensions->active_hook('freeway_pre_parse_uri') === TRUE) + { + $this->original_uri = $this->EE->extensions->call('freeway_pre_parse_uri', $this->original_uri); + } + $uri_segments = explode('/', $this->original_uri); $pattern_segments = explode('/', $this->pattern); $route_segments = explode('/', $this->route);