CloneSet75


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
22460.958class_member
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
122129
administrator/components/com_redirect/controllers/link.php
222217
administrator/components/com_users/controllers/group.php
322214
administrator/components/com_users/controllers/level.php
422259
administrator/components/com_users/controllers/user.php
Clone Instance
1
Line Count
22
Source Line
129
Source File
administrator/components/com_redirect/controllers/link.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));
              }


Clone Instance
2
Line Count
22
Source Line
217
Source File
administrator/components/com_users/controllers/group.php

        /**
         * 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));
              }


Clone Instance
3
Line Count
22
Source Line
214
Source File
administrator/components/com_users/controllers/level.php

        /**
         * 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));
              }


Clone Instance
4
Line Count
22
Source Line
259
Source File
administrator/components/com_users/controllers/user.php

        /**
         * 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));
              }


Clone AbstractionParameter Count: 6Parameter Bindings

 [[#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 Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#4fb9fc00]]
/**
 * Method to delete users.
 *
 * @return      void
 */
public 
12[[#4fb9fc00]]
/**
 * Method to delete access levels.
 *
 * @return      void
 */
public 
13[[#4fb9fc00]]
/**
 * Method to delete groups.
 *
 * @return      void
 */
public 
14[[#4fb9fc00]]
21[[#4fb9fb80]]
'JInvalid_Token' 
22[[#4fb9fb80]]
'JInvalid_Token' 
23[[#4fb9fb80]]
'JInvalid_Token' 
24[[#4fb9fb80]]
'Invalid_Token' 
31[[#4fb9fb60]]
'User' 
32[[#4fb9fb60]]
'Level' 
33[[#4fb9fb60]]
'Group' 
34[[#4fb9fb60]]
'Link','RedirectModel' 
41[[#4fb9fac0]]
'USERS_MEMBER_DELETE_FAILED' 
42[[#4fb9fac0]]
'USERS_LEVEL_DELETE_FAILED' 
43[[#4fb9fac0]]
'USERS_GROUP_DELETE_FAILED' 
44[[#4fb9fac0]]
'Redirect_Link_Delete_Failed' 
51[[#53dd9c20]]
'USERS_MEMBER_DELETE_SUCCESS' 
52[[#53dd9c20]]
'USERS_LEVEL_DELETE_SUCCESS' 
53[[#53dd9c20]]
'USERS_GROUP_DELETE_SUCCESS' 
54[[#53dd9c20]]
'Redirect_Link_Delete_Success' 
61[[#4fb9fa60]]
'index.php?option=com_users&view=users' 
62[[#4fb9fa60]]
'index.php?option=com_users&view=levels' 
63[[#4fb9fa60]]
'index.php?option=com_users&view=groups' 
64[[#4fb9fa60]]
'index.php?option=com_redirect&view=links'