Index: trunk/core/kernel/processors/main_processor.php =================================================================== diff -u -r4329 -r4357 --- trunk/core/kernel/processors/main_processor.php (.../main_processor.php) (revision 4329) +++ trunk/core/kernel/processors/main_processor.php (.../main_processor.php) (revision 4357) @@ -187,13 +187,13 @@ { // list($prefix_special, $field_name) = explode(':', $params['src']); - + $object =& $this->Application->recallObject($prefix_special); $name = $this->SelectParam($params, 'param,name,var'); - + $this->Application->Parser->SetParam($name, $object->GetField($field_name) ); }*/ - + /** * Compares block parameter with value specified * @@ -498,7 +498,7 @@ $t = $this->SelectParam($params, 't,template,block,name'); $t = eregi_replace("\.tpl$", '', $t); - + $templates_cache =& $this->Application->recallObject('TemplatesCache'); $res = $BlockParser->Parse( $templates_cache->GetTemplateBody($t, getArrayValue($params, 'is_silent')), $t ); @@ -699,6 +699,11 @@ */ function RequireLogin($params) { + $t = $this->Application->GetVar('t'); + if ($next_t = getArrayValue($params, 'next_template')) { + $t = $next_t; + } + if($permission_groups = getArrayValue($params, 'permissions')) { $permission_groups = explode('|', $permission_groups); @@ -721,8 +726,7 @@ if( !$this->Application->LoggedIn() ) { - $t = $this->Application->GetVar('t'); - $this->Application->Redirect( $params['login_template'], Array('next_template'=>$t) ); + $this->Application->Redirect( $params['login_template'], Array('next_template'=>$t) ); } else { @@ -760,7 +764,9 @@ if( (!$this->Application->LoggedIn() || !$group_access) && $condition ) { - $t = $this->Application->GetVar('t'); + if ( $this->Application->LoggedIn() && !$group_access) { + $this->Application->Redirect( $params['no_group_perm_template'], Array('next_template'=>$t) ); + } $this->Application->Redirect( $params['login_template'], Array('next_template'=>$t) ); } } @@ -834,21 +840,21 @@ $module =& $this->Application->recallObject('mod.'.$module_name); $this->Application->SetVar('m_cat_id', $module->GetDBField('RootCat') ); } - + function ImportRedirect($params) { $import_id = $this->Application->GetVar('import_id'); if ($import_id) { // redirect forward to step3 (import parameters coosing) $this->Application->StoreVar('ImportScriptID', $import_id); - + $sql = 'SELECT * FROM '.TABLE_PREFIX.'ImportScripts WHERE is_id = '.$import_id; - + $db =& $this->Application->GetADODBConnection(); $is_params = $db->GetRow($sql); - + if ($is_params['is_type'] == 'db') { $this->Application->Redirect('', null, '', 'import/step3.php'); } @@ -879,7 +885,7 @@ { return replaceModuleSection($params['icon']); } - + function StoreSystemVars($params) { // save theese variables to session, because they are useful for most configuration templates @@ -892,6 +898,12 @@ $this->Application->LinkVar('main_prefix'); // window prefix, that opener selector $this->Application->LinkVar('dst_field'); // field to set value choosed in selector $this->Application->LinkVar('return_template'); // template to go, when something was coosen from popup (from finalizePopup) + } + + function XMLTemplate($params) + { + define('DBG_SKIP_REPORTING', 1); + header('Content-type: text/xml'); } }