Replaces the check against the allow_random property, which was a quick hack to
deal with a specific subreddit. Also removes allow_random from the _defaults dict
This attribute can only be set by a user in admin mode. If a non-admin user
creates a subreddit, it defaults to False. If a non-admin user is editing
the subreddit settings, the quarantine attribute defaults to the previous
value.
Just like with user-overriding, sometimes we want to be able to check whether a
feature flag is on for a specific subreddit while in a non-request context.
The function essentially did the same thing as `is_enabled()`, but with
overriding the user and not also checking the subreddit, subdomain, or oauth
client. The former is easily handled with default args, and the latter has
actually potentially been an issue - if you needed to override the user, you
lost the effect of any of those on the feature flag.
Turn subreddit ban into Y/N, removing the possibility for one click accidental bans.
Once a subreddit is banned, provides an option to override public ban message.
Adds a counter to count how many times a subreddit has been banned.
This was mainly a problem in dev with uncompressed scripts.
`rembeddit#init` was being invoke on script load without the callback before
the `'opened.r.popup'` event fired and setup the embed for previewing.
Previously it was part of the main memcache pool, but hardcache uses
keys that are invalid for ascii protocol so it was blocking switching
the main pool to ascii.
This change will save reddit processing and bandwidth by not rendering
/r/sub/w/toolbox markdown (it's JSON data), and by not sending
`content_html` for JSON requests. See also:
3cf7c85346
The pageview pixel code expects various things (the base URL, the secret
token, etc.) to be configured. Other places (like base.html) always
check if `g.tracker_url` is valid before generating the pageview pixel.
This was broken in 1f6a9aa570 when
`js_config()` started calling `get_pageview_pixel_url()`
indiscriminately. Ouch for poor open source and dev installs.
mobile-web keeps cropping up with a bug that puts private IPs into
the account history for users. Best not to worry them with such
things and hide it from their activity page.
The translations are currently being done in the context of the
moderator that creates the ban, not the recipient of the message. So if
the moderator has their language set to something different than the
banned user, the message will be in the wrong language for the
recipient.