MDL-35238 Handle the update installation request - display the confirmation page
authorDavid Mudrák <david@moodle.com>
Sun, 7 Oct 2012 23:56:10 +0000 (01:56 +0200)
committerDavid Mudrák <david@moodle.com>
Thu, 8 Nov 2012 21:33:06 +0000 (22:33 +0100)
admin/index.php
admin/plugins.php

index d3ec395..ed33c00 100644 (file)
@@ -261,6 +261,18 @@ if ($version > $CFG->version) {  // upgrade
         }
 
         $output = $PAGE->get_renderer('core', 'admin');
+
+        $deployer = available_update_deployer::instance();
+        if ($deployer->enabled()) {
+            $deployer->initialize($reloadurl, $reloadurl);
+
+            $deploydata = $deployer->submitted_data();
+            if (!empty($deploydata)) {
+                echo $output->upgrade_plugin_confirm_deploy_page($deployer, $deploydata);
+                die();
+            }
+        }
+
         echo $output->upgrade_plugin_check_page(plugin_manager::instance(), available_update_checker::instance(),
                 $version, $showallplugins, $reloadurl,
                 new moodle_url('/admin/index.php', array('confirmupgrade'=>1, 'confirmrelease'=>1, 'confirmplugincheck'=>1)));
index 7b59cb1..4a99a29 100644 (file)
@@ -51,4 +51,17 @@ if ($fetchremote) {
 }
 
 $output = $PAGE->get_renderer('core', 'admin');
+
+$deployer = available_update_deployer::instance();
+if ($deployer->enabled()) {
+    $myurl = new moodle_url($PAGE->url, array('updatesonly' => $updatesonly, 'contribonly' => $contribonly));
+    $deployer->initialize($myurl, $myurl);
+
+    $deploydata = $deployer->submitted_data();
+    if (!empty($deploydata)) {
+        echo $output->upgrade_plugin_confirm_deploy_page($deployer, $deploydata);
+        die();
+    }
+}
+
 echo $output->plugin_management_page($pluginman, $checker, $options);