Commit 9f98a0de authored by Nigel McNie's avatar Nigel McNie Committed by Nigel McNie
Browse files

Provide a way to mark the system as installed once it is done. Fixed some

whitespace.
parent 1114045a
......@@ -28,7 +28,14 @@ define('INTERNAL',1);
define('INSTALLER',1);
require(dirname(dirname(__FILE__)) . '/init.php');
$name = clean_requestdata('name',PARAM_ALPHAEXT,REQUEST_EITHER);
$name = clean_requestdata('name', PARAM_ALPHAEXT, REQUEST_EITHER);
$install = clean_requestdata('install', PARAM_BOOL, REQUEST_EITHER);
if ($install) {
if (!get_config('installed')) {
set_config('installed', true);
}
}
$upgrade = check_upgrades($name);
$data = array(
......@@ -36,7 +43,7 @@ $data = array(
);
if (!empty($upgrade)) {
$data['newversion'] = $upgrade->torelease . '( ' . $upgrade->to . ')' ;
$data['newversion'] = $upgrade->torelease . ' (' . $upgrade->to . ')' ;
if ($name == 'core') {
$funname = 'upgrade_core';
}
......@@ -57,4 +64,4 @@ else {
$data['errormessage'] = get_string('nothingtoupgrade','admin');
}
echo json_encode($data);
?>
\ No newline at end of file
?>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment