fix error

This commit is contained in:
邱博亞 2022-02-23 16:07:23 +08:00
parent 1f28b16606
commit dfb994cc2c
1 changed files with 4 additions and 4 deletions

View File

@ -192,9 +192,9 @@ class SiteFeedAnnc
tmp['category'] = tmp['category'][locale]
if tmp["link_to_show"].nil?
if !is_widget
tmp["link_to_show"] = UseSourceUrl && tmp["show_url"] ? (tmp["source_url"] + locale + tmp["show_url"]) : OrbitHelper.url_to_show(tmp["params"]) rescue ''
tmp["link_to_show"] = UseSourceUrl && tmp["show_url"] ? "#{tmp["source_url"]}/#{locale}#{tmp["show_url"]}" : OrbitHelper.url_to_show(tmp["params"]) rescue ''
else
tmp["link_to_show"] = UseSourceUrl && tmp["show_url"] ? (tmp["source_url"] + locale + tmp["show_url"]) : OrbitHelper.widget_item_url(tmp["params"]) rescue ''
tmp["link_to_show"] = UseSourceUrl && tmp["show_url"] ? "#{tmp["source_url"]}/#{locale}#{tmp["show_url"]}" : OrbitHelper.widget_item_url(tmp["params"]) rescue ''
end
end
tmp
@ -215,9 +215,9 @@ class SiteFeedAnnc
tmp['category'] = tmp['category'][locale]
if tmp["link_to_show"].nil?
if !is_widget
tmp["link_to_show"] = UseSourceUrl && tmp["show_url"] ? (tmp["source_url"] + locale + tmp["show_url"]) : OrbitHelper.url_to_show(tmp["params"]) rescue ''
tmp["link_to_show"] = UseSourceUrl && tmp["show_url"] ? "#{tmp["source_url"]}/#{locale}#{tmp["show_url"]}" : OrbitHelper.url_to_show(tmp["params"]) rescue ''
else
tmp["link_to_show"] = UseSourceUrl && tmp["show_url"] ? (tmp["source_url"] + locale + tmp["show_url"]) : OrbitHelper.widget_item_url(tmp["params"]) rescue ''
tmp["link_to_show"] = UseSourceUrl && tmp["show_url"] ? "#{tmp["source_url"]}/#{locale}#{tmp["show_url"]}" : OrbitHelper.widget_item_url(tmp["params"]) rescue ''
end
end
tmp