Example #1
0
 /**
  * Migrate
  *
  * @return	none
  * @since	2.5.0
  */
 function getMigrate($table = false, $json = true)
 {
     $table = $table == false ? JRequest::getVar('table') : $table;
     $step = $this->_getStep($table);
     $process = jUpgrade::getInstance($step);
     $process->upgrade();
     $step = $this->_getStep($table);
     // Getting the total
     $total = $process->getTotal();
     if ($total <= $step->cid) {
         $step->last = true;
         $this->_updateStep($step, 2, false, $total);
     }
     unset($step->cache);
     unset($step->status);
     unset($step->laststep);
     unset($step->class);
     unset($step->extension);
     // Encoding
     if ($json == true) {
         $return = json_encode($step);
     } else {
         $return = $step;
     }
     return $return;
 }