HomePhabricator

use API assert for supported 'write' actions

Tags
None
Referenced Files
None
Subscribers
None

Description

use API assert for supported 'write' actions

For MediaWiki 1.23+ extend the existing assertion, that the bot is logged in,
to cover all write operations.

Also add check that the AssertEdit extension is present before asserting
for MediaWiki versions 1.14 to 1.22. Prior versions do not provide a
list of running extensions.

If the first operation to the site is a edit operation, before server
capabilities have been determined, do the assertion unconditionally
as the api module doesnt know check. If the server doesnt understand
the assert, it will issue a warning but others behave properly.

Bug: 55068
Change-Id: I80971cde07651a042ef6472dc1a81cb4a1704742

Details

Provenance
jayvdbAuthored on
LegoktmCommitted on Aug 8 2014, 10:00 PM
Parents
rPWBC969d98a0ae40: Disable testing of scripts/editarticle.py
Branches
Unknown
Tags
Unknown
ChangeId
I80971cde07651a042ef6472dc1a81cb4a1704742