[open-ils-commits] [GIT] Evergreen ILS branch rel_2_1 updated. bd69964ca04110c739866decffcc22b02657a287

Evergreen Git git at git.evergreen-ils.org
Mon May 16 18:23:43 EDT 2011


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, rel_2_1 has been updated
       via  bd69964ca04110c739866decffcc22b02657a287 (commit)
      from  ca2f080695123191c092779911727256bf77cb55 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit bd69964ca04110c739866decffcc22b02657a287
Author: Mike Rylander <mrylander at gmail.com>
Date:   Mon May 16 18:17:30 2011 -0400

    Ignore "deleted" authority records when using the tag-validation method
    
    Signed-off-by: Mike Rylander <mrylander at gmail.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/authority.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/authority.pm
index 58cbc01..af0dff6 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/authority.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/authority.pm
@@ -31,6 +31,7 @@ sub validate_tag {
 	my @searches = @{$args{searches}};
 
 	my $search_table = authority::full_rec->table;
+	my $rec_table = authority::record_entry->table;
 
 	my @values;
 	my @selects;
@@ -53,8 +54,9 @@ sub validate_tag {
 			$sql = 'SELECT COUNT(DISTINCT record) FROM (';
 		}
 		$sql .= 'SELECT record FROM (('.join(') INTERSECT (', @selects).')) AS x ';
-		$sql .= "JOIN $search_table recheck USING (record) WHERE recheck.tag = ? ";
-		$sql .= "GROUP BY 1 HAVING (COUNT(recheck.id) - ?) = 0) AS foo;";
+		$sql .= "JOIN $search_table recheck USING (record) ";
+		$sql .= "JOIN $rec_table delcheck ON (recheck.record = delcheck.id and delcheck.deleted = 'f') ";
+		$sql .= "WHERE recheck.tag = ? GROUP BY 1 HAVING (COUNT(recheck.id) - ?) = 0) AS foo;";
 
 		if ($self->api_name =~ /id_list/) {
 			my $id_list = authority::full_rec->db_Main->selectcol_arrayref( $sql, {}, @values, $t, scalar(@searches) );

-----------------------------------------------------------------------

Summary of changes:
 .../Application/Storage/Publisher/authority.pm     |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list