Details

Applies to
1.5.5a
Purpose
add a link to create a page if not found in a title search
Description
this two line patch adds a very trivial link to a page if it is not found in a title search.

Patch

   1 --- fullsearch.py.orig	Tue Oct 24 12:40:46 2006
   2 +++ fullsearch.py	Tue Oct 24 12:38:25 2006
   3 @@ -115,6 +115,8 @@
   4                                               context=context)
   5      else:
   6          output = results.pageList(request, request.formatter, info=info)        
   7 +	if titlesearch and len(results.hits) < 1:
   8 +		output += _("The page %s does not exist, you want to create it?" % needle)
   9      request.write(output)
  10  
  11      # End content and send footer
titlesearchcreate.patch

You need to use a link to the page to have it work for the general case.

Discussion

This feature is present in 1.6, apparently, but I wanted it sooner. :) -- TheAnarcat 2006-10-24 16:40:26

Plan


CategoryMoinMoinPatch

MoinMoin: MoinMoinPatch/TitleSearchCreatePageIfNotExists (last edited 2007-10-29 19:22:43 by localhost)