NOMDL MNet admin/mnet trivial code cleanups spotted during development

This commit is contained in:
David Mudrak 2010-07-12 15:03:03 +00:00
parent 908ca82aaa
commit e7c1d0211e
2 changed files with 17 additions and 13 deletions

View file

@ -36,7 +36,6 @@ require_login();
$context = get_context_instance(CONTEXT_SYSTEM);
require_capability('moodle/site:config', $context, $USER->id, true, 'nopermissions');
/// Initialize variables.
$hostid = optional_param('hostid', 0, PARAM_INT);
$updra = optional_param('updateregisterall', 0, PARAM_INT);
@ -71,12 +70,10 @@ if (!isset($CFG->mnet_dispatcher_mode)) {
set_config('mnet_dispatcher_mode', 'off');
}
$mnet_peer = new mnet_peer();
$simpleform = new mnet_simple_host_form(); // the one that goes on the bottom of the main page
$reviewform = null; // set up later in different code branches, so mnet_peer can be passed to the constructor
// if the first form has been submitted, bootstrap the peer and load up the review form
if ($formdata = $simpleform->get_data()) {
// ensure we remove trailing slashes
@ -168,7 +165,6 @@ if ($formdata = $reviewform->get_data()) {
$mnet_peer->public_key_expires = $mnet_peer->check_common_name($formdata->public_key);
$mnet_peer->updateparams->public_key_expires = $mnet_peer->check_common_name($formdata->public_key);
$credentials = $mnet_peer->check_credentials($mnet_peer->public_key);
$mnet_peer->public_key_expires = $credentials['validTo_time_t'];