Commit graph

347 commits

Author SHA1 Message Date
Dan Stillman
63ab9da467 Fix incorrect related items upgrade
https://forums.zotero.org/discussion/62779/zotero-5-0-relations-made-in-4-0-disappeared
2016-10-15 16:04:08 -04:00
Dan Stillman
51a3687123 Merge branch '4.0' 2016-10-12 19:29:32 -04:00
Dan Stillman
db2fc7d0ba Update translators 2016-10-03 11:54:25 -04:00
Dan Stillman
b8b85f4853 Update version 2016-09-22 00:19:27 -04:00
Dan Stillman
e8d0dc6e00 Update version 2016-09-19 05:16:37 -04:00
Dan Stillman
4adad64b16 Update version 2016-09-19 02:50:45 -04:00
Dan Stillman
21d3ca298b Merge branch '4.0' 2016-09-18 18:39:18 -04:00
Dan Stillman
71a7eb2628 Update submodules 2016-09-18 18:04:41 -04:00
Dan Stillman
5bcce8ba82 Merge branch '4.0' 2016-09-06 18:57:05 -04:00
Dan Stillman
6591ad63af Update translators 2016-09-06 18:53:27 -04:00
Dan Stillman
daf0f8e0b0 Merge branch '4.0' 2016-08-14 17:27:36 -04:00
Dan Stillman
649ce58726 Update version 2016-08-14 04:18:45 -04:00
Dan Stillman
8f9d356f11 Update translators 2016-08-13 20:39:41 -04:00
Dan Stillman
0eb6dc9ca5 Merge branch '4.0' 2016-08-09 01:52:21 -04:00
Dan Stillman
7daafd4ceb Update submodules 2016-08-08 02:22:57 -04:00
Dan Stillman
5878700808 Update version 2016-08-08 02:03:45 -04:00
Dan Stillman
01aec4134c Update submodules 2016-07-22 00:18:02 -04:00
Dan Stillman
a343a7af6e Merge branch '4.0' 2016-06-06 16:42:39 -04:00
Dan Stillman
0a0283483e Update submodules 2016-06-06 16:14:21 -04:00
Dan Stillman
d8abfa4f67 Save all item data values as string, and convert old integers to strings
Before 5.0 we performed a regexp on new item data values to determine if
they were integers and saved them natively in SQLite if so. We no longer
do that, but setField() used strict equality when checking for changes,
so an item could be marked as changed when comparing to a new string
value (e.g., from a write response from the API, which always returns
strings). To avoid that, this converts all old values in the DB to
strings and saves all incoming values as strings automatically. (This
should also help with searching and some other things.)
2016-05-18 17:25:50 -04:00
Dan Stillman
216900094b Merge branch '4.0' 2016-05-07 13:27:56 -04:00
Dan Stillman
9b41c8dd97 Update version 2016-05-07 13:19:27 -04:00
Dan Stillman
797f00ab7c Update translators 2016-05-02 22:41:52 -04:00
Dan Stillman
56c0933af0 Update version 2016-05-02 22:39:57 -04:00
Dan Stillman
b4a9858f37 Log message for unhandled promise rejection when string is thrown 2016-04-29 23:32:31 -04:00
Dan Stillman
5a4dddcbc6 Download to Bluebird 3.3.4 to fix translation error
browserTest.js -> "should save book with child note to current
collection" was failing with an attempt to translate as COinS instead of
RIS. If this isn't fixed in a subsequent Bluebird release, we can debug
further.
2016-04-27 16:06:58 -04:00
Dan Stillman
1a97f27fe3 Use Bluebird reflect() instead of deprecated settle() 2016-04-27 02:34:46 -04:00
Dan Stillman
05de47149f Allow marking of errors as handled for Bluebird
Set .handledRejection on an Error object to tell Bluebird that it's been
handled and shouldn't be logged by onPossiblyUnhandledRejection().
2016-04-27 02:32:58 -04:00
Dan Stillman
1502985d98 Update Bluebird to 3.3.5 2016-04-27 02:23:49 -04:00
Dan Stillman
a62e7e46bf Remove some unreachable code
Addresses #974
2016-04-26 02:00:51 -04:00
Dan Stillman
196b28cc66 Update version 2016-04-16 02:52:20 -04:00
Dan Stillman
ee5a62b9f4 Show error message on unhandled errors instead of duplicating the stack
Not sure if this is correct in all cases
2016-04-15 04:23:03 -04:00
Dan Stillman
ba1f69b4d5 Merge branch '4.0' 2016-04-12 16:09:10 -04:00
Dan Stillman
9330b9cd40 Update submodules 2016-04-12 04:52:52 -04:00
Dan Stillman
560eb37d0b Schema update step to fix invalid item relations
As corrected in d0a110072
2016-04-11 16:29:48 -04:00
Dan Stillman
8a57183e0b Remove unused version table rows 2016-04-01 02:38:36 -04:00
Dan Stillman
a1ce85decb Overhaul object downloading/processing during data syncs
Previously, objects were first downloaded and saved to the sync cache,
which was then processed separately to create/update local objects. This
meant that a server bug could result in invalid data in the sync cache
that would never be processed. Now, objects are saved as they're
downloaded and only added to the sync cache after being successfully
saved. The keys of objects that fail are added to a queue, and those
objects are refetched and retried on a backoff schedule or when a new
client version is installed (in case of a client bug or a client with
outdated data model support).

An alternative would be to save to the sync cache first and evict
objects that fail and add them to the queue, but that requires more
complicated logic, and it probably makes more sense just to buffer a few
downloads ahead so that processing is never waiting for downloads to
finish.
2016-03-23 04:29:04 -04:00
Dan Stillman
6c43e75d26 Merge pull request #902 from adomasven/feature/feed-reader-UI
Feed Reader UI

(I squashed a bunch of commits from the PR.)
2016-03-22 07:31:03 -04:00
Adomas Venčkauskas
12fc6cfbe8 Various feeds changes
- Hide notes, tags and related for feed items in itembox
- Add feed support for <enclosure> elements
- Add feed syncing methods for synced settings (additional work is
  needed on the sync architecture to download synced settings from the
  server)
- Change feed item clear policy to be less aggressive
- Adjust for deasyncification
- Disable translate-on-select
- Close adomasven/zotero#7, Remove context menu items from feeds
2016-03-22 06:56:36 -04:00
Adomas Venčkauskas
e206b0af5e Various feeds changes
- Change sort order for feed items to natural order
- Remove display of dates in itembox
- Trim html tags from creators in FeedReader parser
2016-03-22 06:56:33 -04:00
Dan Stillman
e8bffc2275 Remove Bluebird mod that may or may not still be necessary 2016-03-21 02:45:14 -04:00
Dan Stillman
ba079d07fe Update version 2016-03-19 03:00:29 -04:00
Dan Stillman
f4896a15ec Merge branch '4.0' 2016-03-17 05:08:06 -04:00
Dan Stillman
0a120d85b1 Update version 2016-03-17 02:59:52 -04:00
Dan Stillman
8830dfeff9 Update version and submodules 2016-03-15 03:31:08 -04:00
Dan Stillman
e9c2b4b76e Update version 2016-03-10 23:17:41 -05:00
Dan Stillman
d4214f5184 Update version 2016-03-10 07:04:48 -05:00
Dan Stillman
c1cb380bcb Update version 2016-03-07 21:56:43 -05:00
Dan Stillman
5df952b0f9 Update version 2016-03-07 08:33:45 -05:00
Dan Stillman
244a52ad22 Merge branch '4.0' 2016-03-06 01:20:51 -05:00
Dan Stillman
5a11777587 Update version 2016-03-05 01:38:50 -05:00
Dan Stillman
ee1e8578ce Update submodules 2016-03-01 01:25:48 -05:00
Dan Stillman
a152e35786 Don't create itemSeeAlso table (already removed via schema updates) 2016-02-17 18:04:06 -05:00
Dan Stillman
b05f1d29aa Backport better incompatible-DB-version handling from 2177a000ea
Implements #891 for 4.0
2016-02-06 04:59:15 -05:00
Dan Stillman
3b402c564c Closes #900, Change fields order for cases in system.sql 2016-02-06 04:12:07 -05:00
Dan Stillman
3071b8093b Merge branch '4.0' 2016-01-20 01:23:02 -05:00
Dan Stillman
b52360d0f4 Update versions 2016-01-14 19:42:14 -05:00
Dan Stillman
2ac27be95e Upgrade to Bluebird 3.1.1 2016-01-08 21:07:10 -05:00
Dan Stillman
2177a000ea Closes #891, Better incompatible-DB-version handling
Fixes the incompatible-version dialog and adds info on the version used
to upgrade the database, which may be helpful for troubleshooting.

Also fixes showing of the Zotero toolbar icons even in case of a startup
error.
2015-12-30 05:14:50 -05:00
Dan Stillman
c5a9987f37 WebDAV file sync overhaul for 5.0
Also:

- Remove last-sync-time mechanism for both WebDAV and ZFS, since it can
  be determined by storage properties (mtime/md5) in data sync
- Add option to include synced storage properties in item toJSON()
  instead of local file properties
- Set "Fake-Server-Match" header in setHTTPResponse() test support
  function, which can be used for request count assertions -- see
  resetRequestCount() and assertRequestCount() in webdavTest.js
- Allow string (e.g., 'to_download') instead of constant in
  Zotero.Sync.Data.Local.setSyncState()
- Misc storage tweaks
2015-12-30 05:14:50 -05:00
Dan Stillman
1d3113971b Bump versions 2015-12-17 16:40:37 -05:00
Dan Stillman
0673face28 Update submodules and maxVersion 2015-12-10 16:33:51 -05:00
Dan Stillman
62aeb1da32 Full-text syncing support via API [DB reupgrade] 2015-11-12 02:54:51 -05:00
Dan Stillman
bad9833896 Resolve caller.start() promise when passed functions finish
Instead of waiting for all queued functions to finish
2015-11-11 02:14:30 -05:00
Dan Stillman
ccd765ff74 Update versions and submodules 2015-11-08 16:21:20 -05:00
Dan Stillman
7f43ca9503 Merge branch '4.0' 2015-11-01 21:22:13 -05:00
Dan Stillman
1e6c29766f Add deletion uploading to API syncing [DB reupgrade]
Tags deletions are not currently synced, and maybe don't need to be.
2015-11-01 03:58:54 -05:00
Dan Stillman
ee6793a9e6 ConcurrentCaller changes
- Different constructor parameters
- id property for logging
- fcall() -> start()
- add() to enqueue without starting
- runAll() to run down queue and return promises for all current tasks
- wait() to wait for all running tasks to finish
2015-10-29 02:57:42 -04:00
Dan Stillman
62e586073d concurrent-caller.js -> concurrentCaller.js 2015-10-29 02:49:31 -04:00
Dan Stillman
ed33c6b712 Update Bluebird to 2.10.2 2015-10-29 02:23:22 -04:00
Dan Stillman
a22fe2ecda Update translators and renamed-styles.json 2015-10-02 05:05:26 -04:00
Dan Stillman
1b333be23f Add Zotero.Library.prototype.lastStorageSync 2015-09-29 04:42:13 -04:00
Dan Stillman
4dd56eadfc Update version 2015-09-25 13:29:02 -04:00
Dan Stillman
ec66d15a5f Update version and submodules 2015-09-24 22:13:35 -04:00
Dan Stillman
c43d36900a Update version 2015-09-24 18:24:52 -04:00
Dan Stillman
b2f0d3beb0 Update versions 2015-09-23 05:04:25 -04:00
Aurimas Vinckevicius
88ab129ffb Add Feed and FeedItem
Also:
* _finalizeErase in Zotero.DataObject is now inheritable
* Call _initErase before starting a DB transaction
* removes Zotero.Libraries.add and Zotero.Libraries.remove (doesn't seem like this is used any more)
2015-09-21 17:08:21 -05:00
Dan Stillman
1c087270e3 Update version 2015-08-27 17:42:58 +01:00
Dan Stillman
9bd2913b2a Unminify TinyMCE plugins 2015-08-27 16:07:50 +02:00
Dan Stillman
030f532d04 Update submodules 2015-08-27 16:00:36 +02:00
Dan Stillman
473c3affb8 Update version 2015-08-14 01:42:24 -04:00
Dan Stillman
4eff7bd2d4 Update submodules 2015-08-13 18:38:59 -04:00
Dan Stillman
c123b4a2f9 Switch to unminified editor_template_src.js in TinyMCE code 2015-08-13 17:53:40 -04:00
Dan Stillman
0aecaad761 Update conflict resolution for API syncing
This will appear much less frequently, since non-conflicting field changes on
both sides can be resolved automatically, but genuine field conflicts still
require manual conflict resolution.

The merge pane is no longer editable, since the itembox code to do that is
async and can't run in a modal window, but it's not really necessary,
particularly with conflicts happening less frequently.

TODO:

- Remote item deletions
- File conflicts
- Maybe handle some edge cases where the conflicted items fail to save
2015-08-06 04:14:49 -04:00
Dan Stillman
7b0c34a3ab Update submodules 2015-08-05 15:11:24 -04:00
Dan Stillman
1178d2509d Update versions 2015-08-05 15:08:29 -04:00
Dan Stillman
2da6bc7fcc Update version 2015-07-30 16:04:10 -04:00
Dan Stillman
fb9109e837 Update versions and submodules 2015-07-26 18:33:04 -04:00
Dan Stillman
984789d304 API syncing megacommit
There's a lot more to do, and this isn't ready for actual usage, but the
basic functionality is mostly in place and has decent test coverage. It
can successfully upgrade a library last used with classic syncing and
pull down changes via the API. Uploading mostly works but is currently
disabled for safety until it has better test coverage.

Downloaded JSON is first saved to a cache table, which is then used to
populate other tables and later for generating PATCH requests and
automatically resolving conflicts (since it shows what was changed
locally and what was changed remotely). Objects with unmet dependencies
or unknown fields are skipped for now but don't block the rest of the
sync.

Some of the bigger remaining to-dos:

- Tests for uploading
- Re-do the preferences to get an API key
- File sync integration
- Full-text syncing integration
- Manual conflict resolution (though this already includes much smarter
  conflict handling that automatically resolves many conflicts)
2015-07-20 18:16:57 -04:00
Dan Stillman
5c523d8694 Merge branch '4.0' 2015-07-18 07:09:53 -04:00
Dan Stillman
2ad0f5ecdc Update translators 2015-07-12 23:57:58 -04:00
Dan Stillman
9e050d6081 Update versions 2015-07-10 17:51:08 -04:00
Dan Stillman
44269d8999 Update versions 2015-07-06 18:02:07 -04:00
Dan Stillman
a080e4090d Update version 2015-07-04 00:02:05 -04:00
Dan Stillman
20f279043b Update submodules 2015-07-03 02:09:27 -04:00
Dan Stillman
44accbadec Update versions 2015-07-03 02:06:51 -04:00
Dan Stillman
4c751740b4 Update versions and translators 2015-06-30 23:41:48 -04:00
Dan Stillman
4233d2ebbd Update translators and repotime 2015-06-30 00:12:57 -04:00
Dan Stillman
99dd1c0697 Merge branch '4.0'
Since modal windows (e.g., the Create Bib window and the Quick Copy site
editor window) can't use yield, style retrieval
(Zotero.Styles.getVisible()/getAll()) is now synchronous, depending on a
previous async Zotero.Styles.init(). The translator list is generated in
the prefs window and passed into the Quick Copy site editor, but it's
possible the translators API should be changed to make getTranslators()
synchronous with a prior init() as well.
2015-06-27 16:59:58 -04:00
Dan Stillman
3a5854f49f Update versions and submodules 2015-06-26 02:40:18 -04:00
Dan Stillman
33dedd1753 Tags overhaul [DB reupgrade]
- Simplified schema
- Tags are now added without reloading entire tag selector
  - On my system, adding 400 tags to an item (separately, with the tag
    selector updating each time) went from 59 seconds to 42. (Given that
    it takes only 13 seconds with the tag selector closed, though,
    there's clearly more work to be done.)
- Tag selector now uses HTML flexbox (in identical fashion, for now, but
  with the possibility of fancier changes later, and with streamlined
  logic thanks to the flexbox 'order' property)
- Various async fixes
- Tests
2015-06-23 05:21:58 -04:00
Dan Stillman
f7216298b4 Update character set handling
Restore prepopulated charset table, but this time with just the
encodings from the WHATWG Encoding Standard. Assigning a charset to
Zotero.Item::attachmentCharset runs the value through
Zotero.CharacterSets.toCanonical() automatically.

This migrates attachment charsets to the new canonical values, clearing any
that are unsupported.

Other legacy mappings could still be added back, as disussed in #760.
2015-06-12 02:46:02 -04:00
Dan Stillman
cd2898ece3 Update Bluebird to v2.9.27 2015-06-08 04:05:46 -04:00
Dan Stillman
a22c4969e6 Move editable and filesEditable props to libraries table [DB reupgrade]
And add group.fromJSON(json, userID), which sets editable and
filesEditable properties based on the group JSON (libraryReading, role
lists, etc.) and the given user
2015-06-07 15:50:07 -04:00
Dan Stillman
a740658452 Relations overhaul (requires new DB upgrade from 4.0)
Relations are now properties of collections and items rather than
first-class objects, stored in separate collectionRelations and
itemRelations tables with ids for subjects, with foreign keys to the
associated data objects.

Related items now use dc:relation relations rather than a separate table
(among other reasons, because API syncing won't necessarily sync both
items at the same time, so they can't be stored by id).

The UI assigns related-item relations bidirectionally, and checks for
related-item and linked-object relations are done unidirectionally by
default.

dc:isReplacedBy is now dc:replaces, so that the subject is an existing
object, and the predicate is now named
Zotero.Attachments.replacedItemPredicate.

Some additional work is still needed, notably around following
replaced-item relations, and migration needs to be tested more fully,
but this seems to mostly work.
2015-06-01 20:28:30 -04:00
Dan Stillman
5ba344516e Update PDF tool handling in tests
The test runner now downloads and caches the PDF tools for the current
platform within the test data directory and only redownloads them when
out of date, and it updates the download URL so that the full-text code
pulls from the cache directory via a file:// URL.

The installPDFTools() support function now installs the files directly
instead of going through the prefs, and a new uninstallPDFTools()
function removes the tools. Since the presence of the PDF tools can
affect other tests, tests that need the tools should install them in a
before() and uninstall them in an after(), leaving most tests to run
without PDF indexing.

This also adds a callback to the waitForWindow() support function. If a
modal dialog is opened, it blocks the next promise handler from running,
so a callback has to be used to interact with and close the dialog
immediately.
2015-05-31 23:50:26 -04:00
Dan Stillman
6b87c641d9 Experimental approach to cancelling unnecessary promises
If a view or other resources are destroyed while a promise is being
resolved, subsequent code can fail. This is generally harmless, but it
results in unnecessary errors being logged to the console.

To address this, promises can use a new function,
Zotero.Promise.check(), to test whether a value is truthy or 0 and
automatically throw a specific error that's ignored by the unhandled
rejection handler if not.

Example usage:

getAsync().tap(() => Zotero.Promise.check(this.win));

If this.win is cleaned up while getAsync() is being resolved, subsequent
lines won't be run, and nothing will be logged to the console.
2015-05-23 04:43:37 -04:00
Dan Stillman
eee0e22bf6 Add 'version' to sync cache primary key
The sync cache will have pristine copies of the existing versions of
local objects for better conflict resolution, but downloads will get
saved to the sync cache first before processing, so the cache needs to
be able to hold more than one version.
2015-05-19 01:25:31 -04:00
Dan Stillman
daad18c1b5 Include running function in current count in ConcurrentCaller log line 2015-05-15 01:47:20 -04:00
Dan Stillman
aa70e60fc6 Add clearTimeout() implementation to Bluebird
Necessary for cancellable promises
2015-05-10 18:30:06 -04:00
Dan Stillman
574f636683 Call next function in finally block in ConcurrentCaller 2015-05-05 02:58:22 -04:00
Dan Stillman
43a2045aec Change computerProgram 'version' to 'versionNumber'
And use 'version' instead of 'itemVersion' for object version for items

Also add deferred foreign key checking to system.sql so that DROP TABLE
commands don't fail mid-transaction
2015-05-04 02:45:53 -04:00
Dan Stillman
90f4996d9d Remove some excessive error logging from Bluebird
And hide errors from DB transaction rollback tests
2015-04-25 03:17:41 -04:00
Dan Stillman
fec43f1f62 Merge branch '4.0' into api_syncing 2015-04-13 02:01:43 -04:00
Dan Stillman
b599aed8ed Fix pasting of non-HTTP URLs into notes from non-note sources
Copying zotero:// and other non-HTTP links from a note itself was fixed
in #452, but copying such links from other sources still stripped the
hrefs. This removes the patch in #452 and just gets the HTML directly
from the clipboard. I'm not sure why TinyMCE doesn't try to do this by
default (it only tries for plaintext), so maybe there's a problem with
this approach, but it seems to work for me (strips bad HTML, etc.).

Fixes #697
2015-04-10 13:08:25 -04:00
Dan Stillman
a9ca6e0857 Support unmodified Xpdf binaries
Use stdout redirection scripts for pdfinfo and, on Windows, a script to
run pdftotext hidden, which together allow for all unmodified binaries
(including, probably, symlinked system ones, though I didn't test that).

On Windows, using a .vbs does cause a brief wait cursor. The stock
pdfinfo needs the redirection script anyway, so that's unavoidable, but
on the async branch I think we'll be able to switch to pdf.js for the
page count, at which point maybe I'll try to remember how I modified the
Windows binaries to be hidden and use a modified version of pdftotext to
avoid VBScript. (We use the stock pdftotext elsewhere already.)
2015-04-01 04:36:21 -04:00
Dan Stillman
4b83b1a630 Bump version and maxVersion 2015-03-27 19:00:25 -04:00
Dan Stillman
b042973751 Merge branch '4.0' into api_syncing 2015-03-22 19:51:29 -04:00
Dan Stillman
d8f3be4bee updateBundledStyles() asyncification and related changes
- Use async DB and OS.File for bundled file updates
- Remove support for translator/style ZIP files -- the two options are
  now non-unpacked XPIs with subfolders or unpacked source installations
- Now that we have async file access, don't store translator code in
  database cache -- just store metadata so that it's available without
  reading each translator file
- Change the (previously partially asyncified) Zotero.Styles/Translators
  APIs a bit -- while the getAll/getVisible methods are asynchronous and
  will wait for loading, the get() methods are synchronous and require
  styles/translators to be initialized before they're called. Most
  places that end up calling get() probably call getAll/getVisible first
  and should therefore be async, but if there's any way to trigger a
  get() first, that will need to be adjusted.
- Asyncify various other style/translator-related code

XPI support is untested, as is style/translator usage, so there are
almost certainly bugs. The latter depends on updated export format
support (#659), since toArray() no longer exists on this branch.

Addresses #529 and #520
2015-03-22 04:27:25 -04:00
Dan Stillman
faed7cd7dd Replace some 'for each..in' instances
There are hundreds more, but these are all the ones that generate warnings in
the console at startup. XPCOM/XBL ones don't seem to do so, so we can ignore
those for now (and hopefully not bother with them on 4.0). Instances in
translators do generate warnings.

Addresses #656
2015-03-17 15:19:45 -04:00
Dan Stillman
bdd69d0a53 Merge branch '4.0' into api_syncing 2015-03-16 23:41:10 -04:00
Dan Stillman
a03772cae7 Merge branch 'master' into api_syncing
Note that this loses conflicting changes to translate_item.js from 849803473a,
so those will need to be reapplied if applicable. /cc @aurimasv, @mtd91429
2015-03-16 15:23:07 -04:00
Simon Kornblith
b4142342a5 Merge remote-tracking branch 'origin/connector' into 4.0 2015-03-14 18:32:54 -04:00
Simon Kornblith
6a05e5c04b We no longer support Fx <24 2015-03-11 12:05:22 -04:00
Dan Stillman
8371749bd1 Add Zotero.clientName, set to "Zotero" by default
We should eventually replace all hard-coded uses of "Zotero" with this
for use by unofficial versions (which legally can't be called "Zotero").
2015-02-23 03:31:52 -05:00
Dan Stillman
aeb7b83a39 Update versions 2015-02-21 21:52:06 -05:00
Dan Stillman
39ecb7d916 Update translators 2015-02-10 22:52:53 -05:00
Dan Stillman
1afa1ffea6 Update submodules, repotime, and versions 2015-02-10 00:13:42 -05:00
Dan Stillman
0b21c4c682 Still show proper line number when no message is thrown 2015-02-05 19:01:55 -05:00
Dan Stillman
c322eaa1bc Restore Error workaround in Bluebird to produce proper line numbers
I didn't really investigate this, but errors from the outside world seem
to not pass the "obj instanceof Error" test due to some weirdness that
Bluebird is doing. (When I took this out recently I thought we just were
throwing some custom errors that didn't properly extend Error, but that
isn't the issue.) This restores the earlier workaround.
2015-02-05 18:39:43 -05:00
Dan Stillman
91d14fc04c Use 'self' instead of 'global' as global object in Bluebird
This fixes an error when other errors occur in recent versions of Bluebird.
2015-02-03 15:36:01 -05:00
Dan Stillman
d660a84f47 Update Bluebird to 2.9.6 2015-02-03 15:36:01 -05:00
Dan Stillman
b5b85ee589 Update submodules and repotime 2015-01-31 16:06:21 -05:00
Dan Stillman
b0e37a38a2 Merge branch '4.0'
Conflicts:
	chrome/content/zotero/xpcom/schema.js
	chrome/content/zotero/xpcom/translation/translate.js
	chrome/content/zotero/xpcom/zotero.js
	install.rdf
	update.rdf
2015-01-29 19:59:47 -05:00
Dan Stillman
84d1be4c03 ConcurrentCaller tweaks 2015-01-28 17:28:38 -05:00
Dan Stillman
b785a3bfce Dynamically populate charsets table
Instead of limiting charsets to a fixed list, dynamically populate it
with any charset name of less than 50 ASCII characters. Previously,
unknown charsets were discarded.

Zotero.Item.prototype.attachmentCharset now always returns a charset
name. It can be set with either a name or a charsetID.

Also:

- Remove the unused 'originalPath' column in itemAttachments
2015-01-28 17:15:16 -05:00
Dan Stillman
b670084925 Use 'version' for groups instead of 'etag'
APIv3 uses 'version'
2015-01-28 17:05:25 -05:00
Dan Stillman
58c062dd06 Add per-library lastsync times and synced flags for sync delete logs 2015-01-28 15:56:46 -05:00
Dan Stillman
30b5c4686e Update Bluebird to 2.9.3
...with fewer modifications, since one (better debug info on an invalid
yield value) was implemented in Bluebird and the other (detecting a
thrown error that doesn't properly extend Error) we should just fix in
our code.
2015-01-28 15:19:29 -05:00
Dan Stillman
6de3fa4d47 Update translators and repotime 2015-01-14 00:09:40 -07:00
Dan Stillman
0c3332b5e4 Update versions 2015-01-14 00:08:31 -07:00
Dan Stillman
b9fb7fa3c6 Update versions 2015-01-12 23:59:26 -07:00
Dan Stillman
f1a3cb3577 Update versions, submodules, and repotime 2015-01-12 21:54:56 -07:00
Dan Stillman
2d0df16509 Switch WWW_BASE_URL to HTTPS 2014-12-09 20:48:15 -05:00
Dan Stillman
3a058c68ed Use config URL for all repo requests, and move config to separate file 2014-12-09 18:53:53 -05:00
Dan Stillman
d7d542a79c Update version, submodules, and repotime 2014-12-01 02:17:09 -05:00
Dan Stillman
12619273b5 Update submodules and repotime 2014-10-14 03:26:15 -04:00
Dan Stillman
7541106641 Update Bluebird to 2.3.5
Our modifications no longer include a custom yield handler to
automatically call all() on yielded arrays (which maintained Bluebird
1.x behavior). It's now necessary to call all() or similar explicitly.

Also fixed a few incorrect yields hidden by that behavior.
2014-10-09 14:21:10 -04:00
Dan Stillman
755ead2119 Update zotero:// extensions (report, timeline, etc.) for async DB, and more
- Protocol handler extensions can now handle promises and can also make
  data available as it's ready instead of all at once (e.g., reports now
  output one entry at a time)
- zotero:// URL syntaxes are now more consistent and closer to the web
  API (old URLs should work, but some may currently be broken)

Also:

- Code to generate server API, currently available for testing via
  zotero://data URLs but eventually moving to HTTP -- zotero://data URLs match
  web API URLs, with a different prefix for the personal library (/library vs.
  /users/12345)
- Miscellaneous fixes to data objects

Under the hood:

- Extensions now return an AsyncChannel, which is an nsIChannel implementation
  that takes a promise-yielding generator that returns a string,
  nsIAsyncInputStream, or file that will be used for the channel's data
- New function Zotero.Utilities.Internal.getAsyncInputStream() takes a
  generator that yields either promises or strings and returns an async input
  stream filled with the yielded strings
- Zotero.Router parsers URLs and extract parameters
- Zotero.Item.toResponseJSON()
2014-09-09 00:36:29 -04:00
Dan Stillman
490d24f43b Merge branch 'master' into async_db 2014-09-09 00:34:18 -04:00