CloneSet558


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
24240.965statement_sequence[6]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
124259
libraries/joomla/access/helper.php
223286
libraries/joomla/access/helper.php
Clone Instance
1
Line Count
24
Source Line
259
Source File
libraries/joomla/access/helper.php

                // Delete any actions for this section.
                $db->setQuery(
                        'DELETE a, b FROM `#__access_actions` AS a'
                        . ' LEFT JOIN `#__access_action_rule_map` AS b ON b.action_id = a.id'
                        . ' WHERE a.section_id = '
                        .                        (int) $id);
                $db->query();

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

                // Delete any assets for this section.
                $db->setQuery(
                        'DELETE a, b, c FROM `#__access_assets` AS a'
                        . ' LEFT JOIN `#__access_asset_assetgroup_map` AS b ON b.asset_id = a.id'
                        . ' LEFT JOIN `#__access_asset_rule_map` AS c ON c.asset_id = a.id'
                        . ' WHERE a.section_id = '
                        .                        (int) $id);
                $db->query();

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


Clone Instance
2
Line Count
23
Source Line
286
Source File
libraries/joomla/access/helper.php

                // Delete any asset groups for this section.
                $db->setQuery(
                        'DELETE a, b FROM `#__access_assetgroups` AS a'
                        . ' LEFT JOIN `#__access_assetgroup_rule_map` AS b ON b.group_id = a.id'
                        . ' WHERE a.section_id = '
                        .                        (int) $id);
                $db->query();

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

                // Delete any rules for this section.
                $db->setQuery(
                        'DELETE a, b FROM `#__access_rules` AS a'
                        . ' LEFT JOIN `#__user_rule_map` AS b ON b.rule_id = a.id'
                        . ' WHERE a.section_id = '
                        .                        (int) $id);
                $db->query();

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


Clone AbstractionParameter Count: 4Parameter Bindings

// Delete any actions for this section.
// Delete any asset groups for this section.
$db->setQuery( [[#variable46025cc0]]
              .  [[#variable46025ba0]]
              . ' WHERE a.section_id = '
              . (int) $id);
$db->query();
// Check for a database error.
if ($db->getErrorNum()) {
  return new JException($db->getErrorMsg());
}
// Delete any assets for this section.
// Delete any rules for this section.
$db->setQuery( [[#variable46025b60]]
              .  [[#variable46025ae0]]
              . ' WHERE a.section_id = '
              . (int) $id);
$db->query();
// Check for a database error.
if ($db->getErrorNum()) {
  return new JException($db->getErrorMsg());
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#46025cc0]]
'DELETE a, b FROM `#__access_actions` AS a' 
12[[#46025cc0]]
'DELETE a, b FROM `#__access_assetgroups` AS a' 
21[[#46025ba0]]
' LEFT JOIN `#__access_action_rule_map` AS b ON b.action_id = a.id' 
22[[#46025ba0]]
' LEFT JOIN `#__access_assetgroup_rule_map` AS b ON b.group_id = a.id' 
31[[#46025b60]]
'DELETE a, b, c FROM `#__access_assets` AS a'
. ' LEFT JOIN `#__access_asset_assetgroup_map` AS b ON b.asset_id = a.id' 
32[[#46025b60]]
'DELETE a, b FROM `#__access_rules` AS a' 
41[[#46025ae0]]
' LEFT JOIN `#__access_asset_rule_map` AS c ON c.asset_id = a.id' 
42[[#46025ae0]]
' LEFT JOIN `#__user_rule_map` AS b ON b.rule_id = a.id'