|
Lines 113-119
sub get_daily_quote {
Link Here
|
| 113 |
|
113 |
|
| 114 |
Is a wrapper for get_daily_quote(), with an extra check for using the correct |
114 |
Is a wrapper for get_daily_quote(), with an extra check for using the correct |
| 115 |
interface defined in the syspref 'QuoteOfTheDay'. |
115 |
interface defined in the syspref 'QuoteOfTheDay'. |
| 116 |
If the current interface is not allowed to display quotes, then returns undef. |
116 |
If the current interface is not allowed to display quotes, then returns nothing. |
| 117 |
|
117 |
|
| 118 |
=cut |
118 |
=cut |
| 119 |
|
119 |
|
|
Lines 126-132
sub get_daily_quote_for_interface {
Link Here
|
| 126 |
Koha::Exceptions::UnknownProgramState->throw(error => $cc[3]."()> C4::Context->interface() is not set! Don't know are you in OPAC or staff client?"); |
126 |
Koha::Exceptions::UnknownProgramState->throw(error => $cc[3]."()> C4::Context->interface() is not set! Don't know are you in OPAC or staff client?"); |
| 127 |
} |
127 |
} |
| 128 |
unless ($qotdPref =~ /$interface/) { |
128 |
unless ($qotdPref =~ /$interface/) { |
| 129 |
return undef; |
129 |
return; |
| 130 |
} |
130 |
} |
| 131 |
|
131 |
|
| 132 |
return $self->get_daily_quote(%opts); |
132 |
return $self->get_daily_quote(%opts); |