public function getForumInfo($id)
    {
        $id = Container::get('hooks')->fire('model.forum.get_info_forum_start', $id);

        $cur_forum['where'] = [
            ['fp.read_forum' => 'IS NULL'],
            ['fp.read_forum' => '1']
        ];

        if (!User::get()->is_guest) {
            $cur_forum['select'] = [
                'f.forum_name',
                'f.redirect_url',
                'f.moderators',
                'f.num_topics',
                'f.sort_by',
                'fp.post_topics',
                'is_subscribed' => 's.user_id'
            ];

            $cur_forum = DB::forTable('forums')->table_alias('f')
                            ->select_many($cur_forum['select'])
//                            ->left_outer_join(DB::prefix().'forum_subscriptions',
// array('f.id', '=', 's.forum_id'), 's')
//                            ->left_outer_join(DB::prefix().'forum_subscriptions',
// array('s.user_id', '=', User::get()->id), null, true)
                    ->left_outer_join(
                    DB::prefix().'forum_subscriptions',
                        '(f.id = s.forum_id AND s.user_id = '.User::get()->id.')',
                        's'
                    )
//                            ->left_outer_join(DB::prefix().'forum_perms',
// array('fp.forum_id', '=', 'f.id'), 'fp')
//                            ->left_outer_join(DB::prefix().'forum_perms',
// array('fp.group_id', '=', User::get()->g_id), null, true)
                ->left_outer_join(
                    DB::prefix().'forum_perms',
                    '(fp.forum_id = f.id AND fp.group_id = '.User::get()->g_id.')',
                    'fp'
                )
                ->where_raw('(fp.read_forum IS NULL OR fp.read_forum=1)')
//                ->where_any_is($cur_forum['where'])
                            ->where('f.id', $id);
        } else {
            $cur_forum['select'] = [
                'f.forum_name',
                'f.redirect_url',
                'f.moderators',
                'f.num_topics',
                'f.sort_by',
                'fp.post_topics'
            ];

            $cur_forum = DB::forTable('forums')->table_alias('f')
                            ->select_many($cur_forum['select'])
                            ->select_expr(0, 'is_subscribed')
//                            ->left_outer_join(DB::prefix().'forum_perms',
// array('fp.forum_id', '=', 'f.id'), 'fp')
//                            ->left_outer_join(DB::prefix().'forum_perms',
// array('fp.group_id', '=', User::get()->g_id), null, true)
                ->left_outer_join(
                    DB::prefix().'forum_perms',
                    '(fp.forum_id = f.id AND fp.group_id = '.User::get()->g_id.')',
                    'fp'
                )
//                            ->where_any_is($cur_forum['where'])
                ->where_raw('(fp.read_forum IS NULL OR fp.read_forum=1)')
                            ->where('f.id', $id);
        }

        $cur_forum = Container::get('hooks')->fireDB('model.forum.get_info_forum_query', $cur_forum);
        $cur_forum = $cur_forum->find_one();

        if (!$cur_forum) {
            throw new RunBBException(__('Bad request'), '404');
        }

        $cur_forum = Container::get('hooks')->fire('model.forum.get_info_forum', $cur_forum);

        return $cur_forum;
    }