[open-ils-commits] r11879 - trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Jan 19 15:49:58 EST 2009
Author: miker
Date: 2009-01-19 15:49:54 -0500 (Mon, 19 Jan 2009)
New Revision: 11879
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/actor.pm
Log:
allow card-only searches
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/actor.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/actor.pm 2009-01-19 18:37:26 UTC (rev 11878)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/actor.pm 2009-01-19 20:49:54 UTC (rev 11879)
@@ -559,10 +559,10 @@
}
} elsif ($addr_where) {
$select = "$a_select";
- } else {
- return undef;
}
+ return undef if (!$select && !$card);
+
my $order_by = join ', ', map { 'LOWER(users.'. (split / /,$_)[0] . ') ' . (split / /,$_)[1] } @$sort;
my $distinct_list = join ', ', map { 'LOWER(users.'. (split / /,$_)[0] . ')' } @$sort;
@@ -585,11 +585,12 @@
my $descendants = "actor.org_unit_descendants($ws_ou, $ws_ou_depth)";
+ $select = "JOIN ($select) AS search ON (search.id = users.id)" if ($select);
$select = <<" SQL";
SELECT DISTINCT $distinct_list
FROM $u_table AS users $card
- JOIN ($select) AS search ON (search.id = users.id)
JOIN $descendants d ON (d.id = users.home_ou)
+ $select
$opt_in_join
$clone_select
WHERE users.deleted = FALSE
More information about the open-ils-commits
mailing list