Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
73 | 2 | 2 | 0.996 | class_member_list[3] |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 73 | 26 | administrator/components/com_installer/models/components.php |
2 | 73 | 26 | administrator/components/com_installer/models/manage.php |
| ||||
/** * Extension Type * @var string */ var $_type= 'component'; /** * Enable a component * * @static * @return boolean True on success * @since 1.0 */ function enable($eid=array()) { // Initialize variables $result= FALSE; /* * Ensure eid is an array of extension ids * TODO: If it isn't an array do we want to set an error and fail? */ if (!is_array($eid)) { $eid= array( $eid); } // Get a database connector $db= &JFactory::getDbo(); // Get a table object for the extension type $table= & JTable::getInstance($this->_type); // Enable the extension in the table and store it in the database foreach ($eid as $id) { $table->load($id); $table->enabled = '1'; $result |= $table->store(); } return $result; } /** * Disable a component * * @return boolean True on success * @since 1.5 */ function disable($eid=array()) { // Initialize variables $result= FALSE; /* * Ensure eid is an array of extension ids * TODO: If it isn't an array do we want to set an error and fail? */ if (!is_array($eid)) { $eid= array( $eid); } // Get a database connector $db= &JFactory::getDbo(); // Get a table object for the extension type $table= & JTable::getInstance($this->_type); // Disable the extension in the table and store it in the database foreach ($eid as $id) { $table->load($id); $table->enabled = '0'; $result |= $table->store(); } return $result; } |
| ||||
/** * Extension Type * @var string */ var $_type= 'extension'; /** * Enable an extension * * @static * @return boolean True on success * @since 1.0 */ function enable($eid=array()) { // Initialize variables $result= FALSE; /* * Ensure eid is an array of extension ids * TODO: If it isn't an array do we want to set an error and fail? */ if (!is_array($eid)) { $eid= array( $eid); } // Get a database connector $db= & JFactory::getDBO(); // Get a table object for the extension type $table= & JTable::getInstance($this->_type); // Enable the extension in the table and store it in the database foreach ($eid as $id) { $table->load($id); $table->enabled = '1'; $result |= $table->store(); } return $result; } /** * Disable an extension * * @return boolean True on success * @since 1.5 */ function disable($eid=array()) { // Initialize variables $result= FALSE; /* * Ensure eid is an array of extension ids * TODO: If it isn't an array do we want to set an error and fail? */ if (!is_array($eid)) { $eid= array( $eid); } // Get a database connector $db= & JFactory::getDBO(); // Get a table object for the extension type $table= & JTable::getInstance($this->_type); // Disable the extension in the table and store it in the database foreach ($eid as $id) { $table->load($id); $table->enabled = '0'; $result |= $table->store(); } return $result; } |
| |||
/** * Extension Type * @var string */ var $_type= [[#variable512ebc60]]; /** * Enable a component * * @static * @return boolean True on success * @since 1.0 */ /** * Enable an extension * * @static * @return boolean True on success * @since 1.0 */ function enable($eid=array()) { // Initialize variables $result=FALSE; /* * Ensure eid is an array of extension ids * TODO: If it isn't an array do we want to set an error and fail? */ if (!is_array($eid)) { $eid=array($eid); } // Get a database connector $db= &JFactory:: [[#variable512ebc40]](); // Get a table object for the extension type $table= &JTable::getInstance($this->_type); // Enable the extension in the table and store it in the database foreach ($eid as $id) { $table->load($id); $table->enabled ='1'; $result |= $table->store(); } return $result; } /** * Disable a component * * @return boolean True on success * @since 1.5 */ /** * Disable an extension * * @return boolean True on success * @since 1.5 */ function disable($eid=array()) { // Initialize variables $result=FALSE; /* * Ensure eid is an array of extension ids * TODO: If it isn't an array do we want to set an error and fail? */ if (!is_array($eid)) { $eid=array($eid); } // Get a database connector $db= &JFactory:: [[#variable512ebc40]](); // Get a table object for the extension type $table= &JTable::getInstance($this->_type); // Disable the extension in the table and store it in the database foreach ($eid as $id) { $table->load($id); $table->enabled ='0'; $result |= $table->store(); } return $result; } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#512ebc60]] | 'component' |
1 | 2 | [[#512ebc60]] | 'extension' |
2 | 1 | [[#512ebc40]] | getDbo |
2 | 2 | [[#512ebc40]] | getDBO |