www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 36af25b3e99974b1f154d3cb85b5bdbcbf47dc6a
parent 6877d33e612634a659af815b8bd0f4eaa992095f
Author: Dan Stillman <dstillman@zotero.org>
Date:   Wed,  9 Aug 2006 16:25:28 +0000

Cache file link mode


Diffstat:
Mchrome/chromeFiles/content/scholar/xpcom/data_access.js | 9++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)

diff --git 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; }