diff --git a/repository/repository_callback.php b/repository/repository_callback.php index 83fb5e38e57..19cb9fa7aa3 100644 --- a/repository/repository_callback.php +++ b/repository/repository_callback.php @@ -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; + die($js); +} + $js =<<