changeset 810:413cc62c6ec4

fix for the xapian indexer
author Franz Pletz <fpletz AT franz-pletz DOT org>
date Fri, 09 Jun 2006 17:57:23 +0200
parents 8dbfb6826497
children 2588317f8b2b
files MoinMoin/Xapian.py MoinMoin/script/index/build.py
diffstat 2 files changed, 7 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/Xapian.py	Thu Jun 08 16:45:10 2006 +0200
+++ b/MoinMoin/Xapian.py	Fri Jun 09 17:57:23 2006 +0200
@@ -485,6 +485,8 @@
         pagename = page.page_name
         mtime = page.mtime_usecs()
         itemid = "%s:%s" % (wikiname, pagename)
+        updated = False
+
         if mode == 'update':
             # from #xapian: if you generate a special "unique id" term, you can just call database.replace_document(uid_term, doc)
             query = xapidx.RawQuery(xapdoc.makePairForWrite('itemid', itemid))
@@ -627,10 +629,10 @@
         read any page. Without this policy some pages will not render,
         which will create broken pagelinks index.        
         """
-        from MoinMoin.request import RequestCLI
-        from MoinMoin.security import Permissions        
-        request = RequestCLI(request.url)
-        class SecurityPolicy(Permissions):            
+        from MoinMoin.request.CLI import Request
+        from MoinMoin.security import Permissions
+        request = Request(request.url)
+        class SecurityPolicy(Permissions):
             def read(*args, **kw):
                 return True        
         request.user.may = SecurityPolicy(request.user)
--- a/MoinMoin/script/index/build.py	Thu Jun 08 16:45:10 2006 +0200
+++ b/MoinMoin/script/index/build.py	Fri Jun 09 17:57:23 2006 +0200
@@ -10,7 +10,6 @@
 """
 
 from MoinMoin.script import MoinScript
-from MoinMoin.Xapian import Index
 
 class IndexScript(MoinScript):
     """ Xapian general index script class """
@@ -39,6 +38,7 @@
     """ Xapian index build script class """
 
     def command(self):
+        from MoinMoin.Xapian import Index
         Index(self.request).indexPages(self.files, self.options.mode)
         #Index(self.request).test(self.request)