2014-08-12 00:31:28 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
* ownCloud - RainLoop mail plugin
|
|
|
|
*
|
|
|
|
* @author RainLoop Team
|
2016-05-21 04:28:57 +08:00
|
|
|
* @copyright 2016 RainLoop Team
|
2014-08-12 00:31:28 +08:00
|
|
|
*
|
|
|
|
* https://github.com/RainLoop/owncloud
|
|
|
|
*/
|
|
|
|
|
|
|
|
OC::$CLASSPATH['OC_RainLoop_Helper'] = OC_App::getAppPath('rainloop') . '/lib/RainLoopHelper.php';
|
|
|
|
|
|
|
|
OCP\App::registerAdmin('rainloop', 'admin');
|
|
|
|
OCP\App::registerPersonal('rainloop', 'personal');
|
|
|
|
|
|
|
|
if (OCP\Config::getAppValue('rainloop', 'rainloop-autologin', false))
|
|
|
|
{
|
|
|
|
OCP\Util::connectHook('OC_User', 'post_login', 'OC_RainLoop_Helper', 'login');
|
|
|
|
OCP\Util::connectHook('OC_User', 'post_setPassword', 'OC_RainLoop_Helper', 'changePassword');
|
|
|
|
}
|
|
|
|
|
2015-02-15 08:30:21 +08:00
|
|
|
OCP\Util::connectHook('OC_User', 'logout', 'OC_RainLoop_Helper', 'logout');
|
|
|
|
|
2015-02-12 14:35:31 +08:00
|
|
|
OCP\Util::addScript('rainloop', 'rainloop');
|
2014-08-12 00:31:28 +08:00
|
|
|
|
2015-02-12 14:35:31 +08:00
|
|
|
OCP\App::addNavigationEntry(array(
|
|
|
|
'id' => 'rainloop_index',
|
|
|
|
'order' => 10,
|
|
|
|
'href' => OCP\Util::linkToRoute('rainloop_index'),
|
|
|
|
'icon' => OCP\Util::imagePath('rainloop', 'mail.png'),
|
|
|
|
'name' => 'Email'
|
|
|
|
));
|
2014-08-12 00:31:28 +08:00
|
|
|
|