www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 7b902f0fd4d97e19d6c54d8e6308e219bc284fbb
parent 8ad3b513a1cde8712c6b914a533386eeebb76b9a
Author: Dan Stillman <dstillman@zotero.org>
Date:   Fri, 14 Oct 2011 02:43:12 +0000

Replace more E4X compound assignment operators with appendChild(), as in r10250


Diffstat:
Mchrome/content/zotero/xpcom/sync.js | 28+++++++++++-----------------
1 file changed, 11 insertions(+), 17 deletions(-)

diff --git a/chrome/content/zotero/xpcom/sync.js b/chrome/content/zotero/xpcom/sync.js @@ -1489,9 +1489,6 @@ Zotero.Sync.Server = new function () { Zotero.suppressUIUpdates = false; _updatesInProgress = false; - //Zotero.debug(xmlstr); - //throw('break'); - if (xmlstr === false) { Zotero.debug("Sync cancelled"); Zotero.DB.rollbackTransaction(); @@ -1506,6 +1503,11 @@ Zotero.Sync.Server = new function () { Zotero.debug(xmlstr); } + if (Zotero.Prefs.get('sync.debugBreak')) { + Zotero.debug('==============='); + throw ("break"); + } + if (!xmlstr) { Zotero.debug("Nothing to upload to server"); Zotero.Sync.Server.lastRemoteSyncTime = response.getAttribute('timestamp'); @@ -3273,15 +3275,7 @@ Zotero.Sync.Server.Data = new function() { if (_timeToYield()) yield true; - var xmlstr = Zotero.Sync.Server.Data.buildUploadXML(syncSession); - - if (Zotero.Prefs.get('sync.debugBreak')) { - Zotero.debug(xmlstr); - callback(false); - return; - } - - callback(xmlstr); + callback(Zotero.Sync.Server.Data.buildUploadXML(syncSession)); } @@ -3795,7 +3789,7 @@ Zotero.Sync.Server.Data = new function() { } var newField = <field>{_xmlize(item.fields[field])}</field>; newField.@name = field; - xml.field += newField; + xml.appendChild(newField); } // Deleted item flag @@ -3812,7 +3806,7 @@ Zotero.Sync.Server.Data = new function() { // Note if (item.primary.itemType == 'note') { var note = <note>{_xmlize(item.note)}</note>; - xml.note += note; + xml.appendChild(note); } // Attachment @@ -3837,7 +3831,7 @@ Zotero.Sync.Server.Data = new function() { } path = <path>{path}</path>; - xml.path += path; + xml.appendChild(path); // Include storage sync time and hash for imported files if (item.attachment.linkMode != Zotero.Attachments.LINK_MODE_LINKED_FILE) { @@ -3855,7 +3849,7 @@ Zotero.Sync.Server.Data = new function() { if (item.note) { var note = <note>{_xmlize(item.note)}</note>; - xml.note += note; + xml.appendChild(note); } } @@ -4316,7 +4310,7 @@ Zotero.Sync.Server.Data = new function() { if (condition.required) { conditionXML.@required = 1; } - xml.condition += conditionXML; + xml.appendChild(conditionXML); } }