View | Details | Raw Unified | Return to bug 16805
Collapse All | Expand All

(-)a/C4/Letters.pm (-5 / +4 lines)
Lines 312-332 sub delalert { Link Here
312
sub getalert {
312
sub getalert {
313
    my ( $borrowernumber, $type, $externalid ) = @_;
313
    my ( $borrowernumber, $type, $externalid ) = @_;
314
    my $dbh   = C4::Context->dbh;
314
    my $dbh   = C4::Context->dbh;
315
    my $query = "SELECT a.*, b.branchcode FROM alert a JOIN borrowers b USING(borrowernumber) WHERE";
315
    my $query = "SELECT a.*, b.branchcode FROM alert a JOIN borrowers b USING(borrowernumber) WHERE 1";
316
    my @bind;
316
    my @bind;
317
    if ($borrowernumber and $borrowernumber =~ /^\d+$/) {
317
    if ($borrowernumber and $borrowernumber =~ /^\d+$/) {
318
        $query .= " borrowernumber=? AND ";
318
        $query .= " AND borrowernumber=?";
319
        push @bind, $borrowernumber;
319
        push @bind, $borrowernumber;
320
    }
320
    }
321
    if ($type) {
321
    if ($type) {
322
        $query .= " type=? AND ";
322
        $query .= " AND type=?";
323
        push @bind, $type;
323
        push @bind, $type;
324
    }
324
    }
325
    if ($externalid) {
325
    if ($externalid) {
326
        $query .= " externalid=? AND ";
326
        $query .= " AND externalid=?";
327
        push @bind, $externalid;
327
        push @bind, $externalid;
328
    }
328
    }
329
    $query =~ s/ AND $//;
330
    my $sth = $dbh->prepare($query);
329
    my $sth = $dbh->prepare($query);
331
    $sth->execute(@bind);
330
    $sth->execute(@bind);
332
    return $sth->fetchall_arrayref({});
331
    return $sth->fetchall_arrayref({});
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt (+12 lines)
Lines 27-32 Link Here
27
            </div>
27
            </div>
28
            <div class="span10">
28
            <div class="span10">
29
                <div id="userdetails" class="maincontent">
29
                <div id="userdetails" class="maincontent">
30
31
                    [% IF adminWarning %]
32
                        <div id="adminwarning" class="dialog alert">
33
                            <p>
34
<strong><i class="fa fa-exclamation-triangle"> </i> Warning:</strong>
35
You are logged in as the database administrative user. This is not recommended because some parts of Koha will not function as expected when using this account. Please log in instead with a regular account.
36
<a class="btn btn-small" href="/cgi-bin/koha/opac-main.pl?logout.x=1">
37
<i class="fa fa-sign-out"> </i> Log out</a>
38
                            </p>
39
                        </div>
40
                    [% END %]
41
30
                    [% IF ( bor_messages ) %]
42
                    [% IF ( bor_messages ) %]
31
                        <div class="alert alert-info">
43
                        <div class="alert alert-info">
32
                            <h3>Messages for you</h3>
44
                            <h3>Messages for you</h3>
(-)a/opac/opac-user.pl (-1 / +4 lines)
Lines 80-85 my $canrenew = 1; Link Here
80
80
81
$template->param( shibbolethAuthentication => C4::Context->config('useshibboleth') );
81
$template->param( shibbolethAuthentication => C4::Context->config('useshibboleth') );
82
82
83
if (!$borrowernumber) {
84
    $template->param( adminWarning => 1 );
85
}
86
83
# get borrower information ....
87
# get borrower information ....
84
my ( $borr ) = GetMemberDetails( $borrowernumber );
88
my ( $borr ) = GetMemberDetails( $borrowernumber );
85
89
86
- 

Return to bug 16805