зеркало из https://github.com/mozilla/pjs.git
Bug 425529 - Undo function does not work for deleted tags in the Library. r=dietrich.
This commit is contained in:
Родитель
e5f416cbbf
Коммит
3c0dda396a
|
@ -932,7 +932,19 @@ placesTagURITransaction.prototype = {
|
|||
|
||||
function placesUntagURITransaction(aURI, aTags) {
|
||||
this._uri = aURI;
|
||||
this._tags = aTags || PlacesUtils.tagging.getTagsForURI(this._uri, {});
|
||||
if (aTags) {
|
||||
// Within this transaction, we cannot rely on tags given by itemId
|
||||
// since the tag containers may be gone after we call untagURI.
|
||||
// Thus, we convert each tag given by its itemId to name.
|
||||
this._tags = aTags;
|
||||
for (var i=0; i < aTags.length; i++) {
|
||||
if (typeof(this._tags[i]) == "number")
|
||||
this._tags[i] = PlacesUtils.bookmarks.getItemTitle(this._tags[i]);
|
||||
}
|
||||
}
|
||||
else
|
||||
this._tags = PlacesUtils.tagging.getTagsForURI(this._uri, {});
|
||||
|
||||
this.redoTransaction = this.doTransaction;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче