Changeset 2084


Ignore:
Timestamp:
02/26/10 09:19:44 (14 years ago)
Author:
amuller
Message:

Ticket #926 - Melhorando o tratamento da sessão no Javascript

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.1/expressoMail1_2/js/main.js

    r2078 r2084  
    637637 
    638638        var handler_move_msgs = function(data){ 
     639                if (!verify_session(data)) 
     640                        return; 
    639641                if(typeof(data) == 'string') 
    640642                        if (data.match(/^(.*)TRYCREATE(.*)$/)){ 
     
    14411443                } 
    14421444        } 
    1443  
    1444     if (typeof(data) == 'object' && !data.success) 
     1445        // Its not good to verify session here beacuse the user is producing their text and can lose in redirection 
     1446        if (data == null) 
     1447                write_msg(get_lang("Connection failed with %1 Server. Try later.", "Web")); 
     1448        else 
     1449            if (typeof(data) == 'object' && !data.success) 
    14451450        { 
    14461451        connector = new  cConnector(); 
     
    14611466            Element('cert_applet').doButtonClickAction(operation, ID, data.body); 
    14621467        } 
    1463         else { 
     1468        else 
     1469        { 
    14641470                        alert(data.error); 
    1465                 } 
     1471        } 
    14661472 
    14671473                return; 
     
    22222228        if(data && data.imap_error) { 
    22232229                if(data.imap_error == "nosession") 
    2224                         write_msg(get_lang("your session could not be verified.")); 
     2230                        //write_msg(get_lang("your session could not be verified.")); 
     2231                        document.location = document.location+'/../../login.php?cd=10'; 
    22252232                else 
    22262233                        write_msg(data.imap_error); 
Note: See TracChangeset for help on using the changeset viewer.