From bf40f95d857389dfbf5a2c2cc69fedd3fa8cc110 Mon Sep 17 00:00:00 2001
From: Laurent Destailleur <eldy@users.sourceforge.net>
Date: Fri, 5 Sep 2008 23:50:18 +0000
Subject: [PATCH] Install process use Mysql files whatever is database handler
 choosed.

---
 htdocs/install/etape2.php | 19 +++++++------------
 1 file changed, 7 insertions(+), 12 deletions(-)

diff --git a/htdocs/install/etape2.php b/htdocs/install/etape2.php
index 6e412d1ae66..b1faebb29b5 100644
--- a/htdocs/install/etape2.php
+++ b/htdocs/install/etape2.php
@@ -141,7 +141,12 @@ if ($_POST["action"] == "set")
                         $buf = fgets($fp, 4096);
                         if (substr($buf, 0, 2) <> '--')
                         {
-                            $buffer .= $buf;
+							if ($choix != 1)	// All databases except Mysql
+							{
+								$buf=$db->convertSQLFromMysql($buf);
+							}
+                        	
+                        	$buffer .= $buf;
                         }
                     }
                     fclose($fp);
@@ -154,17 +159,7 @@ if ($_POST["action"] == "set")
 						$buffer=utf8_encode ($buffer);
 					}
 					
-					if ($choix == 1)	// If database is Mysql 
-					{
-						dolibarr_install_syslog("Request: ".$buffer,LOG_DEBUG);
-					}
-					else	// All databases except Mysql
-					{
-						dolibarr_install_syslog("Request (mysql syntax): ".$buffer,LOG_DEBUG);
-						$buffer=$db->convertSQLFromMysql($buffer);
-						dolibarr_install_syslog("Request (converted): ".$buffer,LOG_DEBUG);
-					}
-					
+					dolibarr_install_syslog("Request: ".$buffer,LOG_DEBUG);
 					if ($db->query($buffer))
 	                {
 	                   // print "<td>OK requete ==== $buffer</td></tr>";
-- 
GitLab