diff --git a/chrome/content/zotero/xpcom/rdf/identity.js b/chrome/content/zotero/xpcom/rdf/identity.js index 66c3dd77f..454ffdd22 100644 --- a/chrome/content/zotero/xpcom/rdf/identity.js +++ b/chrome/content/zotero/xpcom/rdf/identity.js @@ -202,7 +202,7 @@ We replace the bigger with the smaller. moveIndex(this.classActions); moveIndex(this.propertyActions); - tabulator.log.debug("Equate done. "+big+" now links to "+small) + $rdf.log.debug("Equate done. "+big+" now links to "+small) return true; // true means the statement does not need to be put in }; @@ -250,9 +250,7 @@ We replace the bigger with the smaller. return new $rdf.Literal(val); // @@ differet types if(typeof val == 'boolean') return new $rdf.Literal(val ? "1" : "0", undefined, $rdf.Symbol.prototype.XSDboolean); - else if(typeof val == 'number') - return new $rdf.Literal('' + val); // @@ datatypes - else if(typeof val == 'undefined') + if(typeof val == 'undefined') return undefined; else // @@ add converting of dates and numbers throw "Can't make Term from " + val + " of type " + typeof val; @@ -390,12 +388,11 @@ We replace the bigger with the smaller. break; } } - if(st != null) results.push(st); - } - - if(justOne) { - if(results.length > 1) - results = results.slice(0, 1); + if(st != null) { + results.push(st); + if(justOne) + break; + } } return results; }; // statementsMatching diff --git a/chrome/content/zotero/xpcom/rdf/init.js b/chrome/content/zotero/xpcom/rdf/init.js index fc310ec7f..1a5ca0ccc 100644 --- a/chrome/content/zotero/xpcom/rdf/init.js +++ b/chrome/content/zotero/xpcom/rdf/init.js @@ -19,7 +19,11 @@ var $rdf = { } throw "RDFArrayRemove: Array did not contain " + x; }, - } + }, + log: { + debug: Zotero.debug, + warn: Zotero.debug + } }; if(Zotero.RDF) { @@ -28,11 +32,5 @@ if(Zotero.RDF) { Zotero.RDF = {AJAW:$rdf}; } -var tabulator = { - log: { - debug: Zotero.debug, - warn: Zotero.debug - } -}; - -var alert = Zotero.debug; \ No newline at end of file +var tabulator = {log: $rdf.log}; +var alert = $rdf.log.warn; \ No newline at end of file diff --git a/chrome/content/zotero/xpcom/translation/translate.js b/chrome/content/zotero/xpcom/translation/translate.js index a12c9e63b..e3e4e9b6d 100644 --- a/chrome/content/zotero/xpcom/translation/translate.js +++ b/chrome/content/zotero/xpcom/translation/translate.js @@ -2285,7 +2285,8 @@ Zotero.Translate.IO._RDFSandbox.prototype = { "getArcsOut":"r", "getSources":"r", "getTargets":"r", - "getStatementsMatching":"r" + "getStatementsMatching":"r", + "serialize":"r" }, /**