localgovdrupal / localgov_events

Events for LocalGov Drupal.
GNU General Public License v2.0
1 stars 0 forks source link

Fix conditional in hook_views_query_alter() to check if end string ha… #21

Closed finnlewis closed 3 years ago

finnlewis commented 3 years ago

…s length as well as isset. Stops events listing being reduced to just tomorrow in the adsance of a specific end date.

finnlewis commented 3 years ago

Thanks @stephen-cox Agreed on the title and description. I was in a rush. It basically fixes an unintended bug in the listing of events. Applying a filter to the view triggers the 'end' get parameter to be set in the GET string, but with no value. This then sets it to today + 1, limiting the events listings to events today, which is not the intention. The extra check for the length of the string prevents this from happening on empty end dates.