[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:
parent
e11df9e038
commit
97f874a897
1 changed files with 2 additions and 3 deletions
|
@ -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:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue