Commit Graph

7221 Commits

Author SHA1 Message Date
Matt Lee
d4eaef679b Reports: Add default text color to report form
This should make it harder for subreddit css to accidentally make
the report form unreadable, particularly in subreddits with dark themes.
2016-02-18 12:27:14 -05:00
Matt Lee
06ebd786a2 install-reddit: Add reddit-serve helper script
Runs the app in the terminal so you can see logs and use pdb.
2016-02-18 12:27:03 -05:00
Matt Lee
f900cf0e7b Embeds: Add missing window.r object 2016-02-18 12:26:29 -05:00
Matt Lee
67ff3e3f34 Timeouts: Filter user info exposed through API.
Some account information for users in permanent suspension, such as karma, are
still accessible through the api. This info is hidden on the site, so it should
be treated similarly in the API response.
2016-02-18 12:25:54 -05:00
Matt Lee
49a94a2d86 Fix timeout modal on report link. 2016-02-18 12:25:47 -05:00
Matt Lee
80e0212956 Timeouts: Disable email sharing in UI. 2016-02-18 12:25:37 -05:00
Matt Lee
c4ea9b1442 Remove link to reddit.tv in footer 2016-02-18 12:25:26 -05:00
Matt Lee
ef5ba6e33b Timeouts: Remove feature flags. 2016-02-18 12:25:13 -05:00
Matt Lee
f7d7167042 Add missing gold config to example.ini
The gold plugin is throwing an error on a fresh install without this.
2016-02-14 12:39:22 -08:00
Chad Birch
7099b63f5e Spam filter "all" setting: call admintools.spam()
This needs to be called on posts being removed by the "all" filter
setting to update some info on them and put them into the correct cached
queries so that they show up in pages where the mods expect them.
2016-02-12 13:00:35 -07:00
Chris Slowe
4d8bebd6bd Testing: fix broken eventcollector_test.py and link_test.py 2016-02-11 15:03:43 -08:00
Brian Simpson
c6c2f09427 vagrant: Ensure host's code path is set correctly
You can run `vagrant up` from any directory within a project--vagrant
will look for a Vagrantfile in the current directory and if it doesn't
find one walk up one directory, and repeat until it finds a Vagrantfile.
Previously the `code_share_host_path` was set assuming that `vagrant up`
would always be run from the root reddit directory. Now it is set from the
fixed known location of the Vagrantfile.
2016-02-11 10:36:39 -08:00
Chad Birch
9dd31e5c10 POST_selectflair: call format_html() correctly 2016-02-10 15:54:31 -07:00
Chris Slowe
d786830434 Events: add link rank (if available) to vote events 2016-02-10 13:52:04 -08:00
Chad Birch
3b39d7ba1a Handle "all" spam-filter level at time of posting
This was previously being done in the spam-filter itself, so if there
are site issues causing the filter to fall behind, subreddits that use
the "all" setting to initially remove all posts would have it stop
working until the filter was able to catch up.

This moves the check into the actual posting process so that it isn't
dependent on the filter at all (and will also make this setting function
on open-source installs where the spam-filter code isn't available).
2016-02-10 14:38:56 -07:00
Chris Slowe
107ddbd1b2 Testing: remove inapplicable url_flags test 2016-02-10 13:35:54 -08:00
MelissaCole
b601b510f9 Move report event process_notes logic 2016-02-10 13:25:49 -08:00
MelissaCole
d0e24626e8 Support new and old sitewide rules in report events 2016-02-10 13:15:44 -08:00
MelissaCole
310849093e Support subreddit rules in report events 2016-02-10 13:15:23 -08:00
Chris Slowe
81315c9829 Anti-Evil: Only update the global reports list when the user reports spam 2016-02-10 12:25:53 -08:00
Chris Slowe
fa06747bc3 Events: add target_age_seconds and target_title (for links) to applicable events on the event pipeline
For events with a notion of a `target`, this stores:

  * `target._age` as `target_age_seconds` in seconds.  This is derivable from the event timestamp and the `target_created_ts` but simpler to query if it's denormalized
  * For `Link`s, store the `target.title` as `target_title`.  The primary goal here is to add more context around reports in Interana.

Also add a test for the report event and fixup the existing tests.
2016-02-10 12:24:42 -08:00
Chris Slowe
be5106d4b9 Testing: fixup mocking in feature_test.py and eventcollector_tests.py 2016-02-10 12:23:42 -08:00
Chris Slowe
20f061eab3 Anti-Evil: add listing to drive /r/all/about/reports 2016-02-10 12:10:18 -08:00
13steinj
528cfcf867 Don't translate messages for gold gifts.
Sending a translated message is confusing for the recipient and can theoretically void an anonymous sender's privacy.
2016-02-10 12:02:40 -08:00
MelissaCole
cd8103a3d0 Clear up flat list buttons for deleted posts
Don't allow sharing, saving, or hiding a deleted post. A user can unsave and
unhide a deleted post so that it's not stuck in the user's saved/hidden lists.
2016-02-10 12:02:37 -08:00
Matt Lee
fc8c9a75a4 Sharing: Disable on links with comments disabled.
The share feature is currently broken on promoted links that have comments
disabled. Since the share feature relies on links having a comments thread,
hide it for any link with comments disabled.
2016-02-10 12:02:33 -08:00
Brian Simpson
6145561143 Set attributes on Wrapped search result 2016-02-10 11:58:11 -08:00
Tiffany Dohzen
6d2ce40fea Mod tools: Rename 'links' to 'posts' in menus 2016-02-10 10:54:34 -08:00
Tiffany Dohzen
3dbcba8bf8 Change reddiquette link to content policy on comment/PM compose box 2016-02-10 10:54:26 -08:00
Chad Birch
8031d388cb tdb_cassandra: remove obsolete report functions
These functions are no longer used for anything (and don't even work).
2016-02-09 13:58:36 -07:00
Chad Birch
ec2368a17a Thing/tdb_sql: remove unused get_cols/extra_props
Neither of these are used at all, so this code can be simplified a bit
by dropping them. get_cols was being specifically set to False in the
code so everything related to it being True was completely dead code.
2016-02-09 13:56:31 -07:00
Chad Birch
0d808811b7 Stop checking title for NSFW/NSFL at display-time
As of 156672bed6 we started checking the
title of submissions at submit-time to see if they should be set to
NSFW. Between that and backfilling all existing submissions to have the
NSFW flag set correctly based on their titles, we can now remove the
display-time check.

This will allow moderators and submitters to turn off NSFW even if
"NSFW" or "NSFL" is in the title. This was an annoyance in cases where
the submitter puts something like "(not NSFW)" in the title but then had
the flag stuck on because of the display-time check.
2016-02-09 13:08:20 -07:00
Brian Simpson
49d7c8d1b5 Add tests for CommentBuilder ordering 2016-02-08 13:55:17 -08:00
Brian Simpson
7e4ae8b280 CommentBuilder._get_comments: set order to object
This will let us test the sorting behavior
2016-02-08 13:55:11 -08:00
Jack Lawson
d30471661f Add wiki_enabled to subreddit JSON response
So we know whether or not to show a "wiki" button, include wiki_enabled.
This will be "true" if the wiki is public, or if you are a mod/admin and
the wiki is set to "mod only"; othrewise, it will return "false".
2016-02-08 13:20:45 -08:00
Brian Simpson
d99a0aef49 Stop updating comment scores on sticky change 2016-02-08 09:25:36 -08:00
Jack Lawson
c66c3942c5 Add adzerk_url to example.ini 2016-02-02 14:37:29 -08:00
Zean Tsoi
3e14743ef3 Events collector: add config vars for test_js_key and test_js_secret 2016-02-02 11:55:07 -08:00
David Wick
a510e92c7c analytics.js: Factor out common event data into addContextData 2016-02-01 14:56:46 -08:00
Matt Lee
86b3e71f02 Events: Add frontend expando events 2016-02-01 14:56:42 -08:00
David Wick
306ceff774 Update event-tracker to latest version 2016-02-01 14:51:55 -08:00
David Wick
517a1a49de eventscollector: Use test endpoint if g.debug is True. 2016-02-01 14:50:44 -08:00
Chad Birch
663b00bf1e Create subreddit button: hide if user can't create
We only show the create subreddit button in the sidebar to users whose
account is at least 30 days old, but since there are now some additional
requirements for creating a subreddit, this means that sometimes we end
up showing the button to people that won't be able to successfully
create a subreddit. This keeps the 30-day restriction, but on top of
that also checks that the user's actually going to be able to create
before showing the button.
2016-02-01 12:44:57 -07:00
Daniel Ellis
b7f1b052c8 ip_events: Use TTL on batch mutator. 2016-01-28 15:58:21 -08:00
Chris Slowe
81f5d74cc2 Fix install-reddit.sh to once again work via wget without checkout out the repository 2016-01-28 11:25:54 -08:00
zeantsoi
921c734816 Vagrantfile: Update box url and checksum 2016-01-27 12:31:06 -08:00
Daniel Ellis
45cb444d97 ip_events: Add Cassandra models.
We are storing the date in the column for sorting when querying.

Entries will stay in Cassandra for 90 days.
2016-01-27 11:44:19 -08:00
MelissaCole
816cd3bf03 Subreddit Rules: Fix typos 2016-01-27 11:35:15 -08:00
Brian Simpson
4c6740c6f6 Account.friend_rels_cache: Load data attributes in query
Otherwise we may pollute the cache with un-loaded Account objects.
This is almost guaranteed to happen when Account.friend_rels needs
to load the Accounts with data immediately after calling
Account.friend_rels_cache.
2016-01-27 11:19:26 -08:00
Brian Simpson
2f2998110d Account._by_name_cache: Don't pollute cache with unloaded objects
Set `data=True` on the query so that the retrieved Accounts will
have their data attributes loaded before being set into the cache.
2016-01-27 11:19:20 -08:00