Don't send full-text content in read-only libraries
This commit is contained in:
parent
3c16eb2fb3
commit
31c36c528c
|
@ -594,11 +594,20 @@ Zotero.Fulltext = new function(){
|
||||||
+ "FROM fulltextItems JOIN items USING (itemID) WHERE synced=" + SYNC_STATE_UNSYNCED
|
+ "FROM fulltextItems JOIN items USING (itemID) WHERE synced=" + SYNC_STATE_UNSYNCED
|
||||||
+ " ORDER BY clientDateModified DESC";
|
+ " ORDER BY clientDateModified DESC";
|
||||||
var rows = Zotero.DB.query(sql) || [];
|
var rows = Zotero.DB.query(sql) || [];
|
||||||
|
var libraryIsEditable = {};
|
||||||
for each (let row in rows) {
|
for each (let row in rows) {
|
||||||
let text;
|
let text;
|
||||||
let itemID = row.itemID;
|
let itemID = row.itemID;
|
||||||
let item = Zotero.Items.get(itemID);
|
let item = Zotero.Items.get(itemID);
|
||||||
let libraryKey = item.libraryID + "/" + item.key;
|
let libraryID = item.libraryID;
|
||||||
|
// Don't send full-text in read-only libraries
|
||||||
|
if (libraryID && libraryIsEditable[libraryID] === undefined) {
|
||||||
|
libraryIsEditable[libraryID] = Zotero.Libraries.isEditable(libraryID);
|
||||||
|
if (!libraryIsEditable[libraryID]) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let libraryKey = libraryID + "/" + item.key;
|
||||||
let mimeType = item.attachmentMIMEType;
|
let mimeType = item.attachmentMIMEType;
|
||||||
if (isCachedMIMEType(mimeType) || Zotero.MIME.isTextType(mimeType)) {
|
if (isCachedMIMEType(mimeType) || Zotero.MIME.isTextType(mimeType)) {
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user