Index: trunk/core/kernel/application.php =================================================================== diff -u -r949 -r950 --- trunk/core/kernel/application.php (.../application.php) (revision 949) +++ trunk/core/kernel/application.php (.../application.php) (revision 950) @@ -576,6 +576,8 @@ $ret = $this->BaseURL($prefix).$index_file.'?'.ENV_VAR_NAME.'='.$sid.':'.$t; $t_pass=$this->GetVar('t_pass'); + $t_pass_events=$this->GetVar('t_pass_events'); // pass events with url + if($t_pass) { $pass_info=explode(',',$t_pass); // array( prefix[.special], prefix[.special] ... @@ -584,6 +586,9 @@ $ret.=':'; list($prefix)=explode('.',$pass_element); $query_vars = $this->getUnitOption($prefix,'QueryString'); + + if(!$t_pass_events) $this->SetVar($pass_element.'_event',''); // remove event from url if requested + if($query_vars) { $tmp_string=Array(0=>$pass_element); @@ -596,7 +601,7 @@ } } } - + $this->SetVar('t_pass_events',0); // don't pass events in url by default return $ret; } @@ -605,9 +610,26 @@ return PROTOCOL.SERVER_NAME.(defined('PORT')?':'.PORT : '').BASE_PATH.$prefix.'/'; } + /** + * Build enviroment variable based on + * data submitted from previous template + * + * @access public + */ + function ReBuildENV() + { + $event_manager =& $this->recallObject('EventManager'); + $prefix_specials = array_keys($event_manager->queryMaps); + $this->SetVar('t_pass', implode(',',$prefix_specials) ); + } + function Redirect($t='', $params='', $prefix='') { if ($t == '') $t = $this->GetVar('t'); + + // pass prefixes and special from previous url + $this->ReBuildENV(); + $location = $this->HREF($t, $prefix); $a_location = $location; $location = sprintf("Location: %s".($params ? "&" : '')."%s",$location, $params); Index: trunk/core/kernel/processors/main_processor.php =================================================================== diff -u -r936 -r950 --- trunk/core/kernel/processors/main_processor.php (.../main_processor.php) (revision 936) +++ trunk/core/kernel/processors/main_processor.php (.../main_processor.php) (revision 950) @@ -61,10 +61,17 @@ */ function T($params) { - if(!isset($params['pass'])) $params['pass']=''; - $t = (isset($params['t']) && $params['t']) ? $params['t'] : $this->Application->GetVar('t'); - $this->Application->SetVar('t_pass',$params['pass']); - return $this->Application->HREF($t, isset($params['prefix']) ? $params['prefix'] : ''); + $t=isset($params['t'])&&$params['t']?$params['t']:$this->Application->GetVar('t'); unset($params['t']); + $prefix=isset($params['prefix'])?$params['prefix']:''; unset($params['prefix']); + + $pass=isset($params['pass'])?$params['pass']:$this->Application->GetVar('t_pass'); unset($params['pass']); + $this->Application->SetVar('t_pass',$pass); + + $pass_events=isset($params['pass_events'])&&$params['pass_events']?1:0; unset($params['pass_events']); + $this->Application->SetVar('t_pass_events',$pass_events); + + $this->Set($params); // set other params as application vars + return $this->Application->HREF($t,$prefix); } /*// NEEDS TEST @@ -453,6 +460,17 @@ return $parser->ParseBlock($params); } + /** + * Find out what object were in link + * used to move here and copy them to + * form submit url + * + * @param unknown_type $params + */ + function PrepareSubmitURL($params) + { + $this->Application->ReBuildENV(); + } /* function Login($params)