wiki: 'max_separators' should be lowercase.

down
This commit is contained in:
Andre D
2012-10-21 20:18:00 -05:00
committed by Neil Williams
parent 5c20a04c4d
commit dacab697b8
2 changed files with 2 additions and 2 deletions

View File

@@ -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}

View File

@@ -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()