diff options
author | Matthias <matthias.held@uni-konstanz.de> | 2019-10-14 20:15:36 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-14 20:15:36 +0300 |
commit | 0f3f5138fcf13ae2519ea3075572fe11f2f79c76 (patch) | |
tree | 1aa272bdb09c882037d648bd41229638377fdba2 | |
parent | 22a2fd92c041c3ba26f691be2a3de11422649546 (diff) | |
parent | b7437ad523796391b958dd2e26d3130b89fef492 (diff) |
Merge pull request #24 from undo-ransomware/developv0.6.0
Release 0.6.0
-rw-r--r-- | .travis.yml | 30 | ||||
-rw-r--r-- | CHANGELOG.md | 6 | ||||
-rw-r--r-- | appinfo/info.xml | 4 | ||||
-rw-r--r-- | lib/AppInfo/Application.php | 11 | ||||
-rw-r--r-- | lib/Notification/Notifier.php | 22 |
5 files changed, 35 insertions, 38 deletions
diff --git a/.travis.yml b/.travis.yml index f479b51..e60d12f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,9 +2,13 @@ language: php env: global: - - CORE_BRANCH=stable16 + - CORE_BRANCH=stable17 - APP_NAME=ransomware_detection +services: + - mysql + - postgresql + branches: only: - master @@ -26,30 +30,6 @@ jobs: - env: "CHECKSTYLE=2" include: - stage: test - php: 7.0 - env: - - DB=sqlite - - CORE_BRANCH=stable13 - script: - - cd apps/$APP_NAME/ - - phpunit --configuration phpunit.xml - - stage: test - php: 7.0 - env: - - DB=sqlite - - CORE_BRANCH=stable14 - script: - - cd apps/$APP_NAME/ - - phpunit --configuration phpunit.xml - - stage: test - php: 7.0 - env: - - DB=sqlite - - CORE_BRANCH=stable15 - script: - - cd apps/$APP_NAME/ - - phpunit --configuration phpunit.xml - - stage: test php: 7.1 env: - DB=mysql diff --git a/CHANGELOG.md b/CHANGELOG.md index 783b788..85c9b5d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ All notable changes to this project will be documented in this file. +## 0.6.0 + +### Added + +- Nextcloud version 17 support. + ## 0.5.2 ### Fixed diff --git a/appinfo/info.xml b/appinfo/info.xml index e507073..edd5605 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -5,7 +5,7 @@ <name>Ransomware recovery</name> <summary><![CDATA[This app offers synchronization monitoring and a file storage scanner for a guided user-controlled one-step ransomare recovery.]]></summary> <description><![CDATA[This app monitors file operations during the synchronization to detect ransomware attacks and also offers a post infection file storage scanner, which works even if it happend that you didn't have this app installed during an attack. This is done by using generic indicators for a guided user-controlled one-step recovery utilizing the integrated file versioning methods.]]></description> - <version>0.5.2</version> + <version>0.6.0</version> <licence>agpl</licence> <author mail="matthias.held@uni-konstanz.de">Matthias Held</author> <namespace>RansomwareDetection</namespace> @@ -20,7 +20,7 @@ <screenshot>https://github.com/undo-ransomware/ransomware_detection/raw/master/screenshots/monitoring-0.3.0.png</screenshot> <screenshot>https://github.com/undo-ransomware/ransomware_detection/raw/master/screenshots/scan-files-0.3.0.png</screenshot> <dependencies> - <nextcloud min-version="13" max-version="16"/> + <nextcloud min-version="17" max-version="17"/> </dependencies> <background-jobs> diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php index e3827bf..dedb5af 100644 --- a/lib/AppInfo/Application.php +++ b/lib/AppInfo/Application.php @@ -174,15 +174,6 @@ class Application extends App protected function registerNotificationNotifier() { - $this->getContainer()->getServer()->getNotificationManager()->registerNotifier(function () { - return $this->getContainer()->query(Notifier::class); - }, function () { - $l = $this->getContainer()->getServer()->getL10NFactory()->get(self::APP_ID); - - return [ - 'id' => self::APP_ID, - 'name' => $l->t('Ransomware recovery'), - ]; - }); + $this->getContainer()->getServer()->getNotificationManager()->registerNotifierService(Notifier::class); } } diff --git a/lib/Notification/Notifier.php b/lib/Notification/Notifier.php index b7a19bd..c3dcc6d 100644 --- a/lib/Notification/Notifier.php +++ b/lib/Notification/Notifier.php @@ -74,7 +74,7 @@ class Notifier implements INotifier * * @return INotification */ - public function prepare(INotification $notification, $languageCode) + public function prepare(INotification $notification, string $languageCode): INotification { if ($notification->getApp() !== Application::APP_ID) { // Not my app => throw @@ -96,4 +96,24 @@ class Notifier implements INotifier throw new \InvalidArgumentException('Unknown subject'); } } + + /** + * Identifier of the notifier, only use [a-z0-9_] + * + * @return string + * @since 17.0.0 + */ + public function getID(): string { + return Application::APP_ID; + } + + /** + * Human readable name describing the notifier + * + * @return string + * @since 17.0.0 + */ + public function getName(): string { + return $this->l10nFactory->get(Application::APP_ID)->t('Ransomware recovery'); + } } |