Index: branches/5.0.x/core/kernel/application.php =================================================================== diff -u -r12366 -r12368 --- branches/5.0.x/core/kernel/application.php (.../application.php) (revision 12366) +++ branches/5.0.x/core/kernel/application.php (.../application.php) (revision 12368) @@ -1,6 +1,6 @@ Session->SetField('GroupList', $user_groups); - $this->StoreVar('UserGroups', $user_groups); + $this->StoreVar('UserGroups', $user_groups, true); // true for optional } $this->HttpQuery->AfterInit(); @@ -382,7 +382,9 @@ }*/ if ($this->GetVar('m_cat_id') === false) $this->SetVar('m_cat_id', 0); - if( !$this->RecallVar('curr_iso') ) $this->StoreVar('curr_iso', $this->GetPrimaryCurrency() ); + if (!$this->RecallVar('curr_iso')) { + $this->StoreVar('curr_iso', $this->GetPrimaryCurrency(), true); // true for optional + } $this->SetVar('visits_id', $this->RecallVar('visit_id') ); @@ -1235,7 +1237,7 @@ /** * Allows to parse given block name or include template * - * @param Array $params Parameters to pass to block/template. Reserved parameter "name" used to specify block/template name. + * @param Array $params Parameters to pass to block. Reserved parameter "name" used to specify block name. * @param Array $pass_params Forces to pass current parser params to this block/template. Use with cauntion, because you can accidently pass "block_no_data" parameter. * @param bool $as_template * @return string @@ -1250,6 +1252,17 @@ } /** + * Allows to include template with a given name and given parameters + * + * @param Array $params Parameters to pass to template. Reserved parameter "name" used to specify template name. + * @return string + */ + function IncludeTemplate($params) + { + return $this->Parser->IncludeTemplate($params, isset($block_params['is_silent']) ? 1 : 0); + } + + /** * Returns index file, that could be passed as parameter to method, as parameter to tag and as constant or not passed at all * * @param string $prefix @@ -1936,7 +1949,7 @@ $this->SetVar('u_id', $user_id); } - $this->StoreVar('user_id', $user_id); + $this->StoreVar('user_id', $user_id, $user_id == -2); // storing Guest user_id (-2) is optional if ($this->GetVar('expired') == 1) { // this parameter is set only from admin