make use of PMA_Message
This commit is contained in:
@@ -44,20 +44,20 @@ $csv_escaped = strtr($csv_escaped, $replacements);
|
||||
$csv_new_line = strtr($csv_new_line, $replacements);
|
||||
|
||||
if (strlen($csv_terminated) != 1) {
|
||||
$message = sprintf($strInvalidCSVParameter, $strFieldsTerminatedBy);
|
||||
$show_error_header = TRUE;
|
||||
$message = PMA_Message::error('strInvalidCSVParameter');
|
||||
$message->addParam('strFieldsTerminatedBy', false);
|
||||
$error = TRUE;
|
||||
} elseif (strlen($csv_enclosed) != 1) {
|
||||
$message = sprintf($strInvalidCSVParameter, $strFieldsEnclosedBy);
|
||||
$show_error_header = TRUE;
|
||||
$message = PMA_Message::error('strInvalidCSVParameter');
|
||||
$message->addParam('strFieldsEnclosedBy', false);
|
||||
$error = TRUE;
|
||||
} elseif (strlen($csv_escaped) != 1) {
|
||||
$message = sprintf($strInvalidCSVParameter, $strFieldsEscapedBy);
|
||||
$show_error_header = TRUE;
|
||||
$message = PMA_Message::error('strInvalidCSVParameter');
|
||||
$message->addParam('strFieldsEscapedBy', false);
|
||||
$error = TRUE;
|
||||
} elseif (strlen($csv_new_line) != 1 && $csv_new_line != 'auto') {
|
||||
$message = sprintf($strInvalidCSVParameter, $strLinesTerminatedBy);
|
||||
$show_error_header = TRUE;
|
||||
$message = PMA_Message::error('strInvalidCSVParameter');
|
||||
$message->addParam('strLinesTerminatedBy', false);
|
||||
$error = TRUE;
|
||||
}
|
||||
|
||||
@@ -93,8 +93,8 @@ if (empty($csv_columns)) {
|
||||
}
|
||||
}
|
||||
if (!$found) {
|
||||
$message = sprintf($strInvalidColumn, $val);
|
||||
$show_error_header = TRUE;
|
||||
$message = PMA_Message::error('strInvalidColumn');
|
||||
$message->addParam($val);
|
||||
$error = TRUE;
|
||||
break;
|
||||
}
|
||||
@@ -142,8 +142,8 @@ while (!($finished && $i >= $len) && !$error && !$timeout_passed) {
|
||||
while ($i < $len) {
|
||||
// Deadlock protection
|
||||
if ($lasti == $i && $lastlen == $len) {
|
||||
$message = sprintf($strInvalidCSVFormat, $line);
|
||||
$show_error_header = TRUE;
|
||||
$message = PMA_Message::error('strInvalidCSVFormat');
|
||||
$message->addParam($line);
|
||||
$error = TRUE;
|
||||
break;
|
||||
}
|
||||
@@ -262,8 +262,8 @@ while (!($finished && $i >= $len) && !$error && !$timeout_passed) {
|
||||
if ($values[count($values) - 1] == ';') {
|
||||
unset($values[count($values) - 1]);
|
||||
} else {
|
||||
$message = sprintf($strInvalidCSVFieldCount, $line);
|
||||
$show_error_header = TRUE;
|
||||
$message = PMA_Message::error('strInvalidCSVFieldCount');
|
||||
$message->addParam($line);
|
||||
$error = TRUE;
|
||||
break;
|
||||
}
|
||||
@@ -305,8 +305,8 @@ while (!($finished && $i >= $len) && !$error && !$timeout_passed) {
|
||||
PMA_importRunQuery();
|
||||
|
||||
if (count($values) != 0 && !$error) {
|
||||
$message = sprintf($strInvalidCSVFormat, $line);
|
||||
$show_error_header = TRUE;
|
||||
$message = PMA_Message::error('$strInvalidCSVFormat');
|
||||
$message->addParam($line);
|
||||
$error = TRUE;
|
||||
}
|
||||
?>
|
||||
|
@@ -48,8 +48,7 @@ if (isset($plugin_list)) {
|
||||
|
||||
if ($import_file == 'none' || $compression != 'none' || $charset_conversion) {
|
||||
// We handle only some kind of data!
|
||||
$message = $strInvalidLDIImport;
|
||||
$show_error_header = TRUE;
|
||||
$message = PMA_Message::error('strInvalidLDIImport');
|
||||
$error = TRUE;
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user