|
Lines 136-141
if (not $biblios and not $authorities) {
Link Here
|
| 136 |
die $msg; |
136 |
die $msg; |
| 137 |
} |
137 |
} |
| 138 |
|
138 |
|
|
|
139 |
our @tables_allowed_for_select = ( 'biblioitems', 'items', 'biblio' ); |
| 140 |
unless ( grep { /^$table$/ } @tables_allowed_for_select ) { |
| 141 |
die "Cannot specify -t|--table with value '$table'. Only " |
| 142 |
. ( join ', ', @tables_allowed_for_select ) |
| 143 |
. " are allowed."; |
| 144 |
} |
| 145 |
|
| 139 |
|
146 |
|
| 140 |
# -v is for verbose, which seems backwards here because of how logging is set |
147 |
# -v is for verbose, which seems backwards here because of how logging is set |
| 141 |
# on the CLI of zebraidx. It works this way. The default is to not log much |
148 |
# on the CLI of zebraidx. It works this way. The default is to not log much |
|
Lines 445-452
sub select_all_authorities {
Link Here
|
| 445 |
|
452 |
|
| 446 |
sub select_all_biblios { |
453 |
sub select_all_biblios { |
| 447 |
$table = 'biblioitems' |
454 |
$table = 'biblioitems' |
| 448 |
if $table ne 'items' |
455 |
if grep { /^$table$/ } @tables_allowed_for_select; |
| 449 |
and $table ne 'biblio'; |
|
|
| 450 |
my $strsth = qq{ SELECT biblionumber FROM $table }; |
456 |
my $strsth = qq{ SELECT biblionumber FROM $table }; |
| 451 |
$strsth.=qq{ WHERE $where } if ($where); |
457 |
$strsth.=qq{ WHERE $where } if ($where); |
| 452 |
$strsth.=qq{ LIMIT $length } if ($length && !$offset); |
458 |
$strsth.=qq{ LIMIT $length } if ($length && !$offset); |
| 453 |
- |
|
|