From 6d452d44fd42ec6bfc336187bb044ebf4e062ff9 Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Thu, 22 Mar 2007 19:30:56 +0000 Subject: [PATCH] fix errors exporting directory hierarchy with Zotero RDF --- chrome/content/zotero/xpcom/translate.js | 8 +------- scrapers.sql | 8 ++++---- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/chrome/content/zotero/xpcom/translate.js b/chrome/content/zotero/xpcom/translate.js index 9206f36ad..8f551e7c2 100644 --- a/chrome/content/zotero/xpcom/translate.js +++ b/chrome/content/zotero/xpcom/translate.js @@ -1901,13 +1901,7 @@ Zotero.Translate.prototype._exportGetCollection = function() { if(this._collectionsLeft && this._collectionsLeft.length != 0) { var returnItem = this._collectionsLeft.shift(); - var collection = new Object(); - collection.id = returnItem.getID(); - collection.name = returnItem.getName(); - collection.type = "collection"; - collection.children = returnItem.toArray(); - - return collection; + return returnItem.toArray(); } } diff --git a/scrapers.sql b/scrapers.sql index ea8d18af5..c1e2342fd 100644 --- a/scrapers.sql +++ b/scrapers.sql @@ -1,4 +1,4 @@ --- 198 +-- 199 -- ***** BEGIN LICENSE BLOCK ***** -- @@ -22,7 +22,7 @@ -- Set the following timestamp to the most recent scraper update date -REPLACE INTO version VALUES ('repository', STRFTIME('%s', '2007-03-22 18:15:00')); +REPLACE INTO version VALUES ('repository', STRFTIME('%s', '2007-03-22 19:45:00')); REPLACE INTO translators VALUES ('96b9f483-c44d-5784-cdad-ce21b984fe01', '1.0.0b4.r1', '', '2007-03-21 15:26:54', '1', '100', '4', 'Amazon.com', 'Sean Takats', '^https?://(?:www\.)?amazon', 'function detectWeb(doc, url) { @@ -7750,7 +7750,7 @@ function doImport() { } }'); -REPLACE INTO translators VALUES ('14763d24-8ba0-45df-8f52-b8d1108e7ac9', '1.0.0b4.r1', '', '2007-03-22 15:55:00', 1, 25, 2, 'Zotero RDF', 'Simon Kornblith', 'rdf', +REPLACE INTO translators VALUES ('14763d24-8ba0-45df-8f52-b8d1108e7ac9', '1.0.0b4.r1', '', '2007-03-22 19:45:00', 1, 25, 2, 'Zotero RDF', 'Simon Kornblith', 'rdf', 'Zotero.configure("getCollections", true); Zotero.configure("dataMode", "rdf"); Zotero.addOption("exportNotes", true); @@ -7799,7 +7799,7 @@ function generateCollection(collection) { Zotero.RDF.addStatement(collectionResource, rdf+"type", n.z+"Collection", false); Zotero.RDF.addStatement(collectionResource, n.dc+"title", collection.name, true); - for each(var child in collection.children) { + for each(var child in collection.descendents) { // add child list items if(child.type == "collection") { Zotero.RDF.addStatement(collectionResource, n.dcterms+"hasPart", "#collection:"+child.id, false);