summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2016-10-11 22:03:01 +0200
committerGitHub <noreply@github.com>2016-10-11 22:03:01 +0200
commit8a700d7b44814d1eccbed3a0990dc51c90df576a (patch)
tree0af4d42477ec5d084fd0008fa626efcfd0823948 /apps
parentbf56b8c620cd2fc18b6e37a54737fb1dd5430ee5 (diff)
parent7eba1d806b6d0034ba399ad3aeedc336e600ab62 (diff)
downloadnextcloud-server-8a700d7b44814d1eccbed3a0990dc51c90df576a.tar.gz
nextcloud-server-8a700d7b44814d1eccbed3a0990dc51c90df576a.zip
Merge pull request #1705 from nextcloud/us_register-commands-in-info.xml
[oc] Register commands in info.xml
Diffstat (limited to 'apps')
-rw-r--r--apps/dav/appinfo/info.xml6
-rw-r--r--apps/dav/appinfo/register_command.php39
-rw-r--r--apps/federation/appinfo/info.xml4
-rw-r--r--apps/federation/appinfo/register_command.php27
-rw-r--r--apps/files/appinfo/info.xml6
-rw-r--r--apps/files/appinfo/register_command.php34
-rw-r--r--apps/files_trashbin/appinfo/info.xml5
-rw-r--r--apps/files_trashbin/appinfo/register_command.php36
-rw-r--r--apps/files_versions/appinfo/info.xml6
-rw-r--r--apps/files_versions/appinfo/register_command.php34
10 files changed, 26 insertions, 171 deletions
diff --git a/apps/dav/appinfo/info.xml b/apps/dav/appinfo/info.xml
index c9cd6798018..4d3b1757284 100644
--- a/apps/dav/appinfo/info.xml
+++ b/apps/dav/appinfo/info.xml
@@ -29,4 +29,10 @@
<step>OCA\DAV\Migration\GenerateBirthdays</step>
</live-migration>
</repair-steps>
+ <commands>
+ <command>OCA\DAV\Command\CreateAddressBook</command>
+ <command>OCA\DAV\Command\CreateCalendar</command>
+ <command>OCA\DAV\Command\SyncBirthdayCalendar</command>
+ <command>OCA\DAV\Command\SyncSystemAddressBook</command>
+ </commands>
</info>
diff --git a/apps/dav/appinfo/register_command.php b/apps/dav/appinfo/register_command.php
deleted file mode 100644
index 57bf8ff5dd9..00000000000
--- a/apps/dav/appinfo/register_command.php
+++ /dev/null
@@ -1,39 +0,0 @@
-<?php
-/**
- * @copyright Copyright (c) 2016, ownCloud, Inc.
- *
- * @author Joas Schilling <coding@schilljs.com>
- * @author Thomas Müller <thomas.mueller@tmit.eu>
- *
- * @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/>
- *
- */
-use OCA\DAV\AppInfo\Application;
-use OCA\DAV\Command\CreateAddressBook;
-use OCA\DAV\Command\CreateCalendar;
-use OCA\DAV\Command\SyncBirthdayCalendar;
-use OCA\DAV\Command\SyncSystemAddressBook;
-
-$dbConnection = \OC::$server->getDatabaseConnection();
-$userManager = OC::$server->getUserManager();
-$groupManager = OC::$server->getGroupManager();
-
-$app = new Application();
-
-/** @var Symfony\Component\Console\Application $application */
-$application->add(new CreateCalendar($userManager, $groupManager, $dbConnection));
-$application->add(new CreateAddressBook($userManager, $app->getContainer()->query(\OCA\DAV\CardDAV\CardDavBackend::class)));
-$application->add(new SyncSystemAddressBook($app->getSyncService()));
-$application->add(new SyncBirthdayCalendar($userManager, $app->getContainer()->query(\OCA\DAV\CalDAV\BirthdayService::class)));
diff --git a/apps/federation/appinfo/info.xml b/apps/federation/appinfo/info.xml
index da65fef2446..cec3f8341a9 100644
--- a/apps/federation/appinfo/info.xml
+++ b/apps/federation/appinfo/info.xml
@@ -23,4 +23,8 @@
<settings>
<admin>OCA\Federation\Settings\Admin</admin>
</settings>
+
+ <commands>
+ <command>OCA\Federation\Command\SyncFederationAddressBooks</command>
+ </commands>
</info>
diff --git a/apps/federation/appinfo/register_command.php b/apps/federation/appinfo/register_command.php
deleted file mode 100644
index c7cec58efd4..00000000000
--- a/apps/federation/appinfo/register_command.php
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-/**
- * @copyright Copyright (c) 2016, ownCloud, Inc.
- *
- * @author Lukas Reschke <lukas@statuscode.ch>
- * @author Thomas Müller <thomas.mueller@tmit.eu>
- *
- * @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/>
- *
- */
-$app = new \OCA\Federation\AppInfo\Application();
-$syncService = $app->getSyncService();
-
-/** @var Symfony\Component\Console\Application $application */
-$application->add(new \OCA\Federation\Command\SyncFederationAddressBooks($syncService));
diff --git a/apps/files/appinfo/info.xml b/apps/files/appinfo/info.xml
index 513940f73a9..37a85f33afc 100644
--- a/apps/files/appinfo/info.xml
+++ b/apps/files/appinfo/info.xml
@@ -26,4 +26,10 @@
<settings>
<admin>OCA\Files\Settings\Admin</admin>
</settings>
+
+ <commands>
+ <command>OCA\Files\Command\Scan</command>
+ <command>OCA\Files\Command\DeleteOrphanedFiles</command>
+ <command>OCA\Files\Command\TransferOwnership</command>
+ </commands>
</info>
diff --git a/apps/files/appinfo/register_command.php b/apps/files/appinfo/register_command.php
deleted file mode 100644
index e0d3ba622f3..00000000000
--- a/apps/files/appinfo/register_command.php
+++ /dev/null
@@ -1,34 +0,0 @@
-<?php
-/**
- * @copyright Copyright (c) 2016, ownCloud, Inc.
- *
- * @author Bart Visscher <bartv@thisnet.nl>
- * @author Joas Schilling <coding@schilljs.com>
- * @author Morris Jobke <hey@morrisjobke.de>
- * @author Thomas Müller <thomas.mueller@tmit.eu>
- *
- * @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/>
- *
- */
-
-$dbConnection = \OC::$server->getDatabaseConnection();
-$userManager = OC::$server->getUserManager();
-$shareManager = \OC::$server->getShareManager();
-$mountManager = \OC::$server->getMountManager();
-
-/** @var Symfony\Component\Console\Application $application */
-$application->add(new OCA\Files\Command\Scan($userManager));
-$application->add(new OCA\Files\Command\DeleteOrphanedFiles($dbConnection));
-$application->add(new OCA\Files\Command\TransferOwnership($userManager, $shareManager, $mountManager));
diff --git a/apps/files_trashbin/appinfo/info.xml b/apps/files_trashbin/appinfo/info.xml
index 16ed81efd77..2fd88ff7765 100644
--- a/apps/files_trashbin/appinfo/info.xml
+++ b/apps/files_trashbin/appinfo/info.xml
@@ -25,4 +25,9 @@ To prevent a user from running out of disk space, the Deleted files app will not
<background-jobs>
<job>OCA\Files_Trashbin\BackgroundJob\ExpireTrash</job>
</background-jobs>
+
+ <commands>
+ <command>OCA\Files_Trashbin\Command\CleanUp</command>
+ <command>OCA\Files_Trashbin\Command\ExpireTrash</command>
+ </commands>
</info>
diff --git a/apps/files_trashbin/appinfo/register_command.php b/apps/files_trashbin/appinfo/register_command.php
deleted file mode 100644
index e0dafc60cd9..00000000000
--- a/apps/files_trashbin/appinfo/register_command.php
+++ /dev/null
@@ -1,36 +0,0 @@
-<?php
-/**
- * @copyright Copyright (c) 2016, ownCloud, Inc.
- *
- * @author Björn Schießle <bjoern@schiessle.org>
- *
- * @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/>
- *
- */
-
-
-use OCA\Files_Trashbin\AppInfo\Application;
-use OCA\Files_Trashbin\Command\CleanUp;
-use OCA\Files_Trashbin\Command\ExpireTrash;
-
-$app = new Application();
-$expiration = $app->getContainer()->query('Expiration');
-$userManager = OC::$server->getUserManager();
-$rootFolder = \OC::$server->getRootFolder();
-$dbConnection = \OC::$server->getDatabaseConnection();
-
-/** @var Symfony\Component\Console\Application $application */
-$application->add(new CleanUp($rootFolder, $userManager, $dbConnection));
-$application->add(new ExpireTrash($userManager, $expiration));
diff --git a/apps/files_versions/appinfo/info.xml b/apps/files_versions/appinfo/info.xml
index b167104016a..026ed406d7c 100644
--- a/apps/files_versions/appinfo/info.xml
+++ b/apps/files_versions/appinfo/info.xml
@@ -7,7 +7,6 @@
<description>
This application automatically maintains older versions of files that are changed. When enabled, a hidden versions folder is provisioned in every user’s directory and is used to store old file versions. A user can revert to an older version through the web interface at any time, with the replaced file becoming a version. The app automatically manages the versions folder to ensure the user doesn’t run out of Quota because of versions.
In addition to the expiry of versions, the versions app makes certain never to use more than 50% of the user’s currently available free space. If stored versions exceed this limit, the app will delete the oldest versions first until it meets this limit. More information is available in the Versions documentation.
-
</description>
<version>1.4.0</version>
<types>
@@ -25,4 +24,9 @@ In addition to the expiry of versions, the versions app makes certain never to u
<background-jobs>
<job>OCA\Files_Versions\BackgroundJob\ExpireVersions</job>
</background-jobs>
+
+ <commands>
+ <command>OCA\Files_Versions\Command\CleanUp</command>
+ <command>OCA\Files_Versions\Command\ExpireVersions</command>
+ </commands>
</info>
diff --git a/apps/files_versions/appinfo/register_command.php b/apps/files_versions/appinfo/register_command.php
deleted file mode 100644
index bca869075aa..00000000000
--- a/apps/files_versions/appinfo/register_command.php
+++ /dev/null
@@ -1,34 +0,0 @@
-<?php
-/**
- * @copyright Copyright (c) 2016, ownCloud, Inc.
- *
- * @author Björn Schießle <bjoern@schiessle.org>
- *
- * @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/>
- *
- */
-
-
-use OCA\Files_Versions\AppInfo\Application;
-use OCA\Files_Versions\Command\CleanUp;
-use OCA\Files_Versions\Command\ExpireVersions;
-
-$app = new Application();
-$expiration = $app->getContainer()->query('Expiration');
-$userManager = OC::$server->getUserManager();
-$rootFolder = \OC::$server->getRootFolder();
-/** @var Symfony\Component\Console\Application $application */
-$application->add(new CleanUp($rootFolder, $userManager));
-$application->add(new ExpireVersions($userManager, $expiration));