// Format definitions

This commit is contained in:
rMalie
2011-12-13 13:41:54 +00:00
parent a40f3c304c
commit c022f4e0e5
71 changed files with 710 additions and 1791 deletions
+2 -14
View File
@@ -30,9 +30,6 @@ class DateRangeCore extends ObjectModel
public $time_start;
public $time_end;
/**
* @see ObjectModel::$definition
*/
@@ -40,20 +37,11 @@ class DateRangeCore extends ObjectModel
'table' => 'date_range',
'primary' => 'id_date_range',
'fields' => array(
'time_start' => array('type' => 'FILL_ME', 'validate' => 'isDate', 'required' => true),
'time_end' => array('type' => 'FILL_ME', 'validate' => 'isDate', 'required' => true),
'time_start' => array('type' => self::TYPE_DATE, 'validate' => 'isDate', 'required' => true),
'time_end' => array('type' => self::TYPE_DATE, 'validate' => 'isDate', 'required' => true),
),
);
public function getFields()
{
$this->validateFields();
$fields['time_start'] = pSQL($this->time_start);
$fields['time_end'] = pSQL($this->time_end);
return $fields;
}
public static function getCurrentRange()
{
$result = Db::getInstance()->getRow('