Moderators: jmacgreg, michael, John, vgabler
Index: admin/include/fileupload.php
===================================================================
RCS file: /cvs/ojs/admin/include/fileupload.php,v
retrieving revision 1.37
diff -u -r1.37 fileupload.php
--- a/admin/include/fileupload.php 17 Feb 2004 03:29:41 -0000 1.37
+++ b/admin/include/fileupload.php 14 Apr 2004 17:42:28 -0000
@@ -52,6 +52,10 @@
$filename = $chLongID.".".$fileext;
}
+ if (preg_match("/(.*)\.php[^\.]*$/", $filename, $matches)) {
+ $filename = $matches[1] . ".txt";
+ }
+
// set new directory
$filedir = $filepath.$chDirectory;
if(!file_exists($filedir)) { mkdir($filedir, 0755); }
@@ -94,6 +98,10 @@
$filename = $chLongID.".".$fileext;
}
+ if (preg_match("/(.*)\.php[^\.]*$/", $filename, $matches)) {
+ $filename = $matches[1] . ".txt";
+ }
+
// move the uploaded file, making the destination directory if necessary
$filedir = $filepath.$chDirectory;
if(!file_exists($filedir)) { mkdir($filedir, 0755); }
Return to OJS Editorial Support and Discussion
Users browsing this forum: Google [Bot] and 2 guests