changeset 796:a5f12f734986

fix getPageLinks to not return empty pagenames, make linkto: search work
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Tue, 02 May 2006 22:19:08 +0200
parents 1735cad0cd6c
children 89c724b4de15
files MoinMoin/Page.py MoinMoin/Xapian.py
diffstat 2 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/Page.py	Tue May 02 20:49:23 2006 +0200
+++ b/MoinMoin/Page.py	Tue May 02 22:19:08 2006 +0200
@@ -1496,7 +1496,8 @@
             links = self.parsePageLinks(request)
             cache.update('\n'.join(links) + '\n', True)
             return links
-        return cache.content(True).split('\n')
+        links = cache.content(True).split('\n')
+        return [link for link in links if link]
 
     def parsePageLinks(self, request):
         """ Parse page links by formatting with a pagelinks formatter 
--- a/MoinMoin/Xapian.py	Tue May 02 20:49:23 2006 +0200
+++ b/MoinMoin/Xapian.py	Tue May 02 22:19:08 2006 +0200
@@ -255,6 +255,7 @@
                            #W   "weak" (approximately 10 day intervals, taken as YYYYMMD from
                            #  the D term, and changing the last digit to a '2' if it's a '3')
                            #X   longer prefix for user-defined use
+            'linkto': 'XLINKTO', # this document links to that document
                            #Y   year (four digits)
         }