Index: branches/5.2.x/core/kernel/processors/main_processor.php =================================================================== diff -u -N -r14603 -r14628 --- branches/5.2.x/core/kernel/processors/main_processor.php (.../main_processor.php) (revision 14603) +++ branches/5.2.x/core/kernel/processors/main_processor.php (.../main_processor.php) (revision 14628) @@ -1,6 +1,6 @@ Application->ConfigValue($config_name); } - function ConfigEquals($params) + /** + * Compares configuration variable to a given value + * + * @param Array $params + * @return bool + * @deprecated + * @access protected + */ + protected function ConfigEquals($params) { $option = $this->SelectParam($params, 'name,option,var'); - return $this->Application->ConfigValue($option) == getArrayValue($params, 'value'); + + return $this->Application->ConfigValue($option) == $params['value']; } /** @@ -442,9 +451,9 @@ * * @param Array $params * @return string - * @access public + * @access protected */ - function DumpSystemInfo($params) + protected function DumpSystemInfo($params) { $actions =& $this->Application->recallObject('kActions'); /* @var $actions Params */ @@ -756,7 +765,7 @@ { $perm_helper =& $this->Application->recallObject('PermissionsHelper'); /* @var $perm_helper kPermissionsHelper */ - + return $perm_helper->TagPermissionCheck($params); } @@ -848,20 +857,26 @@ } } - function IsMember($params) + /** + * Checks, that user belongs to a group with a given name + * + * @param Array $params + * @return bool + */ + protected function IsMember($params) { - $group = getArrayValue($params, 'group'); - $sql = 'SELECT GroupId - FROM '.TABLE_PREFIX.'PortalGroup - WHERE Name = '.$this->Conn->qstr($group); + FROM ' . TABLE_PREFIX . 'PortalGroup + WHERE Name = ' . $this->Conn->qstr($params['group']); $group_id = $this->Conn->GetOne($sql); - if ($group_id) { + if ( $group_id ) { $groups = explode(',', $this->Application->RecallVar('UserGroups')); - $group_access = in_array($group_id, $groups); + + return in_array($group_id, $groups); } - return $group_access; + + return false; } /** @@ -871,9 +886,9 @@ * If called without params forces https right away. If called with by_config="1" checks the * Require SSL setting from General Config and if it is ON forces https * - * @param unknown_type $params + * @param Array $params */ - function CheckSSL($params) + protected function CheckSSL($params) { $ssl = $this->Application->isAdmin ? $this->Application->ConfigValue('AdminSSL_URL') : false; @@ -929,7 +944,7 @@ if ( $this->Application->GetVar('__KEEP_SSL__') ) { return; } - + // $pass_more = Array ('pass' => 'm', 'm_cat_id' => 0, '__SSL__' => 0); $pass['__SSL__'] = 0; $this->Application->Redirect('', $pass); // $pass_more