This makes hasOption stable and usable even after getOption.
Also getOption can now be called twice with different defaults.
Strictly speaking this is a breaking change, but the actual
behaviour is now closer to the expected/documented behaviour.
Bug: T275619
Change-Id: I65e32a7e1bc253f4b29378be6980c42e43f93032
Usernames containing certain characters would otherwise break the link
generated in the message. Message documentation already says the name is
intended for being placed in links, and so presumably can be left as-is.
Bug: T275620
Change-Id: If03b034beb5dc56a8569602e604d0345b595d054
Sometimes the special page can’t be created – for example, the list of
registered pages could have changed between the data provider and the
test function, due to extensions conditionally registering their special
pages. Skip the test in this case instead of crashing.
Bug: T275661
Change-Id: I573967ac22ed3a596b4f80b76d395ac948f802e8
Per the comment in extractBasePaths(), remoteBasePath is typically '/'
when MediaWiki is installed in the document root. CSSMin knows what to
do with that, but getRemotePath() was getting it wrong, generating an
invalid protocol-relative URL.
So, add a simple hack for this case.
Change-Id: I16abf482e3a1a4a548c571de0e81cb3c1bdf55e1
There's still room for improvement - batching users by prefix
can be abstracted into the UserSelectQueryBuilder, but I'll do that
separately. It still references actor_id, but that's because
we still have to explicitly query rev_user_temp, and different
paging will mess up the continuation. After completing actor
migration I think we can order the results differently.
Change-Id: I75ff6081f8ecb9fd0dcdd7bbd8b0c974ae71101c
We are in the process of moving from getUserId() to getId() anyway. That
should resolve the issue in addWiki for now. It will however break again
in the future, when we requrie a matching wikiId in User::getId().
The real fix would be resolving T200471.
Bug: T275452
Change-Id: I9a7c383a6c31929e25899fd627131afc25584d5b
Replaces calls directly to PermissionManager with calls to
the Authority object available from Context or the
GroupPermissionLookup service.
This patch does not address use of PermissionManager for
blocks.
Deprecations:
- ApiBase::checkUserRightsAny deprecated passing optional
User parameter
- ApiBase::checkTitleUserPermissions deprecated passing
LinkTarget as first parameter, takes PageIdentity instead
Bug: T271462
Bug: T271854
Change-Id: I5d7cac1c28a37e074750c46cda03283980a07fca
This file was never wired to update.php since its introduction in 2004
and was added to documentation as something you can run if you want to.
That documentation was removed in 2005 and since then, there is no
mention of this file anywhere and it's clearly unfit to run in current
schema.
The commit that introduces it: https://phabricator.wikimedia.org/rMW59c6e92429c
The commit that removes documentation: https://phabricator.wikimedia.org/rMW10b01d61eae280
Change-Id: Ib98f2275f9dfba0870d1638274ddf05ecf50b5b1
Cut the explicit dependency on PermissionManager
and rely on the fact that User implements Authority.
There's still a few ends we need to cut before converting
the method parameters to Authority, but that can be done
in followup steps.
Bug: T273510
Change-Id: I69617e624f47944f8a383d0b28885678c1249f23
This is useful for use cases such as T272412, which allows any user
to see all their info via their preferences.
Bug: T275441
Change-Id: I99e576bd9ad3980ee0fa8397409ef0c7e248a175
Cloner elements are created using the data-template attribute in
the parent element. The first template use will result in unique
ids but subsequent uses reuse the template ids.
Use the cloner count to make each id unique whenever the cloner
generates new elements. It is safe to do so because ooui-php
is not used for any other sort of data management, only to distinguish
between unique elements. By appending onto the id, there will also
be no overlap with ooui elements generated elsewhere on the form.
Bug: T274533
Change-Id: I96bb093a83303de7d65772f9b807ed0c735005b2
This introduces a specialized SelectQueryBuilder for
queries related to actor table. So far it's fairly basic,
but in future it is intended to grow.
This patch only introduces the new abstraction, using
it will be separated into separate patches.
Bug: T274223
Change-Id: Ibb1c58016e3956a46bfaf1a9f51f265114bb9ace