Index: file.php
===================================================================
RCS file: /cvsroot/moodle/moodle/file.php,v
retrieving revision 1.46.2.4
diff -c -r1.46.2.4 file.php
*** file.php	10 Jul 2008 09:48:43 -0000	1.46.2.4
--- file.php	16 Aug 2008 19:32:19 -0000
***************
*** 28,33 ****
--- 28,38 ----
      disable_debugging();
  
      $relativepath = get_file_argument('file.php');
+     
+     // gratuitous hack
+     $qsparts = explode('?', $relativepath);
+     $relativepath = $qsparts[0];
+     
      $forcedownload = optional_param('forcedownload', 0, PARAM_BOOL);
      
      // relative path must start with '/', because of backup/restore!!!
