Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/passman.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorbrantje <brantje@gmail.com>2016-10-12 21:12:28 +0300
committerbrantje <brantje@gmail.com>2016-10-12 21:16:37 +0300
commit1a74def8dc02475ee0df2b9cd25d77ae7cb3007e (patch)
tree7d92b46d6a454d34c860ae27c586f3c78dbe18c8 /lib
parentb658e2a4ca16e7cbec4e49186911be871f555885 (diff)
Remove unused code
Diffstat (limited to 'lib')
-rw-r--r--lib/Activity.php2
-rw-r--r--lib/AppInfo/Application.php1
-rw-r--r--lib/Notifier.php5
-rw-r--r--lib/Service/NotificationService.php18
4 files changed, 11 insertions, 15 deletions
diff --git a/lib/Activity.php b/lib/Activity.php
index ded2300b..6e59f0ee 100644
--- a/lib/Activity.php
+++ b/lib/Activity.php
@@ -241,7 +241,7 @@ class Activity implements \OCP\Activity\IExtension {
array(
'id' => 'passman',
'name' => (string) $l->t('Passwords'),
- 'url' => '',//FIXME: $this->URLGenerator->linkToRoute('activity.Activities.showList', array('filter' => 'passman')),
+ 'url' => '',//FIXME: Currenlty we cannot link directly to links, so this needs to be fixed... this->URLGenerator->linkToRoute('activity.Activities.showList', array('filter' => 'passman')),
),
),
);
diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php
index d2468d79..5a61d1a0 100644
--- a/lib/AppInfo/Application.php
+++ b/lib/AppInfo/Application.php
@@ -32,7 +32,6 @@ class Application extends App {
public function __construct () {
parent::__construct('passman');
$container = $this->getContainer();
- $server = $container->getServer();
// Allow automatic DI for the View, until we migrated to Nodes API
$container->registerService(View::class, function() {
return new View('');
diff --git a/lib/Notifier.php b/lib/Notifier.php
index 0f63bd53..5d701360 100644
--- a/lib/Notifier.php
+++ b/lib/Notifier.php
@@ -60,7 +60,7 @@ class Notifier implements INotifier {
$notification->addParsedAction($action);
}
return $notification;
- break;
+
case 'credential_shared':
$notification->setParsedSubject(
@@ -80,21 +80,18 @@ class Notifier implements INotifier {
$notification->addParsedAction($action);
}
return $notification;
- break;
case 'credential_share_denied':
$notification->setParsedSubject(
(string) $l->t('%s has declined your share request for "%s".', $notification->getSubjectParameters())
);
return $notification;
- break;
case 'credential_share_accepted':
$notification->setParsedSubject(
(string) $l->t('%s has accepted your share request for "%s".', $notification->getSubjectParameters())
);
return $notification;
- break;
default:
// Unknown subject => Unknown notification => throw
throw new \InvalidArgumentException();
diff --git a/lib/Service/NotificationService.php b/lib/Service/NotificationService.php
index 063efb7c..b353fcf4 100644
--- a/lib/Service/NotificationService.php
+++ b/lib/Service/NotificationService.php
@@ -21,7 +21,7 @@ class NotificationService {
private $manager;
- public function __construct(FileMapper $fileMapper) {
+ public function __construct() {
$this->manager = \OC::$server->getNotificationManager();
}
@@ -41,8 +41,8 @@ class NotificationService {
$notification->setApp('passman')
->setUser($credential->getUserId())
->setDateTime(new \DateTime())
- ->setObject('credential', $credential->getId()) // $type and $id
- ->setSubject('credential_expired', [$credential->getLabel()]) // $subject and $parameters
+ ->setObject('credential', $credential->getId()) // Set notification type and id
+ ->setSubject('credential_expired', [$credential->getLabel()]) // set subject and parameters
->setLink($link)
->addAction($declineAction)
->addAction($remindAction);
@@ -64,8 +64,8 @@ class NotificationService {
$notification->setApp('passman')
->setUser($data['target_user'])
->setDateTime(new \DateTime())
- ->setObject('passman_share_request', $data['req_id']) // $type and $id
- ->setSubject('credential_shared', [$data['from_user'], $data['credential_label']]) // $subject and $parameters
+ ->setObject('passman_share_request', $data['req_id']) // type and id
+ ->setSubject('credential_shared', [$data['from_user'], $data['credential_label']]) // subject and parameters
->setLink($link)
->addAction($declineAction);
@@ -78,8 +78,8 @@ class NotificationService {
$notification->setApp('passman')
->setUser($data['target_user'])
->setDateTime(new \DateTime())
- ->setObject('passman_share_request', $data['req_id']) // $type and $id
- ->setSubject('credential_share_denied', [$data['from_user'], $data['credential_label']]); // $subject and $parameters
+ ->setObject('passman_share_request', $data['req_id']) // type and id
+ ->setSubject('credential_share_denied', [$data['from_user'], $data['credential_label']]); // subject and parameters
$this->manager->notify($notification);
}
@@ -89,8 +89,8 @@ class NotificationService {
$notification->setApp('passman')
->setUser($data['target_user'])
->setDateTime(new \DateTime())
- ->setObject('passman_share_request', $data['req_id']) // $type and $id
- ->setSubject('credential_share_accepted', [$data['from_user'], $data['credential_label']]); // $subject and $parameters
+ ->setObject('passman_share_request', $data['req_id']) // type and id
+ ->setSubject('credential_share_accepted', [$data['from_user'], $data['credential_label']]); // subject and parameters
$this->manager->notify($notification);
}