}
unflesh_parents($ot);
+ #staff shouldn't see ILL copies unless searching ILL sites
+ if ($self->find_modifier('staff') and ($site_org->id != 138 and $site_org->id != 140)) {
+ $logger->debug('removing ill orgs from search for staff Before: '.Dumper($dorgs));
+ # remove 138 or 140 from dorgs
+ $dorgs = [ map /(138|140)/ ? () : $_, @$dorgs ];
+ $logger->debug('removing ill orgs from search for staff After: '.Dumper($dorgs));
+ }
+
push @{$vis_filter{'c_attr'}},
"search.calculate_visibility_attribute_test('circ_lib','{".join(',', @$dorgs)."}',$negate)";