/** * Check sanity of things that we only check at installation time - not on * every request, like ensure_sanity() does */ function ensure_install_sanity() { // Must must must be a UTF8 database! if (!db_is_utf8()) { throw new ConfigSanityException(get_string('dbnotutf8', 'error')); } if (is_postgres() && !postgres_create_language('plpgsql')) { throw new ConfigSanityException(get_string('plpgsqlnotavailable', 'error')); } if (is_mysql() && !mysql_has_trigger_privilege()) { throw new ConfigSanityException(get_string('mysqlnotriggerprivilege', 'error')); } }
/** * Check sanity of things that we only check at installation time - not on * every request, like ensure_sanity() does */ function ensure_install_sanity() { // Must must must be a UTF8 database! if (!db_is_utf8()) { throw new ConfigSanityException(get_string('dbnotutf8', 'error')); } if (is_postgres() && !postgres_create_language('plpgsql')) { throw new ConfigSanityException(get_string('plpgsqlnotavailable', 'error')); } if (is_mysql() && !mysql_has_trigger_privilege()) { throw new ConfigSanityException(get_string('mysqlnotriggerprivilege', 'error')); } if (!file_exists(get_config('docroot') . 'theme/raw/style/style.css')) { $e = new ConfigSanityException(get_string('cssnotpresent', 'error')); $e->set_log_off(); throw $e; } }
$SESSION->add_error_msg($message); } if (get_config('new_registration_policy') == 1) { redirect('/admin/registersite.php'); } redirect(); } $smarty = smarty(); $upgrades = check_upgrades(); if (!empty($upgrades['core']->install)) { define('TITLE', get_string('installation', 'admin')); $smarty->assign('upgradeheading', get_string('performinginstallation', 'admin')); log_info('Starting Mahara installation...'); } else { define('TITLE', get_string('upgrades', 'admin')); if (!db_is_utf8()) { global $SESSION; $SESSION->add_error_msg(get_string('dbnotutf8warning', 'admin')); } ensure_upgrade_sanity(); $smarty->assign('upgradeheading', get_string('performingupgrades', 'admin')); } if (empty($upgrades['settings']['disablelogin'])) { auth_setup(); } // Remove the "settings" component, which is not a real component (see check_upgrades()) unset($upgrades['settings']); if (!$upgrades) { die_info('<p>' . get_string('noupgrades', 'admin') . '</p>'); } $start = time();
/** * Check sanity of things that we only check at installation time - not on * every request, like ensure_sanity() does */ function ensure_install_sanity() { // Must must must be a UTF8 database! if (!db_is_utf8()) { throw new ConfigSanityException(get_string('dbnotutf8', 'error')); } }