/** * Удаляем из $this->o_site все ноды, которые не подходят по правам текущем уюзеру */ function check_site_rights() { global $o_cur_user; if ($o_cur_user->is_logined) { $cur_rights = array('', $o_cur_user->rights); if ($o_cur_user->rights == 'root') { $cur_rights[] = 'admin'; } } else { $cur_rights = array('_unloggined_'); } $this->site_full_array = $this->o_site->toArray(); $this->site_array = $this->check_nodes_right($this->site_full_array, $cur_rights); //print_r($this->site_array);die; $this->o_site->fromArray('site', $this->site_array); }