CloneSet114


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
32460.968class_member
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
132139
libraries/joomla/access/permission/accesslevel.php
232217
libraries/joomla/access/permission/accesslevel.php
332107
libraries/joomla/access/permission/simplerule.php
432173
libraries/joomla/access/permission/simplerule.php
Clone Instance
1
Line Count
32
Source Line
139
Source File
libraries/joomla/access/permission/accesslevel.php

        /**
         * Method to set the access level section.
         *
         * @access      public
         * @param       mixed   Access section name or id.
         * @return      integer Previous access section id.
         * @since       1.0
         */
        function setSection($section) {

                // Get the old section id.
                $old=  $this->_section_id;

                // Load the action by name if necessary.
                if (!is_int($section))
                {
                        $db=  &$this-> getDbo();
                        $db->setQuery(
                                'SELECT `id`'
                                . ' FROM `#__access_sections`'
                                . ' WHERE `name` = '
                                .                  $db->Quote($section));
                        $sectionId=  (int) $db->loadResult();
                      }
                else {
                        $sectionId=  (int) $section;
                        $db=  &$this-> getDbo();
                        $db->setQuery(
                                'SELECT `name`'
                                . ' FROM `#__access_sections`'
                                . ' WHERE `id` = '
                                .                (int) $sectionId);
                        $section=  $db->loadResult();
                      }

                // Set the new action id and name.
                $this->_section_id = $sectionId;
                $this->_section_name = $section;

                return $old;
              }


Clone Instance
2
Line Count
32
Source Line
217
Source File
libraries/joomla/access/permission/accesslevel.php

        /**
         * Method to set the access level action.
         *
         * @access      public
         * @param       mixed   Access action name or id.
         * @return      integer Previous access action id.
         * @since       1.0
         */
        function setAction($action) {

                // Get the old action id.
                $old=  $this->_action_id;

                // Load the action by name if necessary.
                if (!is_int($action))
                {
                        $db=  &$this-> getDbo();
                        $db->setQuery(
                                'SELECT `id`'
                                . ' FROM `#__access_actions`'
                                . ' WHERE `name` = '
                                .                  $db->Quote($action));
                        $actionId=  (int) $db->loadResult();
                      }
                else {
                        $actionId=  (int) $action;
                        $db=  &$this-> getDbo();
                        $db->setQuery(
                                'SELECT `name`'
                                . ' FROM `#__access_actions`'
                                . ' WHERE `id` = '
                                .                (int) $actionId);
                        $action=  $db->loadResult();
                      }

                // Set the new action id and name.
                $this->_action_id = $actionId;
                $this->_action_name = $action;

                return $old;
              }


Clone Instance
3
Line Count
32
Source Line
107
Source File
libraries/joomla/access/permission/simplerule.php

        /**
         * Method to set the rule section.
         *
         * @access      public
         * @param       mixed   Access section name or id.
         * @return      integer Previous access section id.
         * @since       1.0
         */
        function setSection($section) {

                // Get the old section id.
                $old=  $this->_section_id;

                // Load the action by name if necessary.
                if (!is_int($section))
                {
                        $db=  &$this-> getDbo();
                        $db->setQuery(
                                'SELECT `id`'
                                . ' FROM `#__access_sections`'
                                . ' WHERE `name` = '
                                .                  $db->Quote($section));
                        $sectionId=  (int) $db->loadResult();
                      }
                else {
                        $sectionId=  (int) $section;
                        $db=  &$this->getDbo();
                        $db->setQuery(
                                'SELECT `name`'
                                . ' FROM `#__access_sections`'
                                . ' WHERE `id` = '
                                .                (int) $sectionId);
                        $section=  $db->loadResult();
                      }

                // Set the new action id and name.
                $this->_section_id = $sectionId;
                $this->_section_name = $section;

                return $old;
              }


Clone Instance
4
Line Count
32
Source Line
173
Source File
libraries/joomla/access/permission/simplerule.php

        /**
         * Method to set the rule action.
         *
         * @access      public
         * @param       mixed   Access action name or id.
         * @return      integer Previous access action id.
         * @since       1.0
         */
        function setAction($action) {

                // Get the old action id.
                $old=  $this->_action_id;

                // Load the action by name if necessary.
                if (!is_int($action))
                {
                        $db=  &$this-> getDbo();
                        $db->setQuery(
                                'SELECT `id`'
                                . ' FROM `#__access_actions`'
                                . ' WHERE `name` = '
                                .                  $db->Quote($action));
                        $actionId=  (int) $db->loadResult();
                      }
                else {
                        $actionId=  (int) $action;
                        $db=  &$this->getDbo();
                        $db->setQuery(
                                'SELECT `name`'
                                . ' FROM `#__access_actions`'
                                . ' WHERE `id` = '
                                .                (int) $actionId);
                        $action=  $db->loadResult();
                      }

                // Set the new action id and name.
                $this->_action_id = $actionId;
                $this->_action_name = $action;

                return $old;
              }


Clone AbstractionParameter Count: 6Parameter Bindings

/**
         * Method to set the access level action.
         *
         * @access      public
         * @param       mixed   Access action name or id.
         * @return      integer Previous access action id.
         * @since       1.0
         */
/**
         * Method to set the access level section.
         *
         * @access      public
         * @param       mixed   Access section name or id.
         * @return      integer Previous access section id.
         * @since       1.0
         */
/**
         * Method to set the rule action.
         *
         * @access      public
         * @param       mixed   Access action name or id.
         * @return      integer Previous access action id.
         * @since       1.0
         */
/**
         * Method to set the rule section.
         *
         * @access      public
         * @param       mixed   Access section name or id.
         * @return      integer Previous access section id.
         * @since       1.0
         */
function [[#variable50a814e0]]( [[#variable50a81460]]) {
  // Get the old action id.
  // Get the old section id.
  $old=$this-> [[#variable50a813e0]];
  // Load the action by name if necessary.
  if (!is_int( [[#variable50a81460]])) {
    $db= &$this->getDbo();
    $db->setQuery('SELECT `id`'
                  .  [[#variable50a81380]]
                  . ' WHERE `name` = '
                  . $db->Quote( [[#variable50a81460]]));
     [[#variable50a812c0]]= (int) $db->loadResult();
  }
  else {
     [[#variable50a812c0]]= (int) [[#variable50a81460]];
    $db= &$this->getDbo();
    $db->setQuery('SELECT `name`'
                  .  [[#variable50a81380]]
                  . ' WHERE `id` = '
                  . (int) [[#variable50a812c0]]);
     [[#variable50a81460]]=$db->loadResult();
  }
  // Set the new action id and name.
  $this-> [[#variable50a813e0]]= [[#variable50a812c0]];
  $this-> [[#variable50a812e0]]= [[#variable50a81460]];
  return $old;
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#50a814e0]]
setAction 
12[[#50a814e0]]
setSection 
13[[#50a814e0]]
setAction 
14[[#50a814e0]]
setSection 
21[[#50a81460]]
$action 
22[[#50a81460]]
$section 
23[[#50a81460]]
$action 
24[[#50a81460]]
$section 
31[[#50a813e0]]
_action_id 
32[[#50a813e0]]
_section_id 
33[[#50a813e0]]
_action_id 
34[[#50a813e0]]
_section_id 
41[[#50a81380]]
' FROM `#__access_actions`' 
42[[#50a81380]]
' FROM `#__access_sections`' 
43[[#50a81380]]
' FROM `#__access_actions`' 
44[[#50a81380]]
' FROM `#__access_sections`' 
51[[#50a812c0]]
$actionId 
52[[#50a812c0]]
$sectionId 
53[[#50a812c0]]
$actionId 
54[[#50a812c0]]
$sectionId 
61[[#50a812e0]]
_action_name 
62[[#50a812e0]]
_section_name 
63[[#50a812e0]]
_action_name 
64[[#50a812e0]]
_section_name