fix error

This commit is contained in:
邱博亞 2021-12-30 18:04:52 +08:00
parent 9007a0c51b
commit 051922e13c
1 changed files with 4 additions and 4 deletions

View File

@ -187,9 +187,9 @@ class SiteFeedAnnc
tmp = data['data'] tmp = data['data']
if tmp["link_to_show"].nil? if tmp["link_to_show"].nil?
if !is_widget if !is_widget
tmp["link_to_show"] = UseSourceUrl && tmp["show_url"] ? tmp["show_url"] : OrbitHelper.url_to_show(tmp["params"]) rescue '' tmp["link_to_show"] = UseSourceUrl && tmp["show_url"] ? (tmp["source-site"] + tmp["show_url"]) : OrbitHelper.url_to_show(tmp["params"]) rescue ''
else else
tmp["link_to_show"] = UseSourceUrl && tmp["show_url"] ? tmp["show_url"] : OrbitHelper.widget_item_url(tmp["params"]) rescue '' tmp["link_to_show"] = UseSourceUrl && tmp["show_url"] ? (tmp["source-site"] + tmp["show_url"]) : OrbitHelper.widget_item_url(tmp["params"]) rescue ''
end end
end end
tmp tmp
@ -209,9 +209,9 @@ class SiteFeedAnnc
next if tmp["is_hidden"] || (!tmp["postdate"].nil? && tmp["postdate"]<Time.now) || tmp['title'].blank? next if tmp["is_hidden"] || (!tmp["postdate"].nil? && tmp["postdate"]<Time.now) || tmp['title'].blank?
if tmp["link_to_show"].nil? if tmp["link_to_show"].nil?
if !is_widget if !is_widget
tmp["link_to_show"] = UseSourceUrl && tmp["show_url"] ? tmp["show_url"] : OrbitHelper.url_to_show(tmp["params"]) rescue '' tmp["link_to_show"] = UseSourceUrl && tmp["show_url"] ? (tmp["source-site"] + tmp["show_url"]) : OrbitHelper.url_to_show(tmp["params"]) rescue ''
else else
tmp["link_to_show"] = UseSourceUrl && tmp["show_url"] ? tmp["show_url"] : OrbitHelper.widget_item_url(tmp["params"]) rescue '' tmp["link_to_show"] = UseSourceUrl && tmp["show_url"] ? (tmp["source-site"] + tmp["show_url"])mp["show_url"] : OrbitHelper.widget_item_url(tmp["params"]) rescue ''
end end
end end
tmp tmp