diff --git a/chrome/chromeFiles/content/scholar/xpcom/data_access.js b/chrome/chromeFiles/content/scholar/xpcom/data_access.js index ce5c58b6f..e33e99e8e 100644 --- a/chrome/chromeFiles/content/scholar/xpcom/data_access.js +++ b/chrome/chromeFiles/content/scholar/xpcom/data_access.js @@ -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; }