Changeset 4579 in subversion


Ignore:
Timestamp:
Feb 28, 2011 4:21:46 AM (2 years ago)
Author:
thomasb
Message:

Workaround for IE not sending referer with location.href (#1487806)

Location:
trunk/roundcubemail
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/CHANGELOG

    r4577 r4579  
    22=========================== 
    33 
     4- Force IE to send referers (#1487806) 
    45- Fixed de_CH Localization bugs (#1487773) 
    56- Better display of vcard import results (#1485457) 
  • trunk/roundcubemail/program/js/app.js

    r4574 r4579  
    18521852        (this.is_framed() ? parent.rcmail : this).env.frame_lock = this.set_busy(true, 'loading'); 
    18531853      } 
    1854       target.location.href = this.env.comm_path+url; 
     1854      this.location_href(this.env.comm_path+url, target); 
    18551855 
    18561856      // mark as read and change mbox unread counter 
     
    19741974    if (mbox) { 
    19751975      this.set_busy(true, 'loading'); 
    1976       target.location.href = this.env.comm_path+'&_mbox='+urlencode(mbox)+(page ? '&_page='+page : '')+url; 
     1976      this.location_href(this.env.comm_path+'&_mbox='+urlencode(mbox)+(page ? '&_page='+page : '')+url, target); 
    19771977    } 
    19781978  }; 
     
    36673667 
    36683668    this.set_busy(true, 'loading'); 
    3669     target.location.href = this.env.comm_path + (src ? '&_source='+urlencode(src) : '') + add_url; 
     3669    this.location_href(this.env.comm_path + (src ? '&_source='+urlencode(src) : '') + add_url, target); 
    36703670  }; 
    36713671 
     
    37133713 
    37143714      this.set_busy(true); 
    3715       target.location.href = this.env.comm_path+'&_action='+action+'&_source='+urlencode(this.env.source)+'&_cid='+urlencode(cid) + add_url; 
     3715      this.location_href(this.env.comm_path+'&_action='+action+'&_source='+urlencode(this.env.source)+'&_cid='+urlencode(cid) + add_url, target); 
    37163716    } 
    37173717    return true; 
     
    41884188        target = window.frames[this.env.contentframe]; 
    41894189      } 
    4190       target.location.href = this.env.comm_path+'&_action=edit-prefs&_section='+id+add_url; 
     4190      this.location_href(this.env.comm_path+'&_action=edit-prefs&_section='+id+add_url, target); 
    41914191    } 
    41924192 
     
    42174217    if (action && (id || action=='add-identity')) { 
    42184218      this.set_busy(true); 
    4219       target.location.href = this.env.comm_path+'&_action='+action+'&_iid='+id+add_url; 
     4219      this.location_href(this.env.comm_path+'&_action='+action+'&_iid='+id+add_url, target); 
    42204220    } 
    42214221 
     
    44824482        (parent.rcmail ? parent.rcmail : this).env.frame_lock = this.set_busy(true, 'loading'); 
    44834483      } 
    4484       target.location.href = this.env.comm_path+url; 
     4484      this.location_href(this.env.comm_path+url, target); 
    44854485    } 
    44864486  }; 
     
    51865186      this.set_busy(true); 
    51875187 
    5188     if (this.env.framed && window.parent) 
    5189       parent.location.href = url; 
     5188    if (this.is_framed()) 
     5189      parent.redirect(url, lock); 
    51905190    else 
    5191       location.href = url; 
     5191      this.location_href(url, window); 
    51925192  }; 
    51935193 
     
    51955195  { 
    51965196    this.redirect(this.url(action, query)); 
     5197  }; 
     5198 
     5199  this.location_href = function(url, target) 
     5200  { 
     5201    // simulate real link click to force IE to send referer header 
     5202    if (bw.ie && target == window) 
     5203      $('<a>').attr('href', url).appendTo(document.body).get(0).click(); 
     5204    else 
     5205      target.location.href = url; 
    51975206  }; 
    51985207 
Note: See TracChangeset for help on using the changeset viewer.