Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/Command/App/Update.php4
-rw-r--r--core/Command/Base.php4
-rw-r--r--core/Command/Config/System/DeleteConfig.php4
-rw-r--r--core/Command/Config/System/GetConfig.php2
-rw-r--r--core/Command/Db/Migrations/GenerateFromSchemaFileCommand.php2
-rw-r--r--core/Command/Encryption/DecryptAll.php2
-rw-r--r--core/Command/Encryption/Enable.php2
-rw-r--r--core/Command/Encryption/SetDefaultModule.php2
-rw-r--r--core/Command/L10n/CreateJs.php2
-rw-r--r--core/Command/Log/File.php2
-rw-r--r--core/Command/Log/Manage.php4
-rw-r--r--core/Command/Upgrade.php2
-rw-r--r--core/Command/User/Setting.php4
-rw-r--r--core/Controller/ClientFlowLoginController.php2
-rw-r--r--core/Controller/ClientFlowLoginV2Controller.php2
-rw-r--r--core/Middleware/TwoFactorMiddleware.php2
16 files changed, 21 insertions, 21 deletions
diff --git a/core/Command/App/Update.php b/core/Command/App/Update.php
index 8aa7bccb1a2..4be2f4639ef 100644
--- a/core/Command/App/Update.php
+++ b/core/Command/App/Update.php
@@ -92,7 +92,7 @@ class Update extends Command {
return 1;
}
- } else if ($input->getOption('all') || $input->getOption('showonly')) {
+ } elseif ($input->getOption('all') || $input->getOption('showonly')) {
$apps = \OC_App::getAllApps();
} else {
$output->writeln("<error>Please specify an app to update or \"--all\" to update all updatable apps\"</error>");
@@ -117,7 +117,7 @@ class Update extends Command {
if ($result === false) {
$output->writeln($appId . ' couldn\'t be updated');
$return = 1;
- } else if($result === true) {
+ } elseif($result === true) {
$output->writeln($appId . ' updated');
}
}
diff --git a/core/Command/Base.php b/core/Command/Base.php
index 678f0286db5..9c20e049311 100644
--- a/core/Command/Base.php
+++ b/core/Command/Base.php
@@ -121,9 +121,9 @@ class Base extends Command implements CompletionAwareInterface {
protected function valueToString($value, $returnNull = true) {
if ($value === false) {
return 'false';
- } else if ($value === true) {
+ } elseif ($value === true) {
return 'true';
- } else if ($value === null) {
+ } elseif ($value === null) {
return $returnNull ? null : 'null';
} else {
return $value;
diff --git a/core/Command/Config/System/DeleteConfig.php b/core/Command/Config/System/DeleteConfig.php
index 22e83b15f79..85531c4c4bf 100644
--- a/core/Command/Config/System/DeleteConfig.php
+++ b/core/Command/Config/System/DeleteConfig.php
@@ -106,10 +106,10 @@ class DeleteConfig extends Base {
} else {
$currentValue[$nextKey] = $this->removeSubValue($keys, $currentValue[$nextKey], $throwError);
}
- } else if ($throwError) {
+ } elseif ($throwError) {
throw new \UnexpectedValueException('Config parameter does not exist');
}
- } else if ($throwError) {
+ } elseif ($throwError) {
throw new \UnexpectedValueException('Config parameter does not exist');
}
diff --git a/core/Command/Config/System/GetConfig.php b/core/Command/Config/System/GetConfig.php
index ec4ea7e2577..5d77518db21 100644
--- a/core/Command/Config/System/GetConfig.php
+++ b/core/Command/Config/System/GetConfig.php
@@ -84,7 +84,7 @@ class GetConfig extends Base {
foreach ($configNames as $configName) {
if (isset($configValue[$configName])) {
$configValue = $configValue[$configName];
- } else if (!$input->hasParameterOption('--default-value')) {
+ } elseif (!$input->hasParameterOption('--default-value')) {
return 1;
} else {
$configValue = $defaultValue;
diff --git a/core/Command/Db/Migrations/GenerateFromSchemaFileCommand.php b/core/Command/Db/Migrations/GenerateFromSchemaFileCommand.php
index b3d826c1e5b..7db08ba0061 100644
--- a/core/Command/Db/Migrations/GenerateFromSchemaFileCommand.php
+++ b/core/Command/Db/Migrations/GenerateFromSchemaFileCommand.php
@@ -129,7 +129,7 @@ EOT
if ($default !== null) {
if (is_string($default)) {
$default = "'$default'";
- } else if (is_bool($default)) {
+ } elseif (is_bool($default)) {
$default = ($default === true) ? 'true' : 'false';
}
$content .= str_replace('{{default}}', $default, <<<'EOT'
diff --git a/core/Command/Encryption/DecryptAll.php b/core/Command/Encryption/DecryptAll.php
index b4dc3e0160a..af1aa4c792c 100644
--- a/core/Command/Encryption/DecryptAll.php
+++ b/core/Command/Encryption/DecryptAll.php
@@ -175,7 +175,7 @@ class DecryptAll extends Command {
$output->writeln(' aborted.');
$output->writeln('Server side encryption remains enabled');
$this->config->setAppValue('core', 'encryption_enabled', 'yes');
- } else if ($uid !== '') {
+ } elseif ($uid !== '') {
$output->writeln('Server side encryption remains enabled');
$this->config->setAppValue('core', 'encryption_enabled', 'yes');
}
diff --git a/core/Command/Encryption/Enable.php b/core/Command/Encryption/Enable.php
index c9b842bd2a6..6391eede858 100644
--- a/core/Command/Encryption/Enable.php
+++ b/core/Command/Encryption/Enable.php
@@ -69,7 +69,7 @@ class Enable extends Command {
$defaultModule = $this->config->getAppValue('core', 'default_encryption_module', null);
if ($defaultModule === null) {
$output->writeln('<error>No default module is set</error>');
- } else if (!isset($modules[$defaultModule])) {
+ } elseif (!isset($modules[$defaultModule])) {
$output->writeln('<error>The current default module does not exist: ' . $defaultModule . '</error>');
} else {
$output->writeln('Default module: ' . $defaultModule);
diff --git a/core/Command/Encryption/SetDefaultModule.php b/core/Command/Encryption/SetDefaultModule.php
index 5f73792d99b..f84ed19621a 100644
--- a/core/Command/Encryption/SetDefaultModule.php
+++ b/core/Command/Encryption/SetDefaultModule.php
@@ -76,7 +76,7 @@ class SetDefaultModule extends Command {
if ($moduleId === $this->encryptionManager->getDefaultEncryptionModuleId()) {
$output->writeln('"' . $moduleId . '"" is already the default module');
- } else if ($this->encryptionManager->setDefaultEncryptionModule($moduleId)) {
+ } elseif ($this->encryptionManager->setDefaultEncryptionModule($moduleId)) {
$output->writeln('<info>Set default module to "' . $moduleId . '"</info>');
} else {
$output->writeln('<error>The specified module "' . $moduleId . '" does not exist</error>');
diff --git a/core/Command/L10n/CreateJs.php b/core/Command/L10n/CreateJs.php
index ac6e7339422..fd337994e86 100644
--- a/core/Command/L10n/CreateJs.php
+++ b/core/Command/L10n/CreateJs.php
@@ -161,7 +161,7 @@ class CreateJs extends Command implements CompletionAwareInterface {
public function completeArgumentValues($argumentName, CompletionContext $context) {
if ($argumentName === 'app') {
return \OC_App::getAllApps();
- } else if ($argumentName === 'lang') {
+ } elseif ($argumentName === 'lang') {
$appName = $context->getWordAtIndex($context->getWordIndex() - 1);
return $this->getAllLanguages(\OC_App::getAppPath($appName));
}
diff --git a/core/Command/Log/File.php b/core/Command/Log/File.php
index df5e1ba53ab..2bf77224cd5 100644
--- a/core/Command/Log/File.php
+++ b/core/Command/Log/File.php
@@ -143,7 +143,7 @@ class File extends Command implements Completion\CompletionAwareInterface {
Completion::TYPE_OPTION
);
return $helper->run();
- } else if ($optionName === 'rotate-size') {
+ } elseif ($optionName === 'rotate-size') {
return [0];
}
return [];
diff --git a/core/Command/Log/Manage.php b/core/Command/Log/Manage.php
index b2816ea5f4b..062bc866cc9 100644
--- a/core/Command/Log/Manage.php
+++ b/core/Command/Log/Manage.php
@@ -188,9 +188,9 @@ class Manage extends Command implements CompletionAwareInterface {
public function completeOptionValues($optionName, CompletionContext $context) {
if ($optionName === 'backend') {
return ['file', 'syslog', 'errorlog', 'systemd'];
- } else if ($optionName === 'level') {
+ } elseif ($optionName === 'level') {
return ['debug', 'info', 'warning', 'error', 'fatal'];
- } else if ($optionName === 'timezone') {
+ } elseif ($optionName === 'timezone') {
return \DateTimeZone::listIdentifiers();
}
return [];
diff --git a/core/Command/Upgrade.php b/core/Command/Upgrade.php
index dadcdb0904c..761a6fb55c0 100644
--- a/core/Command/Upgrade.php
+++ b/core/Command/Upgrade.php
@@ -264,7 +264,7 @@ class Upgrade extends Command {
}
return self::ERROR_SUCCESS;
- } else if($this->config->getSystemValueBool('maintenance')) {
+ } elseif($this->config->getSystemValueBool('maintenance')) {
//Possible scenario: Nextcloud core is updated but an app failed
$output->writeln('<warning>Nextcloud is in maintenance mode</warning>');
$output->write('<comment>Maybe an upgrade is already in process. Please check the '
diff --git a/core/Command/User/Setting.php b/core/Command/User/Setting.php
index 521ac850b92..e084b94cc8a 100644
--- a/core/Command/User/Setting.php
+++ b/core/Command/User/Setting.php
@@ -188,7 +188,7 @@ class Setting extends Base {
$this->config->setUserValue($uid, $app, $key, $input->getArgument('value'));
return 0;
- } else if ($input->hasParameterOption('--delete')) {
+ } elseif ($input->hasParameterOption('--delete')) {
if ($input->hasParameterOption('--error-if-not-exists') && $value === null) {
$output->writeln('<error>The setting does not exist for user "' . $uid . '".</error>');
return 1;
@@ -205,7 +205,7 @@ class Setting extends Base {
$this->config->deleteUserValue($uid, $app, $key);
return 0;
- } else if ($value !== null) {
+ } elseif ($value !== null) {
$output->writeln($value);
return 0;
} else {
diff --git a/core/Controller/ClientFlowLoginController.php b/core/Controller/ClientFlowLoginController.php
index ffdfd9f9f0a..5df6ce5c7b6 100644
--- a/core/Controller/ClientFlowLoginController.php
+++ b/core/Controller/ClientFlowLoginController.php
@@ -385,7 +385,7 @@ class ClientFlowLoginController extends Controller {
if (strpos($this->request->getRequestUri(), '/index.php') !== false) {
$serverPostfix = substr($this->request->getRequestUri(), 0, strpos($this->request->getRequestUri(), '/index.php'));
- } else if (strpos($this->request->getRequestUri(), '/login/flow') !== false) {
+ } elseif (strpos($this->request->getRequestUri(), '/login/flow') !== false) {
$serverPostfix = substr($this->request->getRequestUri(), 0, strpos($this->request->getRequestUri(), '/login/flow'));
}
diff --git a/core/Controller/ClientFlowLoginV2Controller.php b/core/Controller/ClientFlowLoginV2Controller.php
index 836606d301b..b5b69972832 100644
--- a/core/Controller/ClientFlowLoginV2Controller.php
+++ b/core/Controller/ClientFlowLoginV2Controller.php
@@ -291,7 +291,7 @@ class ClientFlowLoginV2Controller extends Controller {
if (strpos($this->request->getRequestUri(), '/index.php') !== false) {
$serverPostfix = substr($this->request->getRequestUri(), 0, strpos($this->request->getRequestUri(), '/index.php'));
- } else if (strpos($this->request->getRequestUri(), '/login/v2') !== false) {
+ } elseif (strpos($this->request->getRequestUri(), '/login/v2') !== false) {
$serverPostfix = substr($this->request->getRequestUri(), 0, strpos($this->request->getRequestUri(), '/login/v2'));
}
diff --git a/core/Middleware/TwoFactorMiddleware.php b/core/Middleware/TwoFactorMiddleware.php
index ba97f864ad6..392ae7ca1ca 100644
--- a/core/Middleware/TwoFactorMiddleware.php
+++ b/core/Middleware/TwoFactorMiddleware.php
@@ -114,7 +114,7 @@ class TwoFactorMiddleware extends Middleware {
if ($this->session->exists('app_password') || $this->twoFactorManager->isTwoFactorAuthenticated($user)) {
$this->checkTwoFactor($controller, $methodName, $user);
- } else if ($controller instanceof TwoFactorChallengeController) {
+ } elseif ($controller instanceof TwoFactorChallengeController) {
// Allow access to the two-factor controllers only if two-factor authentication
// is in progress.
throw new UserAlreadyLoggedInException();