Permalink
Browse files

MDL-33664 Hub: required renderer is passed to backup->display and hub…

…url is initalised before use.
  • Loading branch information...
Rajesh Taneja
Rajesh Taneja committed Jun 12, 2012
1 parent f8dfdb5 commit b0fc12189bb703c8d03993811e7ea7ffaba3ddbb
Showing with 7 additions and 7 deletions.
  1. +6 −6 admin/registration/index.php
  2. +1 −1 course/publish/backup.php
@@ -160,19 +160,19 @@
$selectedhuburl = optional_param('publichub', false, PARAM_URL);
$unlistedhuburl = optional_param('unlistedurl', false, PARAM_TEXT);
$password = optional_param('password', '', PARAM_RAW);
-
+ $registeringhuburl = null;
if (!empty($unlistedhuburl)) {
if (clean_param($unlistedhuburl, PARAM_URL) !== '') {
- $huburl = $unlistedhuburl;
+ $registeringhuburl = $unlistedhuburl;
}
} else if (!empty($selectedhuburl)) {
- $huburl = $selectedhuburl;
+ $registeringhuburl = $selectedhuburl;
}
// a hub has been selected, redirect to the hub registration page
- if (empty($cancel) and !empty($huburl) and confirm_sesskey()) {
- $hubname = optional_param(clean_param($huburl, PARAM_ALPHANUMEXT), '', PARAM_TEXT);
- $params = array('sesskey' => sesskey(), 'huburl' => $huburl,
+ if (empty($cancel) and !empty($registeringhuburl) and confirm_sesskey()) {
+ $hubname = optional_param(clean_param($registeringhuburl, PARAM_ALPHANUMEXT), '', PARAM_TEXT);
+ $params = array('sesskey' => sesskey(), 'huburl' => $registeringhuburl,
'password' => $password, 'hubname' => $hubname);
redirect(new moodle_url($CFG->wwwroot . "/" . $CFG->admin . "/registration/register.php",
$params));
@@ -81,7 +81,7 @@
echo $renderer->dependency_notification(get_string('dependenciesenforced', 'backup'));
}
echo $renderer->progress_bar($backup->get_progress_bar());
- echo $backup->display();
+ echo $backup->display($renderer);
echo $OUTPUT->footer();
die();
}

0 comments on commit b0fc121

Please sign in to comment.