David Wick
afca9c746f
Force https when validating sensitive information
2015-03-24 09:32:35 -07:00
Brian Simpson
f060da53c3
cache stats: Don't count localcache hits.
2015-03-23 18:08:20 -04:00
xiongchiamiov
12a8eec564
Q&A sort: condense menu text
...
It looked weird with spaces in it.
2015-03-23 13:18:14 -07:00
Brian Simpson
0e147fc276
MultiReddit.get_all_comments: don't lookup Subreddits.
2015-03-23 03:09:49 -04:00
Brian Simpson
7d8334db34
DefaultSR.get_all_comments: don't lookup Subreddits.
2015-03-23 03:09:49 -04:00
Brian Simpson
650f77f0f9
subreddit.get_links_sr_ids: don't lookup Subreddits.
2015-03-23 03:09:49 -04:00
Brian Simpson
9d93c78b50
pages: Force stale Subreddit lookups.
2015-03-23 03:09:48 -04:00
Brian Simpson
d16d8880f3
Subreddit: do stale lookups in default_subreddits() and user_subreddits().
2015-03-23 03:09:48 -04:00
Brian Simpson
e233fb1626
Subreddit.random_reddits: use stale lookup of automatic reddits.
2015-03-23 03:09:48 -04:00
Brian Simpson
2216f5eae5
LabeledMulti: Allow stale Subreddits.
2015-03-23 03:09:42 -04:00
Brian Simpson
3eee11fd80
Don't load LabeledMultis' subreddits when they're not needed.
2015-03-23 03:09:37 -04:00
xiongchiamiov
8c3504a2c6
Q&A sort: don't collapse comments on permalink pages
...
The comment-hiding behavior of Q&A sort has been confusing when viewing a
comment permalink, since it is fairly likely all the comments would be hidden.
This is particularly problematic when the user hasn't explicitly set the sort
for that page, eg by having it set as their default through the sticky sort
behavior or due to a subreddit- or thread-default sort.
Now we don't do any hiding of comments due to Q&A sort on permalink pages.
2015-03-20 13:18:15 -07:00
Florence Yeun
a292d3615f
Comment embeds: Fix embed code selection
...
Fix bug where embed code was not always selected when clicking to
focus on the textarea.
2015-03-20 11:31:16 -07:00
Florence Yeun
00b64d239b
Comment embeds: Increase spacing between checkboxes
2015-03-20 11:31:16 -07:00
Florence Yeun
9f4d3ff27c
Comment embeds: Restore max-width on iframe
2015-03-20 11:31:16 -07:00
Florence Yeun
3db0aac826
Comment embeds: Add a "read more" link for long comments
...
Truncate long comments using CSS and add a "read more" link to
expand the embedded comment in place.
2015-03-20 11:31:16 -07:00
Jordan Milne
b716a04393
Remove r.resAdvisory.init() call
...
This isn't needed anywhere but `reddit.com`, since that's the only
place RES runs, and it hardly gets triggered anymore.
Fixes #1264
2015-03-19 17:16:36 -07:00
Jordan Milne
36e389b296
Respect SC_ directives when spaceCompressing in $.unsafe()
...
This was causing some strange visual defects on .compact when
things were inserted via `$.insert_things()`, notably when scrolling
down on the messages page.
Fixes https://github.com/reddit/reddit/issues/807
2015-03-19 16:26:52 -07:00
Jordan Milne
cc88c946a3
Fix onVisit() when middle-clicking
...
We use the `click` event handler for catching left clicks rather than
`mousedown` so that we don't mistake a drag event for navigation, but
middle clicks don't generate a `click` event in some browsers! Ick!
Fixes the issue at https://www.reddit.com/r/bugs/comments/2smqt8/remember_what_links_youve_visited_across/cnwyh5o?context=9
2015-03-19 16:26:41 -07:00
Jordan Milne
63407af900
Tell downstream proxies not to cache responses with uncacheable cookies
...
Cloudflare will already catch these and add its own
`Cache-Control: no-cache` header, but let's be defensive here.
2015-03-19 16:26:29 -07:00
zeantsoi
a987aa2320
Update example subreddits to valid values
2015-03-19 15:38:59 -07:00
Brian Simpson
869df93026
MyredditsController and RedditsController: use stale lookups.
2015-03-19 02:23:06 -04:00
Brian Simpson
5d5cd8275c
Relation._query: add option to get stale results.
2015-03-19 02:23:06 -04:00
Brian Simpson
edbdef7ed2
Thing._query: add option to get stale results.
2015-03-19 02:23:01 -04:00
Neil Williams
653c6e5113
Upgrade authentication providers to modern system.
...
This is more consistent with other providers and makes it possible for
providers to live outside r2.
2015-03-19 11:52:06 -07:00
grandpaslab
1b6df45fa1
Add support for automatic account creation when using basic auth.
2015-03-19 11:52:00 -07:00
Neil Williams
2b4c3d1fd3
Move CDN client IP verification to a provider.
...
This makes the base controller a bit cleaner and should be more
flexible.
2015-03-19 11:51:39 -07:00
Keith Mitchell
2a7f9cabe9
Arbitrary sets of multis
2015-03-19 11:17:01 -07:00
xiongchiamiov
15de44edf5
Add UrlParser.switch_subdomain_by_extension()
...
Previously, the only choices for changing a desktop url into a mobile one (or
vice versa, or going to XML, etc.) were to do it manually or to override
`c.render_style` before calling `add_sr()`. Now there's an easier way through
`UrlParser`.
This necessitated moving the mappings from subdomains to hinted render
extensions out of the local namespace of a middleware function and into a more
accessible place, so now we also have access to it for other miscellaneous
uses.
2015-03-18 22:53:26 -07:00
xiongchiamiov
920abafaa6
Generate mobile bi-directional links
...
We have canonical links that point to the desktop site from mobile, but Google
would really like us to point the other way, too - to mobile from desktop.
They call these "bi-directional annotations". More on that here:
https://developers.google.com/webmasters/mobile-sites/mobile-seo/configurations/separate-urls?hl=en
2015-03-18 22:53:07 -07:00
Jordan Milne
689a9554e6
Fix several is_reddit_url() bypasses
...
Thanks to Yassine ABOUKIR (http://www.yassineaboukir.com ) for the report!
`////example.com` doesn't survive the round-trip through
`urlunparse(urlparse())` and becomes `//example.com`.
Things like `///\t/foo.com` were also getting by because some UAs
ignore various characters when they occur before the path section.
`UrlParser.is_web_safe_url()` was added to check if a URL could be
interpreted differently by different parsers
2015-03-18 22:52:55 -07:00
Jordan Milne
bb2a5f3a8d
Only embed HTML timing data in HTML responses
...
This prevents timing data from being injected into responses where
'</body>' only shows up incidentally.
2015-03-18 22:52:48 -07:00
Chris Stephens
9299832965
Apis: Return appropriate errors from vote api
2015-03-18 16:03:17 -07:00
Chris Stephens
da4471b4d2
Multi Api: Handle logged out users viewing sub reddit multis
2015-03-18 16:03:11 -07:00
Neil Williams
709ddd9efd
queries.get_likes: Fix crash when no LastModified found.
2015-03-18 15:37:52 -07:00
Chad Birch
4408a521ba
Fix bug in POST_deleteflair
2015-03-17 16:15:15 -06:00
Keith Mitchell
9a47c545fc
Mega-multis: Use "fresh" hot merging in some cases
...
If any of the multis in a mega-multi use the "fresh" weighting_scheme, set
the derived MultiReddit to also use "fresh" weighting.
2015-03-17 13:49:41 -07:00
Keith Mitchell
db5ea46cfd
Multis: Use weighting_scheme to choose ageweight
...
When merging subreddits in a Multireddit, use the multireddit's
weighting_scheme to determine what ageweight to normalize with.
2015-03-17 13:49:32 -07:00
umbrae
ff742c1a3e
Suggested sort: Restrict set suggested sort to mods only
2015-02-27 22:28:19 -08:00
umbrae
c97ee0ec0b
Suggested sort: Rename default_sort fields to 'suggested' variants
2015-02-27 22:28:11 -08:00
umbrae
42ca4459dc
Suggested sorts: set per-thread suggested sort
2015-02-27 22:28:04 -08:00
umbrae
505aee3630
Suggested sort: Add (suggested) to comments sort dropdown
...
Conflicts:
r2/r2/lib/menus.py
2015-02-27 22:27:53 -08:00
umbrae
f939e8396c
Subreddit suggested sort: fix AttributeError on no thing.site
2015-02-27 22:24:59 -08:00
umbrae
c30203b6b5
Unraw jsonp_callback_rx to fix syntax highlighting
2015-02-27 22:24:50 -08:00
umbrae
ef48f97f67
Fix space on suggested comment sort in sr settings
2015-02-27 22:24:38 -08:00
umbrae
d79aa90ab0
Add "default_comment_sort" option for subreddits.
...
If a sort has not been explicitly set for a thread, it will fall back to this
sort. If no sort is provided here, it will be whatever the user's preference
is.
Conflicts:
r2/r2/controllers/front.py
r2/r2/lib/menus.py
2015-02-27 22:22:47 -08:00
umbrae
e338b64a17
Embeds: rewrite click URL only once
2015-02-27 22:18:46 -08:00
umbrae
e5647d641c
Embeds: use our session-appending redirector to track link clicks
2015-02-27 22:18:41 -08:00
umbrae
a992fe88ae
Embeds: avoid extra lookup with data=True
2015-02-27 22:17:57 -08:00
umbrae
5b54af7bfe
Add default sort for links, a mod settable parameter.
...
This adds the base functionality for a default sort for links, wrapped
behind a feature flag. Still yet to be implemented but necessary for
general release:
* A user option to disable all suggested sorts
* An interface for mods to set default sort for a thread
* A subreddit settings to set the default sort for all threads to the SR
Conflicts:
r2/r2/controllers/front.py
2015-02-27 22:15:33 -08:00