Bugfix: when importing a lot of users that already exists then the warning message may become too long to pass through a get parameter.

An alternative through a session has now been put in place
skala
Patrick Cool 16 years ago
parent 0df64be5fd
commit 030dfc9380
  1. 14
      main/admin/user_import.php
  2. 4
      main/admin/user_list.php

@ -335,6 +335,11 @@ if ($_POST['formSent'] AND $_FILES['import_file']['size'] !== 0) {
$error_message .= '</ul>';
}
// if the warning message is too long then we display the warning message trough a session
if (strlen($error_message) > 150){
$_SESSION['session_message_import_users'] = $error_message;
$error_message = 'session_message';
}
Security::clear_token();
$tok = Security::get_token();
@ -418,11 +423,6 @@ if ($count_fields > 0) {
</blockquote>
<?php
/*
==============================================================================
FOOTER
==============================================================================
*/
// footer
Display :: display_footer();
?>

@ -624,6 +624,10 @@ else
switch ($_GET['action']) {
case 'show_message' :
if (!empty($_GET['warn'])) {
// to prevent too long messages
if ($_GET['warn'] == 'session_message'){
$_GET['warn'] = $_SESSION['session_message_import_users'];
}
Display::display_warning_message(urldecode($_GET['warn']),false);
}
if (!empty($_GET['message'])) {

Loading…
Cancel
Save