From: donal72 Date: Thu, 11 Jan 2007 04:11:25 +0000 (+0000) Subject: mnet: XHTML strict fixes: MDL-7861 X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=1ca484a3b7396c1551aa9c0c235ed41364cccf19;p=moodle.git mnet: XHTML strict fixes: MDL-7861 --- diff --git a/admin/mnet/access_control.php b/admin/mnet/access_control.php index a887de7b8b..0684e1e687 100644 --- a/admin/mnet/access_control.php +++ b/admin/mnet/access_control.php @@ -17,7 +17,6 @@ $adminroot = admin_get_root(); admin_externalpage_setup('ssoaccesscontrol', $adminroot); -admin_externalpage_print_header($adminroot); if (!extension_loaded('openssl')) { print_error('requiresopenssl', 'mnet', '', NULL, true); @@ -53,7 +52,7 @@ if (!empty($action) and confirm_sesskey()) { case "delete": delete_records('mnet_sso_access_control', 'id', $id); - notify(get_string('deleteuserrecord', 'mnet', array($idrec->username, $mnethosts[$idrec->mnet_host_id]))); + redirect('access_control.php', get_string('deleteuserrecord', 'mnet', array($idrec->username, $mnethosts[$idrec->mnet_host_id]))); break; case "acl": @@ -65,14 +64,17 @@ if (!empty($action) and confirm_sesskey()) { } if (mnet_update_sso_access_control($idrec->username, $idrec->mnet_host_id, $access)) { - notify(get_string('ssoacl', 'mnet', array($access, $idrec->username, $mnethosts[$idrec->mnet_host_id]))); + if ($access == 'allow') { + redirect('access_control.php', get_string('ssl_acl_allow','mnet', array($idrec->username, $mnethosts[$idrec->mnet_host_id]))); + } elseif ($access == 'deny') { + redirect('access_control.php', get_string('ssl_acl_deny','mnet', array($idrec->username, $mnethosts[$idrec->mnet_host_id]))); + } } break; default: - error(get_string('invalidactionparam', 'mnet'), '/admin/mnet/access_control.php'); + print_error('invalidactionparam', 'mnet', '/admin/mnet/access_control.php'); } - redirect('access_control.php', get_string('changessaved')); } @@ -104,15 +106,19 @@ if ($form = data_submitted() and confirm_sesskey()) { $username = trim(moodle_strtolower($username)); if (!empty($username)) { if (mnet_update_sso_access_control($username, $form->mnet_host_id, $form->access)) { - notify("SSO ACL: $form->access user '$username' from {$mnethosts[$form->mnet_host_id]}"); + if ($form->access == 'allow') { + redirect('access_control.php', get_string('ssl_acl_allow','mnet', array($username, $mnethosts[$form->mnet_host_id]))); + } elseif ($form->access == 'deny') { + redirect('access_control.php', get_string('ssl_acl_deny','mnet', array($username, $mnethosts[$form->mnet_host_id]))); + } } } } - redirect('access_control.php', get_string('changessaved')); } + exit; } - +admin_externalpage_print_header($adminroot); // output the ACL table $columns = array("username", "mnet_host_id", "access", "delete"); @@ -173,7 +179,7 @@ print_simple_box_start('center','90%','','20'); ?>
- +