|
171 | 171 | } |
172 | 172 |
|
173 | 173 | if (isset($_GET['delimiter'])) { |
174 | | - // Reprocess the file using the selected delimiter |
175 | | - $_SESSION['import_field_delimiter'] = $_GET['delimiter']; |
176 | | - $_SESSION['import_attribute'] = []; |
| 174 | + if (is_string($_GET['delimiter']) && strlen($_GET['delimiter']) == 1) { |
| 175 | + // Reprocess the file using the selected delimiter |
| 176 | + $_SESSION['import_field_delimiter'] = $_GET['delimiter']; |
| 177 | + $_SESSION['import_attribute'] = []; |
| 178 | + } |
177 | 179 | unset($_GET['delimiter']); |
178 | 180 | } |
179 | 181 |
|
|
363 | 365 | $ls->addButton($GLOBALS['I18N']->get('Continue'), 'javascript:document.importform.submit()'); |
364 | 366 |
|
365 | 367 | if (count($headers) == 1) { |
| 368 | + echo '<div class="clearfix"></div><div class="note">'; |
366 | 369 | // try to identify the actual field delimiter from commonly-used values |
367 | 370 | if (preg_match('/([,;:|])/', $headers[0], $matches)) { |
368 | 371 | $delimiter = $matches[1]; |
369 | 372 | $warning = s( |
370 | | - "The file appears to be using '%s' as the field delimiter. Click Resubmit to use '%s' as the delimiter.", |
371 | | - $delimiter, |
| 373 | + "The file appears to be using '%s' as the field delimiter. Click Resubmit to use that delimiter.", |
372 | 374 | $delimiter |
373 | 375 | ); |
374 | 376 | $url = sprintf('import2&delimiter=%s', urlencode($delimiter)); |
|
377 | 379 | $warning = s('The entered field delimiter might not be correct.'); |
378 | 380 | printf('<p class="information">%s</p>', $warning); |
379 | 381 | } |
| 382 | + echo '</div>'; |
380 | 383 | } |
381 | 384 | echo '<p class="information">'.$GLOBALS['I18N']->get('Please identify the target of the following unknown columns').'</p>'; |
382 | 385 | echo '<form name="importform" method="post">'; |
|
0 commit comments