mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-04-05 03:00:15 -04:00
remove liked/disliked/saved bookmarklets and update modhash error handling
This commit is contained in:
@@ -121,9 +121,14 @@ def noresponse(*simple_vals, **param_vals):
|
||||
c.response_content_type = 'application/json; charset=UTF-8'
|
||||
jquery = JQueryResponse()
|
||||
|
||||
validate(*simple_vals, **param_vals)(fn)(self, *a, **env)
|
||||
|
||||
return self.response_func()
|
||||
try:
|
||||
kw = _make_validated_kw(fn, simple_vals, param_vals, env)
|
||||
fn(self, *a, **kw)
|
||||
return ''
|
||||
except UserRequiredException:
|
||||
jquery = JQueryResponse()
|
||||
jquery.refresh()
|
||||
return self.response_func(**dict(list(jquery)))
|
||||
return newfn
|
||||
return val
|
||||
|
||||
@@ -162,12 +167,12 @@ def validatedForm(*simple_vals, **param_vals):
|
||||
return self.response_func(**dict(list(jquery)))
|
||||
|
||||
except UserRequiredException:
|
||||
return self.ajax_login_redirect("/")
|
||||
jquery = JQueryResponse()
|
||||
jquery.refresh()
|
||||
return self.response_func(**dict(list(jquery)))
|
||||
return newfn
|
||||
return val
|
||||
|
||||
|
||||
|
||||
#### validators ####
|
||||
class nop(Validator):
|
||||
def run(self, x):
|
||||
|
||||
@@ -984,8 +984,7 @@ class Socialite(Wrapped):
|
||||
|
||||
class Bookmarklets(Wrapped):
|
||||
"""The bookmarklets page."""
|
||||
def __init__(self, buttons=["reddit", "like", "dislike",
|
||||
"save", "serendipity!"]):
|
||||
def __init__(self, buttons=["reddit", "serendipity!"]):
|
||||
Wrapped.__init__(self, buttons = buttons)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user