[open-ils-commits] r14334 - tags/rel_1_6_0_0/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher (miker)
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Oct 9 14:22:32 EDT 2009
Author: miker
Date: 2009-10-09 14:22:27 -0400 (Fri, 09 Oct 2009)
New Revision: 14334
Modified:
tags/rel_1_6_0_0/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/actor.pm
Log:
foward-porting 1.2 changeset r9281 for cloned patron address searching
Modified: tags/rel_1_6_0_0/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/actor.pm
===================================================================
--- tags/rel_1_6_0_0/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/actor.pm 2009-10-09 18:22:11 UTC (rev 14333)
+++ tags/rel_1_6_0_0/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/actor.pm 2009-10-09 18:22:27 UTC (rev 14334)
@@ -544,12 +544,14 @@
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) {
if ($addr_where) {
More information about the open-ils-commits
mailing list