@@ -, +, @@ --- Koha/Quote.pm | 4 ++-- Koha/Quotes.pm | 4 ++++ koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref | 2 +- koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) --- a/Koha/Quote.pm +++ a/Koha/Quote.pm @@ -113,7 +113,7 @@ sub get_daily_quote { Is a wrapper for get_daily_quote(), with an extra check for using the correct interface defined in the syspref 'QuoteOfTheDay'. -If the current interface is not allowed to display quotes, then returns undef. +If the current interface is not allowed to display quotes, then returns nothing. =cut @@ -126,7 +126,7 @@ sub get_daily_quote_for_interface { Koha::Exceptions::UnknownProgramState->throw(error => $cc[3]."()> C4::Context->interface() is not set! Don't know are you in OPAC or staff client?"); } unless ($qotdPref =~ /$interface/) { - return undef; + return; } return $self->get_daily_quote(%opts); --- a/Koha/Quotes.pm +++ a/Koha/Quotes.pm @@ -41,6 +41,10 @@ sub _type { return 'Quote'; } +=head3 object_class + +=cut + sub object_class { return 'Koha::Quote'; } --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref @@ -518,7 +518,7 @@ OPAC: - Show quote of the day in the - pref: QuoteOfTheDay multiple: - intranet: staff client + intranet: staff interface opac: OPAC - main page. - --- a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt @@ -38,7 +38,7 @@

Quote of the Day

- [% daily_quote.text %] ~ [% daily_quote.source %] + [% daily_quote.text | html %] ~ [% daily_quote.source | html %]
[% END %] --