Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
19 | 3 | 2 | 0.995 | class_member |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 19 | 149 | administrator/components/com_redirect/models/link.php |
2 | 19 | 178 | administrator/components/com_redirect/models/link.php |
3 | 19 | 207 | administrator/components/com_redirect/models/link.php |
| ||||
/** * Method to publish links. * * @access public * @param array The ids of the items to publish. * @return boolean True on success. * @since 1.6 */ function publish($linkId) { // Sanitize the ids. $linkId= (array) $linkId; JArrayHelper::toInteger($linkId); // Get the current user object. $user= & JFactory::getUser(); // Get a link row instance. $table= &$this-> getTable('Link', 'RedirectTable'); // Attempt to publish the items. if (!$table->publish($linkId, 1, $user->get('id'))) { $this->setError($table->getError()); return FALSE; } return TRUE; } |
| ||||
/** * Method to unpublish links. * * @access public * @param array The ids of the items to unpublish. * @return boolean True on success. * @since 1.6 */ function unpublish($linkId) { // Sanitize the ids. $linkId= (array) $linkId; JArrayHelper::toInteger($linkId); // Get the current user object. $user= & JFactory::getUser(); // Get a link row instance. $table= &$this-> getTable('Link', 'RedirectTable'); // Attempt to unpublish the items. if (!$table->publish($linkId, 0, $user->get('id'))) { $this->setError($table->getError()); return FALSE; } return TRUE; } |
| ||||
/** * Method to archive links. * * @access public * @param array The ids of the items to unpublish. * @return boolean True on success. * @since 1.6 */ function archive($linkId) { // Sanitize the ids. $linkId= (array) $linkId; JArrayHelper::toInteger($linkId); // Get the current user object. $user= & JFactory::getUser(); // Get a link row instance. $table= &$this-> getTable('Link', 'RedirectTable'); // Attempt to unpublish the items. if (!$table->publish($linkId, 2, $user->get('id'))) { $this->setError($table->getError()); return FALSE; } return TRUE; } |
| |||
/** * Method to archive links. * * @access public * @param array The ids of the items to unpublish. * @return boolean True on success. * @since 1.6 */ /** * Method to unpublish links. * * @access public * @param array The ids of the items to unpublish. * @return boolean True on success. * @since 1.6 */ /** * Method to publish links. * * @access public * @param array The ids of the items to publish. * @return boolean True on success. * @since 1.6 */ function [[#variable52344ae0]]($linkId) { // Sanitize the ids. $linkId= (array) $linkId; JArrayHelper::toInteger($linkId); // Get the current user object. $user= &JFactory::getUser(); // Get a link row instance. $table= &$this->getTable('Link','RedirectTable'); // Attempt to unpublish the items. // Attempt to publish the items. if (!$table->publish($linkId, [[#variable52344ac0]],$user->get('id'))) { $this->setError($table->getError()); return FALSE; } return TRUE; } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#52344ae0]] | archive |
1 | 2 | [[#52344ae0]] | unpublish |
1 | 3 | [[#52344ae0]] | publish |
2 | 1 | [[#52344ac0]] | 2 |
2 | 2 | [[#52344ac0]] | 0 |
2 | 3 | [[#52344ac0]] | 1 |