From db200fe4d6158b23e5a8861d8c17faf3a0dc90a2 Mon Sep 17 00:00:00 2001
From: satish <satish.dvnk@vtiger.com>
Date: Wed, 14 Jun 2017 11:27:06 +0530
Subject: [PATCH] Fixes #588 - vt7.0.1 CSV Import no longer works

---
 include/database/PearDatabase.php | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/include/database/PearDatabase.php b/include/database/PearDatabase.php
index 6e590733d..218429d7b 100644
--- a/include/database/PearDatabase.php
+++ b/include/database/PearDatabase.php
@@ -810,6 +810,16 @@ class PearDatabase{
 		if ($this->database->clientFlags == 0 && isset($dbconfigoption['clientFlags'])) {
 			$this->database->clientFlags = $dbconfigoption['clientFlags'];
 		}
+
+		if ($this->dbType == 'mysqli') {
+			$optionFlags = array();
+			if ($this->database->optionFlags) {
+				$optionFlags = $this->database->optionFlags;
+			}
+
+			$optionFlags = array_merge($optionFlags, array(array(MYSQLI_OPT_LOCAL_INFILE, true)));
+			$this->database->optionFlags = $optionFlags;
+		}
 		// End
 
 		$result = $this->database->PConnect($this->dbHostName, $this->userName, $this->userPassword, $this->dbName);
-- 
GitLab