| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Bug: T353458
Change-Id: I3ea6b08c5018ba03ba45c5766e1f46e12f6b8597
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Updating name & email addresses for Brooke Vibber.
Re-ran updateCredits.php as well so there are some new entries in
there as well.
There are a couple of files in resources/libs that will have to
be changed upstream to keep tests happy, I will do patches
later. :D
Change-Id: I2f2e75d3fa42e8cf6de19a8fbb615bac28efcd54
|
|
|
|
|
| |
Bug: T342632
Change-Id: I06fe334942848a599e94edadc7e7a14094e4d4b5
|
|
|
|
|
| |
Bug: T319340
Change-Id: Ic987f9381ac17e9e46504abdb2d07a5a94ba3b4a
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is moderately messy.
Process was principally:
* xargs rg --files-with-matches '^use Title;' | grep 'php$' | \
xargs -P 1 -n 1 sed -i -z 's/use Title;/use MediaWiki\\Title\\Title;/1'
* rg --files-without-match 'MediaWiki\\Title\\Title;' . | grep 'php$' | \
xargs rg --files-with-matches 'Title\b' | \
xargs -P 1 -n 1 sed -i -z 's/\nuse /\nuse MediaWiki\\Title\\Title;\nuse /1'
* composer fix
Then manual fix-ups for a few files that don't have any use statements.
Bug: T166010
Follows-Up: Ia5d8cb759dc3bc9e9bbe217d0fb109e2f8c4101a
Change-Id: If8fc9d0d95fc1a114021e282a706fc3e7da3524b
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Migrate all callers of Hooks::run() to use the new
HookContainer/HookRunner system.
General principles:
* Use DI if it is already used. We're not changing the way state is
managed in this patch.
* HookContainer is always injected, not HookRunner. HookContainer
is a service, it's a more generic interface, it is the only
thing that provides isRegistered() which is needed in some cases,
and a HookRunner can be efficiently constructed from it
(confirmed by benchmark). Because HookContainer is needed
for object construction, it is also needed by all factories.
* "Ask your friendly local base class". Big hierarchies like
SpecialPage and ApiBase have getHookContainer() and getHookRunner()
methods in the base class, and classes that extend that base class
are not expected to know or care where the base class gets its
HookContainer from.
* ProtectedHookAccessorTrait provides protected getHookContainer() and
getHookRunner() methods, getting them from the global service
container. The point of this is to ease migration to DI by ensuring
that call sites ask their local friendly base class rather than
getting a HookRunner from the service container directly.
* Private $this->hookRunner. In some smaller classes where accessor
methods did not seem warranted, there is a private HookRunner property
which is accessed directly. Very rarely (two cases), there is a
protected property, for consistency with code that conventionally
assumes protected=private, but in cases where the class might actually
be overridden, a protected accessor is preferred over a protected
property.
* The last resort: Hooks::runner(). Mostly for static, file-scope and
global code. In a few cases it was used for objects with broken
construction schemes, out of horror or laziness.
Constructors with new required arguments:
* AuthManager
* BadFileLookup
* BlockManager
* ClassicInterwikiLookup
* ContentHandlerFactory
* ContentSecurityPolicy
* DefaultOptionsManager
* DerivedPageDataUpdater
* FullSearchResultWidget
* HtmlCacheUpdater
* LanguageFactory
* LanguageNameUtils
* LinkRenderer
* LinkRendererFactory
* LocalisationCache
* MagicWordFactory
* MessageCache
* NamespaceInfo
* PageEditStash
* PageHandlerFactory
* PageUpdater
* ParserFactory
* PermissionManager
* RevisionStore
* RevisionStoreFactory
* SearchEngineConfig
* SearchEngineFactory
* SearchFormWidget
* SearchNearMatcher
* SessionBackend
* SpecialPageFactory
* UserNameUtils
* UserOptionsManager
* WatchedItemQueryService
* WatchedItemStore
Constructors with new optional arguments:
* DefaultPreferencesFactory
* Language
* LinkHolderArray
* MovePage
* Parser
* ParserCache
* PasswordReset
* Router
setHookContainer() now required after construction:
* AuthenticationProvider
* ResourceLoaderModule
* SearchEngine
Change-Id: Id442b0dbe43aba84bd5cf801d86dedc768b082c7
|
|
|
|
|
|
|
| |
First part, mostly doc-only.
Bug: T231636
Change-Id: Id59f585740fa5bfb53c257287121f51a30de38fe
|
|
|
|
| |
Change-Id: Ibb6b324b286f62153ce5d08a66454e0b05a0ef78
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Find: /isset\(\s*([^()]+?)\s*\)\s*\?\s*\1\s*:\s*/
Replace with: '\1 ?? '
(Everywhere except includes/PHPVersionCheck.php)
(Then, manually fix some line length and indentation issues)
Then manually reviewed the replacements for cases where confusing
operator precedence would result in incorrect results
(fixing those in I478db046a1cc162c6767003ce45c9b56270f3372).
Change-Id: I33b421c8cb11cdd4ce896488c9ff5313f03a38cf
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Remove some creation dates, they are not protected by GPL
* Remove duplicate @defgroup API
* Remove @ingroup from some @file doc comments on class files. It is not
useful to list class files alongside classes in the doxygen module menu.
Add @ingroup to some more class files that had @ingroup on their file,
that was probably the author's intent.
* In PackedOverlayImageGallery, use the file comment as a class comment
* Don't put @defgroup and @file in the same comment. @defgroup makes the
whole doc comment describe the group.
* Instead of putting AnsiTermColorer in two groups, use hierarchical
groups.
Change-Id: If54f6e0b2bc1ea6de42045885cf836ee67b8e961
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Links generated by the API are now aware of the user's preferred
language and will show documents in that language if available.
To test, log in to mediawiki.org and set your language preference to 'es',
then on an MediaWiki installation with this patch view the generated
expanded API help at `api.php?action=help&recursivesubmodules=1&modules=main`.
Each link to documentation on mediawiki.org should take you to its
translated /es subpage, if one exists.
Bug: T104518
Change-Id: I339a1f3ae1bce9d759cf251899d57c32b1def91e
|
|
|
|
|
|
|
|
| |
Use HTTPS instead of HTTP where the HTTP link is a redirect to the HTTPS link.
Also update some defect links.
Change-Id: Ic3a5eac910d098ed5c2a21e9f47c9b6ee06b2643
|
|
|
|
|
|
|
|
|
|
| |
Per wikitech-l consensus:
https://lists.wikimedia.org/pipermail/wikitech-l/2016-February/084821.html
Notes:
* Disabled CallTimePassByReference due to false positives (T127163)
Change-Id: I2c8ce713ce6600a0bb7bf67537c87044c7a45c4b
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ApiResult was a mess: some methods could only be used with an array
reference instead of manipulating the stored data, methods that had both
array-ref and internal-data versions had names that didn't at all
correspond, some methods that worked on an array reference were
annoyingly non-static, and then the whole mess with setIndexedTagName.
ApiFormatXml is also entirely annoying to deal with, as it liked to
throw exceptions if certain metadata wasn't provided that no other
formatter required. Its legacy also means we have this silly convention
of using empty-string rather than boolean true, annoying restrictions on
keys (leading to things that should be hashes being arrays of key-value
object instead), '*' used as a key all over the place, and so on.
So, changes here:
* ApiResult is no longer an ApiBase or a ContextSource.
* Wherever sensible, ApiResult provides a static method working on an
arrayref and a non-static method working on internal data.
* Metadata is now always added to ApiResult's internal data structure.
Formatters are responsible for stripping it if necessary. "raw mode"
is deprecated.
* New metadata to replace the '*' key, solve the array() => '[]' vs '{}'
question, and so on.
* New class for formatting warnings and errors using i18n messages, and
support for multiple errors and a more machine-readable format for
warnings. For the moment, though, the actual output will not be changing
yet (see T47843 for future plans).
* New formatversion parameter for format=json and format=php, to select
between BC mode and the modern output.
* In BC mode, booleans will be converted to empty-string presence style;
modules currently returning booleans will need to use
ApiResult::META_BC_BOOLS to preserve their current output.
Actual changes to the API modules' output (e.g. actually returning
booleans for the new formatversion) beyond the use of
ApiResult::setContentValue() are left for a future change.
Bug: T76728
Bug: T57371
Bug: T33629
Change-Id: I7b37295e8862b188d1f3b0cd07f66ac34629678f
|
|
|
|
|
|
| |
* This avoids the overhead of an extra function call
Change-Id: I8ee996f237fd111873ab51965bded3d91e61e4dd
|
|
|
|
|
|
|
| |
ApiBase declares it protected, but for some reason I had made it public
in all subclasses.
Change-Id: I8a50d4f47e66c7f09137968d3941dc5cdc1d28e4
|
|
|
|
|
|
|
|
|
| |
This also adds some new ApiBase::PARAM_* constants to generate more
helpful help, and a method to override the default description message
for the use of ApiDisabled and ApiQueryDisabled.
Bug: 71638
Change-Id: Ic0c3d232e0498d58a043037e2e0c6f0b1c3edad3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Which type is used depends on the ApiModuleManager responsible for
the API module. There are two managers, one in ApiMain and one in
ApiQuery. Both contain a list of API modules they instantiate.
Both use $this as the first parameter in the constructors of the
individual modules. There is no other regular way to instantiate the
modules, so we know the type must either be ApiMain or ApiQuery.
The lists don't intersect.
I would have prefered the naming scheme $mainModule for ApiMain
modules and $queryModule for ApiQuery modules but since this
doesn't add much I left the shorter variable names untouched.
Change-Id: Ie6bf19150f1c9b619655a06a8e051412665e54db
|
|
|
|
|
|
|
| |
Tweak ApiRsd's settings so that it doesn't require read permissions to function.
Bug: 64085
Change-Id: I15288458ec3b0b583eece930d323f80314bb6ee3
|
|
|
|
| |
Change-Id: Icae68c1ab1fd0006e00a3a9a56ae8f831d3d0d45
|
|
|
|
| |
Change-Id: I12fdb71bc87a8ad5ed5b9f1fe9c06bd0f7154e9a
|
|
|
|
| |
Change-Id: I37ce7fe392f4941c500fa0a88007664501d7e338
|
|
|
|
|
|
|
|
| |
For historical reasons, all our API class had a dummy __construct which
simply calls their parent constructor. This patch removes all such
occurences to save out some bytes.
Change-Id: I667955d7821f780fc5ce23823d74dedb1729b9fa
|
|
|
|
|
|
|
|
|
| |
API was using SVN's version keyword which GIT does not support.
All related methods were either removed, or for those that
could have been used from extensions, emptied out.
api.php?version now shows unrecognized param warning.
Change-Id: I910ca1448ed2ed697ac19b17c486d130aa1d7e03
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/104445
|
|
|
|
|
|
|
|
| |
It's a parctice that dates back to 2006 when the API was first written, and frankly isn't covered by the coding conventions. Same thing with the docblocks, they're all copypasted with some bits changed and don't even make sense if you look at them in the genereated code docs.
I don't feel that any of us depend on this anymore (get a better IDE), so in the inerest of consistancy it's time we said goodbye to it.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/103273
|
|
|
|
|
|
|
| |
now no calls to wfExpandUrl() in core that rely on PROTO_CURRENT being the default. Also switch to using getCanonicalUrl() for.... rel="canonical" :D (I picked the right name, I KNEW IT)
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/95010
|
|
|
|
|
|
|
| |
protected
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/94827
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/93820
|
|
|
|
|
|
|
| |
Somewhat vague spec is somehwat vague
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/87631
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/87261
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/79266
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/76195
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/75669
|
|
|
|
|
|
|
|
|
| |
scarily"
Remove some extra blank comment lines
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/75641
|
|
|
|
|
|
|
| |
Add getVersion to ApiFormatXmlRsd
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/75632
|
|
<head> and by providing an API module action=rsd. Added hook ApiRsdServiceApis for extensions to add their own service to the services list.
Patch by Brion Vibber and Bryan Tong Minh.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/75621
|