<commit_before><?php

class Kring extends DataMapper {
	public $table = 'kringen';

    public function get_by_gui_enabled() {
        // get all kringen with active gui
        $kringen = $this->db->query('SELECT kring_id FROM kringen_settings WHERE enable_gui = 1')->row_array();
        array_walk($kringen, create_function('$a', 'return $a[\'kring_id\'];'));
        if(count($kringen) == 0) $kringen = array(0);

        $this->where(array('actief' => 1, 'showonsite' => 1));
        $this->where_in('id', $kringen);

        return $this->get();
    }

    public function is_gui_enabled() {
        $result = $this->db->query('SELECT enable_gui FROM kringen_settings
            WHERE kring_id = ? AND enable_gui = 1', array($this->id))->row_array();
        return !empty($result);
    }
}<commit_msg>Fix bug<commit_after><?php

class Kring extends DataMapper {
	public $table = 'kringen';

    public function get_by_gui_enabled() {
        // get all kringen with active gui
        $kringen = $this->db->query('SELECT kring_id FROM kringen_settings WHERE enable_gui = 1')->result_array();
        $kringen = array_map(create_function('$a', 'return $a[\'kring_id\'];'), $kringen);
        if(count($kringen) == 0) $kringen = array(0);

        $this->where(array('actief' => 1, 'showonsite' => 1));
        $this->where_in('id', $kringen);

        return $this->get();
    }

    public function is_gui_enabled() {
        $result = $this->db->query('SELECT enable_gui FROM kringen_settings
            WHERE kring_id = ? AND enable_gui = 1', array($this->id))->row_array();
        return !empty($result);
    }
}
{'fraction_non_alphanumeric': 0.16738461538461538, 'fraction_numerical': 0.0073846153846153844, 'mean_word_length': 3.1479591836734695, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1754304', 'n_tokens_mistral': 556, 'n_tokens_neox': 538, 'n_words': 116}