Changeset 4750 in subversion


Ignore:
Timestamp:
May 12, 2011 5:27:17 AM (2 years ago)
Author:
alec
Message:
  • Make some regexp faster
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/program/js/list.js

    r4732 r4750  
    102102{ 
    103103  // make references in internal array and set event handlers 
    104   if (row && String(row.id).match(/rcmrow([a-z0-9\-_=\+\/]+)/i)) { 
     104  if (row && String(row.id).match(/^rcmrow([a-z0-9\-_=\+\/]+)/i)) { 
    105105    var self = this, 
    106106      uid = RegExp.$1; 
     
    602602 
    603603    for (i=0, len=rows.length-1; i<len; i++) 
    604       if (rows[i].id && String(rows[i].id).match(/rcmrow([a-z0-9\-_=\+\/]+)/i) && this.rows[RegExp.$1] != null) 
     604      if (rows[i].id && String(rows[i].id).match(/^rcmrow([a-z0-9\-_=\+\/]+)/i) && this.rows[RegExp.$1] != null) 
    605605            return RegExp.$1; 
    606606  } 
     
    615615 
    616616    for (i=rows.length-1; i>=0; i--) 
    617       if (rows[i].id && String(rows[i].id).match(/rcmrow([a-z0-9\-_=\+\/]+)/i) && this.rows[RegExp.$1] != null) 
     617      if (rows[i].id && String(rows[i].id).match(/^rcmrow([a-z0-9\-_=\+\/]+)/i) && this.rows[RegExp.$1] != null) 
    618618        return RegExp.$1; 
    619619  } 
Note: See TracChangeset for help on using the changeset viewer.