Index: trunk/core/kernel/utility/http_query.php =================================================================== diff -u -r3177 -r3182 --- trunk/core/kernel/utility/http_query.php (.../http_query.php) (revision 3177) +++ trunk/core/kernel/utility/http_query.php (.../http_query.php) (revision 3182) @@ -434,6 +434,35 @@ return trim($t, '/'); } + function extractSIDAndTemplate(&$parts) + { + if ( defined('INPORTAL_ENV') && INPORTAL_ENV ) // SID-TEMPLATE + { + $sub_parts = array_shift($parts); + list($sid, $t) = explode('-', $sub_parts, 2); + + // Save Session ID + if($sid) + { + $this->Set('sid', $sid); + $this->Get['sid'] = $sid; + } + + // Save Template Name + $this->Set('t', $this->getDefaultTemplate($t) ); + } + else // SID:TEMPLATE + { + // Save Session ID + $sid = array_shift($parts); + if ($sid) $this->Set('sid', $sid); + + // Save Template Name + $t = array_shift($parts); + $this->Set('t', $this->getDefaultTemplate($t) ); + } + } + /** * Process QueryString only, create * events, ids, based on config @@ -450,46 +479,14 @@ $env_var = $this->Get(ENV_VAR_NAME); if($env_var) { - $sid = $this->Get('sid'); - if ( $this->Application->RewriteURLs() && $sid && !$this->Get('admin') ) + $env_var = str_replace('\:','_&+$$+&_', $env_var); // replace escaped "=" with spec-chars :) + $parts = explode(':', $env_var); + + if( !$this->Application->RewriteURLs() ) { - //$env_var = rtrim($sid.$env_var, '/'); - $split_by = defined('INPORTAL_ENV') ? '-' : ':'; - $env_var = explode($split_by, $env_var, 2); - $env_var[0] = $sid; - $env_var = rtrim( implode($split_by, $env_var), '/'); + $this->extractSIDAndTemplate($parts); } - $env_var = str_replace('\:','_&+$$+&_',$env_var); // replace escaped "=" with spec-chars :) - $parts=explode(':',$env_var); - - if ( $this->Application->RewriteURLs() ) $env_var = str_replace('/', ':', $env_var); - - if (defined('INPORTAL_ENV')) { - $sub_parts = array_shift($parts); - - list($sid, $t) = explode('-', $sub_parts, 2); - - - // Save Session ID - if($sid) { - $this->Set('sid',$sid); - $this->Get['sid'] = $sid; - } - - // Save Template Name - $this->Set('t', $this->getDefaultTemplate($t) ); - } - else { - // Save Session ID - $sid = array_shift($parts); - if ($sid) $this->Set('sid', $sid); - - // Save Template Name - $t = array_shift($parts); - $this->Set('t', $this->getDefaultTemplate($t) ); - } - if($parts) { $query_maps = Array(); @@ -511,10 +508,10 @@ $mixed_part[] = str_replace('_&+$$+&_', '-', $escaped_val); } - $prefix_special=array_shift($mixed_part); // l.pick, l - list($prefix)=explode('.',$prefix_special); + $prefix_special = array_shift($mixed_part); // l.pick, l + list($prefix) = explode('.', $prefix_special); - $query_maps[$prefix_special]=$this->Application->getUnitOption($prefix,'QueryString'); + $query_maps[$prefix_special] = $this->Application->getUnitOption($prefix,'QueryString'); // if config is not defined for prefix in QueryString, then don't process it if( $query_maps[$prefix_special] ) @@ -523,7 +520,7 @@ foreach($query_maps[$prefix_special] as $index => $var_name) { // l_id, l_page, l_bla-bla-bla - $val = $mixed_part[$index-1]; + $val = $mixed_part[$index - 1]; if ($val == '') $val = false; $this->Set($prefix_special.'_'.$var_name, $val); } @@ -534,7 +531,7 @@ } } - $this->Set('passed', implode(',', $passed)); + $this->Set('passed', implode(',', $passed) ); $event_manger->setQueryMaps($query_maps); } }