rem: function nsLDAPPrefsService() { var arrayOfDirectories; var j = 0; try { gPrefInt = Components.classes["@mozilla.org/preferences-service;1"]; gPrefInt = gPrefInt.getService(nsIPrefBranch); } catch (ex) { dump("failed to get prefs service!\n"); return; } /* generate the list of directory servers from preferences */ var prefCount = {value:0}; try { arrayOfDirectories = this.getServerList(gPrefInt, prefCount); } catch (ex) { arrayOfDirectories = null; } if (arrayOfDirectories) { this.availDirectories = new Array(); var position; var description; var dirType; for (var i = 0; i < prefCount.value; i++) { if ((arrayOfDirectories[i] != "ldap_2.servers.pab") && (arrayOfDirectories[i] != "ldap_2.servers.history")) { try{ position = gPrefInt.getIntPref(arrayOfDirectories[i]+".position"); } catch(ex){ position = 1; } try{ dirType = gPrefInt.getIntPref(arrayOfDirectories[i]+".dirType"); } catch(ex){ dirType = 1; } if ((position != 0) && (dirType == 1)) { try{ description = gPrefInt.getComplexValue(arrayOfDirectories[i]+".description", Components.interfaces.nsISupportsString).data; } catch(ex){ description = null; } if (description) { this.availDirectories[j] = new Array(2); this.availDirectories[j][0] = arrayOfDirectories[i]; this.availDirectories[j][1] = description; j++; } } } } } this.migrate(); } 
add: function nsLDAPPrefsService() {} 
context: function nsLDAPPrefsService() {  var arrayOfDirectories;  var j = 0;  try {    gPrefInt = Components.classes["@mozilla.org/preferences-service;1"];    gPrefInt = gPrefInt.getService(nsIPrefBranch);  }  catch (ex) {    dump("failed to get prefs service!\n");    return;  }  /* generate the list of directory servers from preferences */  var prefCount = {value:0};  try {    arrayOfDirectories = this.getServerList(gPrefInt, prefCount);  }  catch (ex) {    arrayOfDirectories = null;  }  if (arrayOfDirectories) {    this.availDirectories = new Array();    var position;    var description;    var dirType;    for (var i = 0; i < prefCount.value; i++)    {      if ((arrayOfDirectories[i] != "ldap_2.servers.pab") &&        (arrayOfDirectories[i] != "ldap_2.servers.history")) {        try{          position = gPrefInt.getIntPref(arrayOfDirectories[i]+".position");        }        catch(ex){          position = 1;        }        try{          dirType = gPrefInt.getIntPref(arrayOfDirectories[i]+".dirType");        }        catch(ex){          dirType = 1;        }        if ((position != 0) && (dirType == 1)) {          try{            description = gPrefInt.getComplexValue(arrayOfDirectories[i]+".description",                                                   Components.interfaces.nsISupportsString).data;          }          catch(ex){            description = null;          }          if (description) {            this.availDirectories[j] = new Array(2);            this.availDirectories[j][0] = arrayOfDirectories[i];            this.availDirectories[j][1] = description;            j++;          }        }      }    }  }  this.migrate();}
meta: 5872	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5872/f8b71df26b7c3af9b9191643588b289aa198876e/nsLDAPPrefsService.js/buggy/mailnews/addrbook/src/nsLDAPPrefsService.js