<?php

/**
 * @version		$Id$
 * @package		ARTIO Booking
 * @subpackage  	tables
 * @copyright		Copyright (C) 2010 ARTIO s.r.o.. All rights reserved.
 * @author 			ARTIO s.r.o., http://www.artio.net
 * @license     	GNU/GPL http://www.gnu.org/copyleft/gpl.html
 * @link        	http://www.artio.net Official website
 */
defined('_JEXEC') or die('Restricted access');

class TableClosingday extends JTable {

    public function __construct(&$db) {
        parent::__construct('#__booking_closingday', 'id', $db);
    }

    public function store($updateNulls = false) {
        $date = JFactory::getDate();
        $user = JFactory::getUser();
        if ($this->id) {
            $this->modified = $date->toSql();
            $this->modified_by = $user->get('id');
        } else {
            $this->created = $date->toSql();
            $this->created_by = $user->get('id');
        }

        return parent::store($updateNulls);
    }

}

?>
