You've already forked phpmyadmin
mirror of
https://github.com/phpmyadmin/phpmyadmin.git
synced 2026-10-29 21:24:44 +03:00
Properly set global message
This commit is contained in:
@@ -97,7 +97,7 @@ class ImportLdi extends AbstractImportCsv
|
||||
*/
|
||||
public function doImport()
|
||||
{
|
||||
global $finished, $error, $import_file, $compression, $charset_conversion, $table;
|
||||
global $finished, $import_file, $compression, $charset_conversion, $table;
|
||||
global $ldi_local_option, $ldi_replace, $ldi_ignore, $ldi_terminated, $ldi_enclosed,
|
||||
$ldi_escaped, $ldi_new_line, $skip_queries, $ldi_columns;
|
||||
|
||||
@@ -106,10 +106,10 @@ class ImportLdi extends AbstractImportCsv
|
||||
|| $charset_conversion
|
||||
) {
|
||||
// We handle only some kind of data!
|
||||
$message = PMA_Message::error(
|
||||
$GLOBALS['message'] = PMA_Message::error(
|
||||
__('This plugin does not support compressed imports!')
|
||||
);
|
||||
$error = true;
|
||||
$GLOBALS['error'] = true;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -167,21 +167,21 @@ class ImportOds extends ImportPlugin
|
||||
|
||||
if ($xml === false) {
|
||||
$sheets = array();
|
||||
$message = PMA_Message::error(
|
||||
$GLOBALS['message'] = PMA_Message::error(
|
||||
__(
|
||||
'The XML file specified was either malformed or incomplete.'
|
||||
. ' Please correct the issue and try again.'
|
||||
)
|
||||
);
|
||||
$error = true;
|
||||
$GLOBALS['error'] = true;
|
||||
} else {
|
||||
$root = $xml->children('office', true)->{'body'}->{'spreadsheet'};
|
||||
if (empty($root)) {
|
||||
$sheets = array();
|
||||
$message = PMA_Message::error(
|
||||
$GLOBALS['message'] = PMA_Message::error(
|
||||
__('Could not parse OpenDocument Spreadsheet!')
|
||||
);
|
||||
$error = true;
|
||||
$GLOBALS['error'] = true;
|
||||
} else {
|
||||
$sheets = $root->children('table', true);
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ class ImportShp extends ImportPlugin
|
||||
public function doImport()
|
||||
{
|
||||
global $db, $error, $finished, $compression,
|
||||
$import_file, $local_import_file;
|
||||
$import_file, $local_import_file, $message;
|
||||
|
||||
if ((int) ini_get('memory_limit') < 512) {
|
||||
@ini_set('memory_limit', '512M');
|
||||
@@ -87,9 +87,6 @@ class ImportShp extends ImportPlugin
|
||||
@set_time_limit(300);
|
||||
|
||||
$GLOBALS['finished'] = false;
|
||||
$buffer = '';
|
||||
$eof = false;
|
||||
|
||||
|
||||
$shp = new PMA_ShapeFile(1);
|
||||
// If the zip archive has more than one file,
|
||||
@@ -339,4 +336,4 @@ class ImportShp extends ImportPlugin
|
||||
$buffer = substr($buffer, $length);
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user