references #1062, Zotero RDF import/export problems with empty collections
fixed 3A here. the new behavior is to add all imported items to the top-level "Imported <DATE>" collection, but to place the top-level collection below if it has sub-collections
This commit is contained in:
parent
3b428f29ac
commit
7c48ca8e15
|
@ -1768,6 +1768,12 @@ Zotero.Translate.prototype._export = function() {
|
|||
if(this.configOptions.getCollections) {
|
||||
// get child collections
|
||||
this._collectionsLeft = Zotero.getCollections(this.collection.getID(), true);
|
||||
|
||||
if(this._collectionsLeft.length) {
|
||||
// only include parent collection if there are actually children
|
||||
this._collectionsLeft.unshift(this.collection);
|
||||
}
|
||||
|
||||
// get items in child collections
|
||||
for each(var collection in this._collectionsLeft) {
|
||||
this._itemsLeft = this._itemsLeft.concat(collection.getChildItems());
|
||||
|
|
Loading…
Reference in New Issue
Block a user