[GIT] Evergreen ILS branch rel_3_14 updated. 19b8bab09c030e347cae0dc438bac10390bb4eec

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_3_14 has been updated via 19b8bab09c030e347cae0dc438bac10390bb4eec (commit) from 4acf0c86cd2bde51cc94173de43ec99bf08891c1 (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 19b8bab09c030e347cae0dc438bac10390bb4eec Author: Chris Sharp <csharp@georgialibraries.org> Date: Wed Mar 19 14:14:01 2025 -0400 LP#2103630: QueryParser.pm should check if $org is defined QueryParser.pm was trying to check visibility of orgs that don't yet exist in the cached version of the org tree object. Check that the $org object actually exists before trying to run methods on it. Release-note: Fix a bug that caused empty search results in the OPAC after changes were made to the organizational unit tree and the autogen script had not yet been run. Signed-off-by: Chris Sharp <csharp@georgialibraries.org> Signed-off-by: Jane Sandberg <sandbergja@gmail.com> diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm index f40c6d1530..6a77108378 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm @@ -1215,15 +1215,19 @@ SQL sub is_org_visible { my $org = shift; - return 0 if (!$U->is_true($org->opac_visible)); + if ( defined($org) ) { + return 0 if (!$U->is_true($org->opac_visible)); - my $non_inherited_vis_gf = shift || $U->get_global_flag('opac.org_unit.non_inherited_visibility'); - return 1 if ($U->is_true($non_inherited_vis_gf->enabled)); + my $non_inherited_vis_gf = shift || $U->get_global_flag('opac.org_unit.non_inherited_visibility'); + return 1 if ($U->is_true($non_inherited_vis_gf->enabled)); - while ($org = $org->parent_ou) { - return 0 if (!$U->is_true($org->opac_visible)); + while ($org = $org->parent_ou) { + return 0 if (!$U->is_true($org->opac_visible)); + } + return 1; + } else { + return 0; } - return 1; } sub flesh_parents { ----------------------------------------------------------------------- Summary of changes: .../OpenILS/Application/Storage/Driver/Pg/QueryParser.pm | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) hooks/post-receive -- Evergreen ILS
participants (1)
-
Git User