diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-04-10 14:19:56 +0200 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-04-10 14:19:56 +0200 |
commit | caff1023ea72bb2ea94130e18a2a6e2ccf819e5f (patch) | |
tree | 186d494c2aea5dea7255d3584ef5d595fc6e6194 /core/templates/installation.php | |
parent | edf8ce32cffdb920e8171207b342abbd7f1fbe73 (diff) | |
download | nextcloud-server-caff1023ea72bb2ea94130e18a2a6e2ccf819e5f.tar.gz nextcloud-server-caff1023ea72bb2ea94130e18a2a6e2ccf819e5f.zip |
Format control structures, classes, methods and function
To continue this formatting madness, here's a tiny patch that adds
unified formatting for control structures like if and loops as well as
classes, their methods and anonymous functions. This basically forces
the constructs to start on the same line. This is not exactly what PSR2
wants, but I think we can have a few exceptions with "our" style. The
starting of braces on the same line is pracrically standard for our
code.
This also removes and empty lines from method/function bodies at the
beginning and end.
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'core/templates/installation.php')
-rw-r--r-- | core/templates/installation.php | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/core/templates/installation.php b/core/templates/installation.php index d65d0adb1cb..a7808a0103c 100644 --- a/core/templates/installation.php +++ b/core/templates/installation.php @@ -9,12 +9,12 @@ script('core', [ <input type='hidden' id='hasOracle' value='<?php p($_['hasOracle']) ?>'> <form action="index.php" method="post"> <input type="hidden" name="install" value="true"> - <?php if(count($_['errors']) > 0): ?> + <?php if (count($_['errors']) > 0): ?> <fieldset class="warning"> <legend><strong><?php p($l->t('Error'));?></strong></legend> - <?php foreach($_['errors'] as $err): ?> + <?php foreach ($_['errors'] as $err): ?> <p> - <?php if(is_array($err)):?> + <?php if (is_array($err)):?> <?php p($err['error']); ?> <span class='hint'><?php p($err['hint']); ?></span> <?php else: ?> @@ -24,7 +24,7 @@ script('core', [ <?php endforeach; ?> </fieldset> <?php endif; ?> - <?php if(!$_['htaccessWorking']): ?> + <?php if (!$_['htaccessWorking']): ?> <fieldset class="warning"> <legend><strong><?php p($l->t('Security warning'));?></strong></legend> <p><?php p($l->t('Your data directory and files are probably accessible from the internet because the .htaccess file does not work.'));?><br> @@ -54,13 +54,13 @@ script('core', [ </p> </fieldset> - <?php if(!$_['directoryIsSet'] or !$_['dbIsSet'] or count($_['errors']) > 0): ?> + <?php if (!$_['directoryIsSet'] or !$_['dbIsSet'] or count($_['errors']) > 0): ?> <fieldset id="advancedHeader"> <legend><a id="showAdvanced" tabindex="0" href="#"><?php p($l->t('Storage & database')); ?><img src="<?php print_unescaped(image_path('', 'actions/caret-white.svg')); ?>" /></a></legend> </fieldset> <?php endif; ?> - <?php if(!$_['directoryIsSet'] or count($_['errors']) > 0): ?> + <?php if (!$_['directoryIsSet'] or count($_['errors']) > 0): ?> <fieldset id="datadirField"> <div id="datadirContent"> <label for="directory"><?php p($l->t('Data folder')); ?></label> @@ -72,14 +72,17 @@ script('core', [ </fieldset> <?php endif; ?> - <?php if(!$_['dbIsSet'] or count($_['errors']) > 0): ?> + <?php if (!$_['dbIsSet'] or count($_['errors']) > 0): ?> <fieldset id='databaseBackend'> - <?php if($_['hasMySQL'] or $_['hasPostgreSQL'] or $_['hasOracle']) - $hasOtherDB = true; else $hasOtherDB =false; //other than SQLite?> + <?php if ($_['hasMySQL'] or $_['hasPostgreSQL'] or $_['hasOracle']) { + $hasOtherDB = true; + } else { + $hasOtherDB =false; + } //other than SQLite?> <legend><?php p($l->t('Configure the database')); ?></legend> <div id="selectDbType"> - <?php foreach($_['databases'] as $type => $label): ?> - <?php if(count($_['databases']) === 1): ?> + <?php foreach ($_['databases'] as $type => $label): ?> + <?php if (count($_['databases']) === 1): ?> <p class="info"> <?php p($l->t('Only %s is available.', [$label])); ?> <?php p($l->t('Install and activate additional PHP modules to choose other database types.')); ?><br> @@ -96,7 +99,7 @@ script('core', [ </div> </fieldset> - <?php if($hasOtherDB): ?> + <?php if ($hasOtherDB): ?> <fieldset id='databaseField'> <div id="use_other_db"> <p class="grouptop"> @@ -123,7 +126,7 @@ script('core', [ autocomplete="off" autocapitalize="none" autocorrect="off" pattern="[0-9a-zA-Z$_-]+"> </p> - <?php if($_['hasOracle']): ?> + <?php if ($_['hasOracle']): ?> <div id="use_oracle_db"> <p class="groupmiddle"> <label for="dbtablespace" class="infield"><?php p($l->t('Database tablespace')); ?></label> @@ -149,7 +152,7 @@ script('core', [ <?php endif; ?> <?php endif; ?> - <?php if(!$_['dbIsSet'] or count($_['errors']) > 0): ?> + <?php if (!$_['dbIsSet'] or count($_['errors']) > 0): ?> <fieldset id="sqliteInformation" class="warning"> <legend><?php p($l->t('Performance warning'));?></legend> <p><?php p($l->t('You chose SQLite as database.'));?></p> |