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 @{ |
|
|
212 |
$dbh->selectall_arrayref( |
213 |
q| ( |
214 |
SELECT authid |
215 |
FROM auth_header |
216 |
WHERE modification_time >= ? |
217 |
) |, { Slice => {} }, $timestamp |
218 |
); |
219 |
}; |
220 |
} else { |
221 |
my $conditions = { |
222 |
( $starting_authid or $ending_authid ) |
215 |
? ( |
223 |
? ( |
216 |
authid => { |
224 |
authid => { |
217 |
( $starting_authid ? ( '>=' => $starting_authid ) : () ), |
225 |
( $starting_authid ? ( '>=' => $starting_authid ) : () ), |
218 |
( $ending_authid ? ( '<=' => $ending_authid ) : () ), |
226 |
( $ending_authid ? ( '<=' => $ending_authid ) : () ), |
219 |
} |
227 |
} |
220 |
) |
228 |
) |
221 |
: (), |
229 |
: (), |
222 |
( $authtype ? ( authtypecode => $authtype ) : () ), |
230 |
( $authtype ? ( authtypecode => $authtype ) : () ), |
223 |
}; |
231 |
}; |
224 |
# Koha::MetadataRecord::Authority is not a Koha::Object... |
232 |
|
225 |
my $authorities = Koha::Database->new->schema->resultset('AuthHeader')->search( $conditions ); |
233 |
# Koha::MetadataRecord::Authority is not a Koha::Object... |
226 |
@record_ids = map { $_->authid } $authorities->all; |
234 |
my $authorities = Koha::Database->new->schema->resultset('AuthHeader')->search($conditions); |
|
|
235 |
@record_ids = map { $_->authid } $authorities->all; |
236 |
} |
227 |
} |
237 |
} |
228 |
|
238 |
|
229 |
@record_ids = uniq @record_ids; |
239 |
@record_ids = uniq @record_ids; |
230 |
- |
|
|