Lazy load dav app

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
This commit is contained in:
Daniel Kesselberg 2020-01-26 21:19:24 +01:00
parent 421054f691
commit a5796292cf
No known key found for this signature in database
GPG Key ID: 36E3664E099D0614
8 changed files with 17 additions and 9 deletions

View File

@ -32,6 +32,7 @@ use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
class CreateAddressBook extends Command {
public const NAME = 'dav:create-addressbook';
/** @var IUserManager */
private $userManager;
@ -53,7 +54,7 @@ class CreateAddressBook extends Command {
protected function configure() {
$this
->setName('dav:create-addressbook')
->setName(self::NAME)
->setDescription('Create a dav addressbook')
->addArgument('user',
InputArgument::REQUIRED,

View File

@ -38,6 +38,7 @@ use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
class CreateCalendar extends Command {
public const NAME = 'dav:create-calendar';
/** @var IUserManager */
protected $userManager;
@ -62,7 +63,7 @@ class CreateCalendar extends Command {
protected function configure() {
$this
->setName('dav:create-calendar')
->setName(self::NAME)
->setDescription('Create a dav calendar')
->addArgument('user',
InputArgument::REQUIRED,

View File

@ -41,6 +41,7 @@ use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
class ListCalendars extends Command {
public const NAME = 'dav:list-calendars';
/** @var IUserManager */
protected $userManager;
@ -60,7 +61,7 @@ class ListCalendars extends Command {
protected function configure() {
$this
->setName('dav:list-calendars')
->setName(self::NAME)
->setDescription('List all calendars of a user')
->addArgument('uid',
InputArgument::REQUIRED,

View File

@ -43,6 +43,7 @@ use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Style\SymfonyStyle;
class MoveCalendar extends Command {
public const NAME = 'dav:move-calendar';
/** @var IUserManager */
private $userManager;
@ -94,7 +95,7 @@ class MoveCalendar extends Command {
protected function configure() {
$this
->setName('dav:move-calendar')
->setName(self::NAME)
->setDescription('Move a calendar from an user to another')
->addArgument('name',
InputArgument::REQUIRED,
@ -183,7 +184,7 @@ class MoveCalendar extends Command {
*/
if (count($shares) > 0) {
$this->io->note([
"Please note that moving calendar " . $calendar['uri'] . " from user <$userOrigin> to <$userDestination> has caused share links to change.",
"Please note that moving calendar " . $calendar['uri'] . " from user <$userOrigin> to <$userDestination> has caused share links to change.",
"Sharees will need to change \"example.com/remote.php/dav/calendars/uid/" . $calendar['uri'] . "_shared_by_$userOrigin\" to \"example.com/remote.php/dav/calendars/uid/" . $calendar['uri'] . "_shared_by_$userDestination\""
]);
}

View File

@ -36,6 +36,7 @@ use Symfony\Component\Console\Output\OutputInterface;
* have no matching principal. Happened because of a bug in the calendar app.
*/
class RemoveInvalidShares extends Command {
public const NAME = 'dav:remove-invalid-shares';
/** @var IDBConnection */
private $connection;
@ -52,7 +53,7 @@ class RemoveInvalidShares extends Command {
protected function configure() {
$this
->setName('dav:remove-invalid-shares')
->setName(self::NAME)
->setDescription('Remove invalid dav shares');
}

View File

@ -36,6 +36,7 @@ use Symfony\Component\Console\Output\OutputInterface;
* @package OCA\DAV\Command
*/
class SendEventReminders extends Command {
public const NAME = 'dav:send-event-reminders';
/** @var ReminderService */
protected $reminderService;
@ -59,7 +60,7 @@ class SendEventReminders extends Command {
*/
protected function configure():void {
$this
->setName('dav:send-event-reminders')
->setName(self::NAME)
->setDescription('Sends event reminders');
}

View File

@ -37,6 +37,7 @@ use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
class SyncBirthdayCalendar extends Command {
public const NAME = 'dav:sync-birthday-calendar';
/** @var BirthdayService */
private $birthdayService;
@ -62,7 +63,7 @@ class SyncBirthdayCalendar extends Command {
protected function configure() {
$this
->setName('dav:sync-birthday-calendar')
->setName(self::NAME)
->setDescription('Synchronizes the birthday calendar')
->addArgument('user',
InputArgument::OPTIONAL,

View File

@ -30,6 +30,7 @@ use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
class SyncSystemAddressBook extends Command {
public const NAME = 'dav:sync-system-addressbook';
/** @var SyncService */
private $syncService;
@ -44,7 +45,7 @@ class SyncSystemAddressBook extends Command {
protected function configure() {
$this
->setName('dav:sync-system-addressbook')
->setName(self::NAME)
->setDescription('Synchronizes users to the system addressbook');
}