@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | } |
57 | 57 | |
58 | 58 | protected function buildPath($path) { |
59 | - $fullPath = \OC\Files\Filesystem::normalizePath($this->root . '/' . $path); |
|
59 | + $fullPath = \OC\Files\Filesystem::normalizePath($this->root.'/'.$path); |
|
60 | 60 | return ltrim($fullPath, '/'); |
61 | 61 | } |
62 | 62 | |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | } catch (FileNotFoundException $e) { |
164 | 164 | return false; |
165 | 165 | } |
166 | - $names = array_map(function ($object) { |
|
166 | + $names = array_map(function($object) { |
|
167 | 167 | return $object['basename']; |
168 | 168 | }, $content); |
169 | 169 | return IteratorDirectory::wrap($names); |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | $tmpFile = \OC::$server->getTempManager()->getTemporaryFile(); |
210 | 210 | } |
211 | 211 | $source = fopen($tmpFile, $mode); |
212 | - return CallbackWrapper::wrap($source, null, null, function () use ($tmpFile, $fullPath) { |
|
212 | + return CallbackWrapper::wrap($source, null, null, function() use ($tmpFile, $fullPath) { |
|
213 | 213 | $this->flysystem->putStream($fullPath, fopen($tmpFile, 'r')); |
214 | 214 | unlink($tmpFile); |
215 | 215 | }); |
@@ -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'); |
@@ -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(); |
@@ -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; |
@@ -6,13 +6,13 @@ |
||
6 | 6 | $baseDir = $vendorDir; |
7 | 7 | |
8 | 8 | return array( |
9 | - 'OCA\\Provisioning_API\\AppInfo\\Application' => $baseDir . '/../lib/AppInfo/Application.php', |
|
10 | - 'OCA\\Provisioning_API\\Controller\\AUserData' => $baseDir . '/../lib/Controller/AUserData.php', |
|
11 | - 'OCA\\Provisioning_API\\Controller\\AppConfigController' => $baseDir . '/../lib/Controller/AppConfigController.php', |
|
12 | - 'OCA\\Provisioning_API\\Controller\\AppsController' => $baseDir . '/../lib/Controller/AppsController.php', |
|
13 | - 'OCA\\Provisioning_API\\Controller\\GroupsController' => $baseDir . '/../lib/Controller/GroupsController.php', |
|
14 | - 'OCA\\Provisioning_API\\Controller\\UsersController' => $baseDir . '/../lib/Controller/UsersController.php', |
|
15 | - 'OCA\\Provisioning_API\\FederatedFileSharingFactory' => $baseDir . '/../lib/FederatedFileSharingFactory.php', |
|
16 | - 'OCA\\Provisioning_API\\Middleware\\Exceptions\\NotSubAdminException' => $baseDir . '/../lib/Middleware/Exceptions/NotSubAdminException.php', |
|
17 | - 'OCA\\Provisioning_API\\Middleware\\ProvisioningApiMiddleware' => $baseDir . '/../lib/Middleware/ProvisioningApiMiddleware.php', |
|
9 | + 'OCA\\Provisioning_API\\AppInfo\\Application' => $baseDir.'/../lib/AppInfo/Application.php', |
|
10 | + 'OCA\\Provisioning_API\\Controller\\AUserData' => $baseDir.'/../lib/Controller/AUserData.php', |
|
11 | + 'OCA\\Provisioning_API\\Controller\\AppConfigController' => $baseDir.'/../lib/Controller/AppConfigController.php', |
|
12 | + 'OCA\\Provisioning_API\\Controller\\AppsController' => $baseDir.'/../lib/Controller/AppsController.php', |
|
13 | + 'OCA\\Provisioning_API\\Controller\\GroupsController' => $baseDir.'/../lib/Controller/GroupsController.php', |
|
14 | + 'OCA\\Provisioning_API\\Controller\\UsersController' => $baseDir.'/../lib/Controller/UsersController.php', |
|
15 | + 'OCA\\Provisioning_API\\FederatedFileSharingFactory' => $baseDir.'/../lib/FederatedFileSharingFactory.php', |
|
16 | + 'OCA\\Provisioning_API\\Middleware\\Exceptions\\NotSubAdminException' => $baseDir.'/../lib/Middleware/Exceptions/NotSubAdminException.php', |
|
17 | + 'OCA\\Provisioning_API\\Middleware\\ProvisioningApiMiddleware' => $baseDir.'/../lib/Middleware/ProvisioningApiMiddleware.php', |
|
18 | 18 | ); |
@@ -31,25 +31,25 @@ |
||
31 | 31 | \OC_JSON::checkAppEnabled('user_ldap'); |
32 | 32 | \OC_JSON::callCheck(); |
33 | 33 | |
34 | -$subject = (string)$_POST['ldap_clear_mapping']; |
|
34 | +$subject = (string) $_POST['ldap_clear_mapping']; |
|
35 | 35 | $mapping = null; |
36 | 36 | try { |
37 | - if($subject === 'user') { |
|
37 | + if ($subject === 'user') { |
|
38 | 38 | $mapping = new UserMapping(\OC::$server->getDatabaseConnection()); |
39 | 39 | $result = $mapping->clearCb( |
40 | - function ($uid) { |
|
40 | + function($uid) { |
|
41 | 41 | \OC::$server->getUserManager()->emit('\OC\User', 'preUnassignedUserId', [$uid]); |
42 | 42 | }, |
43 | - function ($uid) { |
|
43 | + function($uid) { |
|
44 | 44 | \OC::$server->getUserManager()->emit('\OC\User', 'postUnassignedUserId', [$uid]); |
45 | 45 | } |
46 | 46 | ); |
47 | - } else if($subject === 'group') { |
|
47 | + } else if ($subject === 'group') { |
|
48 | 48 | $mapping = new GroupMapping(\OC::$server->getDatabaseConnection()); |
49 | 49 | $result = $mapping->clear(); |
50 | 50 | } |
51 | 51 | |
52 | - if($mapping === null || !$result) { |
|
52 | + if ($mapping === null || !$result) { |
|
53 | 53 | $l = \OC::$server->getL10N('user_ldap'); |
54 | 54 | throw new \Exception($l->t('Failed to clear the mappings.')); |
55 | 55 | } |
@@ -51,16 +51,16 @@ |
||
51 | 51 | * @since 14.0.0 |
52 | 52 | */ |
53 | 53 | public function render(): string { |
54 | - return '<li>' . |
|
55 | - '<a id="directLink-container">' . |
|
56 | - '<span class="icon ' . Util::sanitizeHTML($this->getIcon()) . '"></span>' . |
|
57 | - '<label for="directLink">' . Util::sanitizeHTML($this->getLabel()) . '</label>' . |
|
58 | - '</a>' . |
|
59 | - '</li>' . |
|
60 | - '<li>' . |
|
61 | - '<span class="menuitem">' . |
|
62 | - '<input id="directLink" type="text" readonly="" value="' . Util::sanitizeHTML($this->getLink()) . '">' . |
|
63 | - '</span>' . |
|
54 | + return '<li>'. |
|
55 | + '<a id="directLink-container">'. |
|
56 | + '<span class="icon '.Util::sanitizeHTML($this->getIcon()).'"></span>'. |
|
57 | + '<label for="directLink">'.Util::sanitizeHTML($this->getLabel()).'</label>'. |
|
58 | + '</a>'. |
|
59 | + '</li>'. |
|
60 | + '<li>'. |
|
61 | + '<span class="menuitem">'. |
|
62 | + '<input id="directLink" type="text" readonly="" value="'.Util::sanitizeHTML($this->getLink()).'">'. |
|
63 | + '</span>'. |
|
64 | 64 | '</li>'; |
65 | 65 | } |
66 | 66 | } |