mediawiki.api.options: Add module for API action=options
authorBartosz Dziewoński <matma.rex@gmail.com>
Sun, 14 Sep 2014 22:16:11 +0000 (00:16 +0200)
committerTimo Tijhof <krinklemail@gmail.com>
Wed, 18 Mar 2015 19:03:16 +0000 (19:03 +0000)
commit9247607184a3bf21317e699eea482cb539f7b277
tree0fc8408fcca1958baa18bf2bd684174c0aec8995
parent03108d5ef204606f5b0d4fe6abcb5074739b6f13
mediawiki.api.options: Add module for API action=options

Implemented mw.Api#saveOptions to save user preferences.

If necessary, the options will be saved using several parallel API
requests. Only one promise is returned that resolves when all requests
are complete.

If a value of `null` is provided, the given option will be to reset to
the default value.

Any warnings returned by the API, including warnings about invalid
option names or values, are currently ignored. This basically means
that all requests will succeed (barring networks problems, internal
server errors and such).

Change-Id: Ia015898ca910923e00bc53f099b4e5631d6ad45c
resources/Resources.php
resources/src/mediawiki.api/mediawiki.api.options.js [new file with mode: 0644]
tests/qunit/QUnitTestResources.php
tests/qunit/suites/resources/mediawiki.api/mediawiki.api.options.test.js [new file with mode: 0644]