Commit 9a276988 authored by Aaron Wells's avatar Aaron Wells

Check for compiled CSS in sanity check (Bug 1497821)

Change-Id: I5c147bf0ab19e02718666d16ee52f58a74e926b7
behatnotneeded: Covered by existing tests
parent d8f6bed8
......@@ -366,6 +366,9 @@ if (get_config('installed')) {
// from logins
require(get_config('libroot') . 'version.php');
$upgradeavailable = $config->version > get_config('version');
if ($upgradeavailable) {
ensure_upgrade_sanity();
}
$disablelogin = $config->disablelogin;
$cfgsiteclosed = get_config('siteclosed');
if ($upgradeavailable != $cfgsiteclosed) {
......
......@@ -58,6 +58,7 @@ $string['dbversioncheckfailed'] = 'Your database server version is not new enoug
$string['plpgsqlnotavailable'] = 'The PL/pgSQL language is not enabled in your Postgres installation, and Mahara cannot enable it. Please install PL/pgSQL in your database manually. For instructions on how to do this, see https://wiki.mahara.org/index.php/System_Administrator\'s_Guide/Enabling_Plpgsql';
$string['mysqlnotriggerprivilege'] = 'Mahara requires permission to create database triggers, but is unable to do so. Please ensure that the trigger privilege has been granted to the appropriate user in your MySQL installation. For instructions on how to do this, see https://wiki.mahara.org/index.php/System_Administrator\'s_Guide/Granting_Trigger_Privilege';
$string['mbstringneeded'] = 'Please install the mbstring extension for php. This is needed if you have UTF-8 characters in usernames. Otherwise, users might not be able to login.';
$string['cssnotpresent'] = 'CSS files are not present in your htdocs/theme/raw/style directory. If you are running Mahara from a git checkout, run "make css" to build the CSS files. If you are running Mahara from a ZIP download, try downloading and unzipping again.';
// general exception error messages
$string['blocktypenametaken'] = "Block type %s is already taken by another plugin (%s).";
......
......@@ -176,6 +176,11 @@ function ensure_install_sanity() {
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;
}
}
function ensure_upgrade_sanity() {
......@@ -194,6 +199,11 @@ function ensure_upgrade_sanity() {
if (is_postgres() && !postgres_create_language('plpgsql')) {
throw new ConfigSanityException(get_string('plpgsqlnotavailable', '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;
}
}
/**
......
Markdown is supported
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