Code Duplication    Length = 15-16 lines in 2 locations

application/libraries/Permitions.php 2 locations

@@ 405-420 (lines=16) @@
402
                    pjax('/admin/rbac/groupEdit/' . $idNewGroup);
403
                }
404
            }
405
        } else {
406
407
            $sqlModel = 'SELECT SRP.id, SRP.name, SRP.group_id, SRPI.title, SRPI.description
408
            FROM shop_rbac_privileges SRP
409
            INNER JOIN shop_rbac_privileges_i18n SRPI ON SRPI.id = SRP.id WHERE SRPI.locale = "' . MY_Controller::getCurrentLocale() . '"  ORDER BY SRP.name ASC';
410
            $model = $this->db->query($sqlModel);
411
412
            $this->template->add_array(
413
                [
414
                    'model' => $model,
415
                    'privileges' => $model->result(),
416
                ]
417
            );
418
419
            $this->template->show('groupCreate', FALSE);
420
        }
421
    }
422
423
    public function groupEdit($groupId) {
@@ 866-880 (lines=15) @@
863
            } else {
864
                pjax('/admin/rbac/privilegeList');
865
            }
866
        } else {
867
            $sql = 'SELECT SRG.id, SRGI.description
868
            FROM shop_rbac_group SRG
869
            INNER JOIN  shop_rbac_group_i18n SRGI ON SRGI.id = SRG.id WHERE SRGI.locale = "' . MY_Controller::getCurrentLocale() . '"';
870
            $queryRBACGroup = $this->db->query($sql)->result();
871
872
            $this->template->add_array(
873
                [
874
                    'model' => $queryRBACPrivilege,
875
                    'groups' => $queryRBACGroup
876
                ]
877
            );
878
879
            $this->template->show('privilegeEdit', FALSE);
880
        }
881
    }
882
883
    /**