[Fusionforge-commits] r9526 - in trunk/gforge/www/docman: . admin

Alain Peyrat aljeux at libremir.placard.fr.eu.org
Mon Apr 19 20:03:46 CEST 2010


Author: aljeux
Date: 2010-04-19 20:03:46 +0200 (Mon, 19 Apr 2010)
New Revision: 9526

Modified:
   trunk/gforge/www/docman/admin/index.php
   trunk/gforge/www/docman/new.php
Log:
Removed no longer needed addslashes() in docman.

Modified: trunk/gforge/www/docman/admin/index.php
===================================================================
--- trunk/gforge/www/docman/admin/index.php	2010-04-19 18:02:42 UTC (rev 9525)
+++ trunk/gforge/www/docman/admin/index.php	2010-04-19 18:03:46 UTC (rev 9526)
@@ -95,7 +95,7 @@
 			if (!is_uploaded_file($uploaded_data['tmp_name'])) {
 				exit_error(_('Error'),sprintf(_('Invalid file attack attempt %1$s'), $uploaded_data['name']));
 			}
-			$data = addslashes(fread(fopen($uploaded_data['tmp_name'], 'r'), $uploaded_data['size']));
+			$data = fread(fopen($uploaded_data['tmp_name'], 'r'), $uploaded_data['size']);
 			$filename=$uploaded_data['name'];
 			$filetype=$uploaded_data['type'];
 		} elseif ($file_url) {
@@ -105,12 +105,12 @@
 		/*
 		} elseif ($sys_use_ftpuploads && $ftp_filename!=100) { //100==None
 			$filename=$upload_dir.'/'.$ftp_filename;
-			$data = addslashes(fread(fopen($filename, 'r'), filesize($filename)));
+			$data = fread(fopen($filename, 'r'), filesize($filename));
 			$filetype=$uploaded_data_type;
 		*/
 		} else {
-			$filename=addslashes($d->getFileName());
-			$filetype=addslashes($d->getFileType());
+			$filename=$d->getFileName();
+			$filetype=$d->getFileType();
 		}
 		if (!$d->update($filename,$filetype,$data,$doc_group,$title,$language_id,$description,$stateid)) {
 			exit_error('Error',$d->getErrorMessage());

Modified: trunk/gforge/www/docman/new.php
===================================================================
--- trunk/gforge/www/docman/new.php	2010-04-19 18:02:42 UTC (rev 9525)
+++ trunk/gforge/www/docman/new.php	2010-04-19 18:03:46 UTC (rev 9526)
@@ -88,7 +88,7 @@
 			if (!is_uploaded_file($uploaded_data['tmp_name'])) {			
 				exit_error(_('Error'),_('Invalid file name.'));
 			}
-			$data = addslashes(fread(fopen($uploaded_data['tmp_name'], 'r'), $uploaded_data['size']));
+			$data = fread(fopen($uploaded_data['tmp_name'], 'r'), $uploaded_data['size']);
 			$file_url='';
 			$uploaded_data_name=$uploaded_data['name'];
 			$uploaded_data_type=$uploaded_data['type'];
@@ -97,7 +97,7 @@
 		/*
 		case 'ftpupload' : {	
 			$uploaded_data_name=$upload_dir.'/'.$ftp_filename;
-			$data = addslashes(fread(fopen($uploaded_data_name, 'r'), filesize($uploaded_data_name)));
+			$data = fread(fopen($uploaded_data_name, 'r'), filesize($uploaded_data_name));
 		}
 		*/
 	}




More information about the Fusionforge-commits mailing list