roundcube: Remove get-enabled from actions

This commit is contained in:
Sunil Mohan Adapa authored and James Valleroy committed 2015-07-19 19:56:05 -04:00
1 parent 4906384b39
commit 384867dc25
3 files changed
+11 -22

No files matched your search

+5
View File
@@ -22,6 +22,7 @@ Plinth module to configure Roundcube.
from gettext import gettext as _
from plinth import actions
from plinth import action_utils
from plinth import cfg
from plinth import service as service_module
@@ -34,3 +35,7 @@ def init():
menu = cfg.main_menu.get('apps:index')
menu.add_urlname(_('Email Client (Roundcube)'), 'glyphicon-envelope',
'roundcube:index', 50)
def is_enabled():
"""Return whether the module is enabled."""
return action_utils.webserver_is_enabled('roundcube')
+2 -4
View File
@@ -27,6 +27,7 @@ import logging
from .forms import RoundcubeForm
from plinth import actions
from plinth import package
from plinth.modules import roundcube
logger = logging.getLogger(__name__)
@@ -67,10 +68,7 @@ def index(request):
def get_status():
"""Get the current status."""
output = actions.run('roundcube', ['get-enabled'])
enabled = (output.strip() == 'yes')
return {'enabled': enabled}
return {'enabled': roundcube.is_enabled()}
def _apply_changes(request, old_status, new_status):