Linux anchor 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64
Apache/2.4.18 (Ubuntu)
Server IP : 10.10.100.4 & Your IP : 216.73.217.150
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
var /
www /
owncloud-prm /
apps /
dav /
lib /
AppInfo /
Delete
Unzip
Name
Size
Permission
Date
Action
Application.php
3.21
KB
-rw-r--r--
2018-04-19 18:15
PluginManager.php
4.29
KB
-rw-r--r--
2018-04-19 18:15
Save
Rename
<?php /** * @author Georg Ehrke <georg@owncloud.com> * @author Joas Schilling <coding@schilljs.com> * @author Thomas Müller <thomas.mueller@tmit.eu> * * @copyright Copyright (c) 2018, ownCloud GmbH * @license AGPL-3.0 * * This code is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License, version 3, * as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License, version 3, * along with this program. If not, see <http://www.gnu.org/licenses/> * */ namespace OCA\DAV\AppInfo; use OCA\DAV\CalDAV\BirthdayService; use OCA\DAV\Capabilities; use OCA\DAV\CardDAV\ContactsManager; use OCA\DAV\CardDAV\SyncService; use OCA\DAV\HookManager; use OCP\AppFramework\App; use OCP\Contacts\IManager; use OCP\IUser; use Symfony\Component\EventDispatcher\GenericEvent; class Application extends App { /** * Application constructor. * * @param array $urlParams */ public function __construct (array $urlParams= []) { parent::__construct('dav', $urlParams); /* * Register capabilities */ $this->getContainer()->registerCapability(Capabilities::class); } /** * @param IManager $contactsManager * @param string $userID */ public function setupContactsProvider(IManager $contactsManager, $userID) { /** @var ContactsManager $cm */ $cm = $this->getContainer()->query(ContactsManager::class); $urlGenerator = $this->getContainer()->getServer()->getURLGenerator(); $cm->setupContactsProvider($contactsManager, $userID, $urlGenerator); } public function registerHooks() { /** @var HookManager $hm */ $hm = $this->getContainer()->query(HookManager::class); $hm->setup(); $dispatcher = $this->getContainer()->getServer()->getEventDispatcher(); // first time login event setup $dispatcher->addListener(IUser::class . '::firstLogin', function ($event) use ($hm) { if ($event instanceof GenericEvent) { $hm->firstLogin($event->getSubject()); } }); // carddav/caldav sync event setup $listener = function($event) { if ($event instanceof GenericEvent) { /** @var BirthdayService $b */ $b = $this->getContainer()->query(BirthdayService::class); $b->onCardChanged( $event->getArgument('addressBookId'), $event->getArgument('cardUri'), $event->getArgument('cardData') ); } }; $dispatcher->addListener('\OCA\DAV\CardDAV\CardDavBackend::createCard', $listener); $dispatcher->addListener('\OCA\DAV\CardDAV\CardDavBackend::updateCard', $listener); $dispatcher->addListener('\OCA\DAV\CardDAV\CardDavBackend::deleteCard', function($event) { if ($event instanceof GenericEvent) { /** @var BirthdayService $b */ $b = $this->getContainer()->query(BirthdayService::class); $b->onCardDeleted( $event->getArgument('addressBookId'), $event->getArgument('cardUri') ); } }); } public function getSyncService() { return $this->getContainer()->query(SyncService::class); } }