mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-25 15:41:06 +00:00
Replace ctx
references with req
references
This commit is contained in:
parent
1ee756c8df
commit
de99912641
@ -203,18 +203,17 @@ class ResultsBase(object):
|
|||||||
assert isinstance(s, (list, tuple))
|
assert isinstance(s, (list, tuple))
|
||||||
return [html.escape(w) for w in s]
|
return [html.escape(w) for w in s]
|
||||||
|
|
||||||
def want_json(self, ctx):
|
def want_json(self, req):
|
||||||
output = get_arg(inevow.IRequest(ctx), "output", "").lower()
|
output = get_arg(req, "output", "").lower()
|
||||||
if output.lower() == "json":
|
if output.lower() == "json":
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def _render_si_link(self, ctx, storage_index):
|
def _render_si_link(self, req, storage_index):
|
||||||
si_s = base32.b2a(storage_index)
|
si_s = base32.b2a(storage_index)
|
||||||
req = inevow.IRequest(ctx)
|
|
||||||
ophandle = req.prepath[-1]
|
ophandle = req.prepath[-1]
|
||||||
target = "%s/operations/%s/%s" % (get_root(ctx), ophandle, si_s)
|
target = "%s/operations/%s/%s" % (get_root(req), ophandle, si_s)
|
||||||
output = get_arg(ctx, "output")
|
output = get_arg(req, "output")
|
||||||
if output:
|
if output:
|
||||||
target = target + "?output=%s" % output
|
target = target + "?output=%s" % output
|
||||||
return tags.a(si_s, href=target)
|
return tags.a(si_s, href=target)
|
||||||
|
Loading…
Reference in New Issue
Block a user