From: tjhunt Date: Tue, 31 Oct 2006 11:59:54 +0000 (+0000) Subject: Make the close_window function better. Merged from MOODLE_17_STABLE. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=dfa924cc99f45b1553ec6c5643d46a79e515df85;p=moodle.git Make the close_window function better. Merged from MOODLE_17_STABLE. --- diff --git a/lang/en_utf8/moodle.php b/lang/en_utf8/moodle.php index 2410252cc2..34896171aa 100644 --- a/lang/en_utf8/moodle.php +++ b/lang/en_utf8/moodle.php @@ -1047,6 +1047,7 @@ $string['periodending'] = 'Period ending ($a)'; $string['personalprofile'] = 'Personal profile'; $string['phone'] = 'Phone'; $string['phpinfo'] = 'PHP info'; +$string['pleaseclose'] = 'Please close this window now.'; $string['pluginsetup'] = 'Setting up plugin tables'; $string['policyagree'] = 'You must agree to this policy to continue using this site. Do you agree?'; $string['policyagreement'] = 'Site Policy Agreement'; diff --git a/lib/weblib.php b/lib/weblib.php index 7bc2efd220..01a50b53bf 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -690,15 +690,20 @@ function close_window_button($name='closewindow', $return=false) { * Try and close the current window immediately using Javascript */ function close_window($delay=0) { - echo ''."\n"; - exit; + setTimeout("close_this_window()", ); +--> + + +