@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | 'post_createUser', |
78 | 78 | $this, |
79 | 79 | 'postCreateUser'); |
80 | - \OC::$server->getUserManager()->listen('\OC\User', 'assignedUserId', function ($uid) { |
|
80 | + \OC::$server->getUserManager()->listen('\OC\User', 'assignedUserId', function($uid) { |
|
81 | 81 | $this->postCreateUser(['uid' => $uid]); |
82 | 82 | }); |
83 | 83 | Util::connectHook('OC_User', |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | 'post_deleteUser', |
90 | 90 | $this, |
91 | 91 | 'postDeleteUser'); |
92 | - \OC::$server->getUserManager()->listen('\OC\User', 'postUnassignedUserId', function ($uid) { |
|
92 | + \OC::$server->getUserManager()->listen('\OC\User', 'postUnassignedUserId', function($uid) { |
|
93 | 93 | $this->postDeleteUser(['uid' => $uid]); |
94 | 94 | }); |
95 | 95 | \OC::$server->getUserManager()->listen('\OC\User', 'postUnassignedUserId', [$this, 'postUnassignedUserId']); |
@@ -107,8 +107,8 @@ discard block |
||
107 | 107 | public function preDeleteUser($params) { |
108 | 108 | $uid = $params['uid']; |
109 | 109 | $this->usersToDelete[$uid] = $this->userManager->get($uid); |
110 | - $this->calendarsToDelete = $this->calDav->getUsersOwnCalendars('principals/users/' . $uid); |
|
111 | - $this->addressBooksToDelete = $this->cardDav->getUsersOwnAddressBooks('principals/users/' . $uid); |
|
110 | + $this->calendarsToDelete = $this->calDav->getUsersOwnCalendars('principals/users/'.$uid); |
|
111 | + $this->addressBooksToDelete = $this->cardDav->getUsersOwnAddressBooks('principals/users/'.$uid); |
|
112 | 112 | } |
113 | 113 | |
114 | 114 | public function preUnassignedUserId($uid) { |
@@ -117,14 +117,14 @@ discard block |
||
117 | 117 | |
118 | 118 | public function postDeleteUser($params) { |
119 | 119 | $uid = $params['uid']; |
120 | - if (isset($this->usersToDelete[$uid])){ |
|
120 | + if (isset($this->usersToDelete[$uid])) { |
|
121 | 121 | $this->syncService->deleteUser($this->usersToDelete[$uid]); |
122 | 122 | } |
123 | 123 | |
124 | 124 | foreach ($this->calendarsToDelete as $calendar) { |
125 | 125 | $this->calDav->deleteCalendar($calendar['id']); |
126 | 126 | } |
127 | - $this->calDav->deleteAllSharesByUser('principals/users/' . $uid); |
|
127 | + $this->calDav->deleteAllSharesByUser('principals/users/'.$uid); |
|
128 | 128 | |
129 | 129 | foreach ($this->addressBooksToDelete as $addressBook) { |
130 | 130 | $this->cardDav->deleteAddressBook($addressBook['id']); |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | } |
133 | 133 | |
134 | 134 | public function postUnassignedUserId($uid) { |
135 | - if (isset($this->usersToDelete[$uid])){ |
|
135 | + if (isset($this->usersToDelete[$uid])) { |
|
136 | 136 | $this->syncService->deleteUser($this->usersToDelete[$uid]); |
137 | 137 | } |
138 | 138 | } |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | |
145 | 145 | public function firstLogin(IUser $user = null) { |
146 | 146 | if (!is_null($user)) { |
147 | - $principal = 'principals/users/' . $user->getUID(); |
|
147 | + $principal = 'principals/users/'.$user->getUID(); |
|
148 | 148 | if ($this->calDav->getCalendarsForUserCount($principal) === 0) { |
149 | 149 | try { |
150 | 150 | $this->calDav->createCalendar($principal, CalDavBackend::PERSONAL_CALENDAR_URI, [ |
@@ -53,8 +53,8 @@ discard block |
||
53 | 53 | * @since 5.0.0 |
54 | 54 | * @deprecated 14.0.0 |
55 | 55 | */ |
56 | - static public function rmdirr( $dir ) { |
|
57 | - return \OC_Helper::rmdirr( $dir ); |
|
56 | + static public function rmdirr($dir) { |
|
57 | + return \OC_Helper::rmdirr($dir); |
|
58 | 58 | } |
59 | 59 | |
60 | 60 | /** |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | * @since 5.0.0 |
66 | 66 | * @deprecated 14.0.0 |
67 | 67 | */ |
68 | - static public function getMimeType( $path ) { |
|
68 | + static public function getMimeType($path) { |
|
69 | 69 | return \OC::$server->getMimeTypeDetector()->detect($path); |
70 | 70 | } |
71 | 71 | |
@@ -88,8 +88,8 @@ discard block |
||
88 | 88 | * @since 5.0.0 |
89 | 89 | * @deprecated 14.0.0 |
90 | 90 | */ |
91 | - public static function streamCopy( $source, $target ) { |
|
92 | - list($count, ) = \OC_Helper::streamCopy( $source, $target ); |
|
91 | + public static function streamCopy($source, $target) { |
|
92 | + list($count,) = \OC_Helper::streamCopy($source, $target); |
|
93 | 93 | return $count; |
94 | 94 | } |
95 | 95 | |
@@ -114,6 +114,6 @@ discard block |
||
114 | 114 | * @deprecated 14.0.0 use IAppData instead |
115 | 115 | */ |
116 | 116 | public static function getStorage($app) { |
117 | - return \OC_App::getStorage( $app ); |
|
117 | + return \OC_App::getStorage($app); |
|
118 | 118 | } |
119 | 119 | } |
@@ -31,9 +31,9 @@ |
||
31 | 31 | \OC_JSON::checkAppEnabled('user_ldap'); |
32 | 32 | \OC_JSON::callCheck(); |
33 | 33 | |
34 | -$prefix = (string)$_POST['ldap_serverconfig_chooser']; |
|
34 | +$prefix = (string) $_POST['ldap_serverconfig_chooser']; |
|
35 | 35 | $helper = new \OCA\User_LDAP\Helper(\OC::$server->getConfig()); |
36 | -if($helper->deleteServerConfiguration($prefix)) { |
|
36 | +if ($helper->deleteServerConfiguration($prefix)) { |
|
37 | 37 | \OC_JSON::success(); |
38 | 38 | } else { |
39 | 39 | $l = \OC::$server->getL10N('user_ldap'); |
@@ -68,7 +68,7 @@ |
||
68 | 68 | try { |
69 | 69 | $ldapWrapper->read($connection->getConnectionResource(), '', 'objectClass=*', array('dn')); |
70 | 70 | } catch (\Exception $e) { |
71 | - if($e->getCode() === 1) { |
|
71 | + if ($e->getCode() === 1) { |
|
72 | 72 | \OC_JSON::error(array('message' => $l->t('Invalid configuration: Anonymous binding is not allowed.'))); |
73 | 73 | exit; |
74 | 74 | } |
@@ -29,7 +29,7 @@ |
||
29 | 29 | \OC_JSON::checkAppEnabled('user_ldap'); |
30 | 30 | \OC_JSON::callCheck(); |
31 | 31 | |
32 | -$prefix = (string)$_POST['ldap_serverconfig_chooser']; |
|
32 | +$prefix = (string) $_POST['ldap_serverconfig_chooser']; |
|
33 | 33 | $ldapWrapper = new OCA\User_LDAP\LDAP(); |
34 | 34 | $connection = new \OCA\User_LDAP\Connection($ldapWrapper, $prefix); |
35 | 35 | $configuration = $connection->getConfiguration(); |
@@ -30,15 +30,15 @@ |
||
30 | 30 | \OC_JSON::checkAppEnabled('user_ldap'); |
31 | 31 | \OC_JSON::callCheck(); |
32 | 32 | |
33 | -$prefix = (string)$_POST['ldap_serverconfig_chooser']; |
|
33 | +$prefix = (string) $_POST['ldap_serverconfig_chooser']; |
|
34 | 34 | |
35 | 35 | // Checkboxes are not submitted, when they are unchecked. Set them manually. |
36 | 36 | // only legacy checkboxes (Advanced and Expert tab) need to be handled here, |
37 | 37 | // the Wizard-like tabs handle it on their own |
38 | 38 | $chkboxes = array('ldap_configuration_active', 'ldap_override_main_server', |
39 | 39 | 'ldap_turn_off_cert_check'); |
40 | -foreach($chkboxes as $boxid) { |
|
41 | - if(!isset($_POST[$boxid])) { |
|
40 | +foreach ($chkboxes as $boxid) { |
|
41 | + if (!isset($_POST[$boxid])) { |
|
42 | 42 | $_POST[$boxid] = 0; |
43 | 43 | } |
44 | 44 | } |
@@ -35,16 +35,16 @@ discard block |
||
35 | 35 | |
36 | 36 | $l = \OC::$server->getL10N('user_ldap'); |
37 | 37 | |
38 | -if(!isset($_POST['action'])) { |
|
38 | +if (!isset($_POST['action'])) { |
|
39 | 39 | \OC_JSON::error(array('message' => $l->t('No action specified'))); |
40 | 40 | } |
41 | -$action = (string)$_POST['action']; |
|
41 | +$action = (string) $_POST['action']; |
|
42 | 42 | |
43 | 43 | |
44 | -if(!isset($_POST['ldap_serverconfig_chooser'])) { |
|
44 | +if (!isset($_POST['ldap_serverconfig_chooser'])) { |
|
45 | 45 | \OC_JSON::error(array('message' => $l->t('No configuration specified'))); |
46 | 46 | } |
47 | -$prefix = (string)$_POST['ldap_serverconfig_chooser']; |
|
47 | +$prefix = (string) $_POST['ldap_serverconfig_chooser']; |
|
48 | 48 | |
49 | 49 | $ldapWrapper = new \OCA\User_LDAP\LDAP(); |
50 | 50 | $configuration = new \OCA\User_LDAP\Configuration($prefix); |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | |
75 | 75 | $wizard = new \OCA\User_LDAP\Wizard($configuration, $ldapWrapper, $access); |
76 | 76 | |
77 | -switch($action) { |
|
77 | +switch ($action) { |
|
78 | 78 | case 'guessPortAndTLS': |
79 | 79 | case 'guessBaseDN': |
80 | 80 | case 'detectEmailAttribute': |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | case 'countInBaseDN': |
94 | 94 | try { |
95 | 95 | $result = $wizard->$action(); |
96 | - if($result !== false) { |
|
96 | + if ($result !== false) { |
|
97 | 97 | \OC_JSON::success($result->getResultArray()); |
98 | 98 | exit; |
99 | 99 | } |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | try { |
110 | 110 | $loginName = $_POST['ldap_test_loginname']; |
111 | 111 | $result = $wizard->$action($loginName); |
112 | - if($result !== false) { |
|
112 | + if ($result !== false) { |
|
113 | 113 | \OC_JSON::success($result->getResultArray()); |
114 | 114 | exit; |
115 | 115 | } |
@@ -125,14 +125,14 @@ discard block |
||
125 | 125 | case 'save': |
126 | 126 | $key = isset($_POST['cfgkey']) ? $_POST['cfgkey'] : false; |
127 | 127 | $val = isset($_POST['cfgval']) ? $_POST['cfgval'] : null; |
128 | - if($key === false || is_null($val)) { |
|
128 | + if ($key === false || is_null($val)) { |
|
129 | 129 | \OC_JSON::error(array('message' => $l->t('No data specified'))); |
130 | 130 | exit; |
131 | 131 | } |
132 | 132 | $cfg = array($key => $val); |
133 | 133 | $setParameters = array(); |
134 | 134 | $configuration->setConfiguration($cfg, $setParameters); |
135 | - if(!in_array($key, $setParameters)) { |
|
135 | + if (!in_array($key, $setParameters)) { |
|
136 | 136 | \OC_JSON::error(array('message' => $l->t($key. |
137 | 137 | ' Could not set configuration %s', $setParameters[0]))); |
138 | 138 | exit; |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | $server->addPlugin(new \OCA\DAV\Connector\Sabre\LockPlugin()); |
118 | 118 | // Some WebDAV clients do require Class 2 WebDAV support (locking), since |
119 | 119 | // we do not provide locking we emulate it using a fake locking plugin. |
120 | - if($this->request->isUserAgent([ |
|
120 | + if ($this->request->isUserAgent([ |
|
121 | 121 | '/WebDAVFS/', |
122 | 122 | '/OneNote/', |
123 | 123 | '/Microsoft-WebDAV-MiniRedir/', |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | } |
131 | 131 | |
132 | 132 | // wait with registering these until auth is handled and the filesystem is setup |
133 | - $server->on('beforeMethod', function () use ($server, $objectTree, $viewCallBack) { |
|
133 | + $server->on('beforeMethod', function() use ($server, $objectTree, $viewCallBack) { |
|
134 | 134 | // ensure the skeleton is copied |
135 | 135 | $userFolder = \OC::$server->getUserFolder(); |
136 | 136 | |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | ); |
163 | 163 | $server->addPlugin(new \OCA\DAV\Connector\Sabre\QuotaPlugin($view, true)); |
164 | 164 | |
165 | - if($this->userSession->isLoggedIn()) { |
|
165 | + if ($this->userSession->isLoggedIn()) { |
|
166 | 166 | $server->addPlugin(new \OCA\DAV\Connector\Sabre\TagsPlugin($objectTree, $this->tagManager)); |
167 | 167 | $server->addPlugin(new \OCA\DAV\Connector\Sabre\SharesPlugin( |
168 | 168 | $objectTree, |
@@ -6,35 +6,35 @@ |
||
6 | 6 | |
7 | 7 | class ComposerStaticInitProvisioning_API |
8 | 8 | { |
9 | - public static $prefixLengthsPsr4 = array ( |
|
9 | + public static $prefixLengthsPsr4 = array( |
|
10 | 10 | 'O' => |
11 | - array ( |
|
11 | + array( |
|
12 | 12 | 'OCA\\Provisioning_API\\' => 21, |
13 | 13 | ), |
14 | 14 | ); |
15 | 15 | |
16 | - public static $prefixDirsPsr4 = array ( |
|
16 | + public static $prefixDirsPsr4 = array( |
|
17 | 17 | 'OCA\\Provisioning_API\\' => |
18 | - array ( |
|
19 | - 0 => __DIR__ . '/..' . '/../lib', |
|
18 | + array( |
|
19 | + 0 => __DIR__.'/..'.'/../lib', |
|
20 | 20 | ), |
21 | 21 | ); |
22 | 22 | |
23 | - public static $classMap = array ( |
|
24 | - 'OCA\\Provisioning_API\\AppInfo\\Application' => __DIR__ . '/..' . '/../lib/AppInfo/Application.php', |
|
25 | - 'OCA\\Provisioning_API\\Controller\\AUserData' => __DIR__ . '/..' . '/../lib/Controller/AUserData.php', |
|
26 | - 'OCA\\Provisioning_API\\Controller\\AppConfigController' => __DIR__ . '/..' . '/../lib/Controller/AppConfigController.php', |
|
27 | - 'OCA\\Provisioning_API\\Controller\\AppsController' => __DIR__ . '/..' . '/../lib/Controller/AppsController.php', |
|
28 | - 'OCA\\Provisioning_API\\Controller\\GroupsController' => __DIR__ . '/..' . '/../lib/Controller/GroupsController.php', |
|
29 | - 'OCA\\Provisioning_API\\Controller\\UsersController' => __DIR__ . '/..' . '/../lib/Controller/UsersController.php', |
|
30 | - 'OCA\\Provisioning_API\\FederatedFileSharingFactory' => __DIR__ . '/..' . '/../lib/FederatedFileSharingFactory.php', |
|
31 | - 'OCA\\Provisioning_API\\Middleware\\Exceptions\\NotSubAdminException' => __DIR__ . '/..' . '/../lib/Middleware/Exceptions/NotSubAdminException.php', |
|
32 | - 'OCA\\Provisioning_API\\Middleware\\ProvisioningApiMiddleware' => __DIR__ . '/..' . '/../lib/Middleware/ProvisioningApiMiddleware.php', |
|
23 | + public static $classMap = array( |
|
24 | + 'OCA\\Provisioning_API\\AppInfo\\Application' => __DIR__.'/..'.'/../lib/AppInfo/Application.php', |
|
25 | + 'OCA\\Provisioning_API\\Controller\\AUserData' => __DIR__.'/..'.'/../lib/Controller/AUserData.php', |
|
26 | + 'OCA\\Provisioning_API\\Controller\\AppConfigController' => __DIR__.'/..'.'/../lib/Controller/AppConfigController.php', |
|
27 | + 'OCA\\Provisioning_API\\Controller\\AppsController' => __DIR__.'/..'.'/../lib/Controller/AppsController.php', |
|
28 | + 'OCA\\Provisioning_API\\Controller\\GroupsController' => __DIR__.'/..'.'/../lib/Controller/GroupsController.php', |
|
29 | + 'OCA\\Provisioning_API\\Controller\\UsersController' => __DIR__.'/..'.'/../lib/Controller/UsersController.php', |
|
30 | + 'OCA\\Provisioning_API\\FederatedFileSharingFactory' => __DIR__.'/..'.'/../lib/FederatedFileSharingFactory.php', |
|
31 | + 'OCA\\Provisioning_API\\Middleware\\Exceptions\\NotSubAdminException' => __DIR__.'/..'.'/../lib/Middleware/Exceptions/NotSubAdminException.php', |
|
32 | + 'OCA\\Provisioning_API\\Middleware\\ProvisioningApiMiddleware' => __DIR__.'/..'.'/../lib/Middleware/ProvisioningApiMiddleware.php', |
|
33 | 33 | ); |
34 | 34 | |
35 | 35 | public static function getInitializer(ClassLoader $loader) |
36 | 36 | { |
37 | - return \Closure::bind(function () use ($loader) { |
|
37 | + return \Closure::bind(function() use ($loader) { |
|
38 | 38 | $loader->prefixLengthsPsr4 = ComposerStaticInitProvisioning_API::$prefixLengthsPsr4; |
39 | 39 | $loader->prefixDirsPsr4 = ComposerStaticInitProvisioning_API::$prefixDirsPsr4; |
40 | 40 | $loader->classMap = ComposerStaticInitProvisioning_API::$classMap; |