CloneSet148


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
65210.999statement_sequence[16]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
165462
libraries/joomla/access/permission/accesslevel.php
265404
libraries/joomla/access/permission/simplerule.php
Clone Instance
1
Line Count
65
Source Line
462
Source File
libraries/joomla/access/permission/accesslevel.php

                // Delete any action maps for this rule.
                $db->setQuery(
                        'DELETE FROM `#__access_action_rule_map`'
                        . ' WHERE `rule_id` = '
                        .                     (int) $this->_rule_id);
                $db->query();

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

                // Delete any asset group maps for this rule.
                $db->setQuery(
                        'DELETE FROM `#__access_assetgroup_rule_map`'
                        . ' WHERE `rule_id` = '
                        .                     (int) $this->_rule_id);
                $db->query();

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

                // Delete any usergroup maps for this rule.
                $db->setQuery(
                        'DELETE FROM `#__usergroup_rule_map`'
                        . ' WHERE `rule_id` = '
                        .                     (int) $this->_rule_id);
                $db->query();

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

                // Delete any user maps for this rule.
                $db->setQuery(
                        'DELETE FROM `#__user_rule_map`'
                        . ' WHERE `rule_id` = '
                        .                     (int) $this->_rule_id);
                $db->query();

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

                // Delete this rule.
                $db->setQuery(
                        'DELETE FROM `#__access_rules`'
                        . ' WHERE `id` = '
                        .                (int) $this->_rule_id);
                $db->query();

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

                return TRUE;


Clone Instance
2
Line Count
65
Source Line
404
Source File
libraries/joomla/access/permission/simplerule.php

                // Delete any action maps for this rule.
                $db->setQuery(
                        'DELETE FROM `#__access_action_rule_map`'
                        . ' WHERE `rule_id` = '
                        .                     (int) $this->_rule_id);
                $db->query();

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

                // Delete any asset maps for this rule.
                $db->setQuery(
                        'DELETE FROM `#__access_asset_rule_map`'
                        . ' WHERE `rule_id` = '
                        .                     (int) $this->_rule_id);
                $db->query();

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

                // Delete any usergroup maps for this rule.
                $db->setQuery(
                        'DELETE FROM `#__usergroup_rule_map`'
                        . ' WHERE `rule_id` = '
                        .                     (int) $this->_rule_id);
                $db->query();

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

                // Delete any user maps for this rule.
                $db->setQuery(
                        'DELETE FROM `#__user_rule_map`'
                        . ' WHERE `rule_id` = '
                        .                     (int) $this->_rule_id);
                $db->query();

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

                // Delete this rule.
                $db->setQuery(
                        'DELETE FROM `#__access_rules`'
                        . ' WHERE `id` = '
                        .                (int) $this->_rule_id);
                $db->query();

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

                return TRUE;


Clone AbstractionParameter Count: 1Parameter Bindings

// Delete any action maps for this rule.
$db->setQuery('DELETE FROM `#__access_action_rule_map`'
              . ' WHERE `rule_id` = '
              . (int) $this->_rule_id);
$db->query();
// Check for a database error.
if ($db->getErrorNum()) {
  $this->setError($db->getErrorMsg());
  return FALSE;
}
// Delete any asset maps for this rule.
// Delete any asset group maps for this rule.
$db->setQuery( [[#variable52420ec0]]
              . ' WHERE `rule_id` = '
              . (int) $this->_rule_id);
$db->query();
// Check for a database error.
if ($db->getErrorNum()) {
  $this->setError($db->getErrorMsg());
  return FALSE;
}
// Delete any usergroup maps for this rule.
$db->setQuery('DELETE FROM `#__usergroup_rule_map`'
              . ' WHERE `rule_id` = '
              . (int) $this->_rule_id);
$db->query();
// Check for a database error.
if ($db->getErrorNum()) {
  $this->setError($db->getErrorMsg());
  return FALSE;
}
// Delete any user maps for this rule.
$db->setQuery('DELETE FROM `#__user_rule_map`'
              . ' WHERE `rule_id` = '
              . (int) $this->_rule_id);
$db->query();
// Check for a database error.
if ($db->getErrorNum()) {
  $this->setError($db->getErrorMsg());
  return FALSE;
}
// Delete this rule.
$db->setQuery('DELETE FROM `#__access_rules`'
              . ' WHERE `id` = '
              . (int) $this->_rule_id);
$db->query();
// Check for a database error.
if ($db->getErrorNum()) {
  $this->setError($db->getErrorMsg());
  return FALSE;
}
return TRUE;
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#52420ec0]]
'DELETE FROM `#__access_asset_rule_map`' 
12[[#52420ec0]]
'DELETE FROM `#__access_assetgroup_rule_map`'