|
1 | 1 | <?php |
2 | | - |
3 | 2 | /** |
4 | | -* ownCloud - user_webdavauth |
5 | | -* |
6 | | -* @author Frank Karlitschek |
7 | | -* @copyright 2012 Frank Karlitschek [email protected] |
8 | | -* |
9 | | -* This library is free software; you can redistribute it and/or |
10 | | -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE |
11 | | -* License as published by the Free Software Foundation; either |
12 | | -* version 3 of the License, or any later version. |
13 | | -* |
14 | | -* This library is distributed in the hope that it will be useful, |
15 | | -* but WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | | -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
17 | | -* GNU AFFERO GENERAL PUBLIC LICENSE for more details. |
18 | | -* |
19 | | -* You should have received a copy of the GNU Affero General Public |
20 | | -* License along with this library. If not, see <http://www.gnu.org/licenses/>. |
21 | | -* |
22 | | -*/ |
23 | | - |
24 | | -require_once OC_App::getAppPath('user_webdavauth').'/user_webdavauth.php'; |
| 3 | + * @author Frank Karlitschek |
| 4 | + * @copyright 2012 Frank Karlitschek [email protected] |
| 5 | + * @copyright 2014 Lukas Reschke [email protected] |
| 6 | + * |
| 7 | + * This file is licensed under the Affero General Public License version 3 or |
| 8 | + * later. |
| 9 | + * See the COPYING-README file. |
| 10 | + */ |
25 | 11 |
|
26 | | -OC_APP::registerAdmin('user_webdavauth', 'settings'); |
| 12 | +namespace OCA\user_webdavauth\AppInfo; |
27 | 13 |
|
28 | | -OC_User::registerBackend("WEBDAVAUTH"); |
29 | | -OC_User::useBackend( "WEBDAVAUTH" ); |
| 14 | +use OCA\user_webdavauth\USER_WEBDAVAUTH; |
| 15 | +use OCP\Util; |
30 | 16 |
|
31 | | -OCP\Util::addTranslations('user_webdavauth'); |
32 | | - |
33 | | -// add settings page to navigation |
34 | | -$entry = array( |
35 | | - 'id' => "user_webdavauth_settings", |
36 | | - 'order'=>1, |
37 | | - 'href' => OC_Helper::linkTo( "user_webdavauth", "settings.php" ), |
38 | | - 'name' => 'WEBDAVAUTH' |
| 17 | +$userBackend = new USER_WEBDAVAUTH( |
| 18 | + \OC::$server->getConfig(), |
| 19 | + \OC::$server->getDb(), |
| 20 | + \OC::$server->getHTTPHelper(), |
| 21 | + \OC::$server->getLogger(), |
| 22 | + \OC::$server->getUserManager(), |
| 23 | + \OC::$server->getServerRoot() |
39 | 24 | ); |
| 25 | +\OC_User::useBackend($userBackend); |
| 26 | + |
| 27 | +Util::addTranslations('user_webdavauth'); |
| 28 | +\OC_APP::registerAdmin('user_webdavauth', 'settings'); |
0 commit comments