Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
65 | 2 | 1 | 0.999 | statement_sequence[16] |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 65 | 462 | libraries/joomla/access/permission/accesslevel.php |
2 | 65 | 404 | 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 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; |
| ||||
// 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; |
| |||
// 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 Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#52420ec0]] | 'DELETE FROM `#__access_asset_rule_map`' |
1 | 2 | [[#52420ec0]] | 'DELETE FROM `#__access_assetgroup_rule_map`' |