]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-16007 remoevd dontdie param from sent_temp_file()
authorskodak <skodak>
Tue, 12 Aug 2008 15:09:46 +0000 (15:09 +0000)
committerskodak <skodak>
Tue, 12 Aug 2008 15:09:46 +0000 (15:09 +0000)
lib/filelib.php

index b6b5921490a0eb50ec1d9df518fbfe4235667fb4..2340d6f9d23cf8e4683c0370cbf0e0e3d4f55c20 100644 (file)
@@ -567,24 +567,18 @@ function get_mimetype_description($mimetype,$capitalise=false) {
  * @param string $path path to file, preferably from moodledata/temp/something; or content of file itself
  * @param string $filename proposed file name when saving file
  * @param bool $path is content of file
- * @param bool $dontdie - return control to caller afterwards. this is not recommended and only used for cleanup tasks.
- *                        if this is passed as true, ignore_user_abort is called.  if you don't want your processing to continue on cancel,
- *                        you must detect this case when control is returned using connection_aborted.
+ * @return does not return, script terminated
  */
-function send_temp_file($path, $filename, $pathisstring=false, $dontdie=false) {
+function send_temp_file($path, $filename, $pathisstring=false) {
     global $CFG;
 
-    if ($dontdie) {
-        ignore_user_abort();
-    }
-
     // close session - not needed anymore
     @session_write_close();
 
     if (!$pathisstring) {
         if (!file_exists($path)) {
             header('HTTP/1.0 404 not found');
-            error(get_string('filenotfound', 'error'), $CFG->wwwroot.'/');
+            print_error('filenotfound', 'error', $CFG->wwwroot.'/');
         }
         // executed after normal finish or abort
         @register_shutdown_function('send_temp_file_finished', $path);
@@ -622,9 +616,6 @@ function send_temp_file($path, $filename, $pathisstring=false, $dontdie=false) {
         readfile_chunked($path);
     }
 
-    if ($dontdie) {
-        return;
-    }
     die; //no more chars to output
 }