name = get_input('sitename'); $site->url = get_input('wwwroot'); $site->access_id = 2; // The site is public $guid = $site->save(); if (!$guid) throw new InstallationException(sprintf(elgg_echo('InstallationException:CantCreateSite'), get_input('sitename'), get_input('wwwroot'))); datalist_set('installed',time()); datalist_set('path',get_input('path')); datalist_set('dataroot',get_input('dataroot')); datalist_set('default_site',$site->getGUID()); set_config('language', get_input('language'), $site->getGUID()); system_message(elgg_echo("installation:configuration:success")); header("Location: ../../register.php"); exit; } } ?>