Merge branch 'MDL-21042_master' of git://github.com/markn86/moodle

This commit is contained in:
Marina Glancy 2014-08-12 16:01:56 +08:00
commit dc0f4b4f26

View File

@ -766,7 +766,12 @@ function report_security_check_riskbackup($detailed=false) {
$systemrolecount = empty($systemroles) ? 0 : count($systemroles);
$overriddenrolecount = empty($overriddenroles) ? 0 : count($overriddenroles);
$result->status = REPORT_SECURITY_WARNING; // there is always at least one admin
if (max($usercount, $systemrolecount, $overriddenrolecount) > 0) {
$result->status = REPORT_SECURITY_WARNING;
} else {
$result->status = REPORT_SECURITY_OK;
}
$a = (object)array('rolecount'=>$systemrolecount,'overridecount'=>$overriddenrolecount,'usercount'=>$usercount);
$result->info = get_string('check_riskbackup_warning', 'report_security', $a);