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

(-)a/misc/export_records.pl (-16 / +25 lines)
Lines 102-122 $timestamp = ($timestamp) ? output_pref({ dt => dt_from_string($timestamp), date Link Here
102
102
103
if ( $record_type eq 'bibs' ) {
103
if ( $record_type eq 'bibs' ) {
104
    if ( $timestamp ) {
104
    if ( $timestamp ) {
105
        push @record_ids, $_->{biblionumber} for @{
105
        if ($dont_export_items) {
106
            $dbh->selectall_arrayref(q| (
106
            push @record_ids, $_->{biblionumber} for @{
107
                SELECT biblionumber
107
                $dbh->selectall_arrayref(q| (
108
                FROM biblioitems
108
                    SELECT biblionumber
109
                  LEFT JOIN items USING(biblionumber)
109
                    FROM biblioitems
110
                WHERE biblioitems.timestamp >= ?
110
                        LEFT JOIN items USING(biblionumber)
111
                  OR items.timestamp >= ?
111
                    WHERE biblioitems.timestamp >= ?
112
            ) UNION (
112
                        OR items.timestamp >= ?
113
                SELECT biblionumber
113
                    ) UNION (
114
                FROM biblioitems
114
                    SELECT biblionumber
115
                  LEFT JOIN deleteditems USING(biblionumber)
115
                    FROM biblioitems
116
                WHERE biblioitems.timestamp >= ?
116
                        LEFT JOIN deleteditems USING(biblionumber)
117
                  OR deleteditems.timestamp >= ?
117
                    WHERE biblioitems.timestamp >= ?
118
            ) |, { Slice => {} }, ( $timestamp ) x 4 );
118
                        OR deleteditems.timestamp >= ?
119
        };
119
                ) |, { Slice => {} }, ( $timestamp ) x 4 );
120
            };
121
        } else {
122
            push @record_ids, $_->{biblionumber} for @{
123
                $dbh->selectall_arrayref(q| (
124
                    SELECT biblionumber
125
                    FROM biblioitems
126
                    WHERE biblioitems.timestamp >= ?
127
                ) |, { Slice => {} }, $timestamp );
128
            };
129
        }
120
    } else {
130
    } else {
121
        my $conditions = {
131
        my $conditions = {
122
            ( $starting_biblionumber or $ending_biblionumber )
132
            ( $starting_biblionumber or $ending_biblionumber )
123
- 

Return to bug 20485