From a69f2baf010de91e026e460eb328134fc6b1a36b Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Fri, 28 Aug 2009 13:34:45 +0000 Subject: [PATCH] remove unnecessary discussion-check utility code. svn path=/plone.app.discussion/trunk/; revision=29436 --- plone/app/discussion/browser/configure.zcml | 9 ------- plone/app/discussion/browser/controlpanel.py | 25 -------------------- 2 files changed, 34 deletions(-) diff --git a/plone/app/discussion/browser/configure.zcml b/plone/app/discussion/browser/configure.zcml index 935f62c..512e6da 100644 --- a/plone/app/discussion/browser/configure.zcml +++ b/plone/app/discussion/browser/configure.zcml @@ -109,13 +109,4 @@ permission="cmf.ManagePortal" /> - - - diff --git a/plone/app/discussion/browser/controlpanel.py b/plone/app/discussion/browser/controlpanel.py index 2a8788f..e71619e 100644 --- a/plone/app/discussion/browser/controlpanel.py +++ b/plone/app/discussion/browser/controlpanel.py @@ -40,28 +40,3 @@ class DiscussionSettingsEditForm(controlpanel.RegistryEditForm): class DiscussionSettingsControlPanel(controlpanel.ControlPanelFormWrapper): form = DiscussionSettingsEditForm - -class Utility(BrowserView): - """Utility view to determine ... - """ - - def globally_enabled(self): - """Determine if the utility is enabled and we are in an enabled domain - """ - - registry = queryUtility(IRegistry) - if registry is None: - return False - - settings = None - try: - settings = registry.forInterface(IDiscussionSettings) - except KeyError: - return False - - if not settings.globally_enabled: - return False - else: - return True - - return False