Mercurial > moin > 1.9
changeset 250:763d15fbcdfc
fixed moin_dump
imported from: moin--main--1.5--patch-253
author | Thomas Waldmann <tw@waldmann-edv.de> |
---|---|
date | Sun, 27 Nov 2005 15:39:27 +0000 |
parents | de46a69b9865 |
children | 1a2378d230d1 |
files | MoinMoin/request.py MoinMoin/scripts/moin_dump.py docs/CHANGES |
diffstat | 3 files changed, 13 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/MoinMoin/request.py Sun Nov 27 14:14:16 2005 +0000 +++ b/MoinMoin/request.py Sun Nov 27 15:39:27 2005 +0000 @@ -889,6 +889,14 @@ ]) self.write('You are not allowed to access this!\r\n') self.setResponseCode(403) + + def initTheme(self): + """ Set theme - forced theme, user theme or wiki default """ + if self.cfg.theme_force: + theme_name = self.cfg.theme_default + else: + theme_name = self.user.theme_name + self.loadTheme(theme_name) def run(self): # Exit now if __init__ failed or request is forbidden @@ -918,12 +926,7 @@ # parse request data try: - # Set theme - forced theme, user theme or wiki default - if self.cfg.theme_force: - theme_name = self.cfg.theme_default - else: - theme_name = self.user.theme_name - self.loadTheme(theme_name) + self.initTheme() self.args = self.setup_args() self.form = self.args
--- a/MoinMoin/scripts/moin_dump.py Sun Nov 27 14:14:16 2005 +0000 +++ b/MoinMoin/scripts/moin_dump.py Sun Nov 27 15:39:27 2005 +0000 @@ -113,8 +113,7 @@ if err.errno != errno.EEXIST: _util.fatal("Cannot create output directory '%s'!" % outputdir) - # Insert config dir or the current directory to the start of the - # path. + # Insert config dir or the current directory to the start of the path. config_dir = self.options.config_dir if config_dir and os.path.isfile(config_dir): config_dir = os.path.dirname(config_dir) @@ -132,6 +131,8 @@ original_url_prefix = request.cfg.url_prefix request.cfg.url_prefix = url_prefix + request.initTheme() # usually request.run() does this, but we don't use it + if self.options.page: pages = [self.options.page] else:
--- a/docs/CHANGES Sun Nov 27 14:14:16 2005 +0000 +++ b/docs/CHANGES Sun Nov 27 15:39:27 2005 +0000 @@ -9,6 +9,7 @@ * We don't remove RenamePage and DeletePage from menu any more if user is unknown. This stuff is only driven by ACLs now. * Some fixes to Despam action. + * Fixed moin_dump (broken by some recent theme init change). Other changes: * Added irc:// to the builtin supported link schemas. You can remove it from config.url_schemas in case you have patched it in there.