CloneSet176


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
28260.991statement_sequence[11]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
12855
administrator/components/com_users/models/groups.php
22855
administrator/components/com_users/models/levels.php
Clone Instance
1
Line Count
28
Source Line
55
Source File
administrator/components/com_users/models/groups.php

                // If the model is set to check item state, add to the query.
                if ($this->getState('check.state', TRUE)) {
                        //$query->where('a.block = ' . (int)$this->getState('filter.state'));
                }

                // Filter the items over the parent id if set.
                $parent_id=  $this->getState('filter.parent_id');
                if ($parent_id !== NULL
                    &&                     $parent_id>  0) {
                        $query->join('LEFT', '`#__usergroups` AS p ON p.id = '
                                             .                                 (int) $parent_id);
                        $query->where('a.lft > p.lft AND a.rgt < p.rgt');
                      }
                // Filter the items over the section id if set.
                $sectionId=  $this->getState('filter.section_id');
                if ($sectionId !== NULL
                    &&                     $sectionId>  0) {
                        $query->where('a.section_id = '
                                      .                 (int) $sectionId);
                      }
                // Filter the comments over the search string if set.
                $search=  $this->getState('filter.search');
                if (!empty($search)) {
                        $query->where('a.title LIKE '
                                      .               $this->_db->Quote('%'
                                                                        .   $search
                                                                        .           '%'));
                      }
                // Join on the access control system
                $query->select('GROUP_CONCAT(DISTINCT(act.title) SEPARATOR \',\') AS actions');
                $query->leftJoin('#__usergroup_rule_map AS ugrm ON ugrm.group_id = a.id');
                $query->leftJoin('#__access_rules AS r ON r.id = ugrm.rule_id AND r.access_type = 1');
                $query->leftJoin('#__access_action_rule_map AS arm ON arm.rule_id = r.id ');


Clone Instance
2
Line Count
28
Source Line
55
Source File
administrator/components/com_users/models/levels.php

                // If the model is set to check item state, add to the query.
                if ($this->getState('check.state', TRUE)) {
                        //$query->where('a.block = ' . (int)$this->getState('filter.state'));
                }

                // Filter the items over the parent id if set.
                $parent_id=  $this->getState('filter.parent_id');
                if ($parent_id !== NULL
                    &&                     $parent_id>  0) {
                        $query->join('LEFT', '`#__access_assetgroups` AS p ON p.id = '
                                             .                                         (int) $parent_id);
                        $query->where('a.lft > p.lft AND a.rgt < p.rgt');
                      }
                // Filter the items over the section id if set.
                $sectionId=  $this->getState('filter.section_id');
                if ($sectionId !== NULL
                    &&                     $sectionId>  0) {
                        $query->where('a.section_id = '
                                      .                 (int) $sectionId);
                      }
                // Filter the items over the search string if set.
                $search=  $this->getState('filter.search');
                if (!empty($search)) {
                        $query->where('a.title LIKE '
                                      .               $this->_db->Quote('%'
                                                                        .   $search
                                                                        .           '%'));
                      }
                // Extended joins to get a list of user groups associated with an access level.
                $query->select('GROUP_CONCAT(DISTINCT ug2.title ORDER BY ug2.lft ASC SEPARATOR \',\') AS user_groups');
                $query->leftJoin('#__access_assetgroup_rule_map AS agrm ON agrm.group_id = a.id');
                $query->innerJoin('#__access_rules AS r ON r.id = agrm.rule_id');
                $query->leftJoin('#__usergroup_rule_map AS ugrm ON ugrm.rule_id = r.id');


Clone AbstractionParameter Count: 6Parameter Bindings

// If the model is set to check item state, add to the query.
if ($this->getState('check.state',TRUE)) {
//$query->where('a.block = ' . (int)$this->getState('filter.state'));
}
// Filter the items over the parent id if set.
$parent_id=$this->getState('filter.parent_id');
if ($parent_id !== NULL
    && $parent_id>0) {
  $query->join('LEFT', [[#variable53d8d2a0]]
                      . (int) $parent_id);
  $query->where('a.lft > p.lft AND a.rgt < p.rgt');
}
// Filter the items over the section id if set.
$sectionId=$this->getState('filter.section_id');
if ($sectionId !== NULL
    && $sectionId>0) {
  $query->where('a.section_id = '
                . (int) $sectionId);
}
// Filter the comments over the search string if set.
// Filter the items over the search string if set.
$search=$this->getState('filter.search');
if (!empty($search)) {
  $query->where('a.title LIKE '
                . $this->_db->Quote('%'
                                    . $search
                                    . '%'));
}
// Join on the access control system
// Extended joins to get a list of user groups associated with an access level.
$query->select( [[#variable53d8d220]]);
$query->leftJoin( [[#variable53d8d160]]);
$query-> [[#variable53d8d120]]( [[#variable53d8d060]]);
$query->leftJoin( [[#variable53d8d020]]);
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#53d8d2a0]]
'`#__usergroups` AS p ON p.id = ' 
12[[#53d8d2a0]]
'`#__access_assetgroups` AS p ON p.id = ' 
21[[#53d8d220]]
'GROUP_CONCAT(DISTINCT(act.title) SEPARATOR \',\') AS actions' 
22[[#53d8d220]]
'GROUP_CONCAT(DISTINCT ug2.title ORDER BY ug2.lft ASC SEPARATOR \',\') AS user_groups' 
31[[#53d8d160]]
'#__usergroup_rule_map AS ugrm ON ugrm.group_id = a.id' 
32[[#53d8d160]]
'#__access_assetgroup_rule_map AS agrm ON agrm.group_id = a.id' 
41[[#53d8d120]]
leftJoin 
42[[#53d8d120]]
innerJoin 
51[[#53d8d060]]
'#__access_rules AS r ON r.id = ugrm.rule_id AND r.access_type = 1' 
52[[#53d8d060]]
'#__access_rules AS r ON r.id = agrm.rule_id' 
61[[#53d8d020]]
'#__access_action_rule_map AS arm ON arm.rule_id = r.id ' 
62[[#53d8d020]]
'#__usergroup_rule_map AS ugrm ON ugrm.rule_id = r.id'