1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32:
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
require_once("Secure_Controller.php");
class Migrate extends Secure_Controller
{
public function __construct()
{
parent::__construct('migrate');
$this->load->library('migration');
}
public function index()
{
$this->load->view('migrate/manage');
}
public function perform_migration()
{
if( ! $this->migration->latest())
{
echo json_encode(array('success' => FALSE, 'message' => $this->lang->line('migrate_failed - ' . $this->migration->error_string())));
}
else
{
echo json_encode(array('success' => TRUE, 'message' => $this->lang->line('migrate_success')));
}
}
}
?>