<commit_before><?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');

class Ride extends CI_Controller {

    /**
     * Ride Page for this controller.
     *
     * Maps to the following URL
     * 		http://rideashare.com/index.php/ride
     * 	- or -  
     * 		http://rideashare.com/index.php/ride/create
     *
     */
    public function __construct() {
        parent::__construct();
        $this->load->model('ride_model');
    }

    public function create() {
        $post = $this->input->post();
        $rideDirty = $post;
        $ridedata = $this->cleanRide($rideDirty);
        $this->ride_model->create($ridedata);
    }

    private function cleanRide($dirtyData) {
        $ride = array();
        if (isset($dirtyData['rdate'])) {
            $ride['rdate'] = $dirtyData['rdate'];
        }
        if (isset($dirtyData['rtime'])) {
            $ride['rtime'] = $dirtyData['rtime'];
        }
        if (isset($dirtyData['host'])) {
            $ride['host'] = $dirtyData['host'];
        }
        if (isset($dirtyData['car_id'])) {
            $ride['car_id'] = $dirtyData['car_id'];
        }
        if (isset($dirtyData['rfrom'])) {
            $ride['rfrom'] = $dirtyData['rfrom'];
        }
        if (isset($dirtyData['rto'])) {
            $ride['rto'] = $dirtyData['rto'];
        }
        if (isset($dirtyData['seat'])) {
            $ride['seats'] = $dirtyData['seats'];
        }
        if (isset($dirtyData['rlate'])) {
            $ride['rlat'] = $dirtyData['rlat'];
        }
        if (isset($dirtyData['rlong'])) {
            $ride['rlong'] = $dirtyData['rlong'];
        }
        return $ride;
    }


<commit_msg>ride feature added<commit_after><?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');

class Ride extends CI_Controller {

    /**
     * Ride Page for this controller.
     *
     * Maps to the following URL
     * 		http://rideashare.com/index.php/ride
     * 	- or -  
     * 		http://rideashare.com/index.php/ride/create
     *
     */
    public function __construct() {
        parent::__construct();
        $this->load->model('ride_model');
    }

    public function create() {
        $post = $this->input->post();
        $rideDirty = $post;
        $ridedata = $this->cleanRide($rideDirty);
        $this->ride_model->create($ridedata);
    }

    private function cleanRide($dirtyData) {
        $ride = array();
        if (isset($dirtyData['rdate'])) {
            $ride['rdate'] = $dirtyData['rdate'];
        }
        if (isset($dirtyData['rtime'])) {
            $ride['rtime'] = $dirtyData['rtime'];
        }
        if (isset($dirtyData['host'])) {
            $ride['host'] = $dirtyData['host'];
        }
        if (isset($dirtyData['car_id'])) {
            $ride['car_id'] = $dirtyData['car_id'];
        }
        if (isset($dirtyData['rfrom'])) {
            $ride['rfrom'] = $dirtyData['rfrom'];
        }
        if (isset($dirtyData['rto'])) {
            $ride['rto'] = $dirtyData['rto'];
        }
        if (isset($dirtyData['seat'])) {
            $ride['seats'] = $dirtyData['seats'];
        }
        if (isset($dirtyData['rlate'])) {
            $ride['rlat'] = $dirtyData['rlat'];
        }
        if (isset($dirtyData['rlong'])) {
            $ride['rlong'] = $dirtyData['rlong'];
        }
        return $ride;
    }



    

{'fraction_non_alphanumeric': 0.19058893163657886, 'fraction_numerical': 0.0, 'mean_word_length': 1.9991126885536823, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5503194', 'n_tokens_mistral': 1080, 'n_tokens_neox': 1057, 'n_words': 168}