| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
| |
| |
| |
| |
| | |
It has been deprecated since 1.36 and it is unused.
Change-Id: I316333f55526116e9510e4719fce2a93e7683ea6
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
[x] Logging more data when it happens again
Bug: T297403
Change-Id: I4bf2f4204e990b2869c497ffd3a79af7cde34434
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This adds support for languages that the SVG uses but that MediaWiki
does not support. It might not be able to find the correct
languagename for that language code, specifically for als.
Add some paramString parsing testcases
Bug: T279874
Change-Id: Id8a62e2a9c5e1565f173b1bba466306741b62762
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The default for multilanguage SVGs is the content language. In order
to show element with no explicit language, you have to request the
'und' aka undetermined language.
Because this was not special cased, this was not accessible and would
always fallback to English.
Make the default language code a const.
Bug: T310235
Change-Id: I6941f46d176ddf3dc811b29d580b1c5b8856eb1c
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
File::getMatchedLanguage does not produce any useful return with null,
because the implementation in SvgHandler::getMatchedLanguage returns
null as well, null never matched with anything using strcasecmp
Bypass the call if no language is requested and adjust the documentation
This also avoids passing null to internal functions,
which gets deprecated in newer php
Bug: T309426
Bug: T289926
Follow-Up: I1d8ec00a0040c7cbebe705012ca99f1e9f613e7f
Change-Id: I028b519de20dafad7a872c79343e76991ef544d0
|
|
|
|
|
|
|
|
|
| |
Both this feature and the web standard are experimental.
The standard was only exposed as a Google Chrome Origin Trial
and the standard has evolved in a non-compatible way.
Bug: T308707
Change-Id: I987c0fb9e3fbb1a9f727b3f171c747246d8adb77
|
|
|
|
|
|
|
|
| |
This feature was experimental, unsupported and untested.
It was disabled by default.
Bug: T308621
Change-Id: I9375f35d031f635af0d39ee0bc027ac719899d9d
|
|
|
|
|
|
|
|
|
| |
Matches Parsoid commit Icbc36b6e9aa1b9f4f27c23f4833c626a725cc154
Bug: T297443
Bug: T108380
Depends-On: I896e2af2e8a712a36eb23a25cad08f53574fc044
Change-Id: I30eba0fb226971ddeda4eb240929e89ef7e5f45f
|
|\ |
|
| |
| |
| |
| |
| |
| | |
Wikilinks don't include the anchor, so we match that.
Change-Id: Icddc1ce6f19c21e34ca37f35a75a7b9263f93417
|
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Symlinks are lightweight and ideal, but some systems may not allow
them.
Instead of failing outright, an attempt should be made to copy the
file and, only if that also fails, declare that the thumbnail creation
has failed.
Bug: T227157
Change-Id: I50765ab125d775b9ef77613776f8d58da459c496
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Now largely automated:
VARS=$(grep -o "'[A-Za-z0-9_]*'" includes/MainConfigNames.php | \
tr "\n" '|' | sed "s/|$/\n/;s/'//g")
sed -i -E "s/'($VARS)'/MainConfigNames::\1/g" \
$(grep -ERIl "'($VARS)'" includes/)
Then git add -p with lots of error-prone manual checking. Then
semi-manually add all the necessary "use" lines:
vim $(grep -L 'use MediaWiki\\MainConfigNames;' \
$(git diff --cached --name-only --diff-filter=M HEAD^))
I didn't bother fixing lines that were over 100 characters unless they
were over 120 and triggered phpcs.
Bug: T305805
Change-Id: I74e0ab511abecb276717ad4276a124760a268147
|
| |
| |
| |
| | |
Change-Id: I7f5598add628d218a000a7da4a1cbb4c0cc2f31b
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | | |
Add missing @return and use false instead of bool where possible
Change-Id: Ie85a40987422e32aa02c56969e103371ec2e5b5f
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Allow phan to assume that some array keys are always set after call to
normaliseParams to avoid phan suppression
Follow-Up: I701f12ab94478c3b8e7fd82110ade74a8e6b04ef
Change-Id: I8d14e49340d30c56642422cd88169019dd2c4286
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|\ \
| | |
| | |
| | | |
minimum_target_php_version"
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
MediaWiki still supports PHP 7.2+, but we want to mainly test in newer versions
of PHP. Setting minimum_target_php_version to 7.2 this lets us run phan without
phan trying to get us to make PHP 7.2-incompatible changes to 'appease' PHP 8.0
or whatever later changes.
Some switches of generic 'resource' type-hinting to 'resource|object' to inform
phan to ignore this (triggering PHPCS at the time, ah well), rather than trying
to hint the specific novel PHP encapsulation classes to that have replaced them
from PHP 8.0 onwards but don't yet exist, and fixes from where we were checking
the results of implode and explode.
Bug: T293924
Change-Id: I629e3fb3adfad73beb3d424a07e643c2e079d9bb
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Make phan stricter about array keys
Remaining false positive issues are suppressed.
The suppression and the setting change can only be done together
Bug: T304887
Depends-On: I3105a5fd4826f8667b5232834defc5ec93be32a1
Depends-On: Ie9610a6e83731468311edb3ed17f80fc509de385
Change-Id: I701f12ab94478c3b8e7fd82110ade74a8e6b04ef
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Limit the array for the input to the expected size (or one bigger).
This avoids big arrays on bad input and allows to process with the
expected values in the array.
Change-Id: Iec1a85c29d928966c14cc0273b1a251dc0b6b738
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
See also MediaHandler::getMetadataVersion
Change-Id: I6186439c05b5770d9b317ac7b37df116a5d06cbc
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Swap null/false or use real strings if needed
Found by phan strict checks
Change-Id: Id82ea609f05a76c5cb8c661d5cf2b7922d6cfbc1
|
|\ \ \ \ |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
The functions returning null or the class property is set explict null.
Some function should not accept null or return null.
Found by phan strict checks
Change-Id: Ie50f23249282cdb18caa332f562a3945a58d86ff
|
|\ \ \ \ \ |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Found by phan strict checks
Change-Id: I83187b5fd25b015d2c75e22d4b5202803653d743
|
|/ / / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Found by phan strict checks
Change-Id: If41d16b473baddd92cc4261cdc2bfbe65fedcb19
|
| |/ / /
|/| | |
| | | |
| | | |
| | | |
| | | | |
Found by phan strict checks
Change-Id: Icc44cd143f2e98fa3ca188e625a3289441de0f73
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Some function already document "False on failure", but does not document
it on the used type
Found by phan strict checks
Change-Id: I12eb8bbc99179833ee3e42c1a7d1dc1443682ca6
|
|\ \ \
| |/ /
|/| | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Matches Parsoid output.
Bug: T292657
Depends-On: Iccee2dcbc7b06d80bcb4e026eedc11042585550b
Change-Id: I206f1ccbfee1a601f3e5a4b52cb6acb5a6fbf113
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* Some functions accept only string, cast ints and floats to string
* After preg_matches or explode() casts numbers to int to do maths
* Cast unix timestamps to int to do maths
* Cast return values from timestamp format function to int
* Cast bitwise operator to bool when needed as bool
* php internal functions like floor/round/ceil documented to return
float, most cases the result is used as int, added casts
Found by phan strict checks
Change-Id: Icb2de32107f43817acc45fe296fb77acf65c1786
|
|/ /
| |
| |
| | |
Bug: T297403
Change-Id: I89daeeb24bda37c33ad58177bfc8fbe469f20540
|
| |
| |
| |
| | |
Change-Id: I2eb133a9e32116cd155f59086245bc4d15ecbfcc
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This reverts commit 5809ef7caa512b9ad6efa747c88620484c36446d.
Bug: T292657
Bug: T297984
Depends-On: I261887a3b2d15130894b947d18a2e85537d50a1f
Change-Id: Id4e8d16344ce0f420bfd3e0d5833c67d1cf85fd8
|
| |
| |
| |
| |
| |
| |
| | |
link-url for external links, which this isn't and which gain rel
attributes in the follow up.
Change-Id: I968dbb72731b9588fad0fa1e7770c799c0e451a5
|
| |
| |
| |
| |
| |
| |
| | |
An aside, this is poorly named, custom-link-target would be less
confusing with the other -link postfix options, which affect the href.
Change-Id: Ib8c5bdcc0cc8732990f55e30e77c865496c74ee1
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The order of applying the different operations matters in Imagick. We
should set the background before adding the SVG, or the transparency
will get lost.
This is also mentioned in a comment of
https://www.php.net/manual/en/imagick.setbackgroundcolor.php
Fix thanks to User:TheAlmightyGuru
Bug: T301242
Change-Id: Idf8e4da6bfae149b3bd2be04a0ae490122173215
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Don't catch and discard exceptions from the RequestTimeout library,
except when the exception is properly handled and the code seems to be
trying to wrap things up.
In most cases the exception is rethrown. Ideally it should instead be
done by narrowing the catch, and this was feasible in a few cases. But
sometimes the exception being caught is an instance of the base class
(notably DateTime::__construct()). Often Exception is the root of the
hierarchy of exceptions being thrown and so is the obvious catch-all.
Notes on specific callers:
* In the case of ResourceLoader::respond(), exceptions were caught for API
correctness, but processing continued. I added an outer try block for
timeout handling so that termination would be more prompt.
* In LCStoreCDB the Exception being caught was Cdb\Exception not
\Exception. I added an alias to avoid confusion.
* In ImageGallery I added a special exception class.
* In Message::__toString() the rationale for catching disappears
in PHP 7.4.0+, so I added a PHP version check.
* In PoolCounterRedis, let the shutdown function do its thing, but
rethrow the exception for logging.
Change-Id: I4c3770b9efc76a1ce42ed9f59329c36de04d657c
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When overwriting a file, the browser will sometimes display a cached old
version of the file instead of the new version. This is because the URLs
for the current version of a file (and thumbnails) are not versioned.
This patch adds the timestamp as a query parameter to the end of the
file URLs. Only the src and srcset URLs will have the timestamp, the
links to the original and thumbnails are not versioned. The current
version in the file history also gets the timestamp. Previous versions
already have a timestamp in the URL.
This timestamp is only used for client-side cache busting, it is not
interpreted server-side. On WMF sites it will be stripped out by the
caching layer anyway.
Bug: T38380
Change-Id: Ia63bd96a02d1aa36265742c4307f5af2e675b3ec
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
As discussed in the task, there is no simple replacement for this
function.
Reduces core PHPUnit error count from 121 to 2.
Bug: T268847
Change-Id: Ia8697e1c3ba369346b39ef50d94ea8b132eb9c80
|