From 33225dd0a2a4660e118a9df1cbbc00fb90d7a795 Mon Sep 17 00:00:00 2001 From: Colin de Roos <8250462+cdfa@users.noreply.github.com> Date: Fri, 9 Sep 2022 15:27:17 +0200 Subject: [PATCH] Remove call to binary_to_existing_atom (#712) This function is only available from OTP 23 and ginger is stuck on OTP 22 Co-authored-by: Colin de Roos --- modules/mod_ginger_base/support/ginger_search.erl | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/modules/mod_ginger_base/support/ginger_search.erl b/modules/mod_ginger_base/support/ginger_search.erl index 180af0fc..6ad0ee2b 100644 --- a/modules/mod_ginger_base/support/ginger_search.erl +++ b/modules/mod_ginger_base/support/ginger_search.erl @@ -166,7 +166,7 @@ parse_argument({Key, <<"undefined">>}) -> parse_argument({hassubjects, Subjects}) -> lists:map( fun(Subject) -> - {hassubject, parse_predicate(Subject)} + {hassubject, Subject} end, Subjects ); @@ -174,7 +174,7 @@ parse_argument({hassubjects, Subjects}) -> parse_argument({hasobjects, Objects}) -> lists:map( fun(Object) -> - {hasobject, parse_predicate(Object)} + {hasobject, Object} end, Objects ); @@ -309,12 +309,6 @@ parse_argument({boost_featured, true}) -> parse_argument(Arg) -> [Arg]. -parse_predicate(P) -> - case P of - [Node, PredName] -> [Node, erlang:binary_to_existing_atom(PredName)]; - _ -> P - end. - date_facet(Property) -> %% A facet on a date property is a min/max range. [