]> git.mjollnir.org Git - moodle.git/commitdiff
Remove possible path disclosure and add a translatable error message
authormoodler <moodler>
Wed, 18 Aug 2004 05:47:55 +0000 (05:47 +0000)
committermoodler <moodler>
Wed, 18 Aug 2004 05:47:55 +0000 (05:47 +0000)
file.php
lang/en/error.php

index f5c7d622c55ae8a64265a882cc66c0168950d42d..466b9f0ef489575d30921b3113c98b8fef23c9ac 100644 (file)
--- a/file.php
+++ b/file.php
@@ -91,8 +91,7 @@
             }
         }
     } else {
-        error("Sorry, but the file you are looking for was not found ($pathname)", 
-              "$CFG->wwwroot/course/view.php?id=$courseid");
+        error(get_string("filenotfound", "error"), "$CFG->wwwroot/course/view.php?id=$courseid");
     }
 
     exit;
index 3f0c9ba33d16c7d2a37b8dced52c917d5979c2cf..388f4fc29c8a06f14cec9c569e8fa10d68cdfdc6 100755 (executable)
@@ -4,6 +4,7 @@
 $string['coursegroupunknown'] = 'Course corresponding to group $a not specified';
 $string['erroronline'] = 'Error on line $a';
 $string['fieldrequired'] = '\"$a\" is a required field';
+$string['filenotfound'] = 'Sorry, the requested file could not be found';
 $string['groupalready'] = 'User already belongs to group $a';
 $string['groupunknown'] = 'Group $a not associated to specified course';
 $string['invalidfieldname'] = '\"$a\" is not a valid field name';