Merge branch 'hotfix/animalillo/nc16_breaking'

This commit is contained in:
WolFi 2019-10-21 23:19:40 +02:00
commit 79ab13aaf4
No known key found for this signature in database
GPG key ID: 7D15585354D072FF
3 changed files with 17 additions and 24 deletions

View file

@ -23,8 +23,19 @@ $app = new \OCA\Passman\AppInfo\Application();
$app->registerNavigationEntry();
$app->registerPersonalPage();
$l = \OC::$server->getL10N('passman');
$manager = \OC::$server->getNotificationManager();
$manager->registerNotifierService(Notifier::class);
$manager->registerNotifier(function() {
return new Notifier(
\OC::$server->getL10NFactory()
);
}, function() use ($l) {
return [
'id' => 'passman',
'name' => $l->t('Passwords'),
];
});
/**
* Loading translations

View file

@ -19,7 +19,7 @@ Features:
- Import from various password managers (KeePass, LastPass, DashLane, ZOHO, Clipperz.is )
For an demo of this app visit [https://demo.passman.cc](https://demo.passman.cc)
]]></description>
<version>2.3.3</version>
<version>2.3.4</version>
<licence>agpl</licence>
<author homepage="https://github.com/brantje">Sander Brand</author>
<author homepage="https://github.com/animalillo">Marcos Zuriaga</author>
@ -42,8 +42,8 @@ For an demo of this app visit [https://demo.passman.cc](https://demo.passman.cc)
<database>pgsql</database>
<database min-version="5.5">mysql</database>
<lib>openssl</lib>
<nextcloud min-version="14" max-version="17"/>
<owncloud min-version="14" max-version="17"/>
<nextcloud min-version="14" max-version="16"/>
<owncloud min-version="14" max-version="16"/>
</dependencies>
<background-jobs>

View file

@ -37,7 +37,7 @@ class Notifier implements INotifier {
* @param INotification $notification
* @param string $languageCode The code of the language that should be used to prepare the notification
*/
public function prepare(INotification $notification, string $languageCode): INotification {
public function prepare(INotification $notification, $languageCode) {
if ($notification->getApp() !== 'passman') {
// Not my app => throw
throw new \InvalidArgumentException();
@ -109,22 +109,4 @@ class Notifier implements INotifier {
throw new \InvalidArgumentException();
}
}
/**
* Identifier of the notifier
*
* @return string
*/
public function getID(): string {
return 'passman';
}
/**
* Human readable name describing the notifier
*
* @return string
*/
public function getName(): string {
return $this->factory->get('passman')->t('Passwords');
}
}
}