Three new validate.php checks

* Check that $config['install_dir'] is set correctly by checking that config.php exists there.
* Check if the local branch is not master, warn that it will prevent updates
* Check for modified files and list them (this will not include staged files)
This commit is contained in:
Tony Murray
2016-04-29 12:53:02 -05:00
parent 940e98e41e
commit bf1e7c2822
2 changed files with 23 additions and 1 deletions
+7 -1
View File
@@ -1041,7 +1041,13 @@ function version_info($remote=true) {
curl_setopt($api, CURLOPT_RETURNTRANSFER, 1);
$output['github'] = json_decode(curl_exec($api),true);
}
$output['local_sha'] = chop(`git rev-parse HEAD`);
$output['local_sha'] = rtrim(`git rev-parse HEAD`);
$output['local_branch'] = rtrim(`git rev-parse --abbrev-ref HEAD`);
exec('git diff --name-only --exit-code', $cmdoutput, $code);
$output['git_modified'] = ($code !== 0);
$output['git_modified_files'] = $cmdoutput;
$output['db_schema'] = dbFetchCell('SELECT version FROM dbSchema');
$output['php_ver'] = phpversion();
$output['mysql_ver'] = dbFetchCell('SELECT version()');