public function up()
 {
     if (!$this->db->field_exists('description', 'locations')) {
         $this->dbforge->add_column('locations', array('description' => array('type' => 'TEXT', 'null' => TRUE)));
     }
     $lm = new Location_model();
     $lm->reinitialize_model();
 }
 function get_map_data()
 {
     $obj = new View();
     if (!$this->authorized()) {
         $obj->view('json', array('msg' => 'Not authorized'));
         return;
     }
     $location = new Location_model();
     $obj->view('json', array('msg' => $location->get_map_data()));
 }
	<?php 
    $error = form_error($f['name']);
    $class = $error ? ' error' : '';
    $skip_me = FALSE;
    switch ($f['name']) {
        case 'group_output':
            $lm = new Location_model();
            if ($countries = $lm->get_countries()) {
            } else {
                unset($f['options']['country']);
                unset($f['options']['country_city']);
                unset($f['options']['country_state']);
            }
            break;
        case 'choose_country':
            $lm = new Location_model();
            if ($countries = $lm->get_countries()) {
                $f['help'] = join(', ', $countries);
            } else {
                $skip_me = TRUE;
            }
            break;
    }
    if ($skip_me) {
        continue;
    }
    ?>
	<div class="control-group<?php 
    echo $class;
    ?>
">