diff --git a/mod_slideshow.erl b/mod_slideshow.erl index c102e96..16af447 100644 --- a/mod_slideshow.erl +++ b/mod_slideshow.erl @@ -82,8 +82,8 @@ observe_media_stillimage({media_stillimage, Id, _Props}, Context) -> %% @doc Handle a request for a slideshow popup observe_postback_notify(#postback_notify{message="slideshow"}, Context) -> - Ids = [ list_to_integer(Id) || Id <- z_context:get_q_all("id", Context) ], - Ids1 = [ Id || Id <- Ids, z_acl:rsc_visible(Id, Context) ], + Ids = [ z_convert:to_integer(Id) || Id <- z_context:get_q_all("id", Context) ], + Ids1 = [ Id || Id <- Ids, is_integer(Id), z_acl:rsc_visible(Id, Context) ], StartId = case z_context:get_q("start_id", Context) of [] -> undefined; QStartId -> list_to_integer(QStartId) @@ -97,8 +97,7 @@ observe_postback_notify(#postback_notify{message="slideshow"}, Context) -> {height, 600} ], Context); -observe_postback_notify(X, _Context) -> - ?DEBUG(X), +observe_postback_notify(_X, _Context) -> undefined. reorder_ids(undefined, Ids) ->