Commit 679538f4 authored by Robin Sonnabend's avatar Robin Sonnabend
Browse files

Move CALENDAR_TIMEZONE_MAP to new section

CALENDAR_TIMEZONE_MAP is not used for the calendar functionality, but
for the ical export, which is independent.

/close #199
parent b3df54d3
...@@ -402,8 +402,7 @@ def check_wiki( ...@@ -402,8 +402,7 @@ def check_wiki(
def check_calendar( def check_calendar(
CALENDAR_URL, CALENDAR_DEFAULT_DURATION, CALENDAR_MAX_REQUESTS, CALENDAR_URL, CALENDAR_DEFAULT_DURATION, CALENDAR_MAX_REQUESTS):
CALENDAR_TIMEZONE_MAP):
from calendarpush import Client, CalendarException from calendarpush import Client, CalendarException
try: try:
client = Client(url=CALENDAR_URL) client = Client(url=CALENDAR_URL)
...@@ -413,6 +412,10 @@ def check_calendar( ...@@ -413,6 +412,10 @@ def check_calendar(
CALENDAR_URL)) CALENDAR_URL))
def check_timezone(CALENDAR_TIMEZONE_MAP):
pass
CONFIG_SECTIONS = [ CONFIG_SECTIONS = [
ConfigSection( ConfigSection(
name="Database", name="Database",
...@@ -897,6 +900,13 @@ CONFIG_SECTIONS = [ ...@@ -897,6 +900,13 @@ CONFIG_SECTIONS = [
description=( description=(
"Number of retries before giving a connection attempt up. " "Number of retries before giving a connection attempt up. "
"Some CalDAV servers reply randomly with errors.")), "Some CalDAV servers reply randomly with errors.")),
],
check=check_calendar,
deactivatable=True,
description="CalDAV settings"),
ConfigSection(
name="TIMEZONE",
entries=[
ConfigEntry( ConfigEntry(
name="CALENDAR_TIMEZONE_MAP", name="CALENDAR_TIMEZONE_MAP",
default={ default={
...@@ -906,9 +916,8 @@ CONFIG_SECTIONS = [ ...@@ -906,9 +916,8 @@ CONFIG_SECTIONS = [
required=False, internal=False, required=False, internal=False,
description="Timezone abbreviation map. Add as needed."), description="Timezone abbreviation map. Add as needed."),
], ],
check=check_calendar, check=check_timezone,
deactivatable=True, description="Settings for translating timezone information."),
description="CalDAV settings"),
] ]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment