forked from Wavyzz/dolibarr
Better error management on import web site with PHP
This commit is contained in:
@@ -328,7 +328,7 @@ function run_sql($sqlfile, $silent = 1, $entity = 0, $usesavepoint = 1, $handler
|
||||
$keyforsql = md5($sqlfile);
|
||||
foreach ($arraysql as $i => $sql) {
|
||||
if ($sql) {
|
||||
// Test if th SQL is allowed SQL
|
||||
// Test if the SQL is allowed SQL
|
||||
if ($onlysqltoimportwebsite) {
|
||||
$newsql = str_replace(array("\'"), '__BACKSLASHQUOTE__', $sql); // Replace the \' char
|
||||
|
||||
@@ -388,6 +388,7 @@ function run_sql($sqlfile, $silent = 1, $entity = 0, $usesavepoint = 1, $handler
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
if (!$qualified) {
|
||||
$error++;
|
||||
//print 'Request '.($i + 1)." contains non allowed instructions.<br>\n";
|
||||
|
||||
Reference in New Issue
Block a user