changeset 6112:4716268c34e3

merge branches
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Wed, 07 Sep 2016 04:31:59 +0200
parents 1fdd537e9d83 (current diff) cefd695e7572 (diff)
children a0ec7f89be84
files MoinMoin/action/AttachFile.py MoinMoin/theme/__init__.py
diffstat 10 files changed, 25 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/action/AttachFile.py	Tue Sep 06 04:39:28 2016 +0200
+++ b/MoinMoin/action/AttachFile.py	Wed Sep 07 04:31:59 2016 +0200
@@ -545,6 +545,7 @@
     _ = request.getText
     action = request.form.get('multifile')
     fnames = request.form.getlist('fn')
+    fails = []
     if action == 'rm':
         if not request.user.may.delete(pagename):
             return _('You are not allowed to delete attachments on this page.')
@@ -560,24 +561,34 @@
         if not request.user.may.write(dest_pagename):
             return _('You are not allowed to attach a file to this page.')
         for fn in fnames:
-            move_attachment(request, pagename, dest_pagename, fn, fn)
+            try:
+                move_attachment(request, pagename, dest_pagename, fn, fn)
+            except (DestPathExists, SamePath):
+                fails.append(fn)
         msg = _("Attachment '%(pagename)s/%(filename)s' moved to '%(new_pagename)s/%(new_filename)s'.") % dict(
                 pagename=pagename,
                 filename=u'{%s}' % ','.join(fnames),
                 new_pagename=dest_pagename,
                 new_filename=u'*')
+        if fails:
+            msg += " " + _("Failed: %s", ", ".join(fails))
         return upload_form(pagename, request, msg=msg)
     if action == 'cp':
         dest_pagename = request.form.get('multi_dest_pagename')
         if not request.user.may.write(dest_pagename):
             return _('You are not allowed to attach a file to this page.')
         for fn in fnames:
-            copy_attachment(request, pagename, dest_pagename, fn, fn)
+            try:
+                copy_attachment(request, pagename, dest_pagename, fn, fn)
+            except (DestPathExists, SamePath):
+                fails.append(fn)
         msg = _("Attachment '%(pagename)s/%(filename)s' copied to '%(new_pagename)s/%(new_filename)s'.") % dict(
                 pagename=pagename,
                 filename=u'{%s}' % ','.join(fnames),
                 new_pagename=dest_pagename,
                 new_filename=u'*')
+        if fails:
+            msg += " " + _("Failed: %s", ", ".join(fails))
         return upload_form(pagename, request, msg=msg)
     return u'unsupported multifile operation'
 
--- a/MoinMoin/theme/__init__.py	Tue Sep 06 04:39:28 2016 +0200
+++ b/MoinMoin/theme/__init__.py	Wed Sep 07 04:31:59 2016 +0200
@@ -1699,6 +1699,8 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
 <html>
 <head>
+<meta http-equiv="X-UA-Compatible" content="IE=Edge">
+<meta name="viewport" content="width=device-width, initial-scale=1">
 %s
 %s
 %s
--- a/wiki/server/moin	Tue Sep 06 04:39:28 2016 +0200
+++ b/wiki/server/moin	Wed Sep 07 04:31:59 2016 +0200
@@ -15,7 +15,7 @@
 
 # a1) Path of the directory where the MoinMoin code package is located.
 #     Needed if you installed with --prefix=PREFIX or you didn't use setup.py.
-#sys.path.insert(0, 'PREFIX/lib/python2.3/site-packages')
+#sys.path.insert(0, 'PREFIX/lib/python2.7/site-packages')
 
 # a2) Path of the directory where wikiconfig.py / farmconfig.py is located.
 #     See wiki/config/... for some sample config files.
--- a/wiki/server/moin.ajp	Tue Sep 06 04:39:28 2016 +0200
+++ b/wiki/server/moin.ajp	Wed Sep 07 04:31:59 2016 +0200
@@ -15,7 +15,7 @@
 
 # a1) Path of the directory where the MoinMoin code package is located.
 #     Needed if you installed with --prefix=PREFIX or you didn't use setup.py.
-#sys.path.insert(0, 'PREFIX/lib/python2.3/site-packages')
+#sys.path.insert(0, 'PREFIX/lib/python2.7/site-packages')
 
 # a2) Path of the directory where wikiconfig.py / farmconfig.py is located.
 #     See wiki/config/... for some sample config files.
--- a/wiki/server/moin.cgi	Tue Sep 06 04:39:28 2016 +0200
+++ b/wiki/server/moin.cgi	Wed Sep 07 04:31:59 2016 +0200
@@ -17,7 +17,7 @@
 
 # a1) Path of the directory where the MoinMoin code package is located.
 #     Needed if you installed with --prefix=PREFIX or you didn't use setup.py.
-#sys.path.insert(0, 'PREFIX/lib/python2.3/site-packages')
+#sys.path.insert(0, 'PREFIX/lib/python2.7/site-packages')
 
 # a2) Path of the directory where wikiconfig.py / farmconfig.py is located.
 #     See wiki/config/... for some sample config files.
--- a/wiki/server/moin.fcgi	Tue Sep 06 04:39:28 2016 +0200
+++ b/wiki/server/moin.fcgi	Wed Sep 07 04:31:59 2016 +0200
@@ -18,7 +18,7 @@
 
 # a1) Path of the directory where the MoinMoin code package is located.
 #     Needed if you installed with --prefix=PREFIX or you didn't use setup.py.
-#sys.path.insert(0, 'PREFIX/lib/python2.3/site-packages')
+#sys.path.insert(0, 'PREFIX/lib/python2.7/site-packages')
 
 # a2) Path of the directory where wikiconfig.py / farmconfig.py is located.
 #     See wiki/config/... for some sample config files.
--- a/wiki/server/moin.scgi	Tue Sep 06 04:39:28 2016 +0200
+++ b/wiki/server/moin.scgi	Wed Sep 07 04:31:59 2016 +0200
@@ -15,7 +15,7 @@
 
 # a1) Path of the directory where the MoinMoin code package is located.
 #     Needed if you installed with --prefix=PREFIX or you didn't use setup.py.
-#sys.path.insert(0, 'PREFIX/lib/python2.3/site-packages')
+#sys.path.insert(0, 'PREFIX/lib/python2.7/site-packages')
 
 # a2) Path of the directory where wikiconfig.py / farmconfig.py is located.
 #     See wiki/config/... for some sample config files.
--- a/wiki/server/moin.wsgi	Tue Sep 06 04:39:28 2016 +0200
+++ b/wiki/server/moin.wsgi	Wed Sep 07 04:31:59 2016 +0200
@@ -3,7 +3,7 @@
     MoinMoin - mod_wsgi driver script
 
     To use this, add those statements to your Apache's VirtualHost definition:
-    
+
     # you will invoke your moin wiki at the root url, like http://servername/FrontPage:
     WSGIScriptAlias / /some/path/moin.wsgi
 
@@ -25,7 +25,7 @@
 
 # a1) Path of the directory where the MoinMoin code package is located.
 #     Needed if you installed with --prefix=PREFIX or you didn't use setup.py.
-#sys.path.insert(0, 'PREFIX/lib/python2.3/site-packages')
+#sys.path.insert(0, 'PREFIX/lib/python2.7/site-packages')
 
 # a2) Path of the directory where wikiconfig.py / farmconfig.py is located.
 #     See wiki/config/... for some sample config files.
--- a/wiki/server/test.wsgi	Tue Sep 06 04:39:28 2016 +0200
+++ b/wiki/server/test.wsgi	Wed Sep 07 04:31:59 2016 +0200
@@ -11,11 +11,10 @@
 The main use of this script will be using the WSGI "application" defined
 below within your production WSGI environment. You will use some code similar
 to what you see at the end of this script to use the application from that
-environment. For the special case of apache2/mod_wsgi, it shoud be possible
+environment. For the special case of apache2/mod_wsgi, it should be possible
 to directly use this file.
 
-If you start this script from the commandline either with python2.5 or with
-and older python + wsgiref module installed, it will serve the content on
+If you start this script from the commandline, it will serve the content on
 http://localhost:8000/ - this is mainly for debugging THIS script.
 
 @copyright: 2008 by MoinMoin:ThomasWaldmann
--- a/wikiserver.py	Tue Sep 06 04:39:28 2016 +0200
+++ b/wikiserver.py	Wed Sep 07 04:31:59 2016 +0200
@@ -14,7 +14,7 @@
 
 # a1) Path of the directory where the MoinMoin code package is located.
 #     Needed if you installed with --prefix=PREFIX or you didn't use setup.py.
-#sys.path.insert(0, 'PREFIX/lib/python2.4/site-packages')
+#sys.path.insert(0, 'PREFIX/lib/python2.7/site-packages')
 
 # a2) Path of the directory where wikiconfig.py / farmconfig.py is located.
 moinpath = os.path.abspath(os.path.normpath(os.path.dirname(sys.argv[0])))