wiki: Rename wiki_disabled to disable_wiki.

This commit is contained in:
Andre D
2012-09-13 00:00:43 -05:00
committed by Neil Williams
parent ac8c222d21
commit 8e188e2b3c
4 changed files with 6 additions and 6 deletions

View File

@@ -81,6 +81,9 @@ disable_captcha = false
disable_ratelimit = false
disable_require_admin_otp = false
# Disable wiki editing and viewing for everyone except admins
disable_wiki = false
# -- important settings --
# the domain that this app serves itself up as
domain = reddit.local
@@ -514,9 +517,6 @@ wiki_max_page_name_length = 128
# Max number of separators in a wiki page name
wiki_max_page_separators = 3
# Disable wiki editing and viewing for everyone except admins
wiki_disabled = false
# Location (directory) for temp files for diff3 merging
# Empty will use python default for temp files
# Pro tip: Use /dev/shm for in-memory diff3

View File

@@ -207,7 +207,7 @@ class WikiController(RedditController):
def pre(self):
RedditController.pre(self)
if g.wiki_disabled and not c.user_is_admin:
if g.disable_wiki and not c.user_is_admin:
self.handle_error(403, 'WIKI_DOWN')
if not c.site._should_wiki:
self.handle_error(404, 'NOT_WIKIABLE') # /r/mod for an example

View File

@@ -151,7 +151,7 @@ class Globals(object):
'disable_ratelimit',
'amqp_logging',
'read_only_mode',
'wiki_disabled',
'disable_wiki',
'heavy_load_mode',
's3_media_direct',
'disable_captcha',

View File

@@ -445,7 +445,7 @@ class Reddit(Templated):
if c.user_is_loggedin:
mod = bool(c.user_is_admin or c.site.is_moderator(c.user))
if c.site._should_wiki and (c.site.wikimode != 'disabled' or mod):
if not g.wiki_disabled:
if not g.disable_wiki:
main_buttons.append(NavButton('wiki', 'wiki'))
more_buttons = []