Index: trunk/core/kernel/processors/main_processor.php =================================================================== diff -u -r4723 -r4758 --- trunk/core/kernel/processors/main_processor.php (.../main_processor.php) (revision 4723) +++ trunk/core/kernel/processors/main_processor.php (.../main_processor.php) (revision 4758) @@ -524,17 +524,17 @@ $current_template = $this->Application->GetVar('t'); foreach ($this->Application->ModuleInfo as $module_name => $module_data) { $module_key = strtolower($module_name); - + if ($module_name == 'In-Portal') { $module_prefix = ''; } else { $module_prefix = $this->Application->IsAdmin() ? $module_key.'/' : $module_data['TemplatePath'].'/'; } - + $block_params['t'] = $module_prefix.$this->SelectParam($params, $module_key.'_template,'.$module_key.'_t,template,t'); if ($block_params['t'] == $current_template) continue; - + $no_data = $this->SelectParam($params, $module_key.'_block_no_data,block_no_data'); if ($no_data) { $block_params['block_no_data'] = $module_prefix.'/'.$no_data; @@ -754,7 +754,7 @@ if ( $this->Application->LoggedIn() && !$group_access) { $this->Application->Redirect( $params['no_group_perm_template'], Array('next_template'=>$t) ); } - + $redirect_params = Array('next_template' => $t); $session_expired = $this->Application->GetVar('expired'); if ($session_expired) { @@ -764,6 +764,18 @@ } } + function IsMember($params) + { + $group = getArrayValue($params, 'group'); + $conn =& $this->Application->DB; + $group_id = $conn->GetOne('SELECT GroupId FROM '.TABLE_PREFIX.'PortalGroup WHERE Name = '.$conn->qstr($group)); + if ($group_id) { + $groups = explode(',', $this->Application->RecallVar('UserGroups')); + $group_access = in_array($group_id, $groups); + } + return $group_access; + } + /** * Checks if SSL is on and redirects to SSL URL if needed * If SSL_URL is not defined in config - the tag does not do anything @@ -823,7 +835,7 @@ $module =& $this->Application->recallObject('mod.'.$module_name); $this->Application->SetVar('m_cat_id', $module->GetDBField('RootCat') ); } - + function XMLTemplate($params) { define('DBG_SKIP_REPORTING', 1);