Skip to content
Browse files

Allow mtrace to sleep to keep message on screen

  • Loading branch information...
1 parent b258c9a commit a2f8e0d40c81c3554fa6c43a09a04a78c7b59d9a fiedorow committed Feb 19, 2005
Showing with 6 additions and 1 deletion.
  1. +6 −1 lib/moodlelib.php
View
7 lib/moodlelib.php
@@ -5100,7 +5100,7 @@ function address_in_subnet($addr, $subnetstr) {
* @param string $eol ?
* @todo Finish documenting this function
*/
-function mtrace($string, $eol="\n") {
+function mtrace($string, $eol="\n", $sleep=0) {
if (defined('STDOUT')) {
fwrite(STDOUT, $string.$eol);
@@ -5109,6 +5109,11 @@ function mtrace($string, $eol="\n") {
}
flush();
+
+ //delay to keep message on user's screen in case of subsequent redirect
+ if ($sleep) {
+ sleep($sleep);
+ }
}
//Replace 1 or more slashes or backslashes to 1 slash

0 comments on commit a2f8e0d

Please sign in to comment.
Something went wrong with that request. Please try again.