Bug 15325: Fix --table option of rebuild_zebra.pl

Option's value given on command line was never used and 'biblioitems'
was used instead.

Test plan:
1. git checkout master
2. perl misc/migration_tools/rebuild_zebra.pl -b -t items --where "price = 42"
3. You should see errors printed on screen about an unknown column
4. Apply patch
5. perl misc/migration_tools/rebuild_zebra.pl -b -t items --where "price = 42"
6. No errors \o/

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
Julian Maurice 2015-12-07 15:25:25 +01:00 committed by Kyle M Hall
parent ae5962cab4
commit 48df0b8a2d
1 changed files with 1 additions and 1 deletions

View File

@ -452,7 +452,7 @@ sub select_all_authorities {
sub select_all_biblios {
$table = 'biblioitems'
if grep { /^$table$/ } @tables_allowed_for_select;
unless grep { /^$table$/ } @tables_allowed_for_select;
my $strsth = qq{ SELECT biblionumber FROM $table };
$strsth.=qq{ WHERE $where } if ($where);
$strsth.=qq{ LIMIT $length } if ($length && !$offset);