| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 20 | 2 | 1 | 0.998 | statement_sequence[7] |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 20 | 63 | libraries/joomla/form/rules/email.php |
| 2 | 20 | 37 | libraries/joomla/form/rules/username.php |
| ||||
$key= $field->attributes('field');
$value= isset ($values[$key])
? $values[$key]
: 0;
// Check the rule.
if (!$key) {
return new JException('Invalid Form Rule :: '
. get_class($this));
}
// Check if the username is unique.
$db= &JFactory::getDbo();
$db->setQuery(
'SELECT count(*) FROM `#__users`'
. ' WHERE `email` = '
. $db->Quote($values[$name])
. ' AND '
. $db->nameQuote($key)
. ' != '
. $db->Quote($value));
$duplicate= (bool) $db->loadResult();
// Check for a database error.
if ($db->getErrorNum()) {
return new JException('Database Error :: '
. $db->getErrorMsg());
}
|
| ||||
$key= $field->attributes('field');
$value= isset ($values[$key])
? $values[$key]
: 0;
// Check the rule.
if (!$key) {
return new JException('Invalid Form Rule :: '
. get_class($this));
}
// Check if the username is unique.
$db= &JFactory::getDbo();
$db->setQuery(
'SELECT count(*) FROM `#__users`'
. ' WHERE `username` = '
. $db->Quote($values[$name])
. ' AND '
. $db->nameQuote($key)
. ' != '
. $db->Quote($value));
$duplicate= (bool) $db->loadResult();
// Check for a database error.
if ($db->getErrorNum()) {
return new JException('Database Error :: '
. $db->getErrorMsg());
}
|
| |||
$key=$field->attributes('field');
$value= isset ($values[$key])
? $values[$key]
: 0;
// Check the rule.
if (!$key) {
return new JException('Invalid Form Rule :: '
. get_class($this));
}
// Check if the username is unique.
$db= &JFactory::getDbo();
$db->setQuery('SELECT count(*) FROM `#__users`'
. [[#variable4e4d4e00]]
. $db->Quote($values[$name])
. ' AND '
. $db->nameQuote($key)
. ' != '
. $db->Quote($value));
$duplicate= (bool) $db->loadResult();
// Check for a database error.
if ($db->getErrorNum()) {
return new JException('Database Error :: '
. $db->getErrorMsg());
}
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#4e4d4e00]] | ' WHERE `username` = ' |
| 1 | 2 | [[#4e4d4e00]] | ' WHERE `email` = ' |