@@ -37,7 +37,7 @@ |
||
37 | 37 | $this |
38 | 38 | ->setIdentifier($invalidId) |
39 | 39 | ->setScheme(self::SCHEME_NULL) |
40 | - ->setText('Unknown auth mechanism backend ' . $invalidId) |
|
40 | + ->setText('Unknown auth mechanism backend '.$invalidId) |
|
41 | 41 | ; |
42 | 42 | } |
43 | 43 |
@@ -7,17 +7,17 @@ discard block |
||
7 | 7 | ?> |
8 | 8 | <form id="ocDefaultEncryptionModule" class="sub-section"> |
9 | 9 | <h3><?php p($l->t("Default encryption module")); ?></h3> |
10 | - <?php if(!$_["initStatus"] && $_['masterKeyEnabled'] === false): ?> |
|
10 | + <?php if (!$_["initStatus"] && $_['masterKeyEnabled'] === false): ?> |
|
11 | 11 | <?php p($l->t("Encryption app is enabled but your keys are not initialized, please log-out and log-in again")); ?> |
12 | 12 | <?php else: ?> |
13 | 13 | <p id="encryptHomeStorageSetting"> |
14 | 14 | <input type="checkbox" class="checkbox" name="encrypt_home_storage" id="encryptHomeStorage" |
15 | 15 | value="1" <?php if ($_['encryptHomeStorage']) print_unescaped('checked="checked"'); ?> /> |
16 | - <label for="encryptHomeStorage"><?php p($l->t('Encrypt the home storage'));?></label></br> |
|
17 | - <em><?php p( $l->t( "Enabling this option encrypts all files stored on the main storage, otherwise only files on external storage will be encrypted" ) ); ?></em> |
|
16 | + <label for="encryptHomeStorage"><?php p($l->t('Encrypt the home storage')); ?></label></br> |
|
17 | + <em><?php p($l->t("Enabling this option encrypts all files stored on the main storage, otherwise only files on external storage will be encrypted")); ?></em> |
|
18 | 18 | </p> |
19 | 19 | <br /> |
20 | - <?php if($_['masterKeyEnabled'] === false): ?> |
|
20 | + <?php if ($_['masterKeyEnabled'] === false): ?> |
|
21 | 21 | <p id="encryptionSetRecoveryKey"> |
22 | 22 | <?php $_["recoveryEnabled"] === '0' ? p($l->t("Enable recovery key")) : p($l->t("Disable recovery key")); ?> |
23 | 23 | <span class="msg"></span> |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | </p> |
43 | 43 | <br/><br/> |
44 | 44 | |
45 | - <p name="changeRecoveryPasswordBlock" id="encryptionChangeRecoveryKey" <?php if($_['recoveryEnabled'] === '0') print_unescaped('class="hidden"');?>> |
|
45 | + <p name="changeRecoveryPasswordBlock" id="encryptionChangeRecoveryKey" <?php if ($_['recoveryEnabled'] === '0') print_unescaped('class="hidden"'); ?>> |
|
46 | 46 | <?php p($l->t("Change recovery key password:")); ?> |
47 | 47 | <span class="msg"></span> |
48 | 48 | <br/> |
@@ -46,15 +46,15 @@ |
||
46 | 46 | const CREATE_GROUP = 0x00000001; |
47 | 47 | const DELETE_GROUP = 0x00000010; |
48 | 48 | const ADD_TO_GROUP = 0x00000100; |
49 | - const REMOVE_FROM_GOUP = 0x00001000; // oops |
|
50 | - const REMOVE_FROM_GROUP = 0x00001000; |
|
49 | + const REMOVE_FROM_GOUP = 0x00001000; // oops |
|
50 | + const REMOVE_FROM_GROUP = 0x00001000; |
|
51 | 51 | //OBSOLETE const GET_DISPLAYNAME = 0x00010000; |
52 | - const COUNT_USERS = 0x00100000; |
|
53 | - const GROUP_DETAILS = 0x01000000; |
|
52 | + const COUNT_USERS = 0x00100000; |
|
53 | + const GROUP_DETAILS = 0x01000000; |
|
54 | 54 | /** |
55 | 55 | * @since 13.0.0 |
56 | 56 | */ |
57 | - const IS_ADMIN = 0x10000000; |
|
57 | + const IS_ADMIN = 0x10000000; |
|
58 | 58 | |
59 | 59 | /** |
60 | 60 | * Check if backend implements actions |
@@ -71,18 +71,18 @@ |
||
71 | 71 | $errorMessage = $this->getLastError(); |
72 | 72 | if ($errorMessage) { |
73 | 73 | throw new \OC\DatabaseSetupException($this->trans->t('Oracle connection could not be established'), |
74 | - $errorMessage . ' Check environment: ORACLE_HOME=' . getenv('ORACLE_HOME') |
|
75 | - . ' ORACLE_SID=' . getenv('ORACLE_SID') |
|
76 | - . ' LD_LIBRARY_PATH=' . getenv('LD_LIBRARY_PATH') |
|
77 | - . ' NLS_LANG=' . getenv('NLS_LANG') |
|
78 | - . ' tnsnames.ora is ' . (is_readable(getenv('ORACLE_HOME') . '/network/admin/tnsnames.ora') ? '' : 'not ') . 'readable'); |
|
74 | + $errorMessage.' Check environment: ORACLE_HOME='.getenv('ORACLE_HOME') |
|
75 | + . ' ORACLE_SID='.getenv('ORACLE_SID') |
|
76 | + . ' LD_LIBRARY_PATH='.getenv('LD_LIBRARY_PATH') |
|
77 | + . ' NLS_LANG='.getenv('NLS_LANG') |
|
78 | + . ' tnsnames.ora is '.(is_readable(getenv('ORACLE_HOME').'/network/admin/tnsnames.ora') ? '' : 'not ').'readable'); |
|
79 | 79 | } |
80 | 80 | throw new \OC\DatabaseSetupException($this->trans->t('Oracle username and/or password not valid'), |
81 | - 'Check environment: ORACLE_HOME=' . getenv('ORACLE_HOME') |
|
82 | - . ' ORACLE_SID=' . getenv('ORACLE_SID') |
|
83 | - . ' LD_LIBRARY_PATH=' . getenv('LD_LIBRARY_PATH') |
|
84 | - . ' NLS_LANG=' . getenv('NLS_LANG') |
|
85 | - . ' tnsnames.ora is ' . (is_readable(getenv('ORACLE_HOME') . '/network/admin/tnsnames.ora') ? '' : 'not ') . 'readable'); |
|
81 | + 'Check environment: ORACLE_HOME='.getenv('ORACLE_HOME') |
|
82 | + . ' ORACLE_SID='.getenv('ORACLE_SID') |
|
83 | + . ' LD_LIBRARY_PATH='.getenv('LD_LIBRARY_PATH') |
|
84 | + . ' NLS_LANG='.getenv('NLS_LANG') |
|
85 | + . ' tnsnames.ora is '.(is_readable(getenv('ORACLE_HOME').'/network/admin/tnsnames.ora') ? '' : 'not ').'readable'); |
|
86 | 86 | } |
87 | 87 | |
88 | 88 | $this->config->setValues([ |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | $searchResult = $this->c->resolve(SearchResult::class); |
48 | 48 | |
49 | 49 | foreach ($shareTypes as $type) { |
50 | - if(!isset($this->pluginList[$type])) { |
|
50 | + if (!isset($this->pluginList[$type])) { |
|
51 | 51 | continue; |
52 | 52 | } |
53 | 53 | foreach ($this->pluginList[$type] as $plugin) { |
@@ -70,18 +70,18 @@ discard block |
||
70 | 70 | // that the exact same email address and federated cloud id exists |
71 | 71 | $emailType = new SearchResultType('emails'); |
72 | 72 | $remoteType = new SearchResultType('remotes'); |
73 | - if($searchResult->hasExactIdMatch($emailType) && !$searchResult->hasExactIdMatch($remoteType)) { |
|
73 | + if ($searchResult->hasExactIdMatch($emailType) && !$searchResult->hasExactIdMatch($remoteType)) { |
|
74 | 74 | $searchResult->unsetResult($remoteType); |
75 | 75 | } elseif (!$searchResult->hasExactIdMatch($emailType) && $searchResult->hasExactIdMatch($remoteType)) { |
76 | 76 | $searchResult->unsetResult($emailType); |
77 | 77 | } |
78 | 78 | |
79 | - return [$searchResult->asArray(), (bool)$hasMoreResults]; |
|
79 | + return [$searchResult->asArray(), (bool) $hasMoreResults]; |
|
80 | 80 | } |
81 | 81 | |
82 | 82 | public function registerPlugin(array $pluginInfo) { |
83 | - $shareType = constant(Share::class . '::' . $pluginInfo['shareType']); |
|
84 | - if($shareType === null) { |
|
83 | + $shareType = constant(Share::class.'::'.$pluginInfo['shareType']); |
|
84 | + if ($shareType === null) { |
|
85 | 85 | throw new \InvalidArgumentException('Provided ShareType is invalid'); |
86 | 86 | } |
87 | 87 | $this->pluginList[$shareType][] = $pluginInfo['class']; |
@@ -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'], |