Please sign in to comment.
don't freak out on deprecation warnings
The upload API call can sometimes return warnings based on the `watch` parameter, which has been deprecated in favor of `watchlist`. When it does, it returns two XML nodes named `<upload>`, and `check-api-response` was only looking at the first one. On my mediawiki (1.19.1), the XML comes back like: `<api><warnings><upload>...</upload></warnings><upload>...</upload></api>` We care about the data in the second `<upload>` node. This patch says if there are two `<upload>` nodes found, use the second one. I'm not sure what's the right thing to do here; I could amend cl-mediawiki to follow the mediawiki API, remove `:watch` and add `:watchlist`, but that drops support for older mediawiki versions, and it seems constraining to limit cl-mediawiki to recent mediawiki versions only.
- Loading branch information...