loadSchema('acl'); // Add the administrative account printHeader("Add an administrative account"); print "\nPlease enter an username for your administrative account [root] : "; $username = getInput('%s'); if ($username == "") { $username = "******"; } print "\nPlease enter a password for your administrative account : "; $password = getInput('%s'); if ($nimode) { $username = '******'; $password = '******'; } LoadObjectDependency("org.freemedsoftware.public.Installation"); Installation::CreateAdministrationAccount($username, $password); print "\n\n"; printHeader("Form ACL rules for users"); include_once dirname(__FILE__) . '/../lib/acl.php'; include_once dirname(__FILE__) . '/../lib/org/freemedsoftware/module/ACL.class.php'; $a = new ACL(); $q = "SELECT username, id FROM user WHERE id > 0"; $r = $GLOBALS['sql']->queryAll($q); foreach ($r as $user) { print " - Adding ACL record for user " . $user['username'] . " (" . $user['id'] . ") \n"; $a->UserAdd($r['id']); } printHeader("Create 'healthy system' status"); `touch ./data/cache/healthy`; printHeader("Force module definition upgrades"); $modules = CreateObject('org.freemedsoftware.core.ModuleIndex', true, false);