<?php

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

class Page_Model extends MY_Model {

    function __construct() {
        parent::__construct();
        $this->_primary_key = 'id';
        $this->_table_name = 'page';
    }

    public function savePage($data, $id = NULL) {
        if ($id !== NULL && $id > 0) {
            $data['updated_by'] = $this->session->userdata('owner');
        } else {
            $data['created_by'] = $this->session->userdata('owner');
            ;
        }
        return parent::save($data, $id);
    }

}
