Index: branches/5.2.x/core/units/helpers/mod_rewrite_helper.php =================================================================== diff -u -N -r14585 -r14628 --- branches/5.2.x/core/units/helpers/mod_rewrite_helper.php (.../mod_rewrite_helper.php) (revision 14585) +++ branches/5.2.x/core/units/helpers/mod_rewrite_helper.php (.../mod_rewrite_helper.php) (revision 14628) @@ -1,6 +1,6 @@ Application->getUnitOption($prefix, 'QueryString'); - if (!$query_vars) { + $query_vars = $this->Application->getUnitOption($prefix, 'QueryString', Array ()); + /* @var $query_vars Array */ + + if ( !$query_vars ) { // given prefix doesn't use "env" variable to pass it's data return false; } $event_key = array_search('event', $query_vars); - if ($event_key) { + if ( $event_key ) { // pass through event of this prefix unset($query_vars[$event_key]); } - if (array_key_exists($prefix_special . '_event', $params) && !$params[$prefix_special . '_event']) { + if ( array_key_exists($prefix_special . '_event', $params) && !$params[$prefix_special . '_event'] ) { // if empty event, then remove it from url - unset( $params[$prefix_special . '_event'] ); + unset($params[$prefix_special . '_event']); } // if pass events is off and event is not implicity passed - if (!$keep_events && !array_key_exists($prefix_special . '_event', $params)) { + if ( !$keep_events && !array_key_exists($prefix_special . '_event', $params) ) { unset($params[$prefix_special . '_event']); // remove event from url if requested //otherwise it will use value from get_var } $processed_params = Array (); - foreach ($query_vars as $index => $var_name) { + foreach ($query_vars as $var_name) { // if value passed in params use it, otherwise use current from application $var_name = $prefix_special . '_' . $var_name; $processed_params[$var_name] = array_key_exists($var_name, $params) ? $params[$var_name] : $this->Application->GetVar($var_name); - if (array_key_exists($var_name, $params)) { + + if ( array_key_exists($var_name, $params) ) { unset($params[$var_name]); } }