changeset 2017:dd3a1da58c28

AttachFile: now really fixed extensions for packages
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Fri, 20 Apr 2007 21:59:19 +0200
parents e55ae6646935
children dbf06dea00aa
files MoinMoin/action/AttachFile.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/action/AttachFile.py	Fri Apr 20 21:21:27 2007 +0200
+++ b/MoinMoin/action/AttachFile.py	Fri Apr 20 21:59:19 2007 +0200
@@ -342,8 +342,8 @@
             else:
                 viewlink = '<a href="%(baseurl)s/%(urlpagename)s?action=%(action)s&amp;do=view&amp;target=%(urlfile)s">%(label_view)s</a>' % parmdict
 
-            if (packages.ZipPackage(request, os.path.join(attach_dir, file).encode(config.charset)).isPackage() and mt.minor == 'zip' and
-                request.user.isSuperUser()):
+            if (packages.ZipPackage(request, os.path.join(attach_dir, file).encode(config.charset)).isPackage() and
+                 request.user.isSuperUser()):
                 viewlink += ' | <a href="%(baseurl)s/%(urlpagename)s?action=%(action)s&amp;do=install&amp;target=%(urlfile)s">%(label_install)s</a>' % parmdict
             elif (zipfile.is_zipfile(os.path.join(attach_dir, file).encode(config.charset)) and
                 mt.minor == 'zip' and request.user.may.read(pagename) and request.user.may.delete(pagename)