Commit Graph

1879 Commits

Author SHA1 Message Date
Logan Hanks
6c856d9b51 Refactor oauth2 scopes and add subreddits to them. 2012-09-26 13:29:44 -07:00
Logan Hanks
ae7435c78b Apply bearer token before calling controller's pre().
This is necessary to add oauth support to controllers that use c.user to
enforce permissions.
2012-09-26 13:29:43 -07:00
Logan Hanks
303b116bf1 Add error code for VModhash errors. 2012-09-26 13:29:43 -07:00
Keith Mitchell
983baa0214 Check reverse_moderator_ids of the wrapped Account 2012-09-26 13:29:41 -07:00
Neil Williams
b2ad131cbb Subreddit CSS: Store subreddit CSS on S3 and minify it.
This means that stylesheets can have all the advantages of other static
files, such as not having session cookies in the request. In addition,
it also means that subreddit objects are drastically smaller in memcache
which saves internal bandwidth and increases cache capacity.
2012-09-25 15:39:06 -07:00
Neil Williams
bfd2372e63 ErrorController: Send status code even when not rendering.
Previously, if the current extension were not in allowed_render_styles,
the error's HTTP status code would be swallowed and turned into a 200.
This meant that 404ing stylesheets were actually sending back the text
"404" as an "OK" stylesheet.
2012-09-25 15:39:06 -07:00
Neil Williams
5c2679fbf6 static: Use rCSSMin to minify CSS files during static file compilation.
This shows a 10% reduction in size of the compressed results on the
current reddit.css stylesheet.
2012-09-25 13:01:37 -07:00
Neil Williams
332277f572 POST_site_admin: move sidebar/description so they're set on creation.
A previous change made it so that the sidebar and description fields
would not be set properly on subreddit creation but only on edit.
2012-09-25 13:01:37 -07:00
Neil Williams
21b33b5a06 vote: Store vote details for 90 days. 2012-09-24 14:33:32 -07:00
Andre D
dceca6edbc subreddit: Correct incorrect modaction site 2012-09-24 14:29:19 -07:00
Keith Mitchell
c53b5e7b75 unicode objects don't have a cssText attr 2012-09-24 14:07:38 -07:00
Arun Debray
87a6a29e8c Fix /user/ page paths in the API documentation.
To view information about a user, one must visit
/user/{username}/overview.json, etc., but the documentation had said one
should visit /{username}/overview.json, etc.
2012-09-24 14:07:13 -07:00
Neil Williams
34417ee6ef vote: Gracefully degrade when no vote details are available. 2012-09-24 14:07:13 -07:00
Max Goodman
7621afe962 Apply stylesheets client-side in a safer manner. 2012-09-19 16:08:14 -07:00
Neil Williams
5dba8a65ae builders: Rework SimpleBuilder for use with simple psuedo-things. 2012-09-19 11:29:39 -07:00
Neil Williams
a6e725502e vote: Remove old tdb_cassandra.Relation-based vote infrastructure. 2012-09-19 11:29:19 -07:00
Neil Williams
34d93cac28 vote: Add get_details method to fetch vote details. 2012-09-19 11:28:52 -07:00
Neil Williams
57f20be12e vote: Cut CommentVote reads over to CommentVotesByAccount.
This patch makes us use the new DenormalizedRelation-based
CommentVotesByAccount for reads.

This continues dual-writing of votes to LinkVote/CommentVote.
2012-09-19 11:28:47 -07:00
Neil Williams
56975f7fed wiki: Cache wikified subreddit text on subreddit object.
This is a short-term solution until we figure out a better place to
store this information.  Currently, the property-getters are generating
way too much traffic to Cassandra and we should continue using the old
storage location for the latest revision.
2012-09-19 11:28:34 -07:00
Andre D
57fb1edd3f Subreddit: Handle previous revision failures 2012-09-19 11:27:41 -07:00
Andre D
a2747b4241 Subreddit: Add missing new wiki related fields 2012-09-19 11:27:34 -07:00
Keith Mitchell
a72a562fe0 Remove unused r2.config.utils
It was at some point moved to r2.lib.utils,
as all the functionality of r2.config.utils is
duplicated exactly in r2.lib.utils
2012-09-17 14:26:40 -07:00
Max Goodman
f50de2d6d4 submit: Add VModhash check. 2012-09-17 14:26:40 -07:00
Max Goodman
c45f0b5328 Remove name availability indicator when updating.
Thanks for the heads-up /u/davidjayhawk!
2012-09-14 17:08:11 -07:00
Max Goodman
fbc8eea552 Whitespace. 2012-09-14 17:08:11 -07:00
Neil Williams
2171b300a8 vote: Fix VoteDetailsByThing aggregating backwards.
Voter and votee were swapped. Déjà vu!
2012-09-14 17:08:10 -07:00
Max Goodman
e86f786aeb Add missing subreddit setting error fields. 2012-09-14 15:27:40 -07:00
Max Goodman
bf9e58ada7 Validate "wikimode" subreddit setting. 2012-09-14 15:27:40 -07:00
Max Goodman
815a432a61 Fix validation of setting subreddits to archived. 2012-09-14 15:27:40 -07:00
Max Goodman
2b53fab01f Wait for 2 characters before querying interest bar. 2012-09-14 15:27:40 -07:00
Max Goodman
a58624b8e6 Reorder interest bar key press handling logic. 2012-09-14 15:27:39 -07:00
Max Goodman
9424f5ad81 registration: Disable submit button when username invalid. 2012-09-14 15:27:39 -07:00
Max Goodman
49adee7c15 CSS cleanup. 2012-09-14 15:27:39 -07:00
Max Goodman
ae040dd405 registration: As-you-type username availability check. 2012-09-14 15:27:39 -07:00
Max Goodman
93a8d567ae Rename/link icons to more generic names. 2012-09-14 15:27:39 -07:00
shlurbee
5c8f678ed9 Add campaign thing name to tracking string
This change will make it possible to track traffic by campaign instead of just
by link.

Note that, as is, this change will cause the campaign fullname to be included
as part of the subreddit string in traffic_thingtarget and traffic_clicktarget,
two tables that are not currently used anywhere in the app.

To complete campaign traffic, the TargetedClickthroughsByCodename and
TargetedImpressionsByCodename in lib/traffic.py:make_report() will need to
be updated to store the campaign codename instead of link codename when
available.
2012-09-12 16:01:18 -07:00
shlurbee
82bd4333c6 Fix incorrectly set campaign id in weights
This fixes a bug where get_promotions_cached was returning the same campaign
id (the last one in the loop) for all promoted links. This bug doesn't affect
anything on the live site, but it means the per-campaign traffic data logged
prior to the fix will be inaccurate.
2012-09-12 15:45:08 -07:00
Neil Williams
5d6abdcf3b trophies: Reduce number of trophies fetched in Trophy.by_award.
We usually only care about 1 trophy anyway (except on admin pages) so
this is drastically wasteful.
2012-09-12 15:35:03 -07:00
Andre D
8b85deb45b Subreddit: Missing json attribute prevstyle 2012-09-12 15:34:40 -07:00
Andre D
a65a35f031 Wiki: Fixed being able to create restricted pages 2012-09-11 21:29:20 -07:00
Andre D
9e5590d3ea Wiki: Fix typo 2012-09-11 21:29:20 -07:00
Andre D
345dfb3e43 Wiki: Fix xss involving page name 2012-09-11 21:29:20 -07:00
Andre D
1229a0e6c2 Wiki: Fix API typo 2012-09-11 21:29:20 -07:00
Andre D
a527104c0a Wiki: Correctly fix getting subreddit name from revision model 2012-09-11 21:29:20 -07:00
Andre D
d10ca35bbe Subreddit: Correct incorrect conflict exceptions 2012-09-11 21:29:20 -07:00
Andre D
024a7d55be Subreddit: Do not show wiki tab on fake subreddits 2012-09-11 21:29:20 -07:00
Andre D
90a777511f Wiki: Match image IDs with percent symbols like the stylesheet 2012-09-11 21:29:20 -07:00
Andre D
ac68957824 Wiki: Correct getting subreddit name from revision model 2012-09-11 21:29:20 -07:00
Andre D
78dd83a0ca Wiki: Small cleanup on wiki model 2012-09-11 21:29:20 -07:00
Andre D
0800900624 Wiki: Corrected wiki toolbox links 2012-09-11 21:29:20 -07:00