mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
MDL-59008 repository: add reload parent window support to callback
This commit is contained in:
parent
1ba1412fa3
commit
64c385a293
@ -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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user