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

(-)a/C4/Reserves.pm (-3 / +2 lines)
Lines 1993-2005 sub MergeHolds { Link Here
1993
        # don't reorder those already waiting
1993
        # don't reorder those already waiting
1994
1994
1995
        $sth = $dbh->prepare(
1995
        $sth = $dbh->prepare(
1996
"SELECT * FROM reserves WHERE biblionumber = ? AND (found <> ? AND found <> ? OR found is NULL) ORDER BY reservedate ASC"
1996
"SELECT * FROM reserves WHERE biblionumber = ? AND (found NOT IN ('W', 'T', 'P') OR found is NULL) ORDER BY reservedate ASC"
1997
        );
1997
        );
1998
        my $upd_sth = $dbh->prepare(
1998
        my $upd_sth = $dbh->prepare(
1999
"UPDATE reserves SET priority = ? WHERE biblionumber = ? AND borrowernumber = ?
1999
"UPDATE reserves SET priority = ? WHERE biblionumber = ? AND borrowernumber = ?
2000
        AND reservedate = ? AND (itemnumber = ? or itemnumber is NULL) "
2000
        AND reservedate = ? AND (itemnumber = ? or itemnumber is NULL) "
2001
        );
2001
        );
2002
        $sth->execute( $to_biblio, 'W', 'T', 'P' );
2002
        $sth->execute( $to_biblio );
2003
        my $priority = 1;
2003
        my $priority = 1;
2004
        while ( my $reserve = $sth->fetchrow_hashref() ) {
2004
        while ( my $reserve = $sth->fetchrow_hashref() ) {
2005
            $upd_sth->execute(
2005
            $upd_sth->execute(
2006
- 

Return to bug 27012