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

(-)a/misc/export_records.pl (-16 / +25 lines)
Lines 142-162 $timestamp = ($timestamp) ? output_pref({ dt => dt_from_string($timestamp), date Link Here
142
142
143
if ( $record_type eq 'bibs' ) {
143
if ( $record_type eq 'bibs' ) {
144
    if ( $timestamp ) {
144
    if ( $timestamp ) {
145
        push @record_ids, $_->{biblionumber} for @{
145
        if (!$dont_export_items) {
146
            $dbh->selectall_arrayref(q| (
146
            push @record_ids, $_->{biblionumber} for @{
147
                SELECT biblio_metadata.biblionumber
147
                $dbh->selectall_arrayref(q| (
148
                FROM biblio_metadata
148
                    SELECT biblio_metadata.biblionumber
149
                  LEFT JOIN items USING(biblionumber)
149
                    FROM biblio_metadata
150
                WHERE biblio_metadata.timestamp >= ?
150
                      LEFT JOIN items USING(biblionumber)
151
                  OR items.timestamp >= ?
151
                    WHERE biblio_metadata.timestamp >= ?
152
            ) UNION (
152
                      OR items.timestamp >= ?
153
                SELECT biblio_metadata.biblionumber
153
                ) UNION (
154
                FROM biblio_metadata
154
                    SELECT biblio_metadata.biblionumber
155
                  LEFT JOIN deleteditems USING(biblionumber)
155
                    FROM biblio_metadata
156
                WHERE biblio_metadata.timestamp >= ?
156
                      LEFT JOIN deleteditems USING(biblionumber)
157
                  OR deleteditems.timestamp >= ?
157
                    WHERE biblio_metadata.timestamp >= ?
158
            ) |, { Slice => {} }, ( $timestamp ) x 4 );
158
                      OR deleteditems.timestamp >= ?
159
        };
159
                ) |, { Slice => {} }, ( $timestamp ) x 4 );
160
            };
161
        } else {
162
            push @record_ids, $_->{biblionumber} for @{
163
                $dbh->selectall_arrayref(q| (
164
                    SELECT biblio_metadata.biblionumber
165
                    FROM biblio_metadata
166
                    WHERE biblio_metadata.timestamp >= ?
167
                ) |, { Slice => {} }, $timestamp );
168
            };
169
        }
160
    } else {
170
    } else {
161
        my $conditions = {
171
        my $conditions = {
162
            ( $starting_biblionumber or $ending_biblionumber )
172
            ( $starting_biblionumber or $ending_biblionumber )
163
- 

Return to bug 20485