[open-ils-commits] [GIT] Evergreen ILS branch master updated. e56a34254da634f34b9e43eaf3f80d6d80ef3f9f

Evergreen Git git at git.evergreen-ils.org
Mon May 16 18:18:42 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, master has been updated
       via  e56a34254da634f34b9e43eaf3f80d6d80ef3f9f (commit)
      from  f40b83b780d9bfda75f34462977f3244840d20d8 (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 e56a34254da634f34b9e43eaf3f80d6d80ef3f9f
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