mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-28 00:07:57 -05:00
wiki: 'max_separators' should be lowercase.
down
This commit is contained in:
@@ -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}
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user