Skip to content

Commit

Permalink
MDL-21581 fixed regression + eliminated one query when mnet not enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
skodak committed Feb 11, 2010
1 parent 821e29e commit ae6b463
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions admin/settings/mnet.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,19 @@

$ADMIN->add('mnet', new admin_category('mnetpeercat', get_string('mnetpeers', 'mnet')));

$hosts = mnet_get_hosts();
foreach ($hosts as $host) {
$ADMIN->add('mnetpeercat',
new admin_externalpage(
'mnetpeer' . $host->id,
$host->name,
$CFG->wwwroot . '/admin/mnet/peers.php?step=update&hostid=' . $host->id,
'moodle/site:config'
)
);
if (isset($CFG->mnet_dispatcher_mode) and $CFG->mnet_dispatcher_mode === 'off') {
require_once($CFG->dirroot.'/mnet/lib.php');
$hosts = mnet_get_hosts();
foreach ($hosts as $host) {
$ADMIN->add('mnetpeercat',
new admin_externalpage(
'mnetpeer' . $host->id,
$host->name,
$CFG->wwwroot . '/admin/mnet/peers.php?step=update&hostid=' . $host->id,
'moodle/site:config'
)
);
}
}

$ADMIN->add('mnet', new admin_externalpage('ssoaccesscontrol', get_string('ssoaccesscontrol', 'mnet'),
Expand Down

0 comments on commit ae6b463

Please sign in to comment.