From: Mike Rylander Date: Thu, 6 Feb 2014 22:32:42 +0000 (-0500) Subject: Use the proper holdings_xml method for both the special case and embedded holdings X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=17c70bba51899d73f0a8f9ba3df8e22261a430b4;p=working%2FEvergreen.git Use the proper holdings_xml method for both the special case and embedded holdings Signed-off-by: Mike Rylander --- 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);