Index: trunk/core/kernel/event_handler.php =================================================================== diff -u -r2406 -r3154 --- trunk/core/kernel/event_handler.php (.../event_handler.php) (revision 2406) +++ trunk/core/kernel/event_handler.php (.../event_handler.php) (revision 3154) @@ -140,6 +140,55 @@ $child_event->Name = $name; return $child_event; } + + /** + * Created url part for this module + * + * @param kEvent $event + */ + function BuildEnv(&$event) + { + $prefix_special = $event->getPrefixSpecial(); + $url_params = $event->getEventParam('url_params'); + + $query_vars = $this->Application->getUnitOption($event->Prefix, 'QueryString'); + + //if pass events is off and event is not implicity passed + if ( !$event->getEventParam('pass_events') && !isset($url_params[$prefix_special.'_event']) ) + { + $url_params[$prefix_special.'_event'] = ''; // remove event from url if requested + //otherwise it will use value from get_var + } + + if(!$query_vars) + { + $event->setEventParam('env_string', ''); + return true; + + } + + + + + /*$tmp_string = Array(0 => $prefix_special); + foreach($query_vars as $index => $var_name) + { + //if value passed in params use it, otherwise use current from application + $var_name = $prefix_special.'_'.$var_name; + $tmp_string[$index] = isset( $url_params[$var_name] ) ? $url_params[$var_name] : $this->Application->GetVar($var_name); + if ( isset($url_params[$var_name]) ) unset( $url_params[$var_name] ); + } + + $escaped = Array(); + foreach ($tmp_string as $tmp_val) + { + $escaped[] = str_replace( Array('-',':'), Array('\-','\:'), $tmp_val); + } + + $portal_env = $this->Application->getUnitOption($event->Prefix, 'PortalStyleEnv'); + $ret .= $portal_env ? array_shift($escaped).array_shift($escaped).'-'.implode('-',$escaped) : implode('-', $escaped);*/ + + } }