mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
MDL-9287 missing resultset check in mnet config_form(); merged from MOODLE_18_STABLE
This commit is contained in:
parent
c9feab8e6c
commit
d525ca256a
@ -673,15 +673,16 @@ class auth_plugin_mnet extends auth_plugin_base {
|
||||
ORDER BY
|
||||
h.name ASC";
|
||||
|
||||
$resultset = get_records_sql($query);
|
||||
$id_providers = array();
|
||||
$service_providers = array();
|
||||
foreach($resultset as $hostservice) {
|
||||
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 ($resultset = get_records_sql($query)) {
|
||||
foreach($resultset as $hostservice) {
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user