Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
32 | 4 | 6 | 0.968 | class_member |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 32 | 139 | libraries/joomla/access/permission/accesslevel.php |
2 | 32 | 217 | libraries/joomla/access/permission/accesslevel.php |
3 | 32 | 107 | libraries/joomla/access/permission/simplerule.php |
4 | 32 | 173 | libraries/joomla/access/permission/simplerule.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; } |
| ||||
/** * 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; } |
| ||||
/** * 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; } |
| ||||
/** * 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; } |
| |||
/** * 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 Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#50a814e0]] | setAction |
1 | 2 | [[#50a814e0]] | setSection |
1 | 3 | [[#50a814e0]] | setAction |
1 | 4 | [[#50a814e0]] | setSection |
2 | 1 | [[#50a81460]] | $action |
2 | 2 | [[#50a81460]] | $section |
2 | 3 | [[#50a81460]] | $action |
2 | 4 | [[#50a81460]] | $section |
3 | 1 | [[#50a813e0]] | _action_id |
3 | 2 | [[#50a813e0]] | _section_id |
3 | 3 | [[#50a813e0]] | _action_id |
3 | 4 | [[#50a813e0]] | _section_id |
4 | 1 | [[#50a81380]] | ' FROM `#__access_actions`' |
4 | 2 | [[#50a81380]] | ' FROM `#__access_sections`' |
4 | 3 | [[#50a81380]] | ' FROM `#__access_actions`' |
4 | 4 | [[#50a81380]] | ' FROM `#__access_sections`' |
5 | 1 | [[#50a812c0]] | $actionId |
5 | 2 | [[#50a812c0]] | $sectionId |
5 | 3 | [[#50a812c0]] | $actionId |
5 | 4 | [[#50a812c0]] | $sectionId |
6 | 1 | [[#50a812e0]] | _action_name |
6 | 2 | [[#50a812e0]] | _section_name |
6 | 3 | [[#50a812e0]] | _action_name |
6 | 4 | [[#50a812e0]] | _section_name |