CloneSet290


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
37201.000statement_sequence[10]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
137572
libraries/joomla/access/permission/accesslevel.php
237535
libraries/joomla/access/permission/simplerule.php
Clone Instance
1
Line Count
37
Source Line
572
Source File
libraries/joomla/access/permission/accesslevel.php

                // Set the rule id.
                $this->_rule_id = $ruleId;

                // Load the usergroups for the rule.
                $db->setQuery(
                        'SELECT `group_id`'
                        . ' FROM `#__usergroup_rule_map`'
                        . ' WHERE `rule_id` = '
                        .                     (int) $this->_rule_id);
                $groups=  (array) $db->loadResultArray();

                // Check for a database error.
                if ($db->getErrorNum()) {
                        $this->setError($db->getErrorMsg());
                        return FALSE;
                      }

                // Set the user groups.
                $this->_user_groups = $groups;

                // Load the users for the rule.
                $db->setQuery(
                        'SELECT `user_id`'
                        . ' FROM `#__user_rule_map`'
                        . ' WHERE `rule_id` = '
                        .                     (int) $this->_rule_id);
                $users=  (array) $db->loadResultArray();

                // Check for a database error.
                if ($db->getErrorNum()) {
                        $this->setError($db->getErrorMsg());
                        return FALSE;
                      }

                // Set the user groups.
                $this->_users = $users;

                return TRUE;


Clone Instance
2
Line Count
37
Source Line
535
Source File
libraries/joomla/access/permission/simplerule.php

                // Set the rule id.
                $this->_rule_id = $ruleId;

                // Load the usergroups for the rule.
                $db->setQuery(
                        'SELECT `group_id`'
                        . ' FROM `#__usergroup_rule_map`'
                        . ' WHERE `rule_id` = '
                        .                     (int) $this->_rule_id);
                $groups=  (array) $db->loadResultArray();

                // Check for a database error.
                if ($db->getErrorNum()) {
                        $this->setError($db->getErrorMsg());
                        return FALSE;
                      }

                // Set the user groups.
                $this->_user_groups = $groups;

                // Load the users for the rule.
                $db->setQuery(
                        'SELECT `user_id`'
                        . ' FROM `#__user_rule_map`'
                        . ' WHERE `rule_id` = '
                        .                     (int) $this->_rule_id);
                $users=  (array) $db->loadResultArray();

                // Check for a database error.
                if ($db->getErrorNum()) {
                        $this->setError($db->getErrorMsg());
                        return FALSE;
                      }

                // Set the user groups.
                $this->_users = $users;

                return TRUE;


Clone AbstractionParameter Count: 0Parameter Bindings

// Set the rule id.
$this->_rule_id =$ruleId;
// Load the usergroups for the rule.
$db->setQuery('SELECT `group_id`'
              . ' FROM `#__usergroup_rule_map`'
              . ' WHERE `rule_id` = '
              . (int) $this->_rule_id);
$groups= (array) $db->loadResultArray();
// Check for a database error.
if ($db->getErrorNum()) {
  $this->setError($db->getErrorMsg());
  return FALSE;
}
// Set the user groups.
$this->_user_groups =$groups;
// Load the users for the rule.
$db->setQuery('SELECT `user_id`'
              . ' FROM `#__user_rule_map`'
              . ' WHERE `rule_id` = '
              . (int) $this->_rule_id);
$users= (array) $db->loadResultArray();
// Check for a database error.
if ($db->getErrorNum()) {
  $this->setError($db->getErrorMsg());
  return FALSE;
}
// Set the user groups.
$this->_users =$users;
return TRUE;
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
None