]> git.mjollnir.org Git - moodle.git/commitdiff
Bug #6141 - Cron output is not plain text - <pre> and missing encoding, minor lang...
authorskodak <skodak>
Thu, 20 Jul 2006 06:36:33 +0000 (06:36 +0000)
committerskodak <skodak>
Thu, 20 Jul 2006 06:36:33 +0000 (06:36 +0000)
admin/cron.php

index 3b3d74b4e7745cf23730c52259a392c8c791dca6..485671a29193fcce83555add8e59c2f3ddbbd637 100644 (file)
     //unset test cookie, user must login again anyway
     setcookie('MoodleSessionTest'.$CFG->sessioncookie, '', time() - 3600, '/');
 
+/// switch to site language and locale
+       if (!empty($CFG->courselang)) {
+        unset ($CFG->courselang);
+       }
+    if (!empty($SESSION->lang)) {
+        unset ($SESSION->lang);
+    }
+    $USER->lang = '';
+    moodle_setlocale();
+
+/// send mime type and encoding
+    @header('Content-Type: text/plain; charset='.current_charset());
+
 /// Start output log
 
     $timenow  = time();
 
-    mtrace("<pre>");
     mtrace("Server Time: ".date('r',$timenow)."\n\n");
 
 /// Run all cron jobs for each module