Merge branch 'master' into feature/noid/increase_version_to2.3.3

This commit is contained in:
WolFi 2019-10-20 20:53:14 +02:00
commit 14ca166b2c
No known key found for this signature in database
GPG key ID: 7D15585354D072FF
7 changed files with 52 additions and 20 deletions

View file

@ -18,11 +18,12 @@ branches:
- fix_layout_for_14
services:
# enable a display for running JavaScript tests
- xvfb
before_install:
# enable a display for running JavaScript tests
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
# <- if [[ "$DB" == 'mysql' ]]; then sudo apt-get -y install mariadb-server; fi
- if [[ "$DB" == 'mysql' ]]; then sudo apt-get -y install mariadb-server; fi
# - wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh
- sh -c "if [ '$CLOUD' = 'nextcloud' ]; then wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh; fi;"
- sh -c "if [ '$CLOUD' = 'owncloud' ]; then wget https://raw.githubusercontent.com/owncloud/administration/master/travis-ci/before_install.sh; fi;"

View file

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

View file

@ -219,7 +219,19 @@ OC.L10N.register(
"Deleted credentials" : "Slettede brugeroplysninger",
"Logout" : "Log ud",
"Donate" : "Donér",
"Show All" : "Vis alle",
"Tags" : "Mærker",
"Search Tags" : "Søg Tags",
"Good Strength" : "God Styrke",
"Medium Strength" : "Styrke medium",
"Bad Strength" : "Svagt",
"Expired" : "Udløbet",
"Filter Tags" : "Filtrer Tags",
"Simple Navigation" : "Simpel Navigation",
"Click here to request it" : "Klik her for at bede om det",
"Loading…" : "Indlæser…",
"Compromise!" : "Marker kompromis!",
"Compromised!" : "Markeret kompromis!",
"Error while saving field" : "Fejl under lagring af felt",
"A Passman item has expired" : "Et element i Passman er udløbet",
"A Passman item has been shared" : "Et element i Passman er blevet delt",

View file

@ -217,7 +217,19 @@
"Deleted credentials" : "Slettede brugeroplysninger",
"Logout" : "Log ud",
"Donate" : "Donér",
"Show All" : "Vis alle",
"Tags" : "Mærker",
"Search Tags" : "Søg Tags",
"Good Strength" : "God Styrke",
"Medium Strength" : "Styrke medium",
"Bad Strength" : "Svagt",
"Expired" : "Udløbet",
"Filter Tags" : "Filtrer Tags",
"Simple Navigation" : "Simpel Navigation",
"Click here to request it" : "Klik her for at bede om det",
"Loading…" : "Indlæser…",
"Compromise!" : "Marker kompromis!",
"Compromised!" : "Markeret kompromis!",
"Error while saving field" : "Fejl under lagring af felt",
"A Passman item has expired" : "Et element i Passman er udløbet",
"A Passman item has been shared" : "Et element i Passman er blevet delt",

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, $languageCode) {
public function prepare(INotification $notification, string $languageCode): INotification {
if ($notification->getApp() !== 'passman') {
// Not my app => throw
throw new \InvalidArgumentException();
@ -109,4 +109,22 @@ 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');
}
}

View file

@ -52,7 +52,7 @@ class CronService {
foreach($expired_credentials as $credential){
$link = ''; // @TODO create direct link to credential
$sql = 'SELECT count(*) as rows from `*PREFIX*notifications` WHERE `subject`= \'credential_expired\' AND object_id=?';
$sql = 'SELECT count(*) as `rows` from `*PREFIX*notifications` WHERE `subject`= \'credential_expired\' AND object_id=?';
$id = $credential->getId();
$result = $this->db->executeQuery($sql, array($id));
$this->logger->debug($credential->getLabel() .' is expired, checking notifications!', array('app' => 'passman'));

View file

@ -54,7 +54,7 @@ function escapeHTML(s) {
* @deprecated use Files.getDownloadURL() instead
*/
function fileDownloadPath(dir, file) {
return OC.filePath('files', 'ajax', 'download.php')+'?files='+encodeURIComponent(file)+'&dir='+encodeURIComponent(dir);
return OCA.Files.Files.getDownloadUrl(file, dir);
}
/** @namespace */