Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
24 | 2 | 4 | 0.965 | statement_sequence[6] |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 24 | 259 | libraries/joomla/access/helper.php |
2 | 23 | 286 | 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()); } |
| ||||
// 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()); } |
| |||
// 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 Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#46025cc0]] | 'DELETE a, b FROM `#__access_actions` AS a' |
1 | 2 | [[#46025cc0]] | 'DELETE a, b FROM `#__access_assetgroups` AS a' |
2 | 1 | [[#46025ba0]] | ' LEFT JOIN `#__access_action_rule_map` AS b ON b.action_id = a.id' |
2 | 2 | [[#46025ba0]] | ' LEFT JOIN `#__access_assetgroup_rule_map` AS b ON b.group_id = a.id' |
3 | 1 | [[#46025b60]] | 'DELETE a, b, c FROM `#__access_assets` AS a' . ' LEFT JOIN `#__access_asset_assetgroup_map` AS b ON b.asset_id = a.id' |
3 | 2 | [[#46025b60]] | 'DELETE a, b FROM `#__access_rules` AS a' |
4 | 1 | [[#46025ae0]] | ' LEFT JOIN `#__access_asset_rule_map` AS c ON c.asset_id = a.id' |
4 | 2 | [[#46025ae0]] | ' LEFT JOIN `#__user_rule_map` AS b ON b.rule_id = a.id' |