| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 47 | 2 | 1 | 0.999 | class_member_list[3] |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 47 | 76 | libraries/joomla/database/table/extension.php |
| 2 | 47 | 67 | libraries/joomla/database/table/update.php |
| ||||
/**
* Overloaded check function
*
* @access public
* @return boolean True if the object is ok
* @see JTable:bind
*/
function check() {
// check for valid name
if (trim( $this->name) == ''
|| trim( $this->element) == '') {
$this->setError(JText::sprintf( 'must contain a title', JText::_( 'Extension')));
return FALSE;
}
return TRUE;
}
/**
* Overloaded bind function
*
* @access public
* @param array $hash named array
* @return null|string null is operation was satisfactory, otherwise returns an error
* @see JTable:bind
* @since 1.5
*/
function bind($array, $ignore= '') {
if ( isset ($array['params'])
&& is_array($array['params'])) {
$registry= new JRegistry();
$registry->loadArray($array['params']);
$array['params']= $registry->toString();
}
if ( isset ($array['control'])
&& is_array( $array['control'])) {
$registry= new JRegistry();
$registry->loadArray($array['control']);
$array['control']= $registry->toString();
}
return parent::bind($array, $ignore);
}
function find($options=array()) {
$dbo= & JFactory::getDBO();
$where= array();
foreach ($options as $col => $val) {
$where[]= $col
. ' = '
. $dbo->Quote($val);
}
$query= 'SELECT extension_id FROM #__extensions WHERE '
. implode(' AND ', $where);
$dbo->setQuery($query);
return $dbo->loadResult();
}
|
| ||||
/**
* Overloaded check function
*
* @access public
* @return boolean True if the object is ok
* @see JTable:bind
*/
function check() {
// check for valid name
if (trim( $this->name) == ''
|| trim( $this->element) == '') {
$this->setError(JText::sprintf( 'must contain a title', JText::_( 'Extension')));
return FALSE;
}
return TRUE;
}
/**
* Overloaded bind function
*
* @access public
* @param array $hash named array
* @return null|string null is operation was satisfactory, otherwise returns an error
* @see JTable:bind
* @since 1.5
*/
function bind($array, $ignore= '') {
if ( isset ($array['params'])
&& is_array($array['params'])) {
$registry= new JRegistry();
$registry->loadArray($array['params']);
$array['params']= $registry->toString();
}
if ( isset ($array['control'])
&& is_array( $array['control'])) {
$registry= new JRegistry();
$registry->loadArray($array['control']);
$array['control']= $registry->toString();
}
return parent::bind($array, $ignore);
}
function find($options=array()) {
$dbo= & JFactory::getDBO();
$where= array();
foreach ($options as $col => $val) {
$where[]= $col
. ' = '
. $dbo->Quote($val);
}
$query= 'SELECT update_id FROM #__updates WHERE '
. implode(' AND ', $where);
$dbo->setQuery($query);
return $dbo->loadResult();
}
|
| |||
/**
* Overloaded check function
*
* @access public
* @return boolean True if the object is ok
* @see JTable:bind
*/
function check() {
// check for valid name
if (trim($this->name) == ''
|| trim($this->element) == '') {
$this->setError(JText::sprintf('must contain a title',JText::_('Extension')));
return FALSE;
}
return TRUE;
}
/**
* Overloaded bind function
*
* @access public
* @param array $hash named array
* @return null|string null is operation was satisfactory, otherwise returns an error
* @see JTable:bind
* @since 1.5
*/
function bind($array,$ignore='') {
if ( isset ($array['params'])
&& is_array($array['params'])) {
$registry=new JRegistry();
$registry->loadArray($array['params']);
$array['params']=$registry->toString();
}
if ( isset ($array['control'])
&& is_array($array['control'])) {
$registry=new JRegistry();
$registry->loadArray($array['control']);
$array['control']=$registry->toString();
}
return parent::bind($array,$ignore);
}
function find($options=array()) {
$dbo= &JFactory::getDBO();
$where=array();
foreach ($options as $col => $val) {
$where[]=$col
. ' = '
. $dbo->Quote($val);
}
$query= [[#variable24d6ecc0]]
. implode(' AND ',$where);
$dbo->setQuery($query);
return $dbo->loadResult();
}
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#24d6ecc0]] | 'SELECT update_id FROM #__updates WHERE ' |
| 1 | 2 | [[#24d6ecc0]] | 'SELECT extension_id FROM #__extensions WHERE ' |