fix for bug #383762: "Sort by Name" doesn't work properly with non-ascii characters.patch=Pavel Cvrcek <bugs@jasnapaka.com>r=sspitzer

This commit is contained in:
sspitzer@mozilla.org 2007-06-12 08:24:44 -07:00
parent 7e12096096
commit ccb8b9955d

View File

@ -2222,12 +2222,7 @@ PlacesSortFolderByNameTransaction.prototype = {
items.push(item);
}
function sortItems(a, b) {
var atitle = a.title;
var btitle = b.title;
return (atitle == btitle) ? 0 : ((atitle < btitle) ? -1 : 1);
}
items.sort(sortItems);
items.sort(function (a, b) { return a.title.localeCompare(b.title); });
for (var i = 0; i < count; ++i)
this.bookmarks.setItemIndex(items[i].itemId, i);