@@ -, +, @@ --------- -- dies before finishing tests -- dies before finishing tests -- 'addalert' is changed to 'getalert' -- see error given in comment #0 -- says 'getalert' -- all tests pass. -- logs in, but gives warning with a nice logout button. Works as I've tested above. Hector tested older test plan which was steps 5,6,8 and 9. Revised test plan again while tweaking to address comment #9. --- C4/Letters.pm | 9 ++++----- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt | 12 ++++++++++++ opac/opac-user.pl | 4 ++++ 3 files changed, 20 insertions(+), 5 deletions(-) --- a/C4/Letters.pm +++ a/C4/Letters.pm @@ -312,21 +312,20 @@ sub delalert { sub getalert { my ( $borrowernumber, $type, $externalid ) = @_; my $dbh = C4::Context->dbh; - my $query = "SELECT a.*, b.branchcode FROM alert a JOIN borrowers b USING(borrowernumber) WHERE"; + my $query = "SELECT a.*, b.branchcode FROM alert a JOIN borrowers b USING(borrowernumber) WHERE 1"; my @bind; if ($borrowernumber and $borrowernumber =~ /^\d+$/) { - $query .= " borrowernumber=? AND "; + $query .= " AND borrowernumber=?"; push @bind, $borrowernumber; } if ($type) { - $query .= " type=? AND "; + $query .= " AND type=?"; push @bind, $type; } if ($externalid) { - $query .= " externalid=? AND "; + $query .= " AND externalid=?"; push @bind, $externalid; } - $query =~ s/ AND $//; my $sth = $dbh->prepare($query); $sth->execute(@bind); return $sth->fetchall_arrayref({}); --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt +++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt @@ -27,6 +27,18 @@
+ + [% IF adminWarning %] +
+

+ Warning: +Using this account is not recommended because some parts of Koha will not function as expected. Instead, please log in with a different account. + + Log out +

+
+ [% END %] + [% IF ( bor_messages ) %]

Messages for you

--- a/opac/opac-user.pl +++ a/opac/opac-user.pl @@ -80,6 +80,10 @@ my $canrenew = 1; $template->param( shibbolethAuthentication => C4::Context->config('useshibboleth') ); +if (!$borrowernumber) { + $template->param( adminWarning => 1 ); +} + # get borrower information .... my ( $borr ) = GetMemberDetails( $borrowernumber ); --