| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Changes to the use statements done automatically via script
Addition of missing use statements and changes to docs done manually
Change-Id: I443aada1c18c8628b02671aa9fd6f441961e5c2e
|
|
|
|
|
| |
Bug: T319340
Change-Id: I2d81c2d7fd31bb07a2d2057361f1670cdeb8b8d0
|
|
|
|
|
|
|
|
|
| |
The Hooks class contains deprecated functions and the whole class is
going to get removed, so remove the convenience function and inline the
code.
Bug: T335536
Change-Id: I8ef3468a64a0199996f26ef293543fcacdf2797f
|
|
|
|
|
|
|
|
|
|
| |
Avoid leaking local variables into the global scope by accident, by
moving the entry point code to a function.
In index.php, document the intentional $mediaWiki global so that
nobody removes it by accident.
Change-Id: Ie1a181ae3ebdda90cd2321f0c1b50e31fb0d586e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
Turn this into a doc group, and let the descriptions come
directly from the files in question. This makes the list easier
to maintain, and alsom means that the overview page becomes
discoverable whenever one is looking at the entry point file
as well. Previously the doc page pointed to the entry points,
but not the other way around. This is also fixed.
Bug: T244294
Change-Id: I891c5a37e17592edc1136d7367949927121c8bc8
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Define the global constant MW_REST_API in rest.php, by analogy with
MW_API. Also generalize this by adding MW_ENTRY_POINT, which contains
the entry script name, "cli" or "unknown". This allows tests such as
if ( MW_ENTRY_POINT !== 'index' )
which is probably what is really intended by defined('MW_API') in many
cases.
Change-Id: I24099f4cdd170de17afd6e1bbad67c9b204071fc
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These two entry points have themselves partly indexed by Doxygen
in a very strange way where these two comments cause part of an
if-statement to be seen as the name of a local variable.
Probably due to some kind of bad interaction with the
maintenance/mwdoc-filter.php filter applied to the file before
it gets indexed.
Fix it for now by avoiding use of /** blocks for something that
isn't a class, function, class member or documented global var.
Change-Id: I4903069e704c3283e6ec7a39999a489d0117cc71
|
|
|
|
|
|
|
|
|
| |
Hook, methods, classes still to rename where appropriate.
Bug: T104148
Depends-On: Id34339dff88bc6d1863378ac94b96b2d590b891d
Depends-On: I4e2938395bcbf7956b83fff00978f09c61dcfa36
Change-Id: I7a725dae551c867a4fa7c213838d52c7fb862756
|
|
|
|
|
|
|
|
| |
Attempts to use session data via these endpoints will now cause
exceptions to be thrown.
Bug: T127233
Change-Id: I28b080a84e7b928e4336a5a1ec770bb57b05d009
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Though that URL may no longer resolve, the correct XML namespace for
OpenSearch remains http://a9.com/-/spec/opensearch/1.1/ – see [1] and
[2] for some discussion clarifying this.
Similarly, the canonical namespace URL for MozSearch uses HTTP, not
HTTPS, as can be seen when visiting it (via either protocol) [3].
This reverts commit 3b86cf03c162298211da2f57333bcc645123a979.
[1]: https://github.com/dewitt/opensearch/issues/3
[2]: https://groups.google.com/d/msg/opensearch/8ecuX35-lEs/JR_cs0N6k68J
[3]: https://www.mozilla.org/2006/browser/search/
Bug: T196643
Change-Id: I8d14660550a5c67cefc421a334502963bfd6ed3c
|
|
|
|
|
|
|
| |
* a9.com OpenSearch website doesn't exist anymore. I replaced it with OpenSearch.org.
* Change HTTP protocol for the xmlns:moz website. I removed the website redirection.
Change-Id: I2c261cd654f009a9316510f2cf80944235c1af82
|
|
|
|
|
|
|
|
|
| |
The siteinfo API response's 'writeapi' value is now hard-set to true,
as are the ResourceLoader variables wgEnableAPI and wgEnableWriteAPI,
to be deprecated later.
Bug: T115414
Change-Id: I54ff9428b247ba203d67aba079149393f323d5a9
|
|
|
|
|
|
|
|
| |
These are so simple there will probably be no problems, but let's set
them to 'warn' for a week just to be sure.
Bug: T127233
Change-Id: I04007faaf541f30dcaf2085fa86b45bea1ecb754
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
This allows empty lines inside the comment as found by the
MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.EmptyComment sniff
Change-Id: Iac155bbda4a84562db2b452baeae9b8973899453
|
|
|
|
| |
Change-Id: I074deaa7dabc9512812a0ec76a8cc2ea4535a484
|
|
|
|
|
|
|
|
|
| |
There's really no reason for the extension to exist separately from
core, and merging it reduces the risks of bitrot in both the extension
(lots of deprecated functions there) and core (missing integration with
PageImages and TextExtracts, for example).
Change-Id: Ie0ab90902ede9499879402290006466efba479e9
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Follows-up I1343872de7, Ia533aedf63 and I2df2f80b81.
Also updated usage in text in documentation and the
installer LocalSettingsGenerator.
Most of them were handled by this regex:
- find: (require|include|require_once|include_once)\s*\(\s*(.+?)\s*\)\s*;$
- replace: $1 $2;
Change-Id: I6b38aad9a5149c9c43ce18bd8edbab14b8ce43fa
|
|
|
|
| |
Change-Id: I8741b5b979e55f38a666961a16c387586a92410e
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix up spaces in our function calls, we do not want spaces before a
comma and try to avoid multiple commas whenever possible.
Errors:
* No space found after comma in function call
* Space found before comma in function call
Change-Id: I51aec02016f742422fa60b92ad35ba3f0ef59ba3
|
|
|
|
|
|
|
|
| |
Removed left over uses of dirname( __FILE__ ) to __DIR__, even in comments.
Running the PHP version test in maintenance/Maintenance.php earlier, so that
we no longer have to stay PHP < 5.3 compatible in there.
Change-Id: I5a00bd5c6af44b7f826c4e5576a7b3de7b5026d8
|
|
|
|
|
|
| |
Or $this->msg in special pages.
Change-Id: I774a89d646615053c8424050e42ad95601f92543
|
|
|
|
|
|
| |
Also made file documentation more consistent.
Change-Id: I30e124514396f110a572467b94ca06cefd5f7b46
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/95000
|
|
|
|
|
|
|
| |
and install-utils.inc
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/48658
|
|
|
|
|
|
|
| |
Clients will expect text/html specifically, and would not necessarily know that say application/xhtml+xml means the regular search page.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/37279
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/37272
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
searches instead of the domain root (which may not even be a wiki).
This is done by adding the <moz:SearchForm> extension element with the Special:Search URL.
Removed the 24-character truncation on ShortName... neither Firefox nor IE seems to care about longer names, but both expect the ShortName and <link> title to match, and will think you have a duplicate search provider if they don't match because only one was truncated. (Besides, 24 was longer than the spec's limit of 16 -- why bother limiting at all if not to spec?)
The JSON suggestions are now no longer included in the OpenSearch description if the API is disabled, since the interface won't work.
Generally removed some hardcoded escape-then-stick-vars-in-string-output eww... Extension hooks now have a more general opportunity to alter or replace the OpenSearch URLs by tying into the OpenSearchUrls hook.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/36869
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* check in a new ajax suggestion engine (mwsuggest.js) which uses
OpenSearch to fetch results (by default via API), this should
deprecated the old ajaxsearch thingy
* extend PrefixSearchBackend hook to accept multiple namespaces for
future lucene use (default implementation however can still
process only one)
* Added to preferences, also a feature to turn it on/off for every
input (disabled atm until I work out browser issues completely)
* WMF wikis probably won't be using API to fetch results, but a
custom php wrapper that just forwards the request to appropriate
lucene daemon, added support for that
SpecialSearch:
* moved stuff out of SpecialSearch to SearchEngine, like snippet
highlighting and such
* support for additional interwiki results, e.g. title matches
from other projects shown in a separate box on the right
* todo: interwiki box doesn't have standard prev/next links to
avoid clutter and unintuitive interface
* support for related articles
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/33400
|
|
|
|
|
|
|
| |
name, use wfMsgForContent, remove an obsolete line.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/31337
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
to avoid passing the length limit as often, is customizable per site via
'opensearch-shortname' message.
Note that the spec actually says ShortName should be trimmed to *16* chars,
which is pretty awful -- 'Wikimedia Commons' doesn't even fit. I haven't
changed the current trimming (to 24 characters).
Note that Firefox uses the longer 'Description' field for its 'add' menu
item, but the ShortName for the actual item once you add it to the menu.
Possibly should have separate description and shortname thingies and do some
smarter trimming. Sigh.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/31336
|
|
|
|
|
|
|
| |
Replaced a bunch of instances of 'if-this-is-not-fully-qualified-prepend-$wgServer' with a function, wfExpandUrl()
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/30898
|
|
|
|
|
|
|
| |
OpenSearch results from 5 to 10 minutes, and send a Cache-Control header as well as Expires for better squid support
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/30233
|
|
|
|
|
|
|
|
|
| |
taken to maintain backwards compatibility.
* Used special page subpages in a few more places, instead of query parameters
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/17300
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/17042
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/17040
|
|
|
|
|
|
|
| |
engine in Firefox 2
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/16898
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/16139
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/16138
|
|
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/16137
|