@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | if ($excludedGroups) { |
118 | 118 | $excludedGroups = $this->config->getAppValue('core', 'shareapi_exclude_groups_list', ''); |
119 | 119 | $decodedExcludeGroups = json_decode($excludedGroups, true); |
120 | - $excludeGroupsList = ($decodedExcludeGroups !== null) ? $decodedExcludeGroups : []; |
|
120 | + $excludeGroupsList = ($decodedExcludeGroups !== null) ? $decodedExcludeGroups : []; |
|
121 | 121 | |
122 | 122 | if (count(array_intersect($excludeGroupsList, $selfGroups)) !== 0) { |
123 | 123 | // a group of the current user is excluded -> filter all local users |
@@ -133,22 +133,22 @@ discard block |
||
133 | 133 | } |
134 | 134 | |
135 | 135 | // Prevent enumerating local users |
136 | - if($disallowEnumeration && $entry->getProperty('isLocalSystemBook')) { |
|
136 | + if ($disallowEnumeration && $entry->getProperty('isLocalSystemBook')) { |
|
137 | 137 | $filterUser = true; |
138 | 138 | |
139 | 139 | $mailAddresses = $entry->getEMailAddresses(); |
140 | - foreach($mailAddresses as $mailAddress) { |
|
141 | - if($mailAddress === $filter) { |
|
140 | + foreach ($mailAddresses as $mailAddress) { |
|
141 | + if ($mailAddress === $filter) { |
|
142 | 142 | $filterUser = false; |
143 | 143 | break; |
144 | 144 | } |
145 | 145 | } |
146 | 146 | |
147 | - if($entry->getProperty('UID') && $entry->getProperty('UID') === $filter) { |
|
147 | + if ($entry->getProperty('UID') && $entry->getProperty('UID') === $filter) { |
|
148 | 148 | $filterUser = false; |
149 | 149 | } |
150 | 150 | |
151 | - if($filterUser) { |
|
151 | + if ($filterUser) { |
|
152 | 152 | return false; |
153 | 153 | } |
154 | 154 | } |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | * @return IEntry|null |
173 | 173 | */ |
174 | 174 | public function findOne(IUser $user, $shareType, $shareWith) { |
175 | - switch($shareType) { |
|
175 | + switch ($shareType) { |
|
176 | 176 | case 0: |
177 | 177 | case 6: |
178 | 178 | $filter = ['UID']; |
@@ -63,19 +63,19 @@ discard block |
||
63 | 63 | $icon->setImageFormat("png32"); |
64 | 64 | |
65 | 65 | $clone = clone $icon; |
66 | - $clone->scaleImage(16,0); |
|
66 | + $clone->scaleImage(16, 0); |
|
67 | 67 | $favicon->addImage($clone); |
68 | 68 | |
69 | 69 | $clone = clone $icon; |
70 | - $clone->scaleImage(32,0); |
|
70 | + $clone->scaleImage(32, 0); |
|
71 | 71 | $favicon->addImage($clone); |
72 | 72 | |
73 | 73 | $clone = clone $icon; |
74 | - $clone->scaleImage(64,0); |
|
74 | + $clone->scaleImage(64, 0); |
|
75 | 75 | $favicon->addImage($clone); |
76 | 76 | |
77 | 77 | $clone = clone $icon; |
78 | - $clone->scaleImage(128,0); |
|
78 | + $clone->scaleImage(128, 0); |
|
79 | 79 | $favicon->addImage($clone); |
80 | 80 | |
81 | 81 | $data = $favicon->getImagesBlob(); |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | */ |
118 | 118 | public function renderAppIcon($app, $size) { |
119 | 119 | $appIcon = $this->util->getAppIcon($app); |
120 | - if($appIcon === false) { |
|
120 | + if ($appIcon === false) { |
|
121 | 121 | return false; |
122 | 122 | } |
123 | 123 | if ($appIcon instanceof ISimpleFile) { |
@@ -128,20 +128,20 @@ discard block |
||
128 | 128 | $mime = mime_content_type($appIcon); |
129 | 129 | } |
130 | 130 | |
131 | - if($appIconContent === false || $appIconContent === "") { |
|
131 | + if ($appIconContent === false || $appIconContent === "") { |
|
132 | 132 | return false; |
133 | 133 | } |
134 | 134 | |
135 | 135 | $color = $this->themingDefaults->getColorPrimary(); |
136 | 136 | |
137 | 137 | // generate background image with rounded corners |
138 | - $background = '<?xml version="1.0" encoding="UTF-8"?>' . |
|
139 | - '<svg xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:cc="http://creativecommons.org/ns#" width="512" height="512" xmlns:xlink="http://www.w3.org/1999/xlink">' . |
|
140 | - '<rect x="0" y="0" rx="100" ry="100" width="512" height="512" style="fill:' . $color . ';" />' . |
|
138 | + $background = '<?xml version="1.0" encoding="UTF-8"?>'. |
|
139 | + '<svg xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:cc="http://creativecommons.org/ns#" width="512" height="512" xmlns:xlink="http://www.w3.org/1999/xlink">'. |
|
140 | + '<rect x="0" y="0" rx="100" ry="100" width="512" height="512" style="fill:'.$color.';" />'. |
|
141 | 141 | '</svg>'; |
142 | 142 | // resize svg magic as this seems broken in Imagemagick |
143 | - if($mime === "image/svg+xml" || substr($appIconContent, 0, 4) === "<svg") { |
|
144 | - if(substr($appIconContent, 0, 5) !== "<?xml") { |
|
143 | + if ($mime === "image/svg+xml" || substr($appIconContent, 0, 4) === "<svg") { |
|
144 | + if (substr($appIconContent, 0, 5) !== "<?xml") { |
|
145 | 145 | $svg = "<?xml version=\"1.0\"?>".$appIconContent; |
146 | 146 | } else { |
147 | 147 | $svg = $appIconContent; |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | $res = $tmp->getImageResolution(); |
154 | 154 | $tmp->destroy(); |
155 | 155 | |
156 | - if($x>$y) { |
|
156 | + if ($x > $y) { |
|
157 | 157 | $max = $x; |
158 | 158 | } else { |
159 | 159 | $max = $y; |
@@ -161,8 +161,8 @@ discard block |
||
161 | 161 | |
162 | 162 | // convert svg to resized image |
163 | 163 | $appIconFile = new Imagick(); |
164 | - $resX = (int)(512 * $res['x'] / $max * 2.53); |
|
165 | - $resY = (int)(512 * $res['y'] / $max * 2.53); |
|
164 | + $resX = (int) (512 * $res['x'] / $max * 2.53); |
|
165 | + $resY = (int) (512 * $res['y'] / $max * 2.53); |
|
166 | 166 | $appIconFile->setResolution($resX, $resY); |
167 | 167 | $appIconFile->setBackgroundColor(new ImagickPixel('transparent')); |
168 | 168 | $appIconFile->readImageBlob($svg); |
@@ -185,10 +185,10 @@ discard block |
||
185 | 185 | $appIconFile->scaleImage(512, 512, true); |
186 | 186 | } |
187 | 187 | // offset for icon positioning |
188 | - $border_w = (int)($appIconFile->getImageWidth() * 0.05); |
|
189 | - $border_h = (int)($appIconFile->getImageHeight() * 0.05); |
|
190 | - $innerWidth = (int)($appIconFile->getImageWidth() - $border_w * 2); |
|
191 | - $innerHeight = (int)($appIconFile->getImageHeight() - $border_h * 2); |
|
188 | + $border_w = (int) ($appIconFile->getImageWidth() * 0.05); |
|
189 | + $border_h = (int) ($appIconFile->getImageHeight() * 0.05); |
|
190 | + $innerWidth = (int) ($appIconFile->getImageWidth() - $border_w * 2); |
|
191 | + $innerHeight = (int) ($appIconFile->getImageHeight() - $border_h * 2); |
|
192 | 192 | $appIconFile->adaptiveResizeImage($innerWidth, $innerHeight); |
193 | 193 | // center icon |
194 | 194 | $offset_w = 512 / 2 - $innerWidth / 2; |
@@ -29,7 +29,7 @@ |
||
29 | 29 | * @package OCP |
30 | 30 | * @since 7.0.0 |
31 | 31 | */ |
32 | -interface ICacheFactory{ |
|
32 | +interface ICacheFactory { |
|
33 | 33 | /** |
34 | 34 | * Get a distributed memory cache instance |
35 | 35 | * |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | public function beforeController($controller, $methodName) { |
47 | 47 | $requestUri = $this->request->getScriptName(); |
48 | 48 | $processingScript = explode('/', $requestUri); |
49 | - $processingScript = $processingScript[count($processingScript)-1]; |
|
49 | + $processingScript = $processingScript[count($processingScript) - 1]; |
|
50 | 50 | |
51 | 51 | if ($processingScript !== 'index.php') { |
52 | 52 | return; |
@@ -86,14 +86,14 @@ discard block |
||
86 | 86 | |
87 | 87 | // Append __Host to the cookie if it meets the requirements |
88 | 88 | $cookiePrefix = ''; |
89 | - if($cookieParams['secure'] === true && $cookieParams['path'] === '/') { |
|
89 | + if ($cookieParams['secure'] === true && $cookieParams['path'] === '/') { |
|
90 | 90 | $cookiePrefix = '__Host-'; |
91 | 91 | } |
92 | 92 | |
93 | - foreach($policies as $policy) { |
|
93 | + foreach ($policies as $policy) { |
|
94 | 94 | header( |
95 | 95 | sprintf( |
96 | - 'Set-Cookie: %snc_sameSiteCookie%s=true; path=%s; httponly;' . $secureCookie . 'expires=Fri, 31-Dec-2100 23:59:59 GMT; SameSite=%s', |
|
96 | + 'Set-Cookie: %snc_sameSiteCookie%s=true; path=%s; httponly;'.$secureCookie.'expires=Fri, 31-Dec-2100 23:59:59 GMT; SameSite=%s', |
|
97 | 97 | $cookiePrefix, |
98 | 98 | $policy, |
99 | 99 | $cookieParams['path'], |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | |
30 | 30 | class Manager implements IManager { |
31 | 31 | /** @var string[] */ |
32 | - protected $sorters =[]; |
|
32 | + protected $sorters = []; |
|
33 | 33 | |
34 | 34 | /** @var ISorter[] */ |
35 | 35 | protected $sorterInstances = []; |
@@ -42,8 +42,8 @@ discard block |
||
42 | 42 | |
43 | 43 | public function runSorters(array $sorters, array &$sortArray, array $context) { |
44 | 44 | $sorterInstances = $this->getSorters(); |
45 | - while($sorter = array_shift($sorters)) { |
|
46 | - if(isset($sorterInstances[$sorter])) { |
|
45 | + while ($sorter = array_shift($sorters)) { |
|
46 | + if (isset($sorterInstances[$sorter])) { |
|
47 | 47 | $sorterInstances[$sorter]->sort($sortArray, $context); |
48 | 48 | } else { |
49 | 49 | $this->c->getLogger()->warning('No sorter for ID "{id}", skipping', [ |
@@ -58,17 +58,17 @@ discard block |
||
58 | 58 | } |
59 | 59 | |
60 | 60 | protected function getSorters() { |
61 | - if(count($this->sorterInstances) === 0) { |
|
61 | + if (count($this->sorterInstances) === 0) { |
|
62 | 62 | foreach ($this->sorters as $sorter) { |
63 | 63 | /** @var ISorter $instance */ |
64 | 64 | $instance = $this->c->resolve($sorter); |
65 | - if(!$instance instanceof ISorter) { |
|
65 | + if (!$instance instanceof ISorter) { |
|
66 | 66 | $this->c->getLogger()->notice('Skipping sorter which is not an instance of ISorter. Class name: {class}', |
67 | 67 | ['app' => 'core', 'class' => $sorter]); |
68 | 68 | continue; |
69 | 69 | } |
70 | 70 | $sorterId = trim($instance->getId()); |
71 | - if(trim($sorterId) === '') { |
|
71 | + if (trim($sorterId) === '') { |
|
72 | 72 | $this->c->getLogger()->notice('Skipping sorter with empty ID. Class name: {class}', |
73 | 73 | ['app' => 'core', 'class' => $sorter]); |
74 | 74 | continue; |
@@ -26,7 +26,7 @@ |
||
26 | 26 | <h2 class="inlineblock"><?php p($_['heading']); ?></h2> |
27 | 27 | <?php if (!empty($_['docs'])): ?> |
28 | 28 | <a target="_blank" rel="noreferrer noopener" class="icon-info svg" |
29 | - title="<?php p($l->t('Open documentation'));?>" |
|
29 | + title="<?php p($l->t('Open documentation')); ?>" |
|
30 | 30 | href="<?php p(link_to_docs($_['docs'])); ?>"> |
31 | 31 | </a> |
32 | 32 | <?php endif; ?> |
@@ -1,11 +1,11 @@ |
||
1 | 1 | <div class="ldapSettingControls"> |
2 | 2 | <button type="button" class="ldap_action_test_connection" name="ldap_action_test_connection"> |
3 | - <?php p($l->t('Test Configuration'));?> |
|
3 | + <?php p($l->t('Test Configuration')); ?> |
|
4 | 4 | </button> |
5 | 5 | <a href="<?php p(link_to_docs('admin-ldap')); ?>" |
6 | 6 | target="_blank" rel="noreferrer noopener"> |
7 | 7 | <img src="<?php print_unescaped(image_path('', 'actions/info.svg')); ?>" |
8 | 8 | style="height:1.75ex" /> |
9 | - <?php p($l->t('Help'));?> |
|
9 | + <?php p($l->t('Help')); ?> |
|
10 | 10 | </a> |
11 | 11 | </div> |
@@ -55,15 +55,15 @@ |
||
55 | 55 | public function getMountsForUser(IUser $user, IStorageFactory $loader) { |
56 | 56 | $cacheBaseDir = $this->config->getSystemValue('cache_path', ''); |
57 | 57 | if ($cacheBaseDir !== '') { |
58 | - $cacheDir = rtrim($cacheBaseDir, '/') . '/' . $user->getUID(); |
|
58 | + $cacheDir = rtrim($cacheBaseDir, '/').'/'.$user->getUID(); |
|
59 | 59 | if (!file_exists($cacheDir)) { |
60 | 60 | mkdir($cacheDir, 0770, true); |
61 | - mkdir($cacheDir . '/uploads', 0770, true); |
|
61 | + mkdir($cacheDir.'/uploads', 0770, true); |
|
62 | 62 | } |
63 | 63 | |
64 | 64 | return [ |
65 | - new MountPoint('\OC\Files\Storage\Local', '/' . $user->getUID() . '/cache', ['datadir' => $cacheDir, $loader]), |
|
66 | - new MountPoint('\OC\Files\Storage\Local', '/' . $user->getUID() . '/uploads', ['datadir' => $cacheDir . '/uploads', $loader]) |
|
65 | + new MountPoint('\OC\Files\Storage\Local', '/'.$user->getUID().'/cache', ['datadir' => $cacheDir, $loader]), |
|
66 | + new MountPoint('\OC\Files\Storage\Local', '/'.$user->getUID().'/uploads', ['datadir' => $cacheDir.'/uploads', $loader]) |
|
67 | 67 | ]; |
68 | 68 | } else { |
69 | 69 | return []; |
@@ -6,5 +6,5 @@ |
||
6 | 6 | $baseDir = $vendorDir; |
7 | 7 | |
8 | 8 | return array( |
9 | - 'OCA\\Files_Sharing\\' => array($baseDir . '/../lib'), |
|
9 | + 'OCA\\Files_Sharing\\' => array($baseDir.'/../lib'), |
|
10 | 10 | ); |