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>
Nextcloud 13 is not compatible with newer than php 7.2
Just to avoid users from trying this with a to new (untested) php version
* Moved the check logic to 1 place
* All directly callable scripts just require this on top
* exit hard (-1) so we know scripts won't continue
* Return status 500 so no sync clients will try fancy stuff
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
During upgrades, before the DB migration is complete, the system is not
usable, but there's no way for monitoring systems to detect this.
Add the 'needupgrade' field to the status json so monitoring systems can
detect this.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* fix XMLHttpRequest - send after callback is registered
* check for correct type of value - it's a boolean
* return correct content-type in status.php
Using status.php for this.
I modified status.php to also show, whether we're in maintenance.
Checks every 20 seconds if maintenance is over, if yes: reload.
Show the different editions to the user. Used in the status call, on the personal settings page and in the updater to update to the next available version from the same edition.