[open-ils-commits] r14331 - trunk/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:21:05 EDT 2009


Author: miker
Date: 2009-10-09 14:21:01 -0400 (Fri, 09 Oct 2009)
New Revision: 14331

Modified:
   trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/actor.pm
Log:
foward-porting 1.2 changeset r9281 for cloned patron address searching

Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/actor.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/actor.pm	2009-10-09 18:18:14 UTC (rev 14330)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/actor.pm	2009-10-09 18:21:01 UTC (rev 14331)
@@ -551,12 +551,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