<commit_before><?php if (!defined('BASEPATH')) exit('No direct script access allowed');
/**
 * This is a survey module for PyroCMS
 *
 * @author 		<NAME> - PyroCMS Dev Team
 * @website		http://unruhdesigns.com
 * @package 	PyroCMS
 * @subpackage 	survey Module
 */
class Plugin_survey extends Plugin
{
	/**
	 * Item List
	 * Usage:
	 * 
	 * {{ survey:items limit="5" order="asc" }}
	 *      {{ id }} {{ name }} {{ slug }}
	 * {{ /survey:items }}
	 *
	 * @return	array
	 */
	function items()
	{
		$limit = $this->attribute('limit');
		$order = $this->attribute('order');
		
		return $this->db->order_by('name', $order)
						->limit($limit)
						->get('survey_items')
						->result_array();
	}

    function clients(){
        $query = $this->db->get_where('survey_clients', array('active'=>1));

        return $query->result();
    }

    function get_survey_name_by_id($id){
        $query = $this->db->get_where('survey', array('id' => $id));
        $row = $query->row();
        if($row){
            return $row->name;
        }else{
            return '';
        }
    }
}

/* End of file plugin.php */<commit_msg>try to draw the history<commit_after><?php if (!defined('BASEPATH')) exit('No direct script access allowed');
/**
 * This is a survey module for PyroCMS
 *
 * @author 		<NAME> - PyroCMS Dev Team
 * @website		http://unruhdesigns.com
 * @package 	PyroCMS
 * @subpackage 	survey Module
 */
class Plugin_survey extends Plugin
{
	/**
	 * Item List
	 * Usage:
	 * 
	 * {{ survey:items limit="5" order="asc" }}
	 *      {{ id }} {{ name }} {{ slug }}
	 * {{ /survey:items }}
	 *
	 * @return	array
	 */
	function items()
	{
		$limit = $this->attribute('limit');
		$order = $this->attribute('order');
		
		return $this->db->order_by('name', $order)
						->limit($limit)
						->get('survey_items')
						->result_array();
	}

    function clients(){
        $query = $this->db->get_where('survey_clients', array('active'=>1));

        return $query->result();
    }

    /*function get_survey_name_by_id($id){
        $query = $this->db->get_where('survey', array('id' => $id));
        $row = $query->row();
        if($row){
            return $row->name;
        }else{
            return '';
        }
    }*/
}

/* End of file plugin.php */
{'fraction_non_alphanumeric': 0.19363395225464192, 'fraction_numerical': 0.0017683465959328027, 'mean_word_length': 2.541471048513302, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 37, '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': '5230264', 'n_tokens_mistral': 831, 'n_tokens_neox': 746, 'n_words': 162}