diff --git a/date_views/includes/date_views_argument_handler.inc b/date_views/includes/date_views_argument_handler.inc index 20eedff..5094d2a 100644 --- a/date_views/includes/date_views_argument_handler.inc +++ b/date_views/includes/date_views_argument_handler.inc @@ -165,14 +165,11 @@ class date_views_argument_handler extends date_views_argument_handler_simple { $this->real_field = $field['field_name']; $this->table = $field['table_name']; $this->original_table = $field['table_name']; - if ($field['table_name'] != $this->table || !empty($this->relationship)) { - $this->table = $this->query->ensure_table($field['table_name'], $this->relationship); - } - // $this->table_alias gets set when the first field is processed if otherwise empty. - // For subsequent fields, we need to be sure it is emptied again. - elseif (empty($this->relationship)) { - $this->table_alias = NULL; - } + + // Reset this table_alias to let ensure_my_table() set it. + $this->table_alias = NULL; + $this->ensure_my_table(); + parent::query($group_by); $this->placeholders = array_merge($this->placeholders, $this->date_handler->placeholders);