| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Bug: T166010
Change-Id: Icdbe003e74d2f31b68b575acfa94c09c24d7aed5
|
|
|
|
|
|
|
|
|
|
|
| |
Use name constants instead of string literals in calls to Config::get
and ServiceOptions::get, when referring to core configuration variables.
This protects against typos and makes the decumentation and schema
declaration of the config settings discoverable.
This is the first batch, only touching files directly under /includes/
Change-Id: I7252e636c7c86d950d9257b33491af492c6dd5eb
|
|
|
|
|
|
| |
Found by phan strict checks
Change-Id: If41d16b473baddd92cc4261cdc2bfbe65fedcb19
|
|
|
|
|
|
|
|
|
|
|
|
| |
Automatically refactors wg prefixed globals to use MediaWikiServices config using Rector. Doesn't include files that set globals or files that fail CI.
Rector Gist: https://gist.github.com/tchin25/7cc54f6d23aedef010b22e4dfbead228
* This patch uses a modified source code rector library for our specific use case and the rector will have different effects without it.
A writeup for future reference is here: https://meta.wikimedia.org/wiki/User:TChin_(WMF)/Using_Rector_On_MediaWiki
Change-Id: I1a691f01cd82e60bf41207d32501edb4b9835e37
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
CommentParser:
* Move comment formatting backend from Linker to a CommentParser service.
Allow link existence and file existence to be batched.
* Rename $local to $samePage since I think that is clearer.
* Rename $title to $selfLinkTarget since it was unclear what the title
was used for.
* Rename the "autocomment" concept to "section link" in public
interfaces, although the old term remains in CSS classes.
* Keep unsafe HTML pass-through in separate "unsafe" methods, for easier
static analysis and code review.
CommentFormatter:
* Add CommentFormatter and RowCommentFormatter services as a usable
frontend for comment batches, and to replace the Linker static methods.
* Provide fluent and parametric interfaces.
Linker:
* Remove Linker::makeCommentLink() without deprecation -- nothing calls
it and it is obviously an internal helper.
* Soft-deprecate Linker methods formatComment(), formatLinksInComment(),
commentBlock() and revComment().
Caller migration:
* CommentFormatter single: Linker, RollbackAction, ApiComparePages,
ApiParse
* CommentFormatter parametric batch: ImageHistoryPseudoPager
* CommentFormatter fluent batch: ApiQueryFilearchive
* RowCommentFormatter sequential: History feed, BlocklistPager,
ProtectedPagesPager, ApiQueryProtectedTitles
* RowCommentFormatter with index: ChangesFeed, ChangesList,
ApiQueryDeletedrevs, ApiQueryLogEvents, ApiQueryRecentChanges
* RevisionCommentBatch: HistoryPager, ContribsPager
Bug: T285917
Change-Id: Ia3fd50a4a13138ba5003d884962da24746d562d0
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Each files' changes can be reviewed independently
There may be places in the files that I didn't catch -
this is not meant to be an exhaustive replacement
Even where it may make sense to use Html::element,
Html::rawElement is used in this patch to avoid changing
any behavior.
Change-Id: I26eaacc65106f10a5066c31d82f6594a59ff1281
|
|/
|
|
|
| |
Bug: T160814
Change-Id: Ib769ee725c20245356772f3c2b23531f5b94ad46
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Not all classes are matched correctly in feed output because of
regex used. Fixed it by updating regex and adding unit tests
Bug: T36801
Change-Id: I6e7a883caee2a36c11966991b19ba93c229683cf
|
|/
|
|
| |
Change-Id: I743d992db703f2b46b6e3abf80c14d026c6599f4
|
|
|
|
|
|
|
| |
Optional for now
Bug: T252979
Change-Id: Ic95fca9efb4beb5655087d3bd2b5264c86aca091
|
|
|
|
|
|
| |
Bug: T250981
Bug: T249021
Change-Id: I0251865f6f1f5ab0627d5eac92d0e210284bc291
|
|
|
|
|
|
|
|
| |
Amending Design Style Guide Base10 to slightly darker `#202122`
to fulfill WCAG requirements in connection to Accent50.
Bug: T248393
Change-Id: Id50b31891ad91c05ec8cc28c8fc75152161b5b89
|
|
|
|
|
|
|
| |
This does //not// fix all calls in core.
Bug: T244929
Change-Id: I02ffcca31fa0bdc6bffddf21e82f4ff5e9ab5374
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Added:
- ContentHandlerFactory
Tests:
- PHPUnit
Changed
- Calls of changed and deprecated
- DI for some service/api
Deprecated:
- ContentHandler::* then similar to ContentHandlerFactory
- ContentHandler::getForTitle
- ContentHandler::$handlers
Bug: T235165
Change-Id: I59246938c7ad7b3e70e46c9e698708ef9bc672c6
|
|
|
|
| |
Change-Id: I90cfe8366c0245c9c67e598d17800684897a4e27
|
|
|
|
|
|
| |
It is enabled for b/c in extensions, but not needed in core
Change-Id: I51dca12be9c77049f77563d9bf0edd07928c2300
|
|
|
|
| |
Change-Id: I2d06bbacef88573f286da25994a3ad434ed90e9c
|
|
|
|
|
|
|
| |
This introduced for use by ChangesFeed::execute(), which in turn
has also been unused for many years – and removed in 6f4d15e385807.
Change-Id: I5ba7ea2b6ff86e4d210b77bf05971c183352424c
|
|
|
|
| |
Change-Id: I429e68c8642a00afa812f5ae900c1fb4f8308528
|
|
|
|
|
|
|
|
| |
Function Content::getNativeData() was deprecated. Replace with
calls to new function TextContent::getText() in most places.
Bug: T155582
Change-Id: I2bd508c72aac4faf474ba45ab1f92e2e8d2eb9be
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This allows CommentStore to be added to MediaWikiServices
without the need of an aditional Factory.
This change includes a compatability layer to allow the behaviour
from 1.30 to continue to be used while deprecated.
CommentStore::newKey has been deprecated.
Keys are now passed into the public methods of CommentStore
where needed.
The following CommentStore methods have had their signatures changed
to introduced a $key parameter, but when used in conjunction with
CommentStore::newKey behaviour will remain unchanged:
* CommentStore::getFields
* CommentStore::getJoin
* CommentStore::getComment
* CommentStore::getCommentLegacy
* CommentStore::insert
* CommentStore::insertWithTemplate
Change-Id: I3abb62a5cfb0dcd456da9f4eb35583476ae41cfb
|
|
|
|
|
|
|
|
|
| |
These comments do not add anything. I argue they are worse than having
no comments, because I have to read them first to understand they
actually don't explain anything. Removing them makes room for actual
improvements in the future (if needed).
Change-Id: Iee70aad681b3385e9af282d5581c10addbb91ac4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Several classes have a "selectFields()" static method to tell callers
which fields to select from the database. With the recent comment table
change and the upcoming actor table change, this pattern has become too
simplistic as a SELECT will need to join several tables to be able to
retrieve all the needed fields.
Thus, we deprecate the selectFields() methods in favor of getQueryInfo()
methods that return tables and join conditions in addition to the
fields.
Change-Id: Idcfd15568489d9f03a7ba4460e96610d33bc4089
|
|
|
|
|
|
|
|
| |
Aligning diff context `background-color`, `color` and
`border-color` to overhauled WikimediaUI palette ones.
Bug: T152025
Change-Id: I70a4eeabfb0905941c093efad38fb1b21dbe4418
|
|
|
|
|
|
|
| |
A subsequent patch will remove the old columns.
Bug: T166732
Change-Id: Ic3a434c061ed6e443ea072bc62dda09acbeeed7f
|
|
|
|
|
|
| |
Organize phpcs.xml a bit
Change-Id: Ifb767729b481b4b686e6d6444cf48b1f580cc478
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
It's unreasonable to expect newbies to know that "bug 12345" means "Task T14345"
except where it doesn't, so let's just standardise on the real numbers.
Change-Id: I6f59febaf8fc96e80f8cfc11f4356283f461142a
|
|/
|
|
|
|
|
|
| |
This has been added in 58f7bb30a04d6c1f137cc1659b8998c5349bf13e (r36376),
already commented-out, and was moved and amended several times until
it became completely out of place.
Change-Id: I11b6e3e2fbb2d0a325a6723bf5874133a7f53851
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For the index.php end point, POSTs do not need a token.
This avoids cross-DC writes in active/active DC setups and
avoids DB writes that can be caused by just accidentally
following a link.
There are no links to action=purge by default in MediaWiki.
User scripts that create purge links will continue to work.
However these links will now point to a confirmation form.
To preserve the immediate-purge-redirect effect, these
scripts should be updated to use the API instead.
Bug: T135170
Change-Id: I5749ff470d99c5e3f22e05ff6856394cc05a0f48
|
|
|
|
|
|
|
|
|
|
| |
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 makes the delete() calls work properly for all DCs.
Also, using the message cache was fairly bizzare.
Change-Id: Idec7fa47811e982ba89bb8fbbd9565a26585e77f
|
|
|
|
| |
Change-Id: I048ccb1fa260e4b7152ca5f09b053defdd72d8f9
|
|
|
|
|
|
|
|
| |
This drops support for the custom utf8 normal PHP extension in favor
of the intl extension.
Bug: T90825
Change-Id: Ifbaeb2ef684217cf6187ccc4fb4d303f89608300
|
|
|
|
| |
Change-Id: I31c81c78715048004fc8fca0f27d09c1fa71c118
|
|
|
|
|
|
|
|
|
|
|
| |
Xhprof generates this data now. Custom profiling of various
sub-function units are kept.
Calls to profiler represented about 3% of page execution
time on Special:BlankPage (1.5% in/out); after this change
it's down to about 0.98% of page execution time.
Change-Id: Id9a1dc9d8f80bbd52e42226b724a1e1213d07af7
|
|
|
|
|
|
|
|
|
|
| |
- Swap "$variable type" to "type $variable"
- Added missing types
- Fixed spacing inside docs
- Makes beginning of @param/@return/@var/@throws in capital
- Changed some types to match the more common spelling
Change-Id: I783e4dbfe5f6f98b32b9a03ccf6439e13e132bcc
|
|
|
|
| |
Change-Id: Ib51381a2261d064988ba2f39b71c0252f2458faf
|
|
|
|
|
|
|
|
|
| |
Swapped some "$var type" to "type $var" or added missing types
before the $var. Changed some other types to match the more common
spelling. Makes beginning of some text in captial.
Also added some missing @param.
Change-Id: I7f605aa9e117b5fd80d9b1440864fe526d2b14a5
|
|
|
|
|
|
|
|
| |
Added spaces after/before parenthesis
Removed unneeded parenthesis around some statements
Broke a long line
Change-Id: I7fbe129f7bbf524dd0598ece2a9708643f08453b
|
|
|
|
|
|
|
| |
This makes code easier to read and the urlencode is done inside
getLocalURL or friends
Change-Id: I21b988890356d11835eedba12a90a347bf0905b2
|
|
|
|
|
|
|
| |
Added spaces before if, foreach
Added some braces for one line statements
Change-Id: Ibb8dd102db045522d12ff939075ba7420d95ab6b
|
|
|
|
|
|
|
|
|
| |
And added/removed spaces around some other tokens,
like +, -, *, /, <, >, =, !
Fixed windows newline style
Change-Id: I0b9c8c408f3f6bfc0d685a074d7ec468fb848fc8
|
|
|
|
| |
Change-Id: I37ce7fe392f4941c500fa0a88007664501d7e338
|
|
|
|
|
|
|
|
|
| |
* Ran spell-checker over code comments in /includes/
* A few spellchecking fixes for wfDebug() calls
Found one very strange (NOOP?) line in Linker.php - see "TODO: BUG?"
Change-Id: Ibb86b51073b980eda9ecce2cf0b8dd33f058adbf
|
|
|
|
|
|
|
|
|
|
|
| |
Doxygen expects parameter types to come before the
parameter name in @param tags. Used a quick regex
to switch everything around where possible. This
only fixes cases where a primitve variable (or a
primitive followed by other types) is the variable
type. Other cases will need to be fixed manually.
Change-Id: Ic59fd20856eb0489d70f3469a56ebce0efb3db13
|
|
|
|
|
|
| |
->Added the background,border in diff-context,diff-addedline,diff-deleted line in $styles array in the FeedUtils.php
Change-Id: Icbfb6cfc659652c146e565b760d0815640fdad64
|
|\ |
|