MDL-9287 missing resultset check in mnet config_form(); merged from MOODLE_18_STABLE

This commit is contained in:
skodak 2007-04-11 08:51:01 +00:00
parent c9feab8e6c
commit d525ca256a

View File

@ -673,15 +673,16 @@ class auth_plugin_mnet extends auth_plugin_base {
ORDER BY ORDER BY
h.name ASC"; h.name ASC";
$resultset = get_records_sql($query);
$id_providers = array(); $id_providers = array();
$service_providers = array(); $service_providers = array();
foreach($resultset as $hostservice) { if ($resultset = get_records_sql($query)) {
if(!empty($hostservice->idppublish) && !empty($hostservice->spsubscribe)) { foreach($resultset as $hostservice) {
$service_providers[]= array('id' => $hostservice->id, 'name' => $hostservice->hostname, 'wwwroot' => $hostservice->wwwroot); if(!empty($hostservice->idppublish) && !empty($hostservice->spsubscribe)) {
} $service_providers[]= array('id' => $hostservice->id, 'name' => $hostservice->hostname, 'wwwroot' => $hostservice->wwwroot);
if(!empty($hostservice->idpsubscribe) && !empty($hostservice->sppublish)) { }
$id_providers[]= array('id' => $hostservice->id, 'name' => $hostservice->hostname, 'wwwroot' => $hostservice->wwwroot); if(!empty($hostservice->idpsubscribe) && !empty($hostservice->sppublish)) {
$id_providers[]= array('id' => $hostservice->id, 'name' => $hostservice->hostname, 'wwwroot' => $hostservice->wwwroot);
}
} }
} }