Commit 2f216613 authored by David Lesieur's avatar David Lesieur

Fixed zero datestamps.

parent fd2fbbec
......@@ -356,7 +356,7 @@ class datestamp_facet extends date_facet {
$main_column = array_shift($db_info['columns']);
$query->add_table($db_info['table'], 'vid', 'n', 'vid');
$query->add_field(NULL, "YEAR(FROM_UNIXTIME(${db_info['table']}.${main_column['column']}))", $this->_field['field_name'] .'_year');
$query->add_where($db_info['table'] .'.'. $main_column['column'] .' IS NOT NULL');
$query->add_where($db_info['table'] .'.'. $main_column['column'] .' > 0');
$query->add_groupby($this->_field['field_name'] .'_year');
return TRUE;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment