changeset 157:99bf20eeb0bc

DEBUG patchset. will be reverted soon ... imported from: moin--main--1.5--patch-159
author Alexander Schremmer <alex@alexanderweb.de.tla>
date Sat, 29 Oct 2005 21:30:56 +0000
parents 206b3db4eade
children 93083cc8f27b
files MoinMoin/Page.py MoinMoin/formatter/text_html.py MoinMoin/wikiutil.py
diffstat 3 files changed, 9 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/Page.py	Sat Oct 29 20:18:48 2005 +0000
+++ b/MoinMoin/Page.py	Sat Oct 29 21:30:56 2005 +0000
@@ -852,7 +852,7 @@
 
         link = wikiutil.link_tag(request, url, wikiutil.escape(text),
                                  formatter=getattr(self, 'formatter', None), **kw)
-
+        import sys; sys.stderr.write("DEBUG - in link_to. got '%r' from link_tag\n" % (link))
         # Create a link to attachments if any exist
         if kw.get('attachment_indicator', 0):
             from MoinMoin.action import AttachFile
--- a/MoinMoin/formatter/text_html.py	Sat Oct 29 20:18:48 2005 +0000
+++ b/MoinMoin/formatter/text_html.py	Sat Oct 29 21:30:56 2005 +0000
@@ -224,6 +224,7 @@
             
         if self.request.user.show_nonexist_qm and on and not page.exists():
             self.pagelink_preclosed = True
+            import sys; sys.stderr.write("DEBUG - Calling 2x link_to(**%r)\n" % (kw))
             return (page.link_to(self.request, on=1, **kw) +
                     self.text("?") +
                     page.link_to(self.request, on=0, **kw))
@@ -269,6 +270,7 @@
             url = wikiutil.mapURL(self.request, url)
         title = kw.get('title', None)
         attrs = kw.get('attrs', None)
+        import sys; sys.stderr.write("DEBUG - called url. on is %r\n" % (on))
         if on:
             str = '<a'
             if css: 
--- a/MoinMoin/wikiutil.py	Sat Oct 29 20:18:48 2005 +0000
+++ b/MoinMoin/wikiutil.py	Sat Oct 29 21:30:56 2005 +0000
@@ -996,15 +996,20 @@
     if text is None:
         text = params # default
     if formatter:
+        import sys; sys.stderr.write("DEBUG - in link_tag. having a formatter\n" % (kw))
         url = "%s/%s" % (request.getScriptname(), params)
         if on != None:
+            import sys; sys.stderr.write("DEBUG - link_tag 2\n" % (kw))
             return formatter.url(on, url, css_class, **kw)
+        import sys; sys.stderr.write("DEBUG - link_tag 3\n" % (kw))
         return (formatter.url(1, url, css_class, **kw) +
                 formatter.rawHTML(text) +
                 formatter.url(0))
+    import sys; sys.stderr.write("DEBUG - link_tag 4\n" % (kw))
     if on != None and not on:
         return '</a>'
-        
+    
+    import sys; sys.stderr.write("DEBUG - link_tag 5\n" % (kw))
     attrs = ''
     if kw.has_key('attrs'):
         attrs += ' ' + kw['attrs']