| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This will no longer be a thing exclusive to REST API,
but will be used more widely for search.
This also introduced the (optional) $size param, for
which implementations (PageImages only) have already
been updated.
Depends-On: Ia30afcc43a0ecec772cd0a82dd9661e61f31a651
Change-Id: Ic9110345b4db69d268685b80ec8e4e33da95a050
Bug: T306883
|
|
|
|
|
|
|
|
|
|
|
|
| |
[x] Remove the header "Results from sister projects"
[x] Remove background box
[x] Update sister projects icons. These are the new black and white icons added to design system. All the icons can be found at the bottom of this icon list.
[x] Add sister project name as a header (with icon) for each project
[x] Update sister project search outlink copy, style and placement. - "See all results" link in the mock.
[x] Add new spacing/padding to better align with the overall page. Follow the grid as mentioned in this ticket. The padding within the section can be found on Figma
Bug: T307468
Change-Id: I9498a070dadacd26d4402943f6f59f308c99a0d0
|
|
|
|
|
| |
Bug: T296083
Change-Id: I83e4cca11c9266e93b237ed11c14293a001609dc
|
|
|
|
| |
Change-Id: I1d9d62d80b17d1a05222c6e82f631cb801c311a8
|
|
|
|
|
|
|
|
| |
The "${var}" and "${expr}" style string interpolations are deprecated in
PHP 8.2. Migrate usages in core to "{$var}" as appropriate.
Bug: T314096
Change-Id: I269bad3d4a68c2b251b3e71a066289d4ad9fd496
|
|
|
|
| |
Change-Id: Id34892c50f7c02e12683102dcbf66e558527f737
|
|
|
|
|
|
|
|
|
|
|
| |
This is mostly about adding return types to methods that implement PHP
interfaces, and not passing null to core functions that want a string.
After this patch, and an update to return types in RemexHtml,
tests/phpunit/integration/ has no more errors than in PHP 8.0.
Bug: T289879
Bug: T289926
Change-Id: Ia424f5cc897070f4188ae126b5bf6a1f552db0e1
|
|
|
|
|
|
| |
Found using IntelliJ's "Typo" code inspection.
Change-Id: I746220ebe6e1e39f6cb503390ec9053e6518cf16
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
All the other ways of doing it were ridiculous and much harder to read,
and usually required repeating the needle expression (to get its
length). I found these occurrences by grepping for various expressions,
but I undoubtedly missed some.
I didn't try replacing the many instances of strpos(...) === 0 with
str_starts_with(...), because I think they're readable enough as-is
(although less efficient). Likewise I didn't try porting strpos(...) !==
false to str_contains(...). For case-insensitive comparisons, Tim
Starling requested that we stick with substr_compare() because it's more
efficient than calling strtolower().
On PHP < 8 these functions will be included with a polyfill via
vendor/autoload.php. This is included at the beginning of
includes/AutoLoader.php, so if our autoloader has been included the
polyfill will be available. This means it should be safe to call these
functions from any code that would not be usable without our autoloader.
Three uses that Tim Starling identified as being performance-sensitive
have been split out to a separate commit for porting after the switch to
PHP 8.
Change-Id: I113a8d052b6845852c15969a2f0e6fbbe3e9f8d9
|
|
|
|
|
|
|
| |
This covers all occurrences of /onfig->.*get( '/ in includes/.
Undoubtedly there are still plenty more to go.
Change-Id: I33196c4153437778496f40436bcde399638ac361
|
|
|
|
|
|
|
|
|
| |
Make phan stricter about conditional variable declaration
Remaining false positive issues are suppressed.
The suppression and the setting change can only be done together
Bug: T259172
Change-Id: I1f200ac37df7448453688bf464a8250c97313e5d
|
|
|
|
|
|
|
|
|
|
|
| |
Make phan stricter about null types by setting null_casts_as_any_type to
false (the default in mediawiki-phan-config)
Remaining false positive issues are suppressed.
The suppression and the setting change can only be done together
Bug: T242536
Bug: T301991
Change-Id: I0f295382b96fb3be8037a01c10487d9d591e7e01
|
|
|
|
|
|
|
|
|
| |
Make phan stricter about scalar types by setting scalar_implicit_cast to
false (the default in mediawiki-phan-config)
Bug: T242536
Bug: T301991
Change-Id: Ia2fe30b17804186571722e728578121c8b75d455
|
|
|
|
|
|
| |
Found by phan strict checks
Change-Id: I42457087198697924c42a23401d0027eb13cbff9
|
|
|
|
|
|
|
| |
Depends-On: I99c5e5664d2401c36a9890f148eba7c25e6e8324
Depends-On: I48ab818b2965da14af15ef370aa83ad9455badd9
Depends-On: I018371e4b77911e56152ca7b2df734afc73f58a5
Change-Id: I04ebdb52102f6191d49a9cc70b1f98308299e72f
|
|
|
|
|
|
| |
Found by phan strict checks
Change-Id: Ia5585536340b59af24a2dbab0cc9f1c739beacd3
|
|
|
|
| |
Change-Id: I97f7b6e3d2c56eb8bcb134a8fc6b7e718a4b96cc
|
|
|
|
| |
Change-Id: I308af05c60401e69f6c3a9cc99240375861b3198
|
|
|
|
|
| |
Bug: T255493
Change-Id: Ie352142c7aa120f2f8985ddcf755a1f4583a5410
|
|
|
|
|
|
|
|
| |
The functions returning null or the class property is set explict null
Found by phan strict checks
Change-Id: I4a271093fb6526564d8083a08249c64cb21f2453
|
|\ |
|
| |
| |
| |
| |
| | |
Bug: T301500
Change-Id: Ia2b994bb8f59fc3826721701e430e0c3b11fd952
|
|/
|
|
| |
Change-Id: I2eb133a9e32116cd155f59086245bc4d15ecbfcc
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It turns out this gets rid of a bunch of suppressed
"SecurityCheck-DoubleEscaped" that appear to have been accurate
warnings.
There seems to have been some confusion about how ::truncateForVisual()
is supposed to be used; in particular it is to be passed *unescaped*
output, because it is not (generally speaking) safe to truncate
HTML-escaped strings. The goal of ::truncateForVisual() is to have
a specific number of codepoints in the output for display purposes,
the encoding of those codepoints is not an issue (htmlspecialchars
can be applied to the *return value*.) If you need a specific number
of *bytes* you should be using ::truncateForDatabase(). If you want
a certain number of *HTML bytes* then the ::truncateHtml() method
is probably what you want.
Slightly refactor some code in RevDelLogItem to avoid a false positive.
Bug: T301205
Bug: T290624
Change-Id: I893362e049aedfa699043fcf27caf4815196f748
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
getPageCount() method return `cat_pages`, a value that makes sense
on database table but is currently non-intuitve in object context
where there's a value that better deserves the name. This makes it
necessary for callers to repeat same logic to get the content pages
count and a comment to explain the behavior.
In this patch, getMemberCount() is added. It returns the total
member count as getPageCount(), by default, does now.
getPageCount() now takes a parameter and two public constants are
provided for that; Category::COUNT_CONTENT_PAGES return count of all
memebers to retain existing behavior, Category::COUNT_CONTENT_PAGES
will return only content pages.
In future there'd be no need for the parameter. Content pages will
be returned always. Total member count is already accessible with
getMemberCount().
Also improve return type doc of getId() and getName()
Bug: T299350
Change-Id: I63c711ebc697c1a131a50910c854f956d4021254
|
|\ |
|
| |
| |
| |
| |
| |
| | |
Make the method simpler to comprehend.
Change-Id: Ib102436a9b351ebd5a572a50ba94094b9afffa98
|
|\|
| |
| |
| | |
mobile web"
|
| |
| |
| |
| |
| |
| |
| | |
The horizontal scroll was as a result of using tables to handle layout.
Bug: T294799
Change-Id: I043b5af6c9e095102bd7cffd16f239d3418e1190
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|/
|
|
| |
Change-Id: Id86769ca81ff65707edde520585aa9ea117123e1
|
|
|
|
|
|
|
|
| |
* Minor code simplfication
* Remove some unnecessary temporary variables
* Fix a couple of typos
Change-Id: Ic730064e0704088cd8f204f2ed4313b0162ba02f
|
|
|
|
|
|
|
|
| |
Nothing to learn from these.
You can find a longer explanation in the comments in I93751e6.
Change-Id: I195aae70fc282b58be5b18160783f27d38605d15
|
|
|
|
|
|
|
|
|
|
|
|
| |
PHP 8.1 will give us "first class callables" that look like e.g.
$result = array_map( $this->fn(...), $array );
For now we can use
$result = array_map( [ $this, 'fn' ], $array );
Change-Id: I7278c80c075d162da73aa45af1b6578310ce0624
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The concept of a redirect chain didn't really work for a value of
max redirect > 1. In the ideal world, we just want to have a source
which points to target (source -> target) discarding the concept of
a redirect chain completely.
Having something like: source -> target -> target1 -> target2 doesn't
really work well with the current database design.
NOTE: Support for $wgMaxRedirect will be removed soon hence
deprecation without interfaces for replacement.
Bug: T290639
Change-Id: I469de6f85e405e8ddbe7abaa5b99b77cb9cf415d
|
|
|
|
|
| |
Bug: T254646
Change-Id: I096b2cf738a1395a14f1d47bcbed0c2c686c2581
|
|\ |
|
| |
| |
| |
| | |
Change-Id: Ic04d4dea86e61fb07b2a3b17acb6021fab6ae5ee
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Make ::setCategory() consistent with the corresponding singular method,
which is ::addCategory(), not ::addCategoryLink(). Also, don't return
a value.
This renaming is in preparation for factoring out a write-only base
class from ParserOutput suitable to be used by Parsoid.
Note that OutputPage does distinguish a 'category link' from a
'category list', and there are separate OutputPage::getCategories()
and OutputPage::getCategoryLinks() methods. However, the category
map in ParserOutput isn't exactly the same as either of these:
it's actually a map (or list of pairs) of category name to sort key.
Rename ParserOutput::getCategoryLinks() to ::getCategoryNames()
in order to clarify that the concept involved is not the same as
the OutputPage "category links" methods.
Code search:
https://codesearch.wmcloud.org/deployed/?q=-%3E(get%7Cset)CategoryLinks%5C(&i=nope&files=&excludeFiles=&repos=
(Note that many of the code search matches are for the methods in
OutputPage, which we are trying to disambiguate here.)
Bug: T287216
Change-Id: Idb383d3d9ef7b76f8a0208a057a3cb8c639465c9
|
| |
| |
| |
| |
| |
| |
| | |
CVE-2021-41798
Bug: T285515
Change-Id: I771e44af5641f3065141fa3478f68ab05e31d71f
|
|\ \ |
|
| |/
| |
| |
| | |
Change-Id: Ia84f5b1f210396cba5daa7b9e8bb8c4069e0171d
|
|/
|
|
| |
Change-Id: I6d0577124d852103f485ffdc819876a13f6641c3
|
|
|
|
|
| |
Co-authored-by: Daniel Kinzler <dkinzler@wikimedia.org>
Change-Id: Ie880482fe58b96809fdfd08ebf0825bdcf1d19d1
|
|
|
|
|
|
|
| |
Addition and remove of suppression needs to be done with the version
update.
Change-Id: I3288b3cefa744b507eadebb67b8ab08c86517c1c
|
|\ |
|
| |
| |
| |
| |
| |
| | |
The variable already has the value
Change-Id: I75f25cc944e30d91a65e1d2bb0abce7d671b19b8
|
|/
|
|
| |
Change-Id: I833052a656b1ce419c0929f6f0514f2a33c2c4cc
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|