Index: trunk/core/kernel/utility/http_query.php =================================================================== diff -u -r3822 -r3834 --- trunk/core/kernel/utility/http_query.php (.../http_query.php) (revision 3822) +++ trunk/core/kernel/utility/http_query.php (.../http_query.php) (revision 3834) @@ -278,18 +278,17 @@ } } - function finalizeParsing($passed, $module_params = Array() ) + function finalizeParsing($passed = Array(), $module_params = Array() ) { - if( !is_array($passed) ) $passed = explode(',', $passed); - $prev_passed = $this->Get('passed'); - if($prev_passed) - { - $prev_passed = explode(',', $prev_passed); - $passed = array_unique( array_merge($passed, $prev_passed) ); + if ($passed) { + $event_manger =& $this->Application->recallObject('EventManager'); + foreach ($passed as $passed_prefix) { + $event_manger->setQueryMap($passed_prefix); + } } - $passed = implode(',', $passed); - $this->Set('passed', $passed); - + + // get joined version (env var + mod rewrite parsed) + $passed = $this->Application->GetVar('passed'); $env = $this->Application->BuildEnv( $this->Get('t'), $module_params, $passed, false, false ); $this->Set(ENV_VAR_NAME, $env); $_REQUEST['env'] = $_GET['env'] = $env; // for capability with old in-portal code @@ -496,20 +495,16 @@ // pass params left to module $this->Application->Phrases->Init('phrases'); - $passed = Array('m'); $module_params = Array(); - - if( isset($module_prefix) ) - { + if ( isset($module_prefix) ) { $passed[] = $module_prefix; $module_event = new kEvent($module_prefix.':ParseEnv', Array('url_parts' => $url_parts) ); $this->Application->HandleEvent($module_event); $item_id = $this->Get($module_prefix.'_id'); $module_params = Array($module_prefix.'_id' => $item_id ? $item_id : '0' ); - if($module_event->status == erFAIL) - { + if ($module_event->status == erFAIL) { $not_found = $this->Application->ConfigValue('ErrorTemplate'); $this->Set('t', $not_found ? $not_found : 'error_notfound' ); } @@ -599,30 +594,19 @@ } $prefix_special = array_shift($mixed_part); // l.pick, l - list($prefix) = explode('.', $prefix_special); - - $query_maps[$prefix_special] = $this->Application->getUnitOption($prefix,'QueryString'); - + $query_map = $event_manger->setQueryMap($prefix_special); + // if config is not defined for prefix in QueryString, then don't process it - if( $query_maps[$prefix_special] ) - { - array_push($passed, $prefix); - foreach($query_maps[$prefix_special] as $index => $var_name) + if ($query_map) { + foreach($query_map as $index => $var_name) { // l_id, l_page, l_bla-bla-bla $val = $mixed_part[$index - 1]; if ($val == '') $val = false; $this->Set($prefix_special.'_'.$var_name, $val); } } - else - { - unset($query_maps[$prefix_special]); - } - } - $this->Set('passed', implode(',', $passed) ); - $event_manger->setQueryMaps($query_maps); } } else