# HG changeset patch # User Thomas Waldmann # Date 1473215519 -7200 # Node ID 4716268c34e34b2a11ed5092dee5c4fb8569a13b # Parent 1fdd537e9d8308bf2a067d593f3696424d8e2302# Parent cefd695e7572b8ac865880aba2aa88f21d5cc16d merge branches diff -r 1fdd537e9d83 -r 4716268c34e3 MoinMoin/action/AttachFile.py --- 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' diff -r 1fdd537e9d83 -r 4716268c34e3 MoinMoin/theme/__init__.py --- 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 @@ + + %s %s %s diff -r 1fdd537e9d83 -r 4716268c34e3 wiki/server/moin --- 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. diff -r 1fdd537e9d83 -r 4716268c34e3 wiki/server/moin.ajp --- 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. diff -r 1fdd537e9d83 -r 4716268c34e3 wiki/server/moin.cgi --- 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. diff -r 1fdd537e9d83 -r 4716268c34e3 wiki/server/moin.fcgi --- 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. diff -r 1fdd537e9d83 -r 4716268c34e3 wiki/server/moin.scgi --- 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. diff -r 1fdd537e9d83 -r 4716268c34e3 wiki/server/moin.wsgi --- 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. diff -r 1fdd537e9d83 -r 4716268c34e3 wiki/server/test.wsgi --- 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 diff -r 1fdd537e9d83 -r 4716268c34e3 wikiserver.py --- 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])))