www

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

commit e31d706ee47aaa511e911c032aeeee18d6bf7fc6
parent d573a5b63938280ca0e848753c5a58af49670310
Author: Dan Stillman <dstillman@zotero.org>
Date:   Tue, 24 Apr 2018 05:08:27 -0400

Date.strToDate: Only check for date.* localized strings in client

Zotero.getString() now exists in the connector, but the expected strings
aren't defined (or needed), so an error is logged.

Diffstat:
Mchrome/content/zotero/xpcom/date.js | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/chrome/content/zotero/xpcom/date.js b/chrome/content/zotero/xpcom/date.js @@ -296,13 +296,13 @@ Zotero.Date = new function(){ // Parse 'yesterday'/'today'/'tomorrow' var lc = (string + '').toLowerCase(); - if (lc == 'yesterday' || (Zotero.getString && lc === Zotero.getString('date.yesterday'))) { + if (lc == 'yesterday' || (Zotero.isClient && lc === Zotero.getString('date.yesterday'))) { string = Zotero.Date.dateToSQL(new Date(Date.now() - 1000*60*60*24)).substr(0, 10); // no 'this' for translator sandbox } - else if (lc == 'today' || (Zotero.getString && lc == Zotero.getString('date.today'))) { + else if (lc == 'today' || (Zotero.isClient && lc == Zotero.getString('date.today'))) { string = Zotero.Date.dateToSQL(new Date()).substr(0, 10); } - else if (lc == 'tomorrow' || (Zotero.getString && lc == Zotero.getString('date.tomorrow'))) { + else if (lc == 'tomorrow' || (Zotero.isClient && lc == Zotero.getString('date.tomorrow'))) { string = Zotero.Date.dateToSQL(new Date(Date.now() + 1000*60*60*24)).substr(0, 10); } else {