diff options
Diffstat (limited to 'apps/dav/lib/CalDAV/PublicCalendarRoot.php')
-rw-r--r-- | apps/dav/lib/CalDAV/PublicCalendarRoot.php | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/apps/dav/lib/CalDAV/PublicCalendarRoot.php b/apps/dav/lib/CalDAV/PublicCalendarRoot.php index 55f969e2167..9385f487bda 100644 --- a/apps/dav/lib/CalDAV/PublicCalendarRoot.php +++ b/apps/dav/lib/CalDAV/PublicCalendarRoot.php @@ -24,6 +24,8 @@ */ namespace OCA\DAV\CalDAV; +use OCP\IConfig; +use OCP\IL10N; use Sabre\DAV\Collection; class PublicCalendarRoot extends Collection { @@ -34,9 +36,22 @@ class PublicCalendarRoot extends Collection { /** @var \OCP\IL10N */ protected $l10n; - function __construct(CalDavBackend $caldavBackend) { + /** @var \OCP\IConfig */ + protected $config; + + /** + * PublicCalendarRoot constructor. + * + * @param CalDavBackend $caldavBackend + * @param IL10N $l10n + * @param IConfig $config + */ + function __construct(CalDavBackend $caldavBackend, IL10N $l10n, + IConfig $config) { $this->caldavBackend = $caldavBackend; - $this->l10n = \OC::$server->getL10N('dav'); + $this->l10n = $l10n; + $this->config = $config; + } /** @@ -51,7 +66,7 @@ class PublicCalendarRoot extends Collection { */ function getChild($name) { $calendar = $this->caldavBackend->getPublicCalendar($name); - return new PublicCalendar($this->caldavBackend, $calendar, $this->l10n); + return new PublicCalendar($this->caldavBackend, $calendar, $this->l10n, $this->config); } /** |