views_autorefresh_handler_argument_date.inc in Views Hacks 6
File
views_autorefresh/views_autorefresh_handler_argument_date.inc
View source
<?php
class views_autorefresh_handler_argument_date extends views_handler_argument {
function construct() {
parent::construct();
$this->format = 'r';
$this->operator = '>';
}
function summary_name($data) {
$created = $data->{$this->name_alias};
return format_date(strtotime($created), 'custom', $this->format, 0);
}
function title() {
return format_date(strtotime($this->argument), 'custom', $this->format, 0);
}
function query() {
$this
->ensure_my_table();
$this->query
->add_where(0, "{$this->table_alias}.{$this->real_field} {$this->operator} %d", $this->argument);
}
}