From 112f52be4b0c4eb325119e89bd040e6987f131a7 Mon Sep 17 00:00:00 2001 From: miker Date: Fri, 9 Oct 2009 18:21:01 +0000 Subject: [PATCH] foward-porting 1.2 changeset r9281 for cloned patron address searching git-svn-id: svn://svn.open-ils.org/ILS/trunk@14331 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../perlmods/OpenILS/Application/Storage/Publisher/actor.pm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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 96fe06605..335241a23 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/actor.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/actor.pm @@ -551,11 +551,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) { -- 2.11.0