diff options
author | Joas Schilling <coding@schilljs.com> | 2016-09-05 16:28:22 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2016-09-05 16:28:46 +0300 |
commit | 45b996ba4477021fae453f1ae6b14bd10fae8433 (patch) | |
tree | 9c2a84ea1da47d1c7e823a9e086304c86fb4bb8f /appinfo | |
parent | 96642b51f3f23051b140c714101c4c9e9c00d5b9 (diff) |
Register app stuff via Application class
Diffstat (limited to 'appinfo')
-rw-r--r-- | appinfo/app.php | 26 |
1 files changed, 2 insertions, 24 deletions
diff --git a/appinfo/app.php b/appinfo/app.php index f70e6ef..178ee18 100644 --- a/appinfo/app.php +++ b/appinfo/app.php @@ -1,7 +1,6 @@ <?php /** * @author Joas Schilling <coding@schilljs.com> - * @author Tom Needham <tom@owncloud.com> * * @copyright Copyright (c) 2016, ownCloud, Inc. * @license AGPL-3.0 @@ -20,26 +19,5 @@ * */ -use OCA\Notifications\App; -use OCA\Notifications\Handler; -use OCP\Util; - -\OC::$server->getNotificationManager()->registerApp(function() { - return new App( - new Handler( - \OC::$server->getDatabaseConnection(), - \OC::$server->getNotificationManager() - ) - ); -}); - -// Only display the app on index.php except for public shares -$request = \OC::$server->getRequest(); -if (\OC::$server->getUserSession()->getUser() !== null - && substr($request->getScriptName(), 0 - strlen('/index.php')) === '/index.php' - && substr($request->getPathInfo(), 0, strlen('/s/')) !== '/s/' - && substr($request->getPathInfo(), 0, strlen('/login/')) !== '/login/') { - Util::addScript('notifications', 'app'); - Util::addScript('notifications', 'notification'); - Util::addStyle('notifications', 'styles'); -} +$application = new \OCA\Notifications\AppInfo\Application(); +$application->register(); |