Mercurial > moin > 1.9
changeset 5398:66e4e61300dc
merged moin/1.8
author | Thomas Waldmann <tw AT waldmann-edv DOT de> |
---|---|
date | Fri, 25 Dec 2009 20:20:02 +0100 |
parents | 1472141fa7be (current diff) 6e7f1b059a3c (diff) |
children | ffaec355ee84 |
files | MoinMoin/macro/__init__.py MoinMoin/packages.py MoinMoin/xmlrpc/__init__.py |
diffstat | 3 files changed, 12 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/MoinMoin/macro/__init__.py Thu Dec 24 15:00:35 2009 +0100 +++ b/MoinMoin/macro/__init__.py Fri Dec 25 20:20:02 2009 +0100 @@ -75,11 +75,6 @@ "GetVal": ["pages"], } - # we need the lang macros to execute when html is generated, - # to have correct dir and lang html attributes - for lang in i18n.wikiLanguages(): - Dependencies[lang] = [] - def __init__(self, parser): self.parser = parser @@ -92,6 +87,12 @@ # Initialized on execute self.name = None + # we need the lang macros to execute when html is generated, + # to have correct dir and lang html attributes + # note: i18n needs to be initialized first before .wikiLanguages() will work + for lang in i18n.wikiLanguages(): + self.Dependencies[lang] = [] + def execute(self, macro_name, args): """ Get and execute a macro
--- a/MoinMoin/packages.py Thu Dec 24 15:00:35 2009 +0100 +++ b/MoinMoin/packages.py Fri Dec 25 20:20:02 2009 +0100 @@ -14,6 +14,7 @@ from MoinMoin.Page import Page from MoinMoin.PageEditor import PageEditor from MoinMoin.logfile import editlog, eventlog +from MoinMoin.util import filesys MOIN_PACKAGE_FILE = 'MOIN_PACKAGE' MAX_VERSION = 1 @@ -138,7 +139,7 @@ if not os.path.exists(target): self._extractToFile(zipname, target) if os.path.exists(target): - os.chmod(target, config.umask ) + filesys.chmod(target, 0666 & config.umask) action = 'ATTNEW' edit_logfile_append(self, pagename, path, rev, action, logname='edit-log', comment=u'%(filename)s' % {"filename": filename}, author=author) @@ -363,7 +364,7 @@ target = os.path.join(attachments, filename) self._extractToFile(zipname, target) if os.path.exists(target): - os.chmod(target, config.umask ) + filesys.chmod(target, 0666 & config.umask) else: self.msg += u"action replace underlay attachment: not enough rights - nothing done \n"
--- a/MoinMoin/xmlrpc/__init__.py Thu Dec 24 15:00:35 2009 +0100 +++ b/MoinMoin/xmlrpc/__init__.py Fri Dec 25 20:20:02 2009 +0100 @@ -618,6 +618,9 @@ @return: True on success """ + + pagename = self._instr(pagename) + if not self.request.user.may.write(pagename): return xmlrpclib.Fault(1, "You are not allowed to edit this page")