Commit Graph

7306 Commits

Author SHA1 Message Date
Chad Birch
ff0d31eda1 TEMP: redirect /related/ to comments page
We can leave this in for a while until search engines and other clients
figure out that the "related" page is gone.
2016-03-03 11:54:28 -07:00
Chad Birch
7aa4c97430 Remove the "related" page for posts
This page works by just doing a search for the title of the post. The
results are almost always completely useless. It's also hit extremely
heavily by search engine bots and is probably costing us a significant
amount of money doing all of these searches.
2016-03-03 11:54:27 -07:00
Kevin O'Connor
d30cfba527 Display current username prominently on OAuth authorization page. 2016-03-02 15:09:03 -08:00
Daniel Ellis
532de4425c ip_events: Move ip_events to reddit. 2016-03-02 14:31:39 -08:00
Brian Simpson
4c9d5d4484 Make errorlog employee only rather than admin only 2016-03-02 12:13:52 -08:00
Tiffany Dohzen
2546387861 Fix "inbox" tab selection for unread and username mentions 2016-03-02 11:23:55 -08:00
Tiffany Dohzen
b342f4bc6e Remove reddit store from footer 2016-03-02 11:23:55 -08:00
Neil Williams
487699f637 setup: Add comment about why baseplate's in a try block 2016-03-02 10:54:55 -08:00
Neil Williams
77c2a2ae16 install-reddit: Print out the conclusion text for non-vagrant users
This required a little more hygiene with the working directory during
the install stuff so that we can find the done script at the end.
2016-03-02 10:54:54 -08:00
Neil Williams
ce015068db install-reddit: Don't build statics
This speeds up builds and is unnecessary to do because uncompressedJS is
on by default.
2016-03-02 10:54:54 -08:00
Neil Williams
23cbcd3bbf install-reddit: Don't sudo inside install-reddit, require it outside
Previously, install-reddit.sh ran install/reddit.sh with sudo. This
confused install.cfg when install-reddit.sh was itself run with sudo
because the inner sudo would cause $SUDO_USER to erroneously be root.
install-reddit.sh _should_ be run as sudo so that when it prints out
install.cfg the values are accurate, but should not run
install/reddit.sh with an additional sudo since that'll mess things up.
2016-03-02 10:54:54 -08:00
Neil Williams
25761e50fb install-reddit: Don't expect the config file to be executable 2016-03-02 10:54:54 -08:00
Daniel Ellis
4c38e3196b ip: Accept any falsy value for column start and finish. 2016-03-02 09:28:47 -08:00
Brian Simpson
f575290741 Move sorting from CommentBuilder to CommentOrderer 2016-03-01 15:54:30 -08:00
Daniel Ellis
676dc3ec5a tdb_cassandra: Only pop item if reversing query. 2016-03-01 15:42:26 -08:00
Brian Simpson
60eba33456 CommentBuilder: Move collapse handling to apply_collapses() 2016-03-01 12:08:52 -08:00
Brian Simpson
3712bb2f04 CommentBuilder: Move Wrapped handling into wrap_items() 2016-03-01 11:24:06 -08:00
Daniel Ellis
6aca2ae9ac tdb_cassandra: Fix bug when reversing with column_start. 2016-03-01 11:11:51 -08:00
Daniel Ellis
53cfa79913 ip: Support reversing results in IP models. 2016-03-01 11:11:44 -08:00
umbrae
7945ab154b API: Add is_employee, in_beta states to me.json 2016-03-01 09:54:19 -08:00
Brian Simpson
80d7745dd1 Update /jobs redirect 2016-02-29 16:31:14 -08:00
Brian Simpson
9cf691ceae CommentTree.rebuild: add missing constructor arg 2016-02-29 12:19:51 -08:00
Brian Simpson
ca800d4eb2 CommentBuilder: Separate handling of MoreRecursions
This isolates the work and logic to one place rather than spread out in the
main CommentBuilder function.
2016-02-29 12:19:45 -08:00
Chris Slowe
5dabab71cb LoID fixup: only create new on non-static render types 2016-02-26 10:09:13 -08:00
Chris Slowe
ea17655abf Add server-side loid generation and cookieing.
This doesn't remove the existing loid generation in JS, but will supercede it as the first request from the server will have the an loid cookie.

This also doesn't change the current cookie behavior, but rather localizes all of the loid generation code to a module so that we can eventually fix it up and not break behavior in the rest of the app.
2016-02-26 10:08:19 -08:00
Chris Slowe
05fa36f801 Add ipv4/24 & ipv4/16 (obfuscated), and hooks to events 2016-02-26 10:07:19 -08:00
Chris Slowe
0ddc88523f Events: track rank of each link in a listing in screenview_events
Example payload:

```json
[
  {
    "event_topic":"screenview_events",
    "event_type":"cs.screenview",
    "event_ts":1455145909943,
    "uuid":"b1507273-c04e-43ab-b339-fb91f72b72b5",
    "payload": {
      "user_id":52,
      "user_name":"KeyserSosa",
      "listing_name":"frontpage",
      "rank_by_link":{"t5_20":1,"t5_1z":2,"t5_1y":3,"t5_1x":4,"t5_1w":5,"t5_1v":6,"t5_1u":7,"t5_1t":8,"t5_1s":9,"t5_1r":10,"t5_1q":11,"t5_1p":12,"t5_1o":13,"t5_1n":14,"t5_1m":15,"t5_1l":16,"t5_1k":17,"t5_1j":18,"t5_1i":19,"t5_1h":20,"t5_1g":21,"t5_1f":22,"t5_1e":23,"t5_1d":24,"t5_1c":25},
      "language":"en",
      "dnt":false,
      "referrer_domain":"reddit.local",
      "referrer_url":"https://reddit.local/",
      "target_type":"listing",
      "target_sort":"new",
      "app_name":"reddit.com",
      "utc_offset":-8,
      "user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.103 Safari/537.36",
      "domain":"reddit.local",
      "base_url":"/new/"
    }
  }
]
```
2016-02-26 10:05:09 -08:00
Chris Slowe
1af69e491b Anti-Evil: move nofollow logic into a separate classmethod with a hook 2016-02-26 10:01:25 -08:00
Brian Simpson
cb72d46be7 CommentBuilder: Add a method to modify the comment tree
This is instead of bundling the modifications in with the logic
to determine the initial candidate comments.
2016-02-25 15:03:46 -08:00
Brian Simpson
f8e76c5226 CommentBuilder: don't shuffle the top level MoreChildren 2016-02-25 14:03:48 -08:00
Brian Simpson
c867b98619 CommentBuilder: Add comment about MoreChildren depth bug 2016-02-25 14:03:48 -08:00
Brian Simpson
e6ccea00a2 CommentBuilder: Add some comments in the constructor
The CommentBuilder has 3 different modes:
* regular mode for building a comments page
* permalink mode for building the tree starting from a specific comment
* morechildren mode for building the tree starting from specific comments
2016-02-25 14:03:48 -08:00
Brian Simpson
6fe0169198 Move make_wrapper to things.py 2016-02-25 14:03:48 -08:00
Brian Simpson
e272a9fe15 Delete unnecessary link_comments_and_sort 2016-02-25 14:03:48 -08:00
Brian Simpson
c94efffcc9 Delete unnecessary get_comment_tree 2016-02-25 14:03:44 -08:00
Brian Simpson
c74c75800d CommentTree: Calculate num_children
num_children is derived directly from the tree, so it makes sense
to calculate it on CommentTree retrieval rather than waiting and making
the CommentBuilder handle it. Calculating child counts in advance for the
full tree appears to be faster than the previous method of using
`get_num_children()` to calculate the child count only for visible comments.
2016-02-25 12:24:05 -08:00
Brian Simpson
ff01943ca7 CommentBuilder: Add test for limited children 2016-02-25 12:24:05 -08:00
Brian Simpson
a2004b2e45 CommentBuilder: Add test for permalink defocusing 2016-02-25 12:24:00 -08:00
Brian Simpson
cce71b0a24 js_config: Guard against unset c.user 2016-02-24 12:29:55 -08:00
Brian Simpson
9caccc3043 _handle_register: Handle AccountExists exception
This is normally caught by the VUname validator, but simultaneous
requests can both pass that check and then the second one will trigger
the exception when actually trying to create the account.
2016-02-24 12:13:18 -08:00
Ricky Ramirez
bddb833e96 Update PII retention periods to 100 days.
This was bumped from 90 to 100 days in the latest version of our privacy
policy.
2016-02-24 11:53:19 -08:00
Chad Birch
b0d393b8ff Update ChillingEffects references to Lumen
Chilling Effects has changed its name to Lumen and its url to
lumendatabase.org: https://www.lumendatabase.org/blog_entries/763
2016-02-23 18:32:13 -07:00
Brian Simpson
89cd42b710 Don't show ads in submit duplicates listing 2016-02-23 15:24:38 -08:00
Brian Simpson
d8ce869312 On submit, show up to 100 duplicates rather than all duplicates 2016-02-23 15:24:30 -08:00
Brian Simpson
98f6365892 Stop writing LinksByUrl
It's now been completely replaced by LinksByUrlAndSubreddit
2016-02-23 15:24:22 -08:00
Brian Simpson
b18c4f17ad Read from LinksByUrlAndSubreddit 2016-02-23 15:24:14 -08:00
Brian Simpson
dffbae446a Add LinksByUrlAndSubreddit backfill script 2016-02-23 15:24:05 -08:00
Brian Simpson
a497cbfb37 Dual write to LinksByUrlAndSubreddit 2016-02-23 15:23:53 -08:00
Brian Simpson
8ac7bfc075 Add LinksByUrlAndSubreddit
This will replace LinksByUrl.
2016-02-23 15:23:36 -08:00
Chad Birch
19b38a4615 Cloudflare purge: stop triple-purging
Supposedly the purging is more reliable now, so it shouldn't be
necessary to purge everything three times to be sure it works.
2016-02-22 13:51:40 -07:00