Fix to stop processing queries on error
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
This commit is contained in:
parent
60be3d9510
commit
f33afab939
@ -252,10 +252,15 @@ class Import
|
||||
unset($sqlData['valid_full']);
|
||||
for ($i = 0; $i < $count; $i++) {
|
||||
$this->executeQuery($queries[$i], $fulls[$i], $sqlData);
|
||||
if ($GLOBALS['error']) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->executeQuery($import_run_buffer['sql'], $import_run_buffer['full'], $sqlData);
|
||||
if (! $GLOBALS['error']) {
|
||||
$this->executeQuery($import_run_buffer['sql'], $import_run_buffer['full'], $sqlData);
|
||||
}
|
||||
}
|
||||
} elseif (! empty($import_run_buffer['full'])) {
|
||||
if ($go_sql) {
|
||||
|
||||
@ -161,6 +161,10 @@ class ImportSql extends ImportPlugin
|
||||
$this->import->runQuery($statement, $statement, $sql_data);
|
||||
}
|
||||
|
||||
if ($GLOBALS['error']) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Finishing.
|
||||
$this->import->runQuery('', '', $sql_data);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user