Don't update attachment item date modified when syncing
This commit is contained in:
parent
1d799a0bbe
commit
5f6952c5bc
3 changed files with 8 additions and 12 deletions
|
@ -211,11 +211,8 @@ Zotero.Sync.Storage = new function () {
|
|||
|
||||
if (updateItem) {
|
||||
// Update item date modified so the new mod time will be synced
|
||||
var item = Zotero.Items.get(itemID);
|
||||
//var date = new Date(mtime * 1000);
|
||||
//item.setField('dateModified', Zotero.Date.dateToSQL(date, true));
|
||||
item.setField('dateModified', Zotero.DB.transactionDateTime);
|
||||
item.save();
|
||||
var sql = "UPDATE items SET clientDateModified=? WHERE itemID=?";
|
||||
Zotero.DB.query(sql, [Zotero.DB.transactionDateTime, itemID]);
|
||||
}
|
||||
|
||||
Zotero.DB.commitTransaction();
|
||||
|
@ -254,10 +251,9 @@ Zotero.Sync.Storage = new function () {
|
|||
Zotero.DB.valueQuery(sql, [hash, itemID]);
|
||||
|
||||
if (updateItem) {
|
||||
// Update item date modified so the new hash will be synced
|
||||
var item = Zotero.Items.get(itemID);
|
||||
item.setField('dateModified', Zotero.DB.transactionDateTime);
|
||||
item.save();
|
||||
// Update item date modified so the new mod time will be synced
|
||||
var sql = "UPDATE items SET clientDateModified=? WHERE itemID=?";
|
||||
Zotero.DB.query(sql, [Zotero.DB.transactionDateTime, itemID]);
|
||||
}
|
||||
|
||||
Zotero.DB.commitTransaction();
|
||||
|
|
|
@ -515,7 +515,7 @@ Zotero.Sync.Storage.Session.WebDAV.prototype._onUploadComplete = function (httpR
|
|||
Zotero.Sync.Storage.setSyncedModificationTime(item.id, mtime, true);
|
||||
|
||||
var hash = item.attachmentHash;
|
||||
Zotero.Sync.Storage.setSyncedHash(item.id, hash, true);
|
||||
Zotero.Sync.Storage.setSyncedHash(item.id, hash);
|
||||
|
||||
Zotero.DB.commitTransaction();
|
||||
|
||||
|
|
|
@ -633,12 +633,12 @@ Zotero.Sync.Storage.Session.ZFS.prototype._updateItemFileInfo = function (item)
|
|||
|
||||
// Store file mod time
|
||||
var mtime = item.attachmentModificationTime;
|
||||
Zotero.Sync.Storage.setSyncedModificationTime(item.id, mtime, false);
|
||||
Zotero.Sync.Storage.setSyncedModificationTime(item.id, mtime, true);
|
||||
|
||||
// Store file hash of individual files
|
||||
if (Zotero.Attachments.getNumFiles(item) == 1) {
|
||||
var hash = item.attachmentHash;
|
||||
Zotero.Sync.Storage.setSyncedHash(item.id, hash, true);
|
||||
Zotero.Sync.Storage.setSyncedHash(item.id, hash);
|
||||
}
|
||||
|
||||
Zotero.DB.commitTransaction();
|
||||
|
|
Loading…
Reference in a new issue