mirror of
https://github.com/zotero/zotero.git
synced 2026-10-05 02:43:38 +00:00
Cache file link mode
This commit is contained in:
parent
6877d33e61
commit
36af25b3e9
1 changed files with 8 additions and 1 deletions
|
|
@ -29,6 +29,8 @@ Scholar.Item.prototype._init = function(){
|
|||
|
||||
this._noteData = null;
|
||||
this._noteDataAccessTime = null;
|
||||
|
||||
this._fileLinkMode = null;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1124,8 +1126,13 @@ Scholar.Item.prototype.getFileLinkMode = function(){
|
|||
throw ("getFileLinkMode() can only be called on items of type 'file'");
|
||||
}
|
||||
|
||||
if (this._fileLinkMode!==null){
|
||||
return this._fileLinkMode;
|
||||
}
|
||||
|
||||
var sql = "SELECT linkMode FROM itemFiles WHERE itemID=" + this.getID();
|
||||
return Scholar.DB.valueQuery(sql);
|
||||
this._fileLinkMode = Scholar.DB.valueQuery(sql);
|
||||
return this._fileLinkMode;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue