Merge branch 'wip-mdl-33664' of git://github.com/rajeshtaneja/moodle
authorDan Poltawski <dan@moodle.com>
Wed, 13 Jun 2012 02:07:32 +0000 (10:07 +0800)
committerDan Poltawski <dan@moodle.com>
Wed, 13 Jun 2012 02:07:32 +0000 (10:07 +0800)
admin/registration/index.php
course/publish/backup.php

index 4c841ae..42f1c07 100644 (file)
@@ -160,19 +160,19 @@ if (empty($cancel) and $unregistration and !$confirm) {
     $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));
index 61ab633..ef59eb8 100644 (file)
@@ -81,7 +81,7 @@ if ($backup->get_stage() !== backup_ui::STAGE_COMPLETE) {
         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();
 }