]> source.dussan.org Git - nextcloud-server.git/commitdiff
move share notifcation settings to files group
authorRobin Appelman <robin@icewind.nl>
Tue, 11 Aug 2020 22:15:53 +0000 (00:15 +0200)
committerRobin Appelman <robin@icewind.nl>
Wed, 12 Aug 2020 22:01:30 +0000 (00:01 +0200)
Signed-off-by: Robin Appelman <robin@icewind.nl>
apps/files_sharing/composer/composer/autoload_classmap.php
apps/files_sharing/composer/composer/autoload_static.php
apps/files_sharing/lib/Activity/Settings/PublicLinks.php
apps/files_sharing/lib/Activity/Settings/RemoteShare.php
apps/files_sharing/lib/Activity/Settings/ShareActivitySettings.php [new file with mode: 0644]
apps/files_sharing/lib/Activity/Settings/Shared.php

index 5203b80a1bd13100cfb2afd20080e40f49c35378..4ba8d1659af59151c207cfdab816f2e47523e7e4 100644 (file)
@@ -15,6 +15,7 @@ return array(
     'OCA\\Files_Sharing\\Activity\\Providers\\Users' => $baseDir . '/../lib/Activity/Providers/Users.php',
     'OCA\\Files_Sharing\\Activity\\Settings\\PublicLinks' => $baseDir . '/../lib/Activity/Settings/PublicLinks.php',
     'OCA\\Files_Sharing\\Activity\\Settings\\RemoteShare' => $baseDir . '/../lib/Activity/Settings/RemoteShare.php',
+    'OCA\\Files_Sharing\\Activity\\Settings\\ShareActivitySettings' => $baseDir . '/../lib/Activity/Settings/ShareActivitySettings.php',
     'OCA\\Files_Sharing\\Activity\\Settings\\Shared' => $baseDir . '/../lib/Activity/Settings/Shared.php',
     'OCA\\Files_Sharing\\AppInfo\\Application' => $baseDir . '/../lib/AppInfo/Application.php',
     'OCA\\Files_Sharing\\BackgroundJob\\FederatedSharesDiscoverJob' => $baseDir . '/../lib/BackgroundJob/FederatedSharesDiscoverJob.php',
index 56036b035eb8e76427aee9f76b2a4b0eef8172dc..4376ad0b8201dd9c89f92726091eeefd4a1b1846 100644 (file)
@@ -30,6 +30,7 @@ class ComposerStaticInitFiles_Sharing
         'OCA\\Files_Sharing\\Activity\\Providers\\Users' => __DIR__ . '/..' . '/../lib/Activity/Providers/Users.php',
         'OCA\\Files_Sharing\\Activity\\Settings\\PublicLinks' => __DIR__ . '/..' . '/../lib/Activity/Settings/PublicLinks.php',
         'OCA\\Files_Sharing\\Activity\\Settings\\RemoteShare' => __DIR__ . '/..' . '/../lib/Activity/Settings/RemoteShare.php',
+        'OCA\\Files_Sharing\\Activity\\Settings\\ShareActivitySettings' => __DIR__ . '/..' . '/../lib/Activity/Settings/ShareActivitySettings.php',
         'OCA\\Files_Sharing\\Activity\\Settings\\Shared' => __DIR__ . '/..' . '/../lib/Activity/Settings/Shared.php',
         'OCA\\Files_Sharing\\AppInfo\\Application' => __DIR__ . '/..' . '/../lib/AppInfo/Application.php',
         'OCA\\Files_Sharing\\BackgroundJob\\FederatedSharesDiscoverJob' => __DIR__ . '/..' . '/../lib/BackgroundJob/FederatedSharesDiscoverJob.php',
index 60094b656e16285001aec2fd7e2f331680b97d5d..fd8b6b56b8828725a0836e83dd162379b447e708 100644 (file)
@@ -26,18 +26,7 @@ namespace OCA\Files_Sharing\Activity\Settings;
 use OCP\Activity\ISetting;
 use OCP\IL10N;
 
-class PublicLinks implements ISetting {
-
-       /** @var IL10N */
-       protected $l;
-
-       /**
-        * @param IL10N $l
-        */
-       public function __construct(IL10N $l) {
-               $this->l = $l;
-       }
-
+class PublicLinks extends ShareActivitySettings {
        /**
         * @return string Lowercase a-z and underscore only identifier
         * @since 11.0.0
index 319b4ebfef384d9b670661b5472aeb2342f34059..f6c4b873b458b0bef2ad10bca23ef18b3fed3625 100644 (file)
@@ -27,18 +27,7 @@ namespace OCA\Files_Sharing\Activity\Settings;
 use OCP\Activity\ISetting;
 use OCP\IL10N;
 
-class RemoteShare implements ISetting {
-
-       /** @var IL10N */
-       protected $l;
-
-       /**
-        * @param IL10N $l
-        */
-       public function __construct(IL10N $l) {
-               $this->l = $l;
-       }
-
+class RemoteShare extends ShareActivitySettings {
        /**
         * @return string Lowercase a-z and underscore only identifier
         * @since 11.0.0
diff --git a/apps/files_sharing/lib/Activity/Settings/ShareActivitySettings.php b/apps/files_sharing/lib/Activity/Settings/ShareActivitySettings.php
new file mode 100644 (file)
index 0000000..14f3fe3
--- /dev/null
@@ -0,0 +1,47 @@
+<?php
+
+declare(strict_types=1);
+/**
+ * @copyright Copyright (c) 2020 Robin Appelman <robin@icewind.nl>
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * 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
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+namespace OCA\Files_Sharing\Activity\Settings;
+
+use OCP\Activity\ActivitySettings;
+use OCP\IL10N;
+
+abstract class ShareActivitySettings extends ActivitySettings {
+       /** @var IL10N */
+       protected $l;
+
+       /**
+        * @param IL10N $l
+        */
+       public function __construct(IL10N $l) {
+               $this->l = $l;
+       }
+
+       public function getGroupIdentifier() {
+               return 'files';
+       }
+
+       public function getGroupName() {
+               return $this->l->t('Files');
+       }
+}
index 1eb6270af3d938b1b95dd13c48d46a62f08ba0dd..40c3e0fea069fd0e97597250975975408099e330 100644 (file)
@@ -27,18 +27,7 @@ namespace OCA\Files_Sharing\Activity\Settings;
 use OCP\Activity\ISetting;
 use OCP\IL10N;
 
-class Shared implements ISetting {
-
-       /** @var IL10N */
-       protected $l;
-
-       /**
-        * @param IL10N $l
-        */
-       public function __construct(IL10N $l) {
-               $this->l = $l;
-       }
-
+class Shared extends ShareActivitySettings {
        /**
         * @return string Lowercase a-z and underscore only identifier
         * @since 11.0.0