| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 43 | 2 | 6 | 0.994 | if_statement |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 43 | 40 | components/com_users/controllers/reset.php |
| 2 | 43 | 169 | components/com_users/controllers/reset.php |
| ||||
// Check for a hard error.
if (JError::isError($return))
{
// Get the error message to display.
if ($app->getCfg('error_reporting')) {
$message= $return->getMessage();
}
else {
$message= JText::_('USERS_RESET_REQUEST_ERROR');
}
// Get the route to the next page.
$itemid= UsersHelperRoute::getResetRoute();
$itemid= $itemid !== NULL
? '&Itemid='
. $itemid
: '';
$route= 'index.php?option=com_users&view=reset'
. $itemid;
// Go back to the request form.
$this->setRedirect(JRoute::_($route, FALSE), $message, 'error');
return FALSE;
}
// The request failed.
elseif ($return === FALSE)
{
// Get the route to the next page.
$itemid= UsersHelperRoute::getResetRoute();
$itemid= $itemid !== NULL
? '&Itemid='
. $itemid
: '';
$route= 'index.php?option=com_users&view=reset'
. $itemid;
// Go back to the request form.
$message= JText::sprintf('USERS_RESET_REQUEST_FAILED', $model->getError());
$this->setRedirect(JRoute::_($route, FALSE), $message, 'notice');
return FALSE;
}
// The request succeeded.
else {
// Get the route to the next page.
$itemid= UsersHelperRoute::getResetRoute();
$itemid= $itemid !== NULL
? '&Itemid='
. $itemid
: '';
$route= 'index.php?option=com_users&view=reset&layout=confirm'
. $itemid;
// Proceed to step two.
$message= JText::_('USERS_RESET_REQUEST_SUCCESS');
$this->setRedirect(JRoute::_($route, FALSE), $message);
return TRUE;
}
|
| ||||
// Check for a hard error.
if (JError::isError($return))
{
// Get the error message to display.
if ($app->getCfg('error_reporting')) {
$message= $return->getMessage();
}
else {
$message= JText::_('USERS_RESET_COMPLETE_ERROR');
}
// Get the route to the next page.
$itemid= UsersHelperRoute::getResetRoute();
$itemid= $itemid !== NULL
? '&Itemid='
. $itemid
: '';
$route= 'index.php?option=com_users&view=reset&layout=complete'
. $itemid;
// Go back to the complete form.
$this->setRedirect(JRoute::_($route, FALSE), $message, 'error');
return FALSE;
}
// Complete failed.
elseif ($return === FALSE)
{
// Get the route to the next page.
$itemid= UsersHelperRoute::getResetRoute();
$itemid= $itemid !== NULL
? '&Itemid='
. $itemid
: '';
$route= 'index.php?option=com_users&view=reset&layout=complete'
. $itemid;
// Go back to the complete form.
$message= JText::sprintf('USERS_RESET_COMPLETE_FAILED', $model->getError());
$this->setRedirect(JRoute::_($route, FALSE), $message, 'notice');
return FALSE;
}
// Complete succeeded.
else {
// Get the route to the next page.
$itemid= UsersHelperRoute::getLoginRoute();
$itemid= $itemid !== NULL
? '&Itemid='
. $itemid
: '';
$route= 'index.php?option=com_users&view=login'
. $itemid;
// Proceed to the login form.
$message= JText::_('USERS_RESET_COMPLETE_SUCCESS');
$this->setRedirect(JRoute::_($route, FALSE), $message);
return TRUE;
}
|
| |||
// Check for a hard error.
if (JError::isError($return)) {
// Get the error message to display.
if ($app->getCfg('error_reporting')) {
$message=$return->getMessage();
}
else {
$message=JText::_( [[#variable479a0640]]);
}
// Get the route to the next page.
$itemid=UsersHelperRoute::getResetRoute();
$itemid=$itemid !== NULL
? '&Itemid='
. $itemid
: '';
$route= [[#variable479a05c0]]
. $itemid;
// Go back to the request form.
// Go back to the complete form.
$this->setRedirect(JRoute::_($route,FALSE),$message,'error');
return FALSE;
}
// The request failed.
// Complete failed.
elseif ($return === FALSE) {
// Get the route to the next page.
$itemid=UsersHelperRoute::getResetRoute();
$itemid=$itemid !== NULL
? '&Itemid='
. $itemid
: '';
$route= [[#variable479a05c0]]
. $itemid;
// Go back to the request form.
// Go back to the complete form.
$message=JText::sprintf( [[#variable479a0560]],$model->getError());
$this->setRedirect(JRoute::_($route,FALSE),$message,'notice');
return FALSE;
}
// The request succeeded.
// Complete succeeded.
else {
// Get the route to the next page.
$itemid=UsersHelperRoute:: [[#variable479a0500]]();
$itemid=$itemid !== NULL
? '&Itemid='
. $itemid
: '';
$route= [[#variable479a0380]]
. $itemid;
// Proceed to step two.
// Proceed to the login form.
$message=JText::_( [[#variable479a02a0]]);
$this->setRedirect(JRoute::_($route,FALSE),$message);
return TRUE;
}
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#479a0640]] | 'USERS_RESET_REQUEST_ERROR' |
| 1 | 2 | [[#479a0640]] | 'USERS_RESET_COMPLETE_ERROR' |
| 2 | 1 | [[#479a05c0]] | 'index.php?option=com_users&view=reset' |
| 2 | 2 | [[#479a05c0]] | 'index.php?option=com_users&view=reset&layout=complete' |
| 3 | 1 | [[#479a0560]] | 'USERS_RESET_REQUEST_FAILED' |
| 3 | 2 | [[#479a0560]] | 'USERS_RESET_COMPLETE_FAILED' |
| 4 | 1 | [[#479a0500]] | getResetRoute |
| 4 | 2 | [[#479a0500]] | getLoginRoute |
| 5 | 1 | [[#479a0380]] | 'index.php?option=com_users&view=reset&layout=confirm' |
| 5 | 2 | [[#479a0380]] | 'index.php?option=com_users&view=login' |
| 6 | 1 | [[#479a02a0]] | 'USERS_RESET_REQUEST_SUCCESS' |
| 6 | 2 | [[#479a02a0]] | 'USERS_RESET_COMPLETE_SUCCESS' |