Skip to content

Commit

Permalink
more container stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
tcitworld committed Sep 27, 2016
1 parent 78a65f0 commit 5baddcb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions appinfo/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@
*/
namespace OCA\Calendar\AppInfo;

use OCP\User;
use OCP\Util;

$app = new Application();
$app->registerNavigation();
$server = $app->getContainer()->getServer();

// only load calendar action if the user is logged in
if (User::isLoggedIn()) {
$eventDispatcher = $app->getContainer()->getServer()->getEventDispatcher();
if ($server->getUserSession()->isLoggedIn()) {
$eventDispatcher = $server->getEventDispatcher();
$eventDispatcher->addListener('OCA\Files::loadAdditionalScripts', function() {
Util::addScript('calendar', 'utility/registerUtility');
});
Expand Down

0 comments on commit 5baddcb

Please sign in to comment.