Lines 100-108
if ( $output_format eq 'csv' and not $csv_profile_id ) {
Link Here
|
100 |
pod2usage(q|Define a csv profile to export in CSV|); |
100 |
pod2usage(q|Define a csv profile to export in CSV|); |
101 |
} |
101 |
} |
102 |
|
102 |
|
103 |
if ( $timestamp and $record_type ne 'bibs' ) { |
|
|
104 |
pod2usage(q|--timestamp can only be used with biblios|); |
105 |
} |
106 |
|
103 |
|
107 |
if ( $record_type ne 'bibs' and $record_type ne 'auths' ) { |
104 |
if ( $record_type ne 'bibs' and $record_type ne 'auths' ) { |
108 |
pod2usage(q|--record_type is not valid|); |
105 |
pod2usage(q|--record_type is not valid|); |
Lines 210-229
if ( $record_type eq 'bibs' ) {
Link Here
|
210 |
} |
207 |
} |
211 |
} |
208 |
} |
212 |
elsif ( $record_type eq 'auths' ) { |
209 |
elsif ( $record_type eq 'auths' ) { |
213 |
my $conditions = { |
210 |
if ( $timestamp ) { |
214 |
( $starting_authid or $ending_authid ) |
211 |
push @record_ids, $_->{authid} for @{ |
215 |
? ( |
212 |
$dbh->selectall_arrayref(q| ( |
216 |
authid => { |
213 |
SELECT authid |
217 |
( $starting_authid ? ( '>=' => $starting_authid ) : () ), |
214 |
FROM auth_header |
218 |
( $ending_authid ? ( '<=' => $ending_authid ) : () ), |
215 |
WHERE modification_time >= ? |
219 |
} |
216 |
) |, { Slice => {} }, $timestamp ); |
220 |
) |
217 |
}; |
221 |
: (), |
218 |
} |
222 |
( $authtype ? ( authtypecode => $authtype ) : () ), |
219 |
else { |
223 |
}; |
220 |
my $conditions = { |
224 |
# Koha::MetadataRecord::Authority is not a Koha::Object... |
221 |
( $starting_authid or $ending_authid ) |
225 |
my $authorities = Koha::Database->new->schema->resultset('AuthHeader')->search( $conditions ); |
222 |
? ( |
226 |
@record_ids = map { $_->authid } $authorities->all; |
223 |
authid => { |
|
|
224 |
( $starting_authid ? ( '>=' => $starting_authid ) : () ), |
225 |
( $ending_authid ? ( '<=' => $ending_authid ) : () ), |
226 |
} |
227 |
) |
228 |
: (), |
229 |
( $authtype ? ( authtypecode => $authtype ) : () ), |
230 |
}; |
231 |
# Koha::MetadataRecord::Authority is not a Koha::Object... |
232 |
my $authorities = Koha::Database->new->schema->resultset('AuthHeader')->search( $conditions ); |
233 |
@record_ids = map { $_->authid } $authorities->all; |
234 |
} |
227 |
} |
235 |
} |
228 |
|
236 |
|
229 |
@record_ids = uniq @record_ids; |
237 |
@record_ids = uniq @record_ids; |
230 |
- |
|
|