Commit Graph

6667 Commits

Author SHA1 Message Date
MelissaCole
3ca7e7ca55 Remove feature flag for modmail muting 2015-10-08 11:07:53 -07:00
Florence Yeun
63a7d8b8f6 Modmail: Add accent color if moderating > 1 subreddit
Only show color coded modmail if moderating more than one subreddit
(any permission type).
2015-10-06 16:04:26 -07:00
Florence Yeun
539cbb19dd Remove modmail_colors feature flag 2015-10-06 16:04:24 -07:00
MelissaCole
7d655faed2 Fix sr style toggle for older subreddits
Some of the subreddits weren't able to be switched to
stylesheet_url because of validation errors.
2015-10-06 14:47:10 -07:00
zeantsoi
6b12899d52 Change frontpage influencers to Reddit front page 2015-10-06 12:14:47 -07:00
Brian Simpson
905783ac6d setup.py: Requirements are based on ubuntu version.
This will let us simultaneously support precise and trusty.
2015-10-06 03:30:36 -04:00
Brian Simpson
b6d1207694 Un-pin sqlalchemy.
We use the default ubuntu package.
2015-10-06 03:30:36 -04:00
Brian Simpson
6dcb729407 Un-pin requests.
The pinning was added in 7d93774781
and the response.json/response.json() incompatibility was fixed
by 644f0988d7.
2015-10-06 03:30:35 -04:00
Brian Simpson
741844a503 Un-pin python-routes and python-pylons.
We are using the default ubuntu packages.
2015-10-06 03:30:35 -04:00
Brian Simpson
69d89f3cd8 setup.py: Remove check for distribute>=0.6.16.
This check was in place for c20db7e11d to make
sure that we were using a new enough version of distribute to handle
the "cythonize" command. distribute was a now-deprecated fork of setuptools,
and the versions of setuptools on precise and trusty are new enough to not
need this check.
2015-10-06 03:30:35 -04:00
David Wick
f02abcdaec spotlight.js: Send flag for ad auto refreshes 2015-10-05 14:50:08 -07:00
David Wick
c2c1166b03 Track clicks w/adserver on comments pages 2015-10-05 14:50:08 -07:00
David Wick
af6cfa51cc promote.py: Fix update_query for urls with existing params
urlparse.parse_qs parses values into lists. `doseq` is required
to properly convert these values back to a qs.

example:

>> urllib.urlencode({"foo":[1,2,3]},doseq=True)
>> 'foo=1&foo=2&foo=3'

vs

>> urllib.urlencode({"foo":[1,2,3]})
>> 'foo=%5B1%2C+2%2C+3%5D'
2015-10-05 14:50:08 -07:00
Brian Simpson
48cc285a44 Always do from PIL import Image.
Previously we had been just doing `import Image`, but that's not
allowed in newer versions of python-imaging that use Pillow. It
still works sometimes when a compatability package is installed
but we shouldn't rely on that.
2015-10-05 16:47:15 -04:00
Chad Birch
d0d63f3bc1 OAuth authorization page: hide mobile web banner
This is confusing when someone's trying to authorize a third-party app.
2015-10-05 12:30:08 -06:00
MelissaCole
24681c0819 Send ban messages when the ban is updated 2015-10-01 14:52:31 -07:00
MelissaCole
0d412f4266 Record changing of ban length
If a mod changes the length of a user's subreddit ban, make
a record of this in the mod log to keep things public.
2015-10-01 14:52:20 -07:00
Chad Birch
e7adea1beb /r/friends: use friends that posted most recently
This takes advantage of the new last_submit_time and last_comment_time
timestamps on the Account objects to determine which friends have posted
most recently.

Ideally the ability to sort on data columns would have been added into
the general _query() function, but that seems to be fairly complex, so
this was a lot simpler of a method for addressing this specific problem.
2015-10-01 12:20:32 -06:00
MelissaCole
22f566b1c8 Send admin event on quarantine 2015-09-30 15:40:05 -07:00
MelissaCole
1f1edd56fc Remove quarantine flag from subreddit settings
This is being moved to the sidebar of the subreddit with the ability
to send modmail at the same time.
2015-09-30 15:40:01 -07:00
MelissaCole
fe515c4e35 Add quarantine and message ability for admins 2015-09-30 15:39:18 -07:00
Matt Lee
c7bd6e84dc Fix sharing for post titles with special characters. 2015-09-30 14:28:47 -07:00
Matt Lee
c7a97fc41c Add extra css class to comment permalink pages.
This allows css authors to target specific styles for the permlink page.
2015-09-30 14:28:47 -07:00
Matt Lee
58f4faca0b Replace incorrect arguments to plain_link in several places.
In several places we're passing sr_path and cname arguments, but the correct
arguments are actually _sr_path and nocname.  In these cases it doesn't appear
to be actually causing any problems, but it's still wrong.
2015-09-30 14:28:47 -07:00
Matt Lee
3f58ecb163 Markdown: Fix strikethrough color inside of links. 2015-09-30 14:28:47 -07:00
13steinj
7874382d1c Correct md_sender in "gold gift" messages.
Previously, due to how Snudown works, if a username had two underscores, it would be rendered as [13stein_j_](http://www.reddit.com/user/13stein_j_). This makes it so that the italicizing effect caused by underlines no longer makes this render incorrectly; at the minimal cost of making the sender's name in `/u/` format, (which in reality, affects absolutely nothing in terms of meaning of the message/sender)
2015-09-30 12:23:54 -07:00
13steinj
787fcdc8d0 Change so mods can't block their own subreddits
Previously, a mod would be able to block their own subreddit in their modmail, if they saw a ban message / original mod invite message.

This changes it so the block subreddit buttons would only show the block subreddit button if the user is not a mod of the subreddit.
2015-09-30 12:23:47 -07:00
Neil Williams
51d4cdc8c3 install-reddit: Replace stunnel with nginx.
We moved reddit.com's infrastructure over to nginx a few months ago, so
this brings the install script in line with production and removes a
now-unnecessary dependency.
2015-09-30 09:17:42 -07:00
Chad Birch
1b34aa7e63 Account: track time of last submission/comment 2015-09-29 16:35:10 -06:00
Chad Birch
c9dfed6973 Account: stop writing last_visit attribute
This was being used for a few things in the past, but isn't currently
needed by anything (and we have the same data in LastModified).
2015-09-29 16:35:08 -06:00
Brian Simpson
95e9f68a8a RunCommand: Remove "standalone" mode and clean up.
RunCommand is based off paster's ShellCommand so the cleanup
involved making it copy the current version. "standalone" mode
was removed to reduce complexity and because it's not needed.
2015-09-29 16:39:21 -04:00
MelissaCole
8a13c6b274 Hide approve and remove buttons on deleted things 2015-09-29 11:07:28 -07:00
MelissaCole
bd75a0f6fb Require user to log in for some fake subreddits
r/contrib, r/mod, and r/friends require the user to log in to view any
of the pages associated with those subreddits.
2015-09-29 10:57:52 -07:00
MelissaCole
cf0fe394e6 Clear form on verify email 2015-09-29 10:57:48 -07:00
Brian Simpson
5d45416e2e update_last_visit timer: Use stop/intermediate correctly.
timer.stop(subname) adds a time for the entire timer duration for the
key "subname". What I actually want is to do timer.intermediate(subname)
plus timer.stop() so that the "subname" key only tracks the incremental
time.
2015-09-29 13:34:36 -04:00
Brian Simpson
d33106e7ad Use separate key for set_last_modified no-op timer. 2015-09-29 13:34:32 -04:00
Brian Simpson
a7c74d7c3d Account.update_last_visit: Add timer. 2015-09-29 13:34:14 -04:00
Brian Simpson
c902b60293 js: Don't use paster to build.
It's unnecessary to setup the Pylons app context for building.
2015-09-24 17:34:56 -04:00
Brian Simpson
df7cf0b27f js: Cleanup separation between build and use.
Build always uses the static build directory and doesn't need
to worry about g.uncompressedJS or any of the app config.
2015-09-24 17:34:50 -04:00
Brian Simpson
40067773b1 generated_strings: Don't require the app and cleanup rand_strings.
All that happens in `make i18n` is creating a .py file with
a bunch of automated messages that are marked for translation. Also
simplify rand_strings (now get_funny_translated_string).
2015-09-24 17:34:41 -04:00
Jordan Milne
2fa0b48a97 Lock down Employee OAuth2 authorization
We don't want random apps to be able to access content and
subreddits that only employees have access to.
2015-09-24 12:29:37 -07:00
Jordan Milne
4fa0260eea Set the Secure flag on cookies properly when secure is unspecified
Whoops, got tripped up by the `getattr()`!
2015-09-24 12:29:37 -07:00
Jordan Milne
a867427c6b Make force HTTPS a global feature flag rather than a user pref
Unfortunately, this involved moving large swaths of code to
`r2.lib.cookies` because `r2.controllers.reddit_base` is
an enormous pain to import in tests at the moment.
2015-09-24 12:29:36 -07:00
Jordan Milne
5431f0a997 Remove HSTS code from the app
The per-user logic is much more twisty than it needs to be, and a 3
line nginx rule will do much the same thing.
2015-09-24 12:00:28 -07:00
Jordan Milne
42f96dc18d Filter out links with double-encoded nulls that crash Chrome 2015-09-24 12:00:28 -07:00
Jordan Milne
9372deb62f HTTPSify all the links
Optionally, of course. If your instance doesn't support HTTPS you
can leave `default_scheme` set to `http`
2015-09-24 12:00:28 -07:00
Matt Lee
e7bbf26ce5 Remove unnecessary selector from infobar css. 2015-09-22 16:44:31 -07:00
Matt Lee
64ec49bc68 Always show the 'my subreddits' dropdown. 2015-09-22 16:44:31 -07:00
Matt Lee
8f418e546f Move error handler to top-level reddit-init modules.
The wrap behavior appears to be ignore on modules bundled into other modules. Since
the wrap is applied to 'reddit-init-base' instead of the top-level modules
'reddit-init' and 'reddit-init-legacy', the error-handling wrapper is not
actually getting applied.
2015-09-22 16:44:31 -07:00
Matt Lee
77c50f5c95 Send js module errors as strings. 2015-09-22 16:44:31 -07:00