The _get_biblio_filters()
function runs the set of years from the database through _biblio_text_year()
which converts the special values 9998 and 9999 to the value of the biblio_inpress_year_text
and biblio_no_year_text
variables, respectively. (By default these are "In Press" and "Submitted".)
This causes those values to render as the human readable values in the filter form generated by biblio_form_filter()
. However, the translated value is passed to biblio_build_query()
which uses the translated value as a database condition.
The result is that the Biblio results page will show all results in the "In Press" or "Submitted" sections when no filters are selected, but choosing one of the filters causes no results to display.
The biblio_build_query()
function should run the supplied year value through _biblio_numeric_year()
before using it as a database condition value and _biblio_numeric_year()
should be updated to take into account custom values for biblio_inpress_year_text
and biblio_no_year_text
.
Comment | File | Size | Author |
---|---|---|---|
#2 | biblio-fix-flitering-custom-year-text-2831249.patch | 1.25 KB | jroberts |
Comments
Comment #2
jroberts CreditAttribution: jroberts at DesignHammer commentedThis patch updates
_biblio_numeric_year()
to translate custom year text values back to their special numeric values. Is also updatesbiblio_build_query()
to run the supplied year filter value through_biblio_numeric_year()
fixing an issue with filtering entries by a custom Year value.