MDL-39967 cron: eliminate browser sniffing.
authorDan Poltawski <dan@moodle.com>
Fri, 31 May 2013 07:09:22 +0000 (15:09 +0800)
committerDan Poltawski <dan@moodle.com>
Fri, 31 May 2013 07:09:22 +0000 (15:09 +0800)
This was an old hack to workaround a bug in IE6, no longer necessary

admin/cron.php

index cce8ae3..e411545 100644 (file)
@@ -72,24 +72,10 @@ if (!empty($CFG->cronremotepassword)) {
 }
 
 // send mime type and encoding
-if (check_browser_version('MSIE')) {
-    //ugly IE hack to work around downloading instead of viewing
-    @header('Content-Type: text/html; charset=utf-8');
-    echo "<xmp>"; //<pre> is not good enough for us here
-} else {
-    //send proper plaintext header
-    @header('Content-Type: text/plain; charset=utf-8');
-}
+@header('Content-Type: text/plain; charset=utf-8');
 
 // we do not want html markup in emulated CLI
 @ini_set('html_errors', 'off');
 
 // execute the cron
 cron_run();
-
-// finish the IE hack
-if (check_browser_version('MSIE')) {
-    echo "</xmp>";
-}
-
-