Skip to content
Browse files

wiki: Rename wiki_disabled to disable_wiki.

  • Loading branch information...
1 parent ac8c222 commit 8e188e2b3c507150c0360caeaf568ea400f3f580 @andre-d andre-d committed with spladug Sep 13, 2012
Showing with 6 additions and 6 deletions.
  1. +3 −3 r2/example.ini
  2. +1 −1 r2/r2/controllers/wiki.py
  3. +1 −1 r2/r2/lib/app_globals.py
  4. +1 −1 r2/r2/lib/pages/pages.py
View
6 r2/example.ini
@@ -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
2 r2/r2/controllers/wiki.py
@@ -207,7 +207,7 @@ def handle_error(self, code, reason=None, **data):
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
2 r2/r2/lib/app_globals.py
@@ -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
2 r2/r2/lib/pages/pages.py
@@ -445,7 +445,7 @@ def build_toolbars(self):
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 = []

0 comments on commit 8e188e2

Please sign in to comment.
Something went wrong with that request. Please try again.