Commit graph

1682 commits

Author SHA1 Message Date
DannyS712
0bbe0b8fe6 Docs: Update hooks.txt to remove usage of global $wgUser
Also remove 2 refernces to $wgOut and $wgRequest

Bug: T159299
Bug: T160810
Bug: T160812
Change-Id: I267dece08d6a2224091cbcb5d29e29bd9e9d3f07
2020-01-07 19:06:04 +00:00
jdlrobson
5b044bb928 resourceloader: Introduce hooks in ResourceLoaderSiteModule
This will allow extensions/skins to alter the wiki pages that editors
can use to control styles

Bug: T237050
Change-Id: I329415b787136fcf9422a9deebfcd34f83b40f12
2020-01-06 22:52:27 +00:00
mainframe98
297a89069a Add LinkBatchFactory to inject services into LinkBatch
All services required by LinkBatch are now injected by the
LinkBatchFactory. The constructor for LinkBatch has been
soft-deprecated, but the required services are still optional.

Bug: T239855
Depends-On: If49cbb730d4ac48586b891908cf24601efbc5d6a
Change-Id: I93d931ab60305ad49a6e419f8269c77791a3938d
2020-01-06 17:02:31 +01:00
jenkins-bot
cf92c2dc44 Merge "Use namespaced IPUtils class" 2020-01-01 23:56:22 +00:00
jenkins-bot
89dbf5c1dc Merge "Convert docs/skin.txt and docs/title.txt to Markdown" 2020-01-01 23:31:42 +00:00
Kunal Mehta
99007e96c7 Use namespaced IPUtils class
Change-Id: I047e099a93203a59093946d336a143d899d0271f
2020-01-01 02:36:49 -08:00
Manuel Alcaraz Zambrano
328f78b711
docs: convert pageupdater and sitelist to markdown
Change-Id: I465831ad1fe0f05c32a44d2b47f3f19b78ba65d7
2019-12-21 19:30:58 +01:00
jenkins-bot
3a1823daf2 Merge "docs: Fix link on intro page" 2019-12-12 01:11:11 +00:00
mainframe98
ac48c84224 Allow specifying autoloaded classes for tests
This introduces two new keys to the extension schema, analogous to
the existing autoloader keys: TestAutoloadNamespaces and
TestAutoloadClasses.

The classes and namespaces defined by these keys are only loaded by
the registry when ExtensionRegistry::setLoadTestClassesAndNamespaces
is called. The phpunit wrapper does this in PHPUnitMaintClass::setup.
The unit test bootstrap file calls
ExtensionRegistry::exportTestAutoloadClassesAndNamespaces instead,
similar to how it loads the regular classes and namespaces.

Bug: T196090
Change-Id: I88cf69663362fd599c20649b1df641907a02678d
2019-12-10 21:39:30 +00:00
Taavi Väänänen
aa1485cd95 Convert docs/skin.txt and docs/title.txt to Markdown
Bug: T233244
Change-Id: I46806ee578f0b2b5ca9bcfebd9ad554baeae8b34
2019-12-09 20:31:43 +02:00
apaskulin
5223984589 docs: Fix link on intro page
Fixes broken link on intro page and re-adds sentence about
purpose of mediawiki.org.

Bug: T233244
Change-Id: Id164efc81d16083cf51ea180136a050723880e32
2019-12-09 08:44:01 -08:00
jenkins-bot
c0a49f1603 Merge "docs: Update docs/schema.txt and docs/scripts.txt to markdown" 2019-12-07 21:05:29 +00:00
jenkins-bot
df03847077 Merge "Implementation of Doxygen-friendly format" 2019-12-07 20:52:37 +00:00
shcherba
7dc297d34f docs: Update docs/schema.txt and docs/scripts.txt to markdown
Bug: T233244
Change-Id: I2c9604539655183bc4cdc9c570b0c638b5b82e7b
2019-12-07 13:30:38 +00:00
jenkins-bot
715f4ac53e Merge "docs: Change docs/contenthandler.txt and docs/database.txt to markdown" 2019-12-04 21:16:19 +00:00
Arturek1
c11b745435 Implementation of Doxygen-friendly format
Markdown format implemented in docs/magicword.md and docs/memcached.md
A section with helpful resources has been added in docs/Introduction.md

Whitespaces removed, Intoduction.md modified

Unnecessary whitespaces have been removed. Helpful resources section has been modified.

Headings fixed, Title changed in magicword.md

Title changed from "magicword.txt" to "Magic Words" in docs/magicword.md. 
Some H1 headers changed to H2 in docs/memcached.md and docs/Introduction.md. 
An unnecessary sentence removed in docs/Introduction.md.

Change-Id: I5c9e8663c922be4ca5f0eea9d5c2469b1b18281c
Task: T111298
2019-12-04 21:08:15 +00:00
arcayn
2834212cc9 docs: Change docs/contenthandler.txt and docs/database.txt to markdown
Bug: T233244
Change-Id: Ieddd5e8850988b2ee66fd6c2c047000526c16a34
2019-12-04 19:20:54 +00:00
leo60228
ea09f8469e docs: Convert logger.txt and linkcache.txt to Markdown
Indexing on doc.wikimedia.org doesn't work for .txt files.
This was done for Google Code-In 2019.

Bug: T233244
Change-Id: I4c441f92b89c1ab1053c5f16a6e7100f2e5e9492
2019-12-04 00:56:26 +00:00
Taavi Väänänen
94582698c3 docs: Convert docs/language.txt and docs/injection.md to Markdown
Bug: T233244
Change-Id: I101381d134b98c48b83e8e0a8bea0a3c384c30b2
2019-12-03 21:35:23 +02:00
jenkins-bot
2ea3adebc2 Merge "skins: Remove deprecated SkinCopyrightFooter $forContent param" 2019-11-19 21:17:56 +00:00
jenkins-bot
8d240f87a9 Merge "docs: Update hook documentation for PageContentSaveComplete" 2019-11-19 01:45:24 +00:00
jenkins-bot
cad9111aec Merge "hooks: Do not document the Parser object to be passed by ref" 2019-11-18 22:04:41 +00:00
Piotr Miazga
076993c938 skins: Remove deprecated SkinCopyrightFooter $forContent param
The $forContent parameter was deprecated six years ago and looks
like nothing else is using it (verified via codeseach.wmflabs.org)

Change-Id: I7c6093a083845a40b82e39c91006a5a0b223eab6
2019-11-18 16:16:27 -05:00
Thiemo Kreuz
17363ad381 hooks: Do not document the Parser object to be passed by ref
It does not make sense for hook handler functions to *expect* the
Parser to be passed by reference. Hook handlers not only can't do
anything with it being a reference, they should *not* use it to
replace the Parser with another one.

This is an obsolete relict from PHP 3 (?), where objects got passed as a
cloned copy, which was very expensive.

Note we can not update the Hooks::run() calls as long as a single
hook handler still *expects* a reference.

Bug: T193950
Change-Id: I5f9a3f56faec0e90a2839c064844928c3b5c9751
2019-11-18 16:47:08 +00:00
Thiemo Kreuz
210483fc16 hooks: Stop suggesting to pass objects by reference
It looks like the examples section on top of the hooks.txt file still
suggests to pass objects by reference. This is an obsolete relict from
PHP 4 and not needed any more.

Bug: T193950
Change-Id: I61bdc4a313401955943903918ff8167c2bea5aac
2019-11-18 16:45:28 +00:00
jenkins-bot
8aafbfc02f Merge "docs: Update ParserGetVariableValueSwitch documentation" 2019-11-15 04:29:59 +00:00
Umherirrender
1feb04b741 docs: Update hook documentation for PageContentSaveComplete
The hook no longer takes null, as of 4860e1d5ac (I492514413ec9c37c2f9343bb207798fc8e24a5a9).

Change-Id: I31b7768ae5bd2389b59f2aca1c55ca962a75b509
2019-11-12 18:45:21 +00:00
Thiemo Kreuz
abf62c6c78 Fix ApiQuerySiteinfo class name capitalization
Change-Id: I7e522fb34119b62c4fb59590f7ee8a45f5a4954d
2019-11-08 16:58:11 +01:00
jenkins-bot
c2c789cc59 Merge "Remove traling double newlines from text files" 2019-11-07 10:01:02 +00:00
Timo Tijhof
0da1ecfd89 profiler: Remove ProfilerOutputDb and profileinfo.php entry point
Bug: T231366
Change-Id: I211c8192200d9af00914f9847608a6daf2898f91
2019-11-06 15:28:00 -05:00
Bartosz Dziewoński
d50c7f5b56 extension.schema.v2: Fix schemas for 'packageFiles'
The PHP code handling 'packageFiles' looks like it only expects
numeric arrays, and not associative arrays. Therefore in JSON the
value for the 'packageFiles' key should be arrays and not objects.
(And a special case of a string, handled the same as single-element
array, is also accepted.)

Individual items in the array can be not only strings, but also
objects, describing data which is pulled from other sources than a
file.

* ResourceLoaderFileModule: Remove unused variable and tweak docs.

Change-Id: I6c3d186de1877f73d4a4e3fec7d6d632a5d5fa83
2019-10-24 22:30:10 +02:00
Fomafix
d607ef8512 Remove traling double newlines from text files
Performed using:

git ls-files \*.json \*.php \*.xml \*.xsd \*.html \*.txt \*.sql | xargs sed -i -e :a -e '/^\n*$/{$d;N;};/\n$/ba'

Excluded tests/parser/preprocess.

Change-Id: I513538ff13c942acfe589f15c5128a8df2b3ace9
2019-10-23 21:17:43 +02:00
jenkins-bot
baf3d4b803 Merge "Remove the deprecated GetBlockedStatus hook" 2019-10-21 17:11:27 +00:00
Thalia
3be681e625 Remove the deprecated GetBlockedStatus hook
Change-Id: I19d522ce32f540cc39bf482ab76f71492e4e9fd0
2019-10-21 17:16:20 +01:00
Thalia
e915f9538a Document that the GetUserBlock hook may pass null instead of a block
Change-Id: I776362564b8caff3c4ab0eb38eb5ef63034e0f51
2019-10-21 12:58:42 +01:00
Daimona Eaytoy
ad93e7ca09 Fix docs for GetUserBlock hooks
Change-Id: I93b64fb00477c0632a6fa3573800dd7609d25db0
2019-10-20 10:45:27 +02:00
Timo Tijhof
34bff221ba mediawiki.messagePoster: Introduce 'MessagePosterModule' extension attribute
This allows extensions to add additional files or dependencies to
the 'mediawiki.messagePoster' module bundle.

Bug: T235315
Change-Id: I17c34cbb26e786328d3d99beb0c0fa65e15ea084
2019-10-17 18:00:10 +00:00
jdlrobson
e97f2943f2 registration: QUnitTestModule should support packageFiles and templates
Change-Id: I1a66939d2b596094b419de40b370e79f09c85581
2019-10-04 17:09:39 +00:00
apaskulin
5443e647bf docs: Fix typo on Doxygen main page
This PR fixes a typo and removes a few extra words
from the Doxygen landing page.

Change-Id: Ieb09c0e72129f4c6b0ccd574daf2f9316f580259
2019-09-27 07:45:59 -07:00
jdlrobson
2bb8515286 Make Special:Contributions use OOUI
Changes:
* IP address/username is now a single label & input element combination
* Add page-specific styles in separate LESS file
* Remove no longer necessary CSS rule

Bug: T117736
Bug: T219238
Change-Id: I979078d8937898acae22bc28d5ed51da1d4ed627
2019-09-23 18:50:44 +00:00
James D. Forrester
7a15f45476 Follow-up 7960d53: Mark when the SecondaryDataUpdates and WikiPageDeletionUpdates hooks were deprecated
Change-Id: Id35cc5e1d21a62d0d6469b80b693bb654215db2a
2019-09-13 11:39:32 -07:00
Thiemo Kreuz
946f35705b docs: Update ParserGetVariableValueSwitch documentation
It never makes sense to pass a (possibly different) Parser or PPFrame
object *back* as a reference. The & are a relic from very old PHP
versions that cloned all objects before passing them. This is not
needed any more.

Change-Id: I9fdb184cb41a61842819d44c9f07bd9cf435bb14
2019-09-10 10:42:34 +02:00
Thalia
bf5464614b Deprecate the GetBlockedStatus hook
This was replaced by GetUserBlock in 7a5508573a.

Handlers in production were updated to use GetUserBlock in
I952aa7d40 and Ibbcd3a239.

Bug: T229035
Change-Id: I95f9fabc6e795243cfe0a1e8737ca6abfb865538
2019-09-09 23:29:25 +01:00
Thalia
af24fc1a7a Deprecate the UserIsHidden hook
This was replaced by GetUserBlock in 7a5508573a.

Handlers in production were updated to use GetUserBlock in
Ibbcd3a239.

Bug: T228948
Change-Id: I3e6da73e595e2bd6a96600fe2a6dc68a54d06a2e
2019-09-09 20:31:02 +01:00
mainframe98
b7b490e46d Support the creation of special pages with services injected
Now that the ObjectFactory library supports object creation with
services (T222409), the special page factory can use the object
factory to create special pages based off a spec, allowing the
creation of special pages that need services injected.

The object factory now also handles constructing from class name
and from callable.

This also deprecates providing the special page list with an
instance of SpecialPage, which hasn't been necessary since
r15031.

Bug: T222388
Change-Id: Iabb78ce5c98cfb3b586644be35d984871cb750cb
2019-09-08 12:57:54 +02:00
Jack Phoenix
495f9fa290 resourceloader: Add $conf parameter to the 'ResourceLoaderGetConfigVars' hook
Change-Id: I3cca8ce87b303ef7dfd96bfe1fdda0c51c441f6f
2019-09-07 15:30:40 +00:00
Timo Tijhof
b7c5acd419 docs: Convert doxygen_first_page.php to proper Markdown
Doxygen has native support for indexing of Markdown pages.
It basically parses them the same way it parses the uglier
methodology of creating a PHP file containing a the markdown
text in a large comment that would start with `@page` or `@mainpage`.

* http://doxygen.nl/manual/commands.html#cmdpage
* http://doxygen.nl/manual/commands.html#cmdmainpage
* http://doxygen.nl/manual/markdown.html#md_page_header

The internal reference name and page title (comparable to the string
passed to `@mainpage` or `@page`) are by default derived from the
file name (without suffix).

The internal reference name (for use in cross-page links) can also
be overidden with an `{#something}` annotation in the first heading.

When using the annotation `{#mainpage}` it changes the page type
from a regular `@page` to the `@mainpage`.

Change-Id: I0c25a49088825744773c4d87dde5688894b2004e
2019-09-04 22:57:02 +00:00
Timo Tijhof
178d312eb8 MessageCache: Remove $wgMsgCacheExpiry configuration var
This variable has never been set to anything other than the default value of
24 hours as introduced in 2003 (r2203, r2204; or 036ff960ce, edf6b38626).

The variable has never changed in core, it's not overridden at WMF,
and MessageCache is not constructed anywhere other than ServiceWiring.php
anywhere in repos on Wikimedia Gerrit, indexed by MediaWiki Codesearch,
or any GitHub-hosted repository (incl Wikia repos and WikiHow mirrors).

I've also checked all GitHub-hosted repos for boilerplates and/or public
settings files from devs or prod, and couldn't find any example of
this being overridden (after filtering out copies of the core files
themselves). Rather than having to support potentially hard-to-predict
interactions betweeen caching layers by checking its state, make it
a constant so we can code reason about it more easily.

Change-Id: Ie2e139001aae3ac54b509d94a3d917bb408eaca0
2019-08-27 17:33:11 +00:00
Daimona Eaytoy
f18af0b61f Remove more Oracle and Mssql leftovers
Follows-up 4d10bb14e8 and 807d793ab9.

According to codesearch [0], these were the last usages. Note that this
patch leaves two constants in places, IDatabase::DBO_SYSDBA and
DBO_DDLMODE. These are public constants used "mostly for oracle" according
to the docs, but maybe we could find other use cases in the future (?).

[0] - https://codesearch.wmflabs.org/core/?q=oracle%7Cmssql&i=fosho&files=%5C.%5B%5Ej%5Cd%5D%7Cen%5C.json&repos=

Bug: T230418
Change-Id: Ibfb748b4b23b885a77f4de161af4bf2ab9649a89
2019-08-25 17:21:49 +00:00
Huji Lee
0a611b47a8 Skin: Add new hook, UndeletePageToolLinks, for Special:Undelete views
This allows extensions to add further links; the particular use case
in mind is for the AbuseFilter extension, but others may want this
too.

Bug: T231055
Change-Id: I671a0479e877e6c37606b688064cb9c893717709
2019-08-23 20:51:21 +00:00