MDL-59008 repository: add reload parent window support to callback

This commit is contained in:
Simey Lameze
2017-07-03 13:45:41 +08:00
parent 4f2c5e18c0
commit 550e03463b
+17
View File
@@ -69,6 +69,23 @@ $repo->callback();
// manually.
$strhttpsbug = json_encode(get_string('cannotaccessparentwin', 'repository'));
$strrefreshnonjs = get_string('refreshnonjsfilepicker', 'repository');
$reloadparent = optional_param('reloadparent', false, PARAM_BOOL);
// If this request is coming from a popup, close window and reload parent window.
if ($reloadparent == true) {
$js = <<<EOD
<html>
<head>
<script type="text/javascript">
window.opener.location.reload();
window.close();
</script>
</head>
<body></body>
</html>
EOD;
die($js);
}
$js =<<<EOD
<html>
<head>