From e8786ed274469a7e4e8657e0187330b40bb4b435 Mon Sep 17 00:00:00 2001 From: Mike Rylander Date: Thu, 6 Feb 2014 17:32:42 -0500 Subject: [PATCH] Use the proper holdings_xml method for both the special case and embedded holdings Signed-off-by: Mike Rylander --- Open-ILS/src/sql/Pg/990.schema.unapi.sql | 6 ++++-- Open-ILS/src/sql/Pg/upgrade/ZZZZ.schema.unapi-mmr.sql | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Open-ILS/src/sql/Pg/990.schema.unapi.sql b/Open-ILS/src/sql/Pg/990.schema.unapi.sql index 598cb83b93..747b1187ec 100644 --- a/Open-ILS/src/sql/Pg/990.schema.unapi.sql +++ b/Open-ILS/src/sql/Pg/990.schema.unapi.sql @@ -1378,7 +1378,9 @@ BEGIN -- TODO: aggregate holdings from constituent records IF format = 'holdings_xml' THEN -- the special case output := unapi.mmr_holdings_xml( - obj_id, ouid, org, depth, includes, slimit, soffset, include_xmlns); + obj_id, ouid, org, depth, + evergreen.array_remove_item_by_value(includes,'holdings_xml'), + slimit, soffset, include_xmlns, pref_lib); RETURN output; END IF; @@ -1403,7 +1405,7 @@ BEGIN hxml := NULL::XML; IF ('holdings_xml' = ANY (includes)) THEN - hxml := unapi.holdings_xml( + hxml := unapi.mmr_holdings_xml( obj_id, ouid, org, depth, evergreen.array_remove_item_by_value(includes,'holdings_xml'), slimit, soffset, include_xmlns, pref_lib); diff --git a/Open-ILS/src/sql/Pg/upgrade/ZZZZ.schema.unapi-mmr.sql b/Open-ILS/src/sql/Pg/upgrade/ZZZZ.schema.unapi-mmr.sql index c443783f8c..03d367c7a3 100644 --- a/Open-ILS/src/sql/Pg/upgrade/ZZZZ.schema.unapi-mmr.sql +++ b/Open-ILS/src/sql/Pg/upgrade/ZZZZ.schema.unapi-mmr.sql @@ -298,7 +298,9 @@ BEGIN -- TODO: aggregate holdings from constituent records IF format = 'holdings_xml' THEN -- the special case output := unapi.mmr_holdings_xml( - obj_id, ouid, org, depth, includes, slimit, soffset, include_xmlns); + obj_id, ouid, org, depth, + evergreen.array_remove_item_by_value(includes,'holdings_xml'), + slimit, soffset, include_xmlns); RETURN output; END IF; @@ -323,7 +325,7 @@ BEGIN hxml := NULL::XML; IF ('holdings_xml' = ANY (includes)) THEN - hxml := unapi.holdings_xml( + hxml := unapi.mmr_holdings_xml( obj_id, ouid, org, depth, evergreen.array_remove_item_by_value(includes,'holdings_xml'), slimit, soffset, include_xmlns, pref_lib); -- 2.11.0