CloneSet146


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
73220.996class_member_list[3]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
17326
administrator/components/com_installer/models/components.php
27326
administrator/components/com_installer/models/manage.php
Clone Instance
1
Line Count
73
Source Line
26
Source File
administrator/components/com_installer/models/components.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;
              }


Clone Instance
2
Line Count
73
Source Line
26
Source File
administrator/components/com_installer/models/manage.php

        /**
         * 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;
              }


Clone AbstractionParameter Count: 2Parameter Bindings

/**
         * 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 Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#512ebc60]]
'component' 
12[[#512ebc60]]
'extension' 
21[[#512ebc40]]
getDbo 
22[[#512ebc40]]
getDBO