Commit Graph

10 Commits

Author SHA1 Message Date
evazion
62875eabb2 /posts.atom: fix banned posts being visible to Members.
Bug: /posts.atom only hid loli/shota, not banned posts and not unsafe
posts when safe mode was on.
2019-08-25 20:29:32 -05:00
evazion
59b277ead1 users: drop id_to_name, name_to_id caching.
Changes:

* Drop Users.id_to_name.
* Don't cache Users.name_to_id.
* Replace calls to name_to_id with find_by_name when possible.
* Don't autodefine creator_name in belongs_to_creator.
* Don't autodefine updater_name in belongs_to_updater.
* Instead manually define creator_name / updater_name only on models that need
  to return these fields in the api.

id_to_name was cached to reduce the impact of N+1 query patterns in
certain places, especially in api responses that return creator_name /
updater_name fields. But it still meant we were doing N calls to
memcache. Using `includes` to prefetch users avoids this N+1 pattern.

name_to_id had no need be cached, it was never used in any performance-
sensitive contexts.

Avoiding caching also avoids the need to keep these caches consistent.
2019-08-18 11:24:42 -05:00
evazion
9b62b78183 Fix #3601: Broken URLs in /posts.atom feed. 2018-04-05 16:46:23 -05:00
Kevin Xiwei Zheng
fdc62b0e07 Don't show colon in feed title if tags are empty 2015-07-26 15:02:35 -04:00
Darayavaush
f58c261756 Rename Atom feeds to include tags in its name 2015-07-16 11:49:38 +03:00
Kevin Xiwei Zheng
dcefb842df More accurately determine linkable sources
Use the "\A" metacharacter for the beginning of a string, instead of "^"
for the beginning of any line within that string, and check for "://" as
well.  Fixes #1947.
2013-08-21 11:32:47 -04:00
ghostrigger
712dbccbc7 potentially fixes #1701
adds tag params to link href for posts and posts.atom
2013-06-01 11:39:22 +09:00
ghostrigger
1e82fe58c1 possible fix for issue #1340
added paragraph tag containing post.tag_string as child element of div inside content; also, as minor edit, modified post/atom to posts.atom and post/index to posts in the link href.
2013-04-16 02:46:19 +08:00
Toks
a34184f55b fixes #1260 2013-04-10 13:24:09 -04:00
albert
41d2634304 added post atom feed 2011-11-11 17:50:26 -05:00