| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 22 | 4 | 6 | 0.958 | class_member |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 22 | 129 | administrator/components/com_redirect/controllers/link.php |
| 2 | 22 | 217 | administrator/components/com_users/controllers/group.php |
| 3 | 22 | 214 | administrator/components/com_users/controllers/level.php |
| 4 | 22 | 259 | administrator/components/com_users/controllers/user.php |
| ||||
/**
* Method to delete redirect links.
*
* @access public
* @return void
* @since 1.6
*/
function delete() {
// Check for request forgeries.
JRequest::checkToken() or jexit(JText::_('Invalid_Token'));
// Get and sanitize the items to delete.
$cid= JRequest::getVar('cid', NULL, 'post', 'array');
JArrayHelper::toInteger($cid);
// Get the model.
$model= &$this-> getModel('Link', 'RedirectModel');
// Attempt to delete the item(s).
if (!$model->delete($cid)) {
$this->setMessage(JText::sprintf('Redirect_Link_Delete_Failed', $model->getError()), 'notice');
}
else {
$this->setMessage(JText::sprintf('Redirect_Link_Delete_Success', count($cid)));
}
// Redirect to the list screen.
$this->setRedirect(JRoute::_('index.php?option=com_redirect&view=links', FALSE));
}
|
| ||||
/**
* Method to delete groups.
*
* @return void
*/
public
function delete() {
// Check for request forgeries.
JRequest::checkToken() or jexit(JText::_('JInvalid_Token'));
// Get and sanitize the items to delete.
$cid= JRequest::getVar('cid', NULL, 'post', 'array');
JArrayHelper::toInteger($cid);
// Get the model.
$model= &$this->getModel('Group');
// Attempt to delete the item(s).
if (!$model->delete($cid)) {
$this->setMessage(JText::sprintf('USERS_GROUP_DELETE_FAILED', $model->getError()), 'notice');
}
else {
$this->setMessage(JText::sprintf('USERS_GROUP_DELETE_SUCCESS', count($cid)));
}
// Redirect to the list screen.
$this->setRedirect(JRoute::_('index.php?option=com_users&view=groups', FALSE));
}
|
| ||||
/**
* Method to delete access levels.
*
* @return void
*/
public
function delete() {
// Check for request forgeries.
JRequest::checkToken() or jexit(JText::_('JInvalid_Token'));
// Get and sanitize the items to delete.
$cid= JRequest::getVar('cid', NULL, 'post', 'array');
JArrayHelper::toInteger($cid);
// Get the model.
$model= &$this->getModel('Level');
// Attempt to delete the item(s).
if (!$model->delete($cid)) {
$this->setMessage(JText::sprintf('USERS_LEVEL_DELETE_FAILED', $model->getError()), 'notice');
}
else {
$this->setMessage(JText::sprintf('USERS_LEVEL_DELETE_SUCCESS', count($cid)));
}
// Redirect to the list screen.
$this->setRedirect(JRoute::_('index.php?option=com_users&view=levels', FALSE));
}
|
| ||||
/**
* Method to delete users.
*
* @return void
*/
public
function delete() {
// Check for request forgeries.
JRequest::checkToken() or jexit(JText::_('JInvalid_Token'));
// Get and sanitize the items to delete.
$cid= JRequest::getVar('cid', NULL, 'post', 'array');
JArrayHelper::toInteger($cid);
// Get the model.
$model= &$this->getModel('User');
// Attempt to delete the item(s).
if (!$model->delete($cid)) {
$this->setMessage(JText::sprintf('USERS_MEMBER_DELETE_FAILED', $model->getError()), 'notice');
}
else {
$this->setMessage(JText::sprintf('USERS_MEMBER_DELETE_SUCCESS', count($cid)));
}
// Redirect to the list screen.
$this->setRedirect(JRoute::_('index.php?option=com_users&view=users', FALSE));
}
|
| |||
[[#variable4fb9fc00]]
/**
* Method to delete redirect links.
*
* @access public
* @return void
* @since 1.6
*/
function delete() {
// Check for request forgeries.
JRequest::checkToken() or jexit(JText::_( [[#variable4fb9fb80]]));
// Get and sanitize the items to delete.
$cid=JRequest::getVar('cid',NULL,'post','array');
JArrayHelper::toInteger($cid);
// Get the model.
$model= &$this->getModel( [[#variable4fb9fb60]]);
// Attempt to delete the item(s).
if (!$model->delete($cid)) {
$this->setMessage(JText::sprintf( [[#variable4fb9fac0]],$model->getError()),'notice');
}
else {
$this->setMessage(JText::sprintf( [[#variable53dd9c20]],count($cid)));
}
// Redirect to the list screen.
$this->setRedirect(JRoute::_( [[#variable4fb9fa60]],FALSE));
}
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#4fb9fc00]] | /** * Method to delete users. * * @return void */ public |
| 1 | 2 | [[#4fb9fc00]] | /** * Method to delete access levels. * * @return void */ public |
| 1 | 3 | [[#4fb9fc00]] | /** * Method to delete groups. * * @return void */ public |
| 1 | 4 | [[#4fb9fc00]] | |
| 2 | 1 | [[#4fb9fb80]] | 'JInvalid_Token' |
| 2 | 2 | [[#4fb9fb80]] | 'JInvalid_Token' |
| 2 | 3 | [[#4fb9fb80]] | 'JInvalid_Token' |
| 2 | 4 | [[#4fb9fb80]] | 'Invalid_Token' |
| 3 | 1 | [[#4fb9fb60]] | 'User' |
| 3 | 2 | [[#4fb9fb60]] | 'Level' |
| 3 | 3 | [[#4fb9fb60]] | 'Group' |
| 3 | 4 | [[#4fb9fb60]] | 'Link','RedirectModel' |
| 4 | 1 | [[#4fb9fac0]] | 'USERS_MEMBER_DELETE_FAILED' |
| 4 | 2 | [[#4fb9fac0]] | 'USERS_LEVEL_DELETE_FAILED' |
| 4 | 3 | [[#4fb9fac0]] | 'USERS_GROUP_DELETE_FAILED' |
| 4 | 4 | [[#4fb9fac0]] | 'Redirect_Link_Delete_Failed' |
| 5 | 1 | [[#53dd9c20]] | 'USERS_MEMBER_DELETE_SUCCESS' |
| 5 | 2 | [[#53dd9c20]] | 'USERS_LEVEL_DELETE_SUCCESS' |
| 5 | 3 | [[#53dd9c20]] | 'USERS_GROUP_DELETE_SUCCESS' |
| 5 | 4 | [[#53dd9c20]] | 'Redirect_Link_Delete_Success' |
| 6 | 1 | [[#4fb9fa60]] | 'index.php?option=com_users&view=users' |
| 6 | 2 | [[#4fb9fa60]] | 'index.php?option=com_users&view=levels' |
| 6 | 3 | [[#4fb9fa60]] | 'index.php?option=com_users&view=groups' |
| 6 | 4 | [[#4fb9fa60]] | 'index.php?option=com_redirect&view=links' |