Change some instances of attachmentMIMEType to attachmentContentType

This commit is contained in:
Dan Stillman 2016-05-13 15:46:19 -04:00
parent b109279a17
commit 82d00a4e7a
2 changed files with 6 additions and 6 deletions

View file

@ -507,9 +507,9 @@ var Zotero_LocateMenu = new function() {
var path = yield attachment.getFilePathAsync(); var path = yield attachment.getFilePathAsync();
if (path) { if (path) {
var ext = Zotero.File.getExtension(Zotero.File.pathToFile(path)); var ext = Zotero.File.getExtension(Zotero.File.pathToFile(path));
if(!attachment.attachmentMIMEType || if(!attachment.attachmentContentType ||
Zotero.MIME.hasNativeHandler(attachment.attachmentMIMEType, ext) || Zotero.MIME.hasNativeHandler(attachment.attachmentContentType, ext) ||
!Zotero.MIME.hasInternalHandler(attachment.attachmentMIMEType, ext)) { !Zotero.MIME.hasInternalHandler(attachment.attachmentContentType, ext)) {
return false; return false;
} }
return attachment; return attachment;

View file

@ -64,10 +64,10 @@ Zotero.Annotate = new function() {
if (m) { if (m) {
var id = m[1]; var id = m[1];
var item = Zotero.Items.get(id); var item = Zotero.Items.get(id);
var mimeType = item.attachmentMIMEType; var contentType = item.attachmentContentType;
var file = item.getFile(); var file = item.getFilePath();
var ext = Zotero.File.getExtension(file); var ext = Zotero.File.getExtension(file);
if (mimeType == 'text/plain' || !Zotero.MIME.hasNativeHandler(mimeType, ext)) { if (contentType == 'text/plain' || !Zotero.MIME.hasNativeHandler(contentType, ext)) {
return false; return false;
} }
return id; return id;