Juan Carlos Raña 15 years ago
parent
commit
79f06f55f2
3 changed files with 10 additions and 5 deletions
  1. 6 5
      archive/.htaccess
  2. 4 0
      main/admin/user_list.php
  3. 0 0
      main/announcements/announcements.inc.php

+ 6 - 5
archive/.htaccess

@@ -360,6 +360,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';
+	}
 	header('Location: user_list.php?action=show_message&message='.urlencode($see_message_import).'&warn='.urlencode($error_message).'&sec_token='.$tok);
 	exit ();
 }
@@ -448,9 +453,5 @@ if ($count_fields > 0) {
 </blockquote>
 
 <?php
-/*
-==============================================================================
-		FOOTER
-==============================================================================
-*/
 Display :: display_footer();
+?>

+ 4 - 0
main/admin/user_list.php

@@ -631,6 +631,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'])) {

+ 0 - 0
main/announcements/announcements.inc.php