Apply "Squiz" code style on old (pre-2014) files

This commit is contained in:
Job Snijders
2015-07-10 13:36:21 +02:00
parent e4f4eb44dc
commit ebd0f6fc35
539 changed files with 13591 additions and 13223 deletions
+19 -21
View File
@@ -1,33 +1,31 @@
<?php
/*
Configuration to JSON converter
Written by Job Snijders <job.snijders@atrato.com>
*/
* Configuration to JSON converter
* Written by Job Snijders <job@instituut.net>
*
*/
$defaults_file = 'includes/defaults.inc.php';
$config_file = 'config.php';
$config_file = 'config.php';
// move to install dir
chdir(dirname($argv[0]));
function iscli() {
if(php_sapi_name() == 'cli' && empty($_SERVER['REMOTE_ADDR'])) {
return true;
} else {
return false;
}
function iscli()
{
if (php_sapi_name() == 'cli' && empty($_SERVER['REMOTE_ADDR'])) {
return true;
}
else {
return false;
}
}
// check if we are running throw the CLI, otherwise abort
if ( iscli() ) {
require_once($defaults_file);
require_once($config_file);
print(json_encode($config));
if (iscli()) {
include_once $defaults_file;
include_once $config_file;
print (json_encode($config));
}
?>