[wiki-lenny] Correction macro RandomPageInclude

... ou comment pourrir la vie des gens en faisant des petits changements de
noms de fonction ...

darcs-hash:20081212122735-ddb99-c45a0a9bef82ee45f7a7b4420342128f367ed743.gz
This commit is contained in:
Michel Blockelet 2008-12-12 13:27:35 +01:00
parent e11df9e038
commit 97f874a897

View file

@ -55,8 +55,7 @@ def execute(macro, text, args_re=re.compile(_args_re_pattern), title_re=re.compi
# Search the pages and return the results # Search the pages and return the results
query = search.QueryParser(regex=1).parse_query(args.group('name')) query = search.QueryParser(regex=1).parse_query(args.group('name'))
results = search.searchPages(request, query) results = search.searchPages(request, query, sort='page_name')
#results.sortByPagename()
pagelist = [results.hits[qnumber].page_name] pagelist = [results.hits[qnumber].page_name]
# prepare including page # prepare including page
@ -190,7 +189,7 @@ def execute(macro, text, args_re=re.compile(_args_re_pattern), title_re=re.compi
strfile = StringIO.StringIO() strfile = StringIO.StringIO()
request.redirect(strfile) request.redirect(strfile)
try: try:
#cid = request.makeUniqueID("Include_%s" % wikiutil.quoteWikinameFS(inc_page.page_name)) cid = request.make_unique_id("Include_%s" % wikiutil.quoteWikinameFS(inc_page.page_name))
inc_page.send_page(content_only=1) #, content_id=cid) inc_page.send_page(content_only=1) #, content_id=cid)
result.append(strfile.getvalue()) result.append(strfile.getvalue())
finally: finally: