浏览代码

Fixed cosmetic issues in the CSV import (related to the recent changes)

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@1005 a333f486-631f-4898-b8df-5754b55c2be0
romainq 14 年之前
父节点
当前提交
bd2a846f77
共有 2 个文件被更改,包括 4 次插入4 次删除
  1. 2 2
      core/bulkchange.class.inc.php
  2. 2 2
      pages/csvimport.php

+ 2 - 2
core/bulkchange.class.inc.php

@@ -516,7 +516,7 @@ class BulkChange
 		{
 			$sErrors = implode(', ', $aErrors);
 			$aResult[$iRow]["__STATUS__"] = new RowStatus_Issue("Unexpected attribute value(s)");
-			return;
+			return $oTargetObj;
 		}
 	
 		// Check that any external key will have a value proposed
@@ -535,7 +535,7 @@ class BulkChange
 		{
 			$sMissingKeys = implode(', ', $aMissingKeys);
 			$aResult[$iRow]["__STATUS__"] = new RowStatus_Issue("Could not be created, due to missing external key(s): $sMissingKeys");
-			return;
+			return $oTargetObj;
 		}
 	
 		// Optionaly record the results

+ 2 - 2
pages/csvimport.php

@@ -596,13 +596,13 @@ try
 				$fErrorsPercentage = (100.0*$iErrors)/count($aRes);
 				if ($fErrorsPercentage >= utils::GetConfig()->Get('csv_import_errors_percentage'))
 				{
-					$sMessage = sprintf("%.0f %% of the loaded objects will be modified.", $fErrorsPercentage);
+					$sMessage = sprintf("%.0f %% of the loaded objects have errors and will be ignored.", $fErrorsPercentage);
 					$bShouldConfirm = true;
 				}
 				$fCreatedPercentage = (100.0*$iCreated)/count($aRes);
 				if ($fCreatedPercentage >= utils::GetConfig()->Get('csv_import_creations_percentage'))
 				{
-					$sMessage = sprintf("%.0f %% of the loaded objects will be modified.", $fCreatedPercentage);
+					$sMessage = sprintf("%.0f %% of the loaded objects will be created.", $fCreatedPercentage);
 					$bShouldConfirm = true;
 				}
 				$fModifiedPercentage = (100.0*$iModified)/count($aRes);