diff --git a/browser/components/places/content/controller.js b/browser/components/places/content/controller.js index 798ccfeeeea..d1af29bdc0e 100755 --- a/browser/components/places/content/controller.js +++ b/browser/components/places/content/controller.js @@ -278,21 +278,18 @@ PlacesController.prototype = { var nodes = this._view.getSelectionNodes(); var root = this._view.getResultNode(); - var bmFolderId = PlacesUtils.bookmarksMenuFolderId; - var ubFolderId = PlacesUtils.unfiledBookmarksFolderId; - var btFolderId = PlacesUtils.toolbarFolderId; - for (var i = 0; i < nodes.length; ++i) { // Disallow removing the view's root node if (nodes[i] == root) return false; - // Disallow removing the toolbar folder + // Disallow removing the toolbar, menu and unfiled-bookmarks folders + var nodeItemId = nodes[i].itemId; if (!aIsMoveCommand && - PlacesUtils.nodeIsFolder(nodes[i]) && - (nodes[i].itemId == btFolderId || - nodes[i].itemId == ubFolderId || - nodes[i].itemId == bmFolderId)) + PlacesUtils.nodeIsFolder(nodes[i]) && + (nodeItemId == PlacesUtils.toolbarFolderId || + nodeItemId == PlacesUtils.unfiledBookmarksFolderId || + nodeItemId == PlacesUtils.bookmarksMenuFolderId)) return false; // We don't call nodeIsReadOnly here, because nodeIsReadOnly means that