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

(-)a/C4/Reserves.pm (-1 / +1 lines)
Lines 1157-1163 sub ModReserve { Link Here
1157
1157
1158
        if ( defined( $suspend_until ) ) {
1158
        if ( defined( $suspend_until ) ) {
1159
            if ( $suspend_until ) {
1159
            if ( $suspend_until ) {
1160
                $suspend_until = eval { output_pref( { dt => dt_from_string( $suspend_until ), dateonly => 1 }); };
1160
                $suspend_until = eval { output_pref( { dt => dt_from_string( $suspend_until ), dateonly => 1, dateformat => 'iso' }); };
1161
                $dbh->do("UPDATE reserves SET suspend = 1, suspend_until = ? WHERE reserve_id = ?", undef, ( $suspend_until, $reserve_id ) );
1161
                $dbh->do("UPDATE reserves SET suspend = 1, suspend_until = ? WHERE reserve_id = ?", undef, ( $suspend_until, $reserve_id ) );
1162
            } else {
1162
            } else {
1163
                $dbh->do("UPDATE reserves SET suspend_until = NULL WHERE reserve_id = ?", undef, ( $reserve_id ) );
1163
                $dbh->do("UPDATE reserves SET suspend_until = NULL WHERE reserve_id = ?", undef, ( $reserve_id ) );
(-)a/t/db_dependent/Holds.t (-2 / +1 lines)
Lines 137-143 ModReserve({ Link Here
137
$reserve = GetReserve( $reserve_id );
137
$reserve = GetReserve( $reserve_id );
138
ok( $reserve->{'priority'} eq '4', "Test GetReserve(), priority changed correctly" );
138
ok( $reserve->{'priority'} eq '4', "Test GetReserve(), priority changed correctly" );
139
ok( $reserve->{'suspend'}, "Test GetReserve(), suspend hold" );
139
ok( $reserve->{'suspend'}, "Test GetReserve(), suspend hold" );
140
ok( $reserve->{'suspend_until'} eq '2013-01-01 00:00:00', "Test GetReserve(), suspend until date" );
140
is( $reserve->{'suspend_until'}, '2013-01-01 00:00:00', "Test GetReserve(), suspend until date" );
141
141
142
ToggleSuspend( $reserve_id );
142
ToggleSuspend( $reserve_id );
143
$reserve = GetReserve( $reserve_id );
143
$reserve = GetReserve( $reserve_id );
144
- 

Return to bug 14985