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

(-)a/Koha/UploadedFiles.pm (-4 / +3 lines)
Lines 63-73 Parameter keep_file may be used to delete records, but keep files. Link Here
63
63
64
sub delete {
64
sub delete {
65
    my ( $self, $params ) = @_;
65
    my ( $self, $params ) = @_;
66
    $self = Koha::UploadedFiles->new if !ref($self); # handle class call
66
    # We use the individual delete on each resultset record
67
    # We use the individual delete on each resultset record
67
    my $err = 0;
68
    my $err = 0;
68
    while( my $row = $self->_resultset->next ) {
69
    while( my $row = $self->next ) {
69
        my $kohaobj = Koha::UploadedFile->_new_from_dbic( $row );
70
        $err++ if !$row->delete( $params );
70
        $err++ if !$kohaobj->delete( $params );
71
    }
71
    }
72
    return $err==0;
72
    return $err==0;
73
}
73
}
74
- 

Return to bug 17669