comparison MoinMoin/action/diff.py @ 1777:ed44b93599b5

remove unneeded request param from page.send_page()
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 18 Feb 2007 21:39:36 +0100
parents 30116d7d098a
children b07b4c102d3d
comparison
equal deleted inserted replaced
1776:fc75423e26a8 1777:ed44b93599b5
15 """ Handle "action=diff" 15 """ Handle "action=diff"
16 checking for either a "rev=formerrevision" parameter 16 checking for either a "rev=formerrevision" parameter
17 or rev1 and rev2 parameters 17 or rev1 and rev2 parameters
18 """ 18 """
19 if not request.user.may.read(pagename): 19 if not request.user.may.read(pagename):
20 Page(request, pagename).send_page(request) 20 Page(request, pagename).send_page()
21 return 21 return
22 22
23 try: 23 try:
24 date = request.form['date'][0] 24 date = request.form['date'][0]
25 try: 25 try:
50 50
51 # get a list of old revisions, and back out if none are available 51 # get a list of old revisions, and back out if none are available
52 currentpage = Page(request, pagename) 52 currentpage = Page(request, pagename)
53 revisions = currentpage.getRevList() 53 revisions = currentpage.getRevList()
54 if len(revisions) < 2: 54 if len(revisions) < 2:
55 currentpage.send_page(request, msg=_("No older revisions available!")) 55 currentpage.send_page(msg=_("No older revisions available!"))
56 return 56 return
57 57
58 if date: # this is how we get called from RecentChanges 58 if date: # this is how we get called from RecentChanges
59 rev1 = 0 59 rev1 = 0
60 log = editlog.EditLog(request, rootpagename=pagename) 60 log = editlog.EditLog(request, rootpagename=pagename)
125 request.write(f.paragraph(0)) 125 request.write(f.paragraph(0))
126 126
127 if request.user.show_fancy_diff: 127 if request.user.show_fancy_diff:
128 from MoinMoin.util import diff_html 128 from MoinMoin.util import diff_html
129 request.write(f.rawHTML(diff_html.diff(request, oldpage.get_raw_body(), newpage.get_raw_body()))) 129 request.write(f.rawHTML(diff_html.diff(request, oldpage.get_raw_body(), newpage.get_raw_body())))
130 newpage.send_page(request, count_hit=0, content_only=1, content_id="content-below-diff") 130 newpage.send_page(count_hit=0, content_only=1, content_id="content-below-diff")
131 else: 131 else:
132 from MoinMoin.util import diff_text 132 from MoinMoin.util import diff_text
133 lines = diff_text.diff(oldpage.getlines(), newpage.getlines()) 133 lines = diff_text.diff(oldpage.getlines(), newpage.getlines())
134 if not lines: 134 if not lines:
135 msg = f.text(_("No differences found!")) 135 msg = f.text(_("No differences found!"))