Index: trunk/core/kernel/event_manager.php =================================================================== diff -u -r932 -r937 --- trunk/core/kernel/event_manager.php (.../event_manager.php) (revision 932) +++ trunk/core/kernel/event_manager.php (.../event_manager.php) (revision 937) @@ -5,7 +5,17 @@ class kEventManager extends kDBBase { + /** + * Cache of QueryString parameters + * from config, that are represented + * in enviroment variable + * + * @var unknown_type + */ + var $queryMaps=Array(); + + /** * Build events registred for * pseudo classes. key - pseudo class * value - event name @@ -77,14 +87,19 @@ return $t; } - function ProcessRequest() + /** + * Process QueryString only, create + * events, ids, based on config + * set template name and sid in + * desired application variables. + * + * @access public + */ + function processQueryString() { // env=SID:TEMPLATE:m-1-1-1-1:l0-0-0:n-0-0-0:bb-0-0-1-1-1-0 - // 1. process QueryString $env_var =& $this->Application->GetVar(ENV_VAR_NAME); - $query_maps=Array(); - if($env_var) { $parts=explode(':',$env_var); @@ -106,8 +121,8 @@ $prefix_special=array_shift($mixed_part); // l.pick, l list($prefix)=explode('.',$prefix_special); - $query_maps[$prefix_special]=$this->Application->getUnitOption($prefix,'QueryString'); - foreach($query_maps[$prefix_special] as $index => $var_name) + $this->queryMaps[$prefix_special]=$this->Application->getUnitOption($prefix,'QueryString'); + foreach($this->queryMaps[$prefix_special] as $index => $var_name) { // l_id, l_page, l_bla-bla-bla $this->Application->SetVar($prefix_special.'_'.$var_name,$mixed_part[$index-1]); @@ -120,15 +135,19 @@ $t=$this->getTemplateName('index'); $this->Application->SetVar('t',$t); } - + } + + + function ProcessRequest() + { // 1. get events from $_POST $events=$this->Application->GetVar('events'); if($events===false) $events=Array(); // 2. if nothing there, then try to find them in $_GET - if($query_maps && !$events) + if($this->queryMaps && !$events) { // if we got $_GET type submit (links, not javascript) - foreach($query_maps as $prefix_special => $query_map) + foreach($this->queryMaps as $prefix_special => $query_map) { $query_map=array_flip($query_map); if(isset($query_map['event'])) @@ -139,7 +158,7 @@ } //print_pre($events); - $t=$this->Application->GetVar('t'); + //$t=$this->Application->GetVar('t'); foreach($events as $prefix_special => $event_name) { if(!$event_name) continue;