From: Henri-Damien LAURENT Date: Tue, 25 Aug 2009 23:40:28 +0000 (+0200) Subject: Bug Fixing : export would export no biblios when X-Git-Tag: v3.02.00-alpha~54^2~422 X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=commitdiff_plain;h=b459a5df5c1392f62234a8e324a31770f0ef60ea;p=koha-ffzg.git Bug Fixing : export would export no biblios when IndependantBranches set and user is kohaadmin I think we can escape defaulting to the userenv Branch with restricting the list to the user branch Signed-off-by: Galen Charlton --- diff --git a/tools/export.pl b/tools/export.pl index f60fcd6e4c..66d1acc626 100755 --- a/tools/export.pl +++ b/tools/export.pl @@ -80,8 +80,8 @@ if ($op eq "export") { ($itemtype && C4::Context->preference('item-level_itypes')); my $query = $items_filter ? "SELECT DISTINCT biblioitems.biblionumber - FROM biblioitems,items - WHERE biblioitems.biblionumber=items.biblionumber " + FROM biblioitems JOIN items + USING (biblionumber) WHERE 1" : "SELECT biblioitems.biblionumber FROM biblioitems WHERE biblionumber >0 "; @@ -123,6 +123,7 @@ if ($op eq "export") { $query .= (C4::Context->preference('item-level_itypes')) ? " AND items.itype = ? " : " AND biblioitems.itemtype = ?"; push @sql_params, $itemtype; } + warn "$query, @sql_params"; my $sth = $dbh->prepare($query); $sth->execute(@sql_params);