Bug 405237 - "deleting "Unfiled Bookmarks" or "bookmarks menu" folders breaks places organizer (should be undeletable)" (Trailing spaces fix) [p=mak77@supereva.it (Marco Bonardo [MaK77]) r=Mano a=blocking1.9+ P1 for M10]

This commit is contained in:
reed@reedloden.com 2007-12-06 15:05:06 -08:00
parent d5d4ab9daa
commit 58638809df

View File

@ -279,15 +279,15 @@ PlacesController.prototype = {
var root = this._view.getResultNode();
for (var i = 0; i < nodes.length; ++i) {
// Disallow removing the view's root node
// Disallow removing the view's root node
if (nodes[i] == root)
return false;
// Disallow removing the toolbar, menu and unfiled-bookmarks folders
// Disallow removing the toolbar, menu and unfiled-bookmarks folders
var nodeItemId = nodes[i].itemId;
if (!aIsMoveCommand &&
PlacesUtils.nodeIsFolder(nodes[i]) &&
(nodeItemId == PlacesUtils.toolbarFolderId ||
PlacesUtils.nodeIsFolder(nodes[i]) &&
(nodeItemId == PlacesUtils.toolbarFolderId ||
nodeItemId == PlacesUtils.unfiledBookmarksFolderId ||
nodeItemId == PlacesUtils.bookmarksMenuFolderId))
return false;