changeset 164:c6655cd44cef

fixed MoinMoinBugs/LinksWithTitlesNotIncludedInSearchResults; fixed pagelinks formatter (attachments) imported from: moin--main--1.5--patch-166
author Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
date Sun, 30 Oct 2005 18:02:50 +0000
parents b19525bf0cf6
children 4f45bb113404
files MoinMoin/formatter/base.py MoinMoin/formatter/pagelinks.py
diffstat 2 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/formatter/base.py	Sun Oct 30 17:31:59 2005 +0000
+++ b/MoinMoin/formatter/base.py	Sun Oct 30 18:02:50 2005 +0000
@@ -83,6 +83,14 @@
             self.pagelinks.append(pagename)
 
     def interwikilink(self, on, interwiki='', pagename='', **kw):
+        # call pagelink() for internal interwikilinks
+        # to make shure they get counted for self.pagelinks
+        wikitag, wikiurl, wikitail, wikitag_bad = wikiutil.resolve_wiki(self.request, '%s:%s' % (interwiki, pagename))
+        if wikitag=='Self' or wikitag==self.request.cfg.interwikiname:
+            if wikitail.find('#') > -1:
+                wikitail, kw['anchor'] = wikitail.split('#', 1)
+                wikitail = wikiutil.url_unquote(wikitail)
+            return self.pagelink(on, wikitail, **kw)
         return ''
             
     def url(self, on, url=None, css=None, **kw):
--- a/MoinMoin/formatter/pagelinks.py	Sun Oct 30 17:31:59 2005 +0000
+++ b/MoinMoin/formatter/pagelinks.py	Sun Oct 30 18:02:50 2005 +0000
@@ -53,6 +53,9 @@
     table = null
     table_row = null
     table_cell = null
+    attachment_link = null
+    attachment_image = null
+    attachment_drawing = null
     
     # These are private additions to formatter added by text_html, and
     # some code use or might use them.