@@ -35,7 +35,7 @@ |
||
| 35 | 35 | |
| 36 | 36 | if(OCA\Files_Versions\Storage::rollback( $file, $revision )) { |
| 37 | 37 | \OC_JSON::success(array("data" => array( "revision" => $revision, "file" => $file ))); |
| 38 | -}else{ |
|
| 38 | +} else{ |
|
| 39 | 39 | $l = \OC::$server->getL10N('files_versions'); |
| 40 | 40 | \OC_JSON::error(array("data" => array( "message" => $l->t("Could not revert: %s", array($file) )))); |
| 41 | 41 | } |
@@ -104,8 +104,7 @@ |
||
| 104 | 104 | $connection->executeUpdate($query); |
| 105 | 105 | $query = "CREATE USER '$name'@'%' IDENTIFIED BY '$password'"; |
| 106 | 106 | $connection->executeUpdate($query); |
| 107 | - } |
|
| 108 | - catch (\Exception $ex){ |
|
| 107 | + } catch (\Exception $ex){ |
|
| 109 | 108 | $this->logger->logException($ex, [ |
| 110 | 109 | 'message' => 'Database user creation failed.', |
| 111 | 110 | 'level' => ILogger::ERROR, |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | $this->path=$source; |
| 48 | 48 | $this->zip=new \ZipArchive(); |
| 49 | 49 | if($this->zip->open($source, \ZipArchive::CREATE)) { |
| 50 | - }else{ |
|
| 50 | + } else{ |
|
| 51 | 51 | \OCP\Util::writeLog('files_archive', 'Error while opening archive '.$source, ILogger::WARN); |
| 52 | 52 | } |
| 53 | 53 | } |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | public function addFile($path, $source='') { |
| 69 | 69 | if($source and $source[0]=='/' and file_exists($source)) { |
| 70 | 70 | $result=$this->zip->addFile($source, $path); |
| 71 | - }else{ |
|
| 71 | + } else{ |
|
| 72 | 72 | $result=$this->zip->addFromString($path, $source); |
| 73 | 73 | } |
| 74 | 74 | if($result) { |
@@ -177,7 +177,7 @@ discard block |
||
| 177 | 177 | public function remove($path) { |
| 178 | 178 | if($this->fileExists($path.'/')) { |
| 179 | 179 | return $this->zip->deleteName($path.'/'); |
| 180 | - }else{ |
|
| 180 | + } else{ |
|
| 181 | 181 | return $this->zip->deleteName($path); |
| 182 | 182 | } |
| 183 | 183 | } |
@@ -196,7 +196,7 @@ discard block |
||
| 196 | 196 | //in the archive when the stream is closed |
| 197 | 197 | if(strrpos($path, '.')!==false) { |
| 198 | 198 | $ext=substr($path, strrpos($path, '.')); |
| 199 | - }else{ |
|
| 199 | + } else{ |
|
| 200 | 200 | $ext=''; |
| 201 | 201 | } |
| 202 | 202 | $tmpFile = \OC::$server->getTempManager()->getTemporaryFile($ext); |
@@ -225,7 +225,7 @@ discard block |
||
| 225 | 225 | private function stripPath($path) { |
| 226 | 226 | if(!$path || $path[0]=='/') { |
| 227 | 227 | return substr($path, 1); |
| 228 | - }else{ |
|
| 228 | + } else{ |
|
| 229 | 229 | return $path; |
| 230 | 230 | } |
| 231 | 231 | } |
@@ -459,7 +459,7 @@ |
||
| 459 | 459 | $appDir = OC_App::getInstallPath() . '/' . $appId; |
| 460 | 460 | OC_Helper::rmdirr($appDir); |
| 461 | 461 | return true; |
| 462 | - }else{ |
|
| 462 | + } else{ |
|
| 463 | 463 | \OCP\Util::writeLog('core', 'can\'t remove app '.$appId.'. It is not installed.', ILogger::ERROR); |
| 464 | 464 | |
| 465 | 465 | return false; |
@@ -58,8 +58,11 @@ discard block |
||
| 58 | 58 | <div class="hidden button icon-delete svg" id="removeavatar" title="<?php p($l->t('Remove image')); ?>"></div> |
| 59 | 59 | <input type="file" name="files[]" id="uploadavatar" class="hiddenuploadfield"> |
| 60 | 60 | <p><em><?php p($l->t('png or jpg, max. 20 MB')); ?></em></p> |
| 61 | - <?php else: ?> |
|
| 62 | - <?php p($l->t('Picture provided by original account')); ?> |
|
| 61 | + <?php else { |
|
| 62 | + : ?> |
|
| 63 | + <?php p($l->t('Picture provided by original account')); |
|
| 64 | +} |
|
| 65 | +?> |
|
| 63 | 66 | <?php endif; ?> |
| 64 | 67 | </div> |
| 65 | 68 | |
@@ -89,9 +92,12 @@ discard block |
||
| 89 | 92 | <?php if ($_['quota'] === \OCP\Files\FileInfo::SPACE_UNLIMITED): ?> |
| 90 | 93 | <?php print_unescaped($l->t('You are using <strong>%s</strong>', |
| 91 | 94 | [$_['usage']]));?> |
| 92 | - <?php else: ?> |
|
| 95 | + <?php else { |
|
| 96 | + : ?> |
|
| 93 | 97 | <?php print_unescaped($l->t('You are using <strong>%s</strong> of <strong>%s</strong> (<strong>%s %%</strong>)', |
| 94 | - [$_['usage'], $_['total_space'], $_['usage_relative']]));?> |
|
| 98 | + [$_['usage'], $_['total_space'], $_['usage_relative']])); |
|
| 99 | +} |
|
| 100 | +?> |
|
| 95 | 101 | <?php endif ?> |
| 96 | 102 | </p> |
| 97 | 103 | </div> |
@@ -135,7 +141,10 @@ discard block |
||
| 135 | 141 | </span> |
| 136 | 142 | </div> |
| 137 | 143 | </h2> |
| 138 | - <div class="verify <?php if ($_['email'] === '' || $_['emailScope'] !== 'public') p('hidden'); ?>"> |
|
| 144 | + <div class="verify <?php if ($_['email'] === '' || $_['emailScope'] !== 'public') { |
|
| 145 | + p('hidden'); |
|
| 146 | +} |
|
| 147 | +?>"> |
|
| 139 | 148 | <img id="verify-email" title="<?php p($_['emailMessage']); ?>" data-status="<?php p($_['emailVerification']) ?>" src=" |
| 140 | 149 | <?php |
| 141 | 150 | switch($_['emailVerification']) { |
@@ -178,7 +187,10 @@ discard block |
||
| 178 | 187 | </span> |
| 179 | 188 | </div> |
| 180 | 189 | </h2> |
| 181 | - <input type="tel" id="phone" name="phone" <?php if(!$_['lookupServerUploadEnabled']) print_unescaped('disabled="1"'); ?> |
|
| 190 | + <input type="tel" id="phone" name="phone" <?php if(!$_['lookupServerUploadEnabled']) { |
|
| 191 | + print_unescaped('disabled="1"'); |
|
| 192 | +} |
|
| 193 | +?> |
|
| 182 | 194 | value="<?php p($_['phone']) ?>" |
| 183 | 195 | placeholder="<?php p($l->t('Your phone number')); ?>" |
| 184 | 196 | autocomplete="on" autocapitalize="none" autocorrect="off" /> |
@@ -200,7 +212,10 @@ discard block |
||
| 200 | 212 | </span> |
| 201 | 213 | </div> |
| 202 | 214 | </h2> |
| 203 | - <input type="text" id="address" name="address" <?php if(!$_['lookupServerUploadEnabled']) print_unescaped('disabled="1"'); ?> |
|
| 215 | + <input type="text" id="address" name="address" <?php if(!$_['lookupServerUploadEnabled']) { |
|
| 216 | + print_unescaped('disabled="1"'); |
|
| 217 | +} |
|
| 218 | +?> |
|
| 204 | 219 | placeholder="<?php p($l->t('Your postal address')); ?>" |
| 205 | 220 | value="<?php p($_['address']) ?>" |
| 206 | 221 | autocomplete="on" autocapitalize="none" autocorrect="off" /> |
@@ -223,7 +238,10 @@ discard block |
||
| 223 | 238 | </div> |
| 224 | 239 | </h2> |
| 225 | 240 | <?php if($_['lookupServerUploadEnabled']) { ?> |
| 226 | - <div class="verify <?php if ($_['website'] === '' || $_['websiteScope'] !== 'public') p('hidden'); ?>"> |
|
| 241 | + <div class="verify <?php if ($_['website'] === '' || $_['websiteScope'] !== 'public') { |
|
| 242 | + p('hidden'); |
|
| 243 | +} |
|
| 244 | +?>"> |
|
| 227 | 245 | <img id="verify-website" title="<?php p($_['websiteMessage']); ?>" data-status="<?php p($_['websiteVerification']) ?>" src=" |
| 228 | 246 | <?php |
| 229 | 247 | switch($_['websiteVerification']) { |
@@ -237,13 +255,16 @@ discard block |
||
| 237 | 255 | p(image_path('core', 'actions/verify.svg')); |
| 238 | 256 | } |
| 239 | 257 | ?>" |
| 240 | - <?php if($_['websiteVerification'] === \OC\Accounts\AccountManager::VERIFICATION_IN_PROGRESS || $_['websiteVerification'] === \OC\Accounts\AccountManager::NOT_VERIFIED) print_unescaped(' class="verify-action"') ?> |
|
| 258 | + <?php if($_['websiteVerification'] === \OC\Accounts\AccountManager::VERIFICATION_IN_PROGRESS || $_['websiteVerification'] === \OC\Accounts\AccountManager::NOT_VERIFIED) { |
|
| 259 | + print_unescaped(' class="verify-action"') ?> |
|
| 241 | 260 | > |
| 242 | 261 | <div class="verification-dialog popovermenu bubble menu"> |
| 243 | 262 | <div class="verification-dialog-content"> |
| 244 | 263 | <p class="explainVerification"></p> |
| 245 | 264 | <p class="verificationCode"></p> |
| 246 | - <p><?php p($l->t('It can take up to 24 hours before the account is displayed as verified.'));?></p> |
|
| 265 | + <p><?php p($l->t('It can take up to 24 hours before the account is displayed as verified.')); |
|
| 266 | +} |
|
| 267 | +?></p> |
|
| 247 | 268 | </div> |
| 248 | 269 | </div> |
| 249 | 270 | </div> |
@@ -251,7 +272,10 @@ discard block |
||
| 251 | 272 | <input type="url" name="website" id="website" value="<?php p($_['website']); ?>" |
| 252 | 273 | placeholder="<?php p($l->t('Link https://…')); ?>" |
| 253 | 274 | autocomplete="on" autocapitalize="none" autocorrect="off" |
| 254 | - <?php if(!$_['lookupServerUploadEnabled']) print_unescaped('disabled="1"'); ?> |
|
| 275 | + <?php if(!$_['lookupServerUploadEnabled']) { |
|
| 276 | + print_unescaped('disabled="1"'); |
|
| 277 | +} |
|
| 278 | +?> |
|
| 255 | 279 | /> |
| 256 | 280 | <span class="icon-checkmark hidden"></span> |
| 257 | 281 | <?php if($_['lookupServerUploadEnabled']) { ?> |
@@ -272,7 +296,10 @@ discard block |
||
| 272 | 296 | </div> |
| 273 | 297 | </h2> |
| 274 | 298 | <?php if($_['lookupServerUploadEnabled']) { ?> |
| 275 | - <div class="verify <?php if ($_['twitter'] === '' || $_['twitterScope'] !== 'public') p('hidden'); ?>"> |
|
| 299 | + <div class="verify <?php if ($_['twitter'] === '' || $_['twitterScope'] !== 'public') { |
|
| 300 | + p('hidden'); |
|
| 301 | +} |
|
| 302 | +?>"> |
|
| 276 | 303 | <img id="verify-twitter" title="<?php p($_['twitterMessage']); ?>" data-status="<?php p($_['twitterVerification']) ?>" src=" |
| 277 | 304 | <?php |
| 278 | 305 | switch($_['twitterVerification']) { |
@@ -286,13 +313,16 @@ discard block |
||
| 286 | 313 | p(image_path('core', 'actions/verify.svg')); |
| 287 | 314 | } |
| 288 | 315 | ?>" |
| 289 | - <?php if($_['twitterVerification'] === \OC\Accounts\AccountManager::VERIFICATION_IN_PROGRESS || $_['twitterVerification'] === \OC\Accounts\AccountManager::NOT_VERIFIED) print_unescaped(' class="verify-action"') ?> |
|
| 316 | + <?php if($_['twitterVerification'] === \OC\Accounts\AccountManager::VERIFICATION_IN_PROGRESS || $_['twitterVerification'] === \OC\Accounts\AccountManager::NOT_VERIFIED) { |
|
| 317 | + print_unescaped(' class="verify-action"') ?> |
|
| 290 | 318 | > |
| 291 | 319 | <div class="verification-dialog popovermenu bubble menu"> |
| 292 | 320 | <div class="verification-dialog-content"> |
| 293 | 321 | <p class="explainVerification"></p> |
| 294 | 322 | <p class="verificationCode"></p> |
| 295 | - <p><?php p($l->t('It can take up to 24 hours before the account is displayed as verified.'));?></p> |
|
| 323 | + <p><?php p($l->t('It can take up to 24 hours before the account is displayed as verified.')); |
|
| 324 | +} |
|
| 325 | +?></p> |
|
| 296 | 326 | </div> |
| 297 | 327 | </div> |
| 298 | 328 | </div> |
@@ -300,7 +330,10 @@ discard block |
||
| 300 | 330 | <input type="text" name="twitter" id="twitter" value="<?php p($_['twitter']); ?>" |
| 301 | 331 | placeholder="<?php p($l->t('Twitter handle @…')); ?>" |
| 302 | 332 | autocomplete="on" autocapitalize="none" autocorrect="off" |
| 303 | - <?php if(!$_['lookupServerUploadEnabled']) print_unescaped('disabled="1"'); ?> |
|
| 333 | + <?php if(!$_['lookupServerUploadEnabled']) { |
|
| 334 | + print_unescaped('disabled="1"'); |
|
| 335 | +} |
|
| 336 | +?> |
|
| 304 | 337 | /> |
| 305 | 338 | <span class="icon-checkmark hidden"></span> |
| 306 | 339 | <?php if($_['lookupServerUploadEnabled']) { ?> |
@@ -247,8 +247,7 @@ |
||
| 247 | 247 | return new JSONResponse($e->getReturnMessage(), Http::STATUS_BAD_REQUEST); |
| 248 | 248 | } catch (AuthenticationFailedException $e) { |
| 249 | 249 | return new JSONResponse(["message" => "RESOURCE_NOT_FOUND"], Http::STATUS_FORBIDDEN); |
| 250 | - } |
|
| 251 | - catch (\Exception $e) { |
|
| 250 | + } catch (\Exception $e) { |
|
| 252 | 251 | return new JSONResponse( |
| 253 | 252 | ['message' => 'Internal error at ' . $this->urlGenerator->getBaseUrl()], |
| 254 | 253 | Http::STATUS_BAD_REQUEST |
@@ -18,14 +18,20 @@ discard block |
||
| 18 | 18 | |
| 19 | 19 | <p> |
| 20 | 20 | <input type="checkbox" name="outgoing_server2server_share_enabled" id="outgoingServer2serverShareEnabled" class="checkbox" |
| 21 | - value="1" <?php if ($_['outgoingServer2serverShareEnabled']) print_unescaped('checked="checked"'); ?> /> |
|
| 21 | + value="1" <?php if ($_['outgoingServer2serverShareEnabled']) { |
|
| 22 | + print_unescaped('checked="checked"'); |
|
| 23 | +} |
|
| 24 | +?> /> |
|
| 22 | 25 | <label for="outgoingServer2serverShareEnabled"> |
| 23 | 26 | <?php p($l->t('Allow users on this server to send shares to other servers'));?> |
| 24 | 27 | </label> |
| 25 | 28 | </p> |
| 26 | 29 | <p> |
| 27 | 30 | <input type="checkbox" name="incoming_server2server_share_enabled" id="incomingServer2serverShareEnabled" class="checkbox" |
| 28 | - value="1" <?php if ($_['incomingServer2serverShareEnabled']) print_unescaped('checked="checked"'); ?> /> |
|
| 31 | + value="1" <?php if ($_['incomingServer2serverShareEnabled']) { |
|
| 32 | + print_unescaped('checked="checked"'); |
|
| 33 | +} |
|
| 34 | +?> /> |
|
| 29 | 35 | <label for="incomingServer2serverShareEnabled"> |
| 30 | 36 | <?php p($l->t('Allow users on this server to receive shares from other servers'));?> |
| 31 | 37 | </label><br/> |
@@ -33,14 +39,20 @@ discard block |
||
| 33 | 39 | <?php if($_['federatedGroupSharingSupported']): ?> |
| 34 | 40 | <p> |
| 35 | 41 | <input type="checkbox" name="outgoing_server2server_group_share_enabled" id="outgoingServer2serverGroupShareEnabled" class="checkbox" |
| 36 | - value="1" <?php if ($_['outgoingServer2serverGroupShareEnabled']) print_unescaped('checked="checked"'); ?> /> |
|
| 42 | + value="1" <?php if ($_['outgoingServer2serverGroupShareEnabled']) { |
|
| 43 | + print_unescaped('checked="checked"'); |
|
| 44 | +} |
|
| 45 | +?> /> |
|
| 37 | 46 | <label for="outgoingServer2serverGroupShareEnabled"> |
| 38 | 47 | <?php p($l->t('Allow users on this server to send shares to groups on other servers'));?> |
| 39 | 48 | </label> |
| 40 | 49 | </p> |
| 41 | 50 | <p> |
| 42 | 51 | <input type="checkbox" name="incoming_server2server_group_share_enabled" id="incomingServer2serverGroupShareEnabled" class="checkbox" |
| 43 | - value="1" <?php if ($_['incomingServer2serverGroupShareEnabled']) print_unescaped('checked="checked"'); ?> /> |
|
| 52 | + value="1" <?php if ($_['incomingServer2serverGroupShareEnabled']) { |
|
| 53 | + print_unescaped('checked="checked"'); |
|
| 54 | +} |
|
| 55 | +?> /> |
|
| 44 | 56 | <label for="incomingServer2serverGroupShareEnabled"> |
| 45 | 57 | <?php p($l->t('Allow users on this server to receive group shares from other servers'));?> |
| 46 | 58 | </label><br/> |
@@ -48,14 +60,20 @@ discard block |
||
| 48 | 60 | <?php endif; ?> |
| 49 | 61 | <p> |
| 50 | 62 | <input type="checkbox" name="lookupServerEnabled" id="lookupServerEnabled" class="checkbox" |
| 51 | - value="1" <?php if ($_['lookupServerEnabled']) print_unescaped('checked="checked"'); ?> /> |
|
| 63 | + value="1" <?php if ($_['lookupServerEnabled']) { |
|
| 64 | + print_unescaped('checked="checked"'); |
|
| 65 | +} |
|
| 66 | +?> /> |
|
| 52 | 67 | <label for="lookupServerEnabled"> |
| 53 | 68 | <?php p($l->t('Search global and public address book for users'));?> |
| 54 | 69 | </label><br/> |
| 55 | 70 | </p> |
| 56 | 71 | <p> |
| 57 | 72 | <input type="checkbox" name="lookupServerUploadEnabled" id="lookupServerUploadEnabled" class="checkbox" |
| 58 | - value="1" <?php if ($_['lookupServerUploadEnabled']) print_unescaped('checked="checked"'); ?> /> |
|
| 73 | + value="1" <?php if ($_['lookupServerUploadEnabled']) { |
|
| 74 | + print_unescaped('checked="checked"'); |
|
| 75 | +} |
|
| 76 | +?> /> |
|
| 59 | 77 | <label for="lookupServerUploadEnabled"> |
| 60 | 78 | <?php p($l->t('Allow users to publish their data to a global and public address book'));?> |
| 61 | 79 | </label><br/> |
@@ -226,7 +226,7 @@ |
||
| 226 | 226 | if ($share->getSharedWith() === null) { |
| 227 | 227 | throw new \InvalidArgumentException('SharedWith should not be empty'); |
| 228 | 228 | } |
| 229 | - } else if ($share->getShareType() === \OCP\Share::SHARE_TYPE_REMOTE_GROUP) { |
|
| 229 | + } else if ($share->getShareType() === \OCP\Share::SHARE_TYPE_REMOTE_GROUP) { |
|
| 230 | 230 | if ($share->getSharedWith() === null) { |
| 231 | 231 | throw new \InvalidArgumentException('SharedWith should not be empty'); |
| 232 | 232 | } |
@@ -465,7 +465,7 @@ |
||
| 465 | 465 | |
| 466 | 466 | $share->setSharedWith($shareWith); |
| 467 | 467 | $share->setPermissions($permissions); |
| 468 | - } else if ($shareType === Share::SHARE_TYPE_REMOTE_GROUP) { |
|
| 468 | + } else if ($shareType === Share::SHARE_TYPE_REMOTE_GROUP) { |
|
| 469 | 469 | if (!$this->shareManager->outgoingServer2ServerGroupSharesAllowed()) { |
| 470 | 470 | throw new OCSForbiddenException($this->l->t('Sharing %s failed because the back end does not allow shares from type %s', [$path->getPath(), $shareType])); |
| 471 | 471 | } |