MDL-55980 Scheduled tasks: Run individual scheduled tasks from web
This commit is contained in:
+6
-1
@@ -8735,8 +8735,13 @@ function address_in_subnet($addr, $subnetstr) {
|
||||
* This ensures any messages have time to display before redirect
|
||||
*/
|
||||
function mtrace($string, $eol="\n", $sleep=0) {
|
||||
global $CFG;
|
||||
|
||||
if (defined('STDOUT') && !PHPUNIT_TEST && !defined('BEHAT_TEST')) {
|
||||
if (isset($CFG->mtrace_wrapper) && function_exists($CFG->mtrace_wrapper)) {
|
||||
$fn = $CFG->mtrace_wrapper;
|
||||
$fn($string, $eol);
|
||||
return;
|
||||
} else if (defined('STDOUT') && !PHPUNIT_TEST && !defined('BEHAT_TEST')) {
|
||||
fwrite(STDOUT, $string.$eol);
|
||||
} else {
|
||||
echo $string . $eol;
|
||||
|
||||
Reference in New Issue
Block a user