Code Duplication    Length = 9-12 lines in 8 locations

application/modules/admin/admin_logs.php 1 location

@@ 12-23 (lines=12) @@
9
10
    public $per_page = 25;
11
12
    public function __construct() {
13
        parent::__construct();
14
15
        $this->load->library('DX_Auth');
16
        admin_or_redirect();
17
18
        $this->load->library('lib_admin');
19
        $this->load->library('pagination');
20
        $this->lib_admin->init_settings();
21
22
        //cp_check_perm('logs_view');
23
    }
24
25
    public function index($offset = 0) {
26
        $this->db->order_by('date', 'DESC');

application/modules/admin/backup.php 1 location

@@ 17-26 (lines=10) @@
14
class Backup extends BaseAdminController
15
{
16
17
    public function __construct() {
18
        parent::__construct();
19
20
        $this->load->library('DX_Auth');
21
        admin_or_redirect();
22
23
        $this->load->library('form_validation');
24
        $this->load->library('lib_admin');
25
        $this->lib_admin->init_settings();
26
    }
27
28
    public function save_settings() {
29
        $backup = \libraries\Backup::create();

application/modules/admin/cache_all.php 1 location

@@ 10-19 (lines=10) @@
7
class Cache_all extends BaseAdminController
8
{
9
10
    public function __construct() {
11
        parent::__construct();
12
13
        $this->load->library('DX_Auth');
14
        admin_or_redirect();
15
16
        $this->load->library('lib_admin');
17
        $this->load->library('form_validation');
18
        $this->lib_admin->init_settings();
19
    }
20
21
    public function index() {
22

application/modules/admin/categories.php 1 location

@@ 54-62 (lines=9) @@
51
    /**
52
     * Categories constructor.
53
     */
54
    public function __construct() {
55
        parent::__construct();
56
57
        $this->load->library('DX_Auth');
58
        admin_or_redirect();
59
        $this->load->library('lib_admin');
60
        $this->load->library('lib_category');
61
        $this->lib_admin->init_settings();
62
    }
63
64
    /**
65
     * Create or update new category

application/modules/admin/components.php 1 location

@@ 29-40 (lines=12) @@
26
     */
27
    private $permited = [];
28
29
    public function __construct() {
30
        parent::__construct();
31
32
        $this->load->library('DX_Auth');
33
34
        admin_or_redirect();
35
36
        $this->load->library('lib_admin');
37
        $this->lib_admin->init_settings();
38
        $this->setInstalled();
39
        $this->setPermited();
40
    }
41
42
    public function index() {
43
        $this->modules_table();

application/modules/admin/languages.php 1 location

@@ 13-23 (lines=11) @@
10
class Languages extends BaseAdminController
11
{
12
13
    public function __construct() {
14
15
        parent::__construct();
16
17
        $this->load->library('DX_Auth');
18
        admin_or_redirect();
19
20
        $this->load->library('lib_admin');
21
        $this->load->library('form_validation');
22
        $this->lib_admin->init_settings();
23
    }
24
25
    public function index() {
26

application/modules/admin/settings.php 1 location

@@ 31-41 (lines=11) @@
28
     */
29
    protected $uploadPath = 'uploads/images/';
30
31
    public function __construct() {
32
33
        parent::__construct();
34
35
        $this->load->library('DX_Auth');
36
        admin_or_redirect();
37
38
        $this->load->library('lib_admin');
39
        $this->load->library('lib_category');
40
        $this->lib_admin->init_settings();
41
    }
42
43
    public function index() {
44

application/modules/admin/sys_info.php 1 location

@@ 18-27 (lines=10) @@
15
class Sys_info extends BaseAdminController
16
{
17
18
    public function __construct() {
19
        parent::__construct();
20
        $this->load->library('DX_Auth');
21
        admin_or_redirect();
22
23
        $this->load->library('lib_admin');
24
        $this->load->library('lib_category');
25
        $this->load->library('email');
26
        $this->lib_admin->init_settings();
27
    }
28
29
    public function index() {
30
        $folders = [