From dacab697b8335e0a2395762bec029227b20d5445 Mon Sep 17 00:00:00 2001 From: Andre D Date: Sun, 21 Oct 2012 20:18:00 -0500 Subject: [PATCH] wiki: 'max_separators' should be lowercase. down --- r2/r2/controllers/validator/wiki.py | 2 +- r2/r2/controllers/wiki.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/r2/r2/controllers/validator/wiki.py b/r2/r2/controllers/validator/wiki.py index 35f251453..42265b6d5 100644 --- a/r2/r2/controllers/validator/wiki.py +++ b/r2/r2/controllers/validator/wiki.py @@ -282,7 +282,7 @@ class VWikiPageRevise(VWikiPage): self.set_error('RESTRICTED_PAGE', code=403) return elif page.count('/') > MAX_SEPARATORS: - return {'reason': 'PAGE_NAME_MAX_SEPARATORS', 'MAX_SEPARATORS': MAX_SEPARATORS} + return {'reason': 'PAGE_NAME_MAX_SEPARATORS', 'max_separators': MAX_SEPARATORS} elif len(page) > MAX_PAGE_NAME_LENGTH: return {'reason': 'PAGE_NAME_LENGTH', 'max_length': MAX_PAGE_NAME_LENGTH} diff --git a/r2/r2/controllers/wiki.py b/r2/r2/controllers/wiki.py index bc71e3f5d..16b0d106c 100644 --- a/r2/r2/controllers/wiki.py +++ b/r2/r2/controllers/wiki.py @@ -142,7 +142,7 @@ class WikiController(RedditController): elif c.error['reason'] == 'PAGE_CREATED_ELSEWHERE': error = _("this page is a special page, please go into the subreddit settings and save the field once to create this special page") elif c.error['reason'] == 'PAGE_NAME_MAX_SEPARATORS': - error = _('a max of %d separators "/" are allowed in a wiki page name.') % c.error['MAX_SEPARATORS'] + error = _('a max of %d separators "/" are allowed in a wiki page name.') % c.error['max_separators'] return BoringPage(_("Wiki error"), infotext=error).render() else: return WikiNotFound(page=page, may_revise=True).render()