| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 31 | 3 | 6 | 0.983 | switch_statement |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 31 | 178 | administrator/components/com_users/controllers/group.php |
| 2 | 31 | 175 | administrator/components/com_users/controllers/level.php |
| 3 | 31 | 182 | administrator/components/com_users/controllers/user.php |
| ||||
// Redirect the user and adjust session state based on the chosen task.
switch ($this->_task) {
case 'apply':
// Set the row data in the session.
$app->setUserState('com_users.edit.group.id', $model->getState('group.id'));
$app->setUserState('com_users.edit.group.data', NULL);
// Redirect back to the edit screen.
$this->setMessage(JText::_('USERS_GROUP_SAVE_SUCCESS'));
$this->setRedirect(JRoute::_('index.php?option=com_users&view=group&layout=edit', FALSE));
break;
case 'save2new':
// Clear the group id and data from the session.
$app->setUserState('com_users.edit.group.id', NULL);
$app->setUserState('com_users.edit.group.data', NULL);
// Redirect back to the edit screen.
$this->setMessage(JText::_('USERS_GROUP_SAVE_SUCCESS'));
$this->setRedirect(JRoute::_('index.php?option=com_users&view=group&layout=edit', FALSE));
break;
default :
// Clear the group id and data from the session.
$app->setUserState('com_users.edit.group.id', NULL);
$app->setUserState('com_users.edit.group.data', NULL);
// Redirect to the list screen.
$this->setMessage(JText::_('USERS_GROUP_SAVE_SUCCESS'));
$this->setRedirect(JRoute::_('index.php?option=com_users&view=groups', FALSE));
break;
}
|
| ||||
// Redirect the user and adjust session state based on the chosen task.
switch ($this->_task) {
case 'apply':
// Set the row data in the session.
$app->setUserState('com_users.edit.level.id', $model->getState('level.id'));
$app->setUserState('com_users.edit.level.data', NULL);
// Redirect back to the edit screen.
$this->setMessage(JText::_('USERS_LEVEL_SAVE_SUCCESS'));
$this->setRedirect(JRoute::_('index.php?option=com_users&view=level&layout=edit', FALSE));
break;
case 'save2new':
// Clear the level id and data from the session.
$app->setUserState('com_users.edit.level.id', NULL);
$app->setUserState('com_users.edit.level.data', NULL);
// Redirect back to the edit screen.
$this->setMessage(JText::_('USERS_LEVEL_SAVE_SUCCESS'));
$this->setRedirect(JRoute::_('index.php?option=com_users&view=level&layout=edit', FALSE));
break;
default :
// Clear the level id and data from the session.
$app->setUserState('com_users.edit.level.id', NULL);
$app->setUserState('com_users.edit.level.data', NULL);
// Redirect to the list screen.
$this->setMessage(JText::_('USERS_LEVEL_SAVE_SUCCESS'));
$this->setRedirect(JRoute::_('index.php?option=com_users&view=levels', FALSE));
break;
}
|
| ||||
// Redirect the user and adjust session state based on the chosen task.
switch ($this->_task) {
case 'apply':
// Set the row data in the session.
$app->setUserState('com_users.edit.user.id', $model->getState('user.id'));
$app->setUserState('com_users.edit.user.data', NULL);
// Redirect back to the edit screen.
$this->setMessage(JText::_('USERS_MEMBER_SAVE_SUCCESS'));
$this->setRedirect(JRoute::_('index.php?option=com_users&view=user&layout=edit', FALSE));
break;
case 'save2new':
// Clear the user id and data from the session.
$app->setUserState('com_users.edit.user.id', NULL);
$app->setUserState('com_users.edit.user.data', NULL);
// Redirect back to the edit screen.
$this->setMessage(JText::_('USERS_MEMBER_SAVE_SUCCESS'));
$this->setRedirect(JRoute::_('index.php?option=com_users&view=user&layout=edit', FALSE));
break;
default :
// Clear the user id and data from the session.
$app->setUserState('com_users.edit.user.id', NULL);
$app->setUserState('com_users.edit.user.data', NULL);
// Redirect to the list screen.
$this->setMessage(JText::_('USERS_MEMBER_SAVE_SUCCESS'));
$this->setRedirect(JRoute::_('index.php?option=com_users&view=users', FALSE));
break;
}
|
| |||
// Redirect the user and adjust session state based on the chosen task.
switch ($this->_task) {
case 'apply':
// Set the row data in the session.
$app->setUserState( [[#variable3c631fc0]],$model->getState( [[#variable3c631f00]]));
$app->setUserState( [[#variable3c631e40]],NULL);
// Redirect back to the edit screen.
$this->setMessage(JText::_( [[#variable3c631dc0]]));
$this->setRedirect(JRoute::_( [[#variable3c631d60]],FALSE));
break;
case 'save2new':
// Clear the group id and data from the session.
// Clear the level id and data from the session.
// Clear the user id and data from the session.
$app->setUserState( [[#variable3c631fc0]],NULL);
$app->setUserState( [[#variable3c631e40]],NULL);
// Redirect back to the edit screen.
$this->setMessage(JText::_( [[#variable3c631dc0]]));
$this->setRedirect(JRoute::_( [[#variable3c631d60]],FALSE));
break;
default :
// Clear the group id and data from the session.
// Clear the level id and data from the session.
// Clear the user id and data from the session.
$app->setUserState( [[#variable3c631fc0]],NULL);
$app->setUserState( [[#variable3c631e40]],NULL);
// Redirect to the list screen.
$this->setMessage(JText::_( [[#variable3c631dc0]]));
$this->setRedirect(JRoute::_( [[#variable3c631d00]],FALSE));
break;
}
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#3c631fc0]] | 'com_users.edit.group.id' |
| 1 | 2 | [[#3c631fc0]] | 'com_users.edit.level.id' |
| 1 | 3 | [[#3c631fc0]] | 'com_users.edit.user.id' |
| 2 | 1 | [[#3c631f00]] | 'group.id' |
| 2 | 2 | [[#3c631f00]] | 'level.id' |
| 2 | 3 | [[#3c631f00]] | 'user.id' |
| 3 | 1 | [[#3c631e40]] | 'com_users.edit.group.data' |
| 3 | 2 | [[#3c631e40]] | 'com_users.edit.level.data' |
| 3 | 3 | [[#3c631e40]] | 'com_users.edit.user.data' |
| 4 | 1 | [[#3c631dc0]] | 'USERS_GROUP_SAVE_SUCCESS' |
| 4 | 2 | [[#3c631dc0]] | 'USERS_LEVEL_SAVE_SUCCESS' |
| 4 | 3 | [[#3c631dc0]] | 'USERS_MEMBER_SAVE_SUCCESS' |
| 5 | 1 | [[#3c631d60]] | 'index.php?option=com_users&view=group&layout=edit' |
| 5 | 2 | [[#3c631d60]] | 'index.php?option=com_users&view=level&layout=edit' |
| 5 | 3 | [[#3c631d60]] | 'index.php?option=com_users&view=user&layout=edit' |
| 6 | 1 | [[#3c631d00]] | 'index.php?option=com_users&view=groups' |
| 6 | 2 | [[#3c631d00]] | 'index.php?option=com_users&view=levels' |
| 6 | 3 | [[#3c631d00]] | 'index.php?option=com_users&view=users' |