From: miker Date: Fri, 9 Oct 2009 18:23:09 +0000 (+0000) Subject: foward-porting 1.2 changeset r9281 for cloned patron address searching X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=7056810d633ebf8fae361a9d4f38582c41d6fe1f;p=Evergreen.git foward-porting 1.2 changeset r9281 for cloned patron address searching git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_4_0@14336 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/actor.pm b/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/actor.pm index 0871160463..01ef97d3db 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/actor.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/actor.pm @@ -514,11 +514,13 @@ sub patron_search { my $ou_table = actor::org_unit->table; my $u_select = "SELECT id as id FROM $u_table u WHERE $usr_where"; - my $a_select = "SELECT usr as id FROM $a_table a WHERE $addr_where"; + my $a_select = "SELECT u.id as id FROM $a_table a JOIN $u_table u ON (u.mailing_address = a.id OR u.billing_address = a.id) WHERE $addr_where"; + my $clone_select = ''; - $clone_select = "JOIN (SELECT cu.id as id FROM $a_table ca ". - "JOIN $u_table cu ON (cu.mailing_address = ca.id OR cu.billing_address = ca.id) ". - "WHERE $addr_where) AS clone ON (clone.id = users.id)" if ($addr_where); + + #$clone_select = "JOIN (SELECT cu.id as id FROM $a_table ca ". + # "JOIN $u_table cu ON (cu.mailing_address = ca.id OR cu.billing_address = ca.id) ". + # "WHERE $addr_where) AS clone ON (clone.id = users.id)" if ($addr_where); my $select = ''; if ($usr_where) {