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

github.com/nextcloud/survey_client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2017-01-09 13:42:28 +0300
committerJoas Schilling <coding@schilljs.com>2017-01-09 13:42:28 +0300
commit9765274005bda4153646baca65cb2af9e68715c9 (patch)
tree244b661ca785febf7c22d87821e547ddfdacedc6 /lib
parentf87025dd64e42417ef9538e55970fdc1962c08a0 (diff)
Create the link on render instead of the creation
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/BackgroundJobs/AdminNotification.php4
-rw-r--r--lib/Notifier.php3
2 files changed, 3 insertions, 4 deletions
diff --git a/lib/BackgroundJobs/AdminNotification.php b/lib/BackgroundJobs/AdminNotification.php
index 25f3958..9b1b3cc 100644
--- a/lib/BackgroundJobs/AdminNotification.php
+++ b/lib/BackgroundJobs/AdminNotification.php
@@ -29,13 +29,11 @@ class AdminNotification extends QueuedJob {
$urlGenerator = \OC::$server->getURLGenerator();
$notification = $manager->createNotification();
- $url = $urlGenerator->linkToRoute('settings.AdminSettings.index', ['section' => 'survey_client']);
$notification->setApp('survey_client')
->setDateTime(new \DateTime())
->setSubject('updated')
- ->setObject('dummy', 23)
- ->setLink($url);
+ ->setObject('dummy', 23);
$enableAction = $notification->createAction();
$enableAction->setLabel('enable')
diff --git a/lib/Notifier.php b/lib/Notifier.php
index 5341866..9685717 100644
--- a/lib/Notifier.php
+++ b/lib/Notifier.php
@@ -61,7 +61,8 @@ class Notifier implements INotifier {
$l = $this->l10nFactory->get('survey_client', $languageCode);
$notification->setParsedSubject((string) $l->t(
- 'Do you want to help us to improve Nextcloud by providing some anonymized data about your setup and usage? You can disable it at any time in the admin settings again.'));
+ 'Do you want to help us to improve Nextcloud by providing some anonymized data about your setup and usage? You can disable it at any time in the admin settings again.'))
+ ->setLink($this->url->linkToRoute('settings.AdminSettings.index', ['section' => 'survey_client']));
foreach ($notification->getActions() as $action) {
if ($action->getLabel() === 'disable') {