Order by clientDateModified DESC when getting content to upload

This way content from newly added/modified items will get uploaded
before content from older items.
This commit is contained in:
Dan Stillman 2013-11-04 04:36:39 -05:00
parent a89388e77a
commit 0c3529170f

View file

@ -591,7 +591,8 @@ Zotero.Fulltext = new function(){
var chars = 0;
var contentItems = [];
var sql = "SELECT itemID, indexedChars, totalChars, indexedPages, totalPages "
+ "FROM fulltextItems WHERE synced=" + SYNC_STATE_UNSYNCED;
+ "FROM fulltextItems JOIN items USING (itemID) WHERE synced=" + SYNC_STATE_UNSYNCED
+ " ORDER BY clientDateModified DESC";
var rows = Zotero.DB.query(sql) || [];
for each (let row in rows) {
let text;