diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2016-03-21 17:48:02 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2016-03-21 17:48:02 +0100 |
commit | 492a1ded1ce9c8151354054e8aa8ea8cdc2f4a5b (patch) | |
tree | d76b7b04f8666deb744c7fa2a8cd3b9e2ea4aa77 /apps/dav/appinfo | |
parent | 2309ef9167f25f668f638151def46c72165118c2 (diff) | |
parent | 5fc859f7ea5daa597ae638c0b9f7d4c04bdd061a (diff) | |
download | nextcloud-server-492a1ded1ce9c8151354054e8aa8ea8cdc2f4a5b.tar.gz nextcloud-server-492a1ded1ce9c8151354054e8aa8ea8cdc2f4a5b.zip |
Merge pull request #23083 from owncloud/generate-birthdays-on-upgrade
Birthday events are generated on upgrade
Diffstat (limited to 'apps/dav/appinfo')
-rw-r--r-- | apps/dav/appinfo/application.php | 15 | ||||
-rw-r--r-- | apps/dav/appinfo/info.xml | 2 | ||||
-rw-r--r-- | apps/dav/appinfo/install.php | 1 | ||||
-rw-r--r-- | apps/dav/appinfo/update.php | 1 |
4 files changed, 18 insertions, 1 deletions
diff --git a/apps/dav/appinfo/application.php b/apps/dav/appinfo/application.php index 1dae3d4efbf..d06daf97f54 100644 --- a/apps/dav/appinfo/application.php +++ b/apps/dav/appinfo/application.php @@ -210,4 +210,19 @@ class Application extends App { $this->getContainer()->getServer()->getLogger()->logException($ex); } } + + public function generateBirthdays() { + try { + /** @var BirthdayService $migration */ + $migration = $this->getContainer()->query('BirthdayService'); + $userManager = $this->getContainer()->getServer()->getUserManager(); + + $userManager->callForAllUsers(function($user) use($migration) { + /** @var IUser $user */ + $migration->syncUser($user->getUID()); + }); + } catch (\Exception $ex) { + $this->getContainer()->getServer()->getLogger()->logException($ex); + } + } } diff --git a/apps/dav/appinfo/info.xml b/apps/dav/appinfo/info.xml index 4f1e805d99e..82d0f7cf8a1 100644 --- a/apps/dav/appinfo/info.xml +++ b/apps/dav/appinfo/info.xml @@ -5,7 +5,7 @@ <description>ownCloud WebDAV endpoint</description> <licence>AGPL</licence> <author>owncloud.org</author> - <version>0.2.1</version> + <version>0.2.2</version> <default_enable/> <types> <filesystem/> diff --git a/apps/dav/appinfo/install.php b/apps/dav/appinfo/install.php index a7a3220b90f..dc5ae39226e 100644 --- a/apps/dav/appinfo/install.php +++ b/apps/dav/appinfo/install.php @@ -25,3 +25,4 @@ $app = new Application(); $app->setupCron(); $app->migrateAddressbooks(); $app->migrateCalendars(); +$app->generateBirthdays(); diff --git a/apps/dav/appinfo/update.php b/apps/dav/appinfo/update.php index aaa36052cd2..fbd41d25f49 100644 --- a/apps/dav/appinfo/update.php +++ b/apps/dav/appinfo/update.php @@ -23,3 +23,4 @@ use OCA\Dav\AppInfo\Application; $app = new Application(); $app->setupCron(); +$app->generateBirthdays(); |