[Fusionforge-commits] r14805 - in branches/Branch_5_1: . src/www/pm

Roland Mas lolando at fusionforge.org
Wed Nov 16 15:39:42 CET 2011


Author: lolando
Date: 2011-11-16 15:39:41 +0100 (Wed, 16 Nov 2011)
New Revision: 14805

Modified:
   branches/Branch_5_1/
   branches/Branch_5_1/src/www/pm/postuploadcsv.php
Log:
Merged from Evolvis: fix more PHP errors

Modified: branches/Branch_5_1/src/www/pm/postuploadcsv.php
===================================================================
--- branches/Branch_5_1/src/www/pm/postuploadcsv.php	2011-11-16 14:39:35 UTC (rev 14804)
+++ branches/Branch_5_1/src/www/pm/postuploadcsv.php	2011-11-16 14:39:41 UTC (rev 14805)
@@ -43,7 +43,8 @@
 require_once $gfcommon.'pm/import_utils.php';
 
 $input_file = getUploadedFile('userfile');
-if (is_uploaded_file($input_file['tmp_name'])) {
+if (isset($input_file) && isset($input_file['tmp_name']) &&
+    is_uploaded_file($input_file['tmp_name'])) {
 	$handle = fopen($input_file['tmp_name'], 'r');
 	$tasks = array();
 	
@@ -106,8 +107,11 @@
 					'dependenton'=>$dependentOn,
 					'notes'=>$cols[11]);
 		}
+		$res=&pm_import_tasks($group_project_id, $tasks);
+
+	} else {
+		$res['errormessage'] = 'Parameter error';
 	}
-	$res=&pm_import_tasks($group_project_id, $tasks);
 	
 	if ($res['success']) {
 		$feedback .= 'Import Was Successful';




More information about the Fusionforge-commits mailing list