changeset 5108:6c31e9dfdd99

support view action for .adraw/.tdraw
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Mon, 14 Sep 2009 00:24:01 +0200
parents 26379ee2aa74
children 506e8cb48ee9
files MoinMoin/action/AttachFile.py
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/action/AttachFile.py	Sun Sep 13 20:13:06 2009 +0200
+++ b/MoinMoin/action/AttachFile.py	Mon Sep 14 00:24:01 2009 +0200
@@ -975,6 +975,10 @@
             fmt.url(0))
     request.write('%s<br><br>' % link)
 
+    if filename.endswith('.tdraw') or filename.endswith('.adraw'):
+        request.write(fmt.attachment_drawing(filename, ''))
+        return
+
     mt = wikiutil.MimeType(filename=filename)
 
     # destinguishs if browser need a plugin in place
@@ -1061,6 +1065,8 @@
     if not filename:
         return
 
+    request.formatter.page = Page(request, pagename)
+
     # send header & title
     # Use user interface language for this generated page
     request.setContentLanguage(request.lang)