views_autorefresh_handler_argument_date.inc in Views Auto-Refresh 7
File
views/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 empty($created) ? NULL : format_date(strtotime($created), 'custom', $this->format, NULL);
}
function title() {
return empty($this->argument) ? NULL : format_date($this->argument, 'custom', $this->format, NULL);
}
function query($group_by = FALSE) {
$this
->ensure_my_table();
$this->query
->add_where_expression(0, "{$this->table_alias}.{$this->real_field} {$this->operator} :date", array(
':date' => $this->argument,
));
}
}