Code Duplication    Length = 7-8 lines in 2 locations

application/modules/admin/categories.php 1 location

@@ 669-675 (lines=7) @@
666
     * @param string $tpl
667
     * @return bool
668
     */
669
    public function tpl_validation($tpl) {
670
        if (preg_match('/^[0-9A-Za-z\_\.]{0,50}$/', $tpl)) {
671
            return TRUE;
672
        }
673
        $this->form_validation->set_message('tpl_validation', lang('The %s field can only contain Latin characters', 'admin'));
674
        return FALSE;
675
    }
676
677
    /**
678
     * @param int $id

application/modules/admin/pages.php 1 location

@@ 72-79 (lines=8) @@
69
     * @param string $tpl
70
     * @return bool
71
     */
72
    public function tpl_validation($tpl) {
73
74
        if (preg_match('/^[A-Za-z\_\.]{0,50}$/', $tpl)) {
75
            return TRUE;
76
        }
77
        $this->form_validation->set_message('tpl_validation', lang('The %s field can only contain Latin characters', 'admin'));
78
        return FALSE;
79
    }
80
81
    /**
82
     * Add new page