Code Duplication    Length = 7-9 lines in 4 locations

web_interface/astpp/application/libraries/astpp/common.php 1 location

@@ 35-42 (lines=8) @@
32
33
    protected $CI; // codeigniter
34
35
    function __construct($library_name = '') {
36
37
        $this->CI = & get_instance();
38
        $this->CI->load->library("timezone");
39
        $this->CI->load->model('db_model');
40
        $this->CI->load->library('email');
41
        $this->CI->load->library('session');
42
    }
43
44
// __construct
45
    /**

web_interface/astpp/application/libraries/astpp/email_lib.php 1 location

@@ 47-53 (lines=7) @@
44
	public $company_website='';
45
	public $account_id='';
46
47
	function __construct($library_name = '') {
48
49
		$this->CI = & get_instance();
50
		$this->CI->load->model('db_model');
51
		$this->CI->load->library('email');
52
		$this->CI->load->library('session');
53
	}
54
55
	function get_email_settings()
56
	{

web_interface/astpp/application/libraries/astpp/form.php 1 location

@@ 44-50 (lines=7) @@
41
    protected $after_button = '';
42
    protected $rules = array(); // storage for validation rules
43
44
    function __construct() {
45
        $this->CI = & get_instance();
46
        $this->CI->load->library('form_validation');
47
        $this->CI->load->library('astpp/common');
48
        $this->CI->load->model('db_model');
49
        $this->check_permissions();
50
    }
51
52
// __construct
53
    /**

web_interface/astpp/application/libraries/locale.php 1 location

@@ 32-40 (lines=9) @@
29
 */
30
class Locale{
31
32
	function __construct($library_name = '') {
33
34
		$this->CI = & get_instance();
35
		$this->CI->load->model('db_model');
36
		$this->CI->load->library('email');
37
		$this->CI->load->library('session');
38
		$this->CI->load->driver('cache');
39
	$this->set_lang();
40
	}
41
	function set_lang($lang=FALSE){
42
43
		$current_locale=$this->CI->session->userdata('user_language');