diff MoinMoin/action/AttachFile.py @ 143:11df1156d432

fixed MoinMoinBugs/BrokenAttachmentPaths imported from: moin--main--1.5--patch-145
author Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
date Thu, 27 Oct 2005 09:15:20 +0000
parents 139cb901b81c
children b11bb396654e
line wrap: on
line diff
--- a/MoinMoin/action/AttachFile.py	Thu Oct 27 02:00:48 2005 +0000
+++ b/MoinMoin/action/AttachFile.py	Thu Oct 27 09:15:20 2005 +0000
@@ -64,6 +64,16 @@
 
     return attach_dir
 
+def absoluteName(url, pagename):
+    """ Get (pagename, filename) of an atatchment: link
+    """
+
+    pieces = url.rsplit('/', 1)
+    if len(pieces)==1:
+        return pagename, pieces[0]
+    else:
+        print pieces
+        return pieces[0], pieces[1]
 
 def getAttachUrl(pagename, filename, request, addts=0, escaped=0):
     """ Get URL that points to attachment `filename` of page `pagename`.