| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
The functions returning null or the class property is set explict null
Found by phan strict checks
Change-Id: I4a271093fb6526564d8083a08249c64cb21f2453
|
|
|
|
|
|
|
|
| |
https://www.mediawiki.org/wiki/Stable_interface_policy mandates the use
of @internal. The semantics of @private was never properly defined.
Bug: T247862
Change-Id: I4c7c6e7b5a80e86456965521f88d1dfa7d698f84
|
|
|
|
|
|
|
|
|
|
|
|
| |
This makes the hook name consistent with GetDoubleUnderscoreIDs, and
is part of a set of related documentation changes clarifying the difference
between "magic words" (a localization infrastructure) and the various
functions which use magic words for localization, such as parser functions,
double underscore variables, magic variables, etc.
See also I621c888e3790a145ca9978f6b30ff1a8f685b64c.
Change-Id: Ie2a6df4b179a360fb7cdfb219e915bedff501d1d
|
|
|
|
|
|
|
| |
Update references from .txt to .md when files have moved, a few other
tweaks, no changes to code.
Change-Id: I0bfd38c47b9fb0fc11ae98a0a674af66fb4c5a84
|
|
|
|
|
|
| |
Depends-On: I7c4400f5f84088572bad2f2aac09f24203c9bb89
Depends-On: I8322471cf35d387ebd320116360bc60e6296ec51
Change-Id: I9c790a8438f88e3a731781e25408e6bdd5f7f894
|
|
|
|
|
|
| |
Align the doc stars and normalize start and end tokens
Change-Id: Ib0d92e128e7b882bb5b838bd00c74fc16ef14303
|
|
|
|
| |
Change-Id: I2851cc51c9e05dd0599733be5af39e19f12b52e2
|
|
|
|
|
| |
Bug: T200247
Change-Id: Ib36e78274f42ddbeaa7801cc8bad77b991a4a1aa
|
|
|
|
|
| |
Bug: T200246
Change-Id: I9f17142d25bc851c973bebe27e6cbc5be8b70729
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Static members of MagicWord have been removed.
Static methods are soft-deprecated and forward to the factory. They
will be hard-deprecated when all callers are removed from core.
MagicWord::clearCache() has been removed. Instead, call
resetServiceForTesting( 'MagicWordFactory' ) on your MediaWikiServices
object.
Change-Id: Ie061fe90f9b9eca0cbf7e8199d9ca325c464867a
Bug: T200247
|
|
|
|
|
|
| |
Auto fix MediaWiki.Commenting.FunctionComment.DefaultNullTypeParam sniff
Change-Id: I865323fd0295aabd06f3e3c75e0e5043fb31069e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`$a <=> $b` returns `-1` if `$a` is lesser, `1` if `$b` is lesser,
and `0` if they are equal, which are exactly the values 'sort()'
callbacks are supposed to return.
It also enables the neat idiom `$a[x] <=> $b[x] ?: $a[y] <=> $b[y]`
to sort arrays of objects first by 'x', and by 'y' if they are equal.
* Replace a common pattern like `return $a < $b ? -1 : 1` with the
new operator (and similar patterns with the variables, the numbers
or the comparison inverted). Some of the uses were previously not
correctly handling the variables being equal; this is now
automatically fixed.
* Also replace `return $a - $b`, which is equivalent to `return
$a <=> $b` if both variables are integers but less intuitive.
* (Do not replace `return strcmp( $a, $b )`. It is also equivalent
when both variables are strings, but if any of the variables is not,
'strcmp()' converts it to a string before comparison, which could
give different results than '<=>', so changing this would require
careful review and isn't worth it.)
* Also replace `return $a > $b`, which presumably sort of works most
of the time (returns `1` if `$b` is lesser, and `0` if they are
equal or `$a` is lesser) but is erroneous.
Change-Id: I19a3d2fc8fcdb208c10330bd7a42c4e05d7f5cf3
|
|
|
|
| |
Change-Id: I46ebd315a99b1677ff89ba392c0072b41bbeb36d
|
|
|
|
|
|
| |
wfDeprecated since 1.25, not used anywhere.
Change-Id: I09fd362a3d795328ffc12572025702ef9b951378
|
|
|
|
| |
Change-Id: I81e68310abcbc59964b22e0e74842d509f6b1fb9
|
|
|
|
|
|
|
|
|
| |
And auto-fix all errors.
The `<exclude-pattern>` stanzas are now included in the default ruleset
and don't need to be repeated.
Change-Id: I928af549dc88ac2c6cb82058f64c7c7f3111598a
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
I was bored. What? Don't look at me that way.
I mostly targetted mixed tabs and spaces, but others were not spared.
Note that some of the whitespace changes are inside HTML output,
extended regexps or SQL snippets.
Change-Id: Ie206cc946459f6befcfc2d520e35ad3ea3c0f1e0
|
|/
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
Use of &$this doesn't work in PHP 7.1. For callbacks to methods like
array_map() it's completely unnecessary, while for hooks we still need
to pass a reference and so we need to copy $this into a local variable.
Bug: T153505
Change-Id: I8bbb26e248cd6f213fd0e7460d6d6935a3f9e468
|
|
|
|
|
|
|
| |
Returns the language code of the page being parsed.
Bug: T59603
Change-Id: I229edd6251cf1120b3395d1811dbb9d96d9cd8ee
|
|
|
|
| |
Change-Id: Ib0eea494e2065c7ab356dc45fd174544a9c1c942
|
|
|
|
| |
Change-Id: I3588d9d2c17203ec3ff11736cd6ce84f687677a5
|
|
|
|
| |
Change-Id: I9ba602da77f1c8d4270d8ae10d03e82a3197e5b1
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
Softer version of I3840a56adc0a6e50963b930051892491f8e90245.
Bug: T115514
Change-Id: Idb297a31b17928a0151476879294eedfbec0d744
|
|
|
|
|
|
|
|
|
| |
This reverts I3840a56adc0a6e50963b930051892491f8e90245 which
threw exceptions on broken UTF-8 in $text.
Bug: T115514
Bug: T117066
Change-Id: Ie665056a13f9e3678a49790d787b0a41dbba6362
|
|
|
|
|
|
| |
Bug: T115514
Bug: T117066
Change-Id: I1d13f8542a4cf11c8e87cd4f6a983fa852dfdf1e
|
|
|
|
|
|
|
|
|
| |
There are a lot of other cases in this file alone that need to be fixed
(e.g. (bool)preg_match), but those should be fixed in a more systematic
way like a wrapper function.
Bug: T115514
Change-Id: I3840a56adc0a6e50963b930051892491f8e90245
|
|
|
|
|
|
|
| |
Init variable before use
Check return value to avoid notice on failures
Change-Id: I5cecae32f7672d748706c7a72bf01e9aee65e6d4
|
|
|
|
| |
Change-Id: Ib7a0c2834314e9c8db442956230d389e51dbb256
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|/
|
|
|
|
| |
MagicWord::replaceMultiple() is completely unused in both core and
all extensions on gerrit, so it is being marked as deprecated.
Change-Id: I6289a36351a2cbc47a0cad237cc985e5c3136773
|
|
|
|
|
|
| |
* This avoids the overhead of an extra function call
Change-Id: I8ee996f237fd111873ab51965bded3d91e61e4dd
|
|
|
|
|
|
|
|
|
| |
The hitcounter implementation in MediaWiki is flawed
and needs removal. For proper metrics, it is suggested to use
something like Piwik or Google Analytics.
RFC: https://www.mediawiki.org/wiki/Requests_for_comment/Removing_hit_counters_from_MediaWiki_core
Change-Id: I0e5006a7e8a09c800f8fa4effa9399e8afdd7a57
|
|
|
|
| |
Change-Id: I45b9d02f94ecc58372268ec5e6a0b572a0b7e2a9
|
|
|
|
|
|
|
| |
Add {{!}} as a magic word that expands to a pipe. Parsoid already does
this, so we know it isn't going to cause major breakage.
Change-Id: I1f857417d224d6443504074a5add852df3975b89
|
|
|
|
| |
Change-Id: I3640fb7a783a68c43a1249b87ef04e587dd0cfd5
|
|
|
|
| |
Change-Id: I566183b5d660a55bb3b2aa7186aaed5355ead2c6
|
|
|
|
| |
Change-Id: I57e85351503897f8f8febb2fb49942a2ddd251e6
|
|
|
|
|
|
|
|
|
| |
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: I0056b4a8df243cfc0c5f25378de48f7a35170aca
|
|
|
|
|
|
|
| |
Searched for:
\@(param|return|throws|since|deprecated|access|todo|var)[ \t]{2,}
Change-Id: Icce22ba9fe0635455691ca58d9872d618151f346
|
|
|
|
|
|
|
|
|
| |
The MagicWord raw was not matched against the whole given string, which
result in a raw output, when this was not intented.
Fixing this by adding a new regex, which matches the string from start
to end.
Bug: 56199
Change-Id: I7781c415bd61447dd91872575877dd21f36fae9f
|
|
|
|
|
|
|
|
| |
Add {{CASCADINGSOURCES}}, which gives a list of cascading-protected pages
that cause a given page to be protected. This is an expensive parser
function.
Change-Id: I0e9556d53d9a78bc02848c775cb667294726cea1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In PCRE 8.34, a subpattern's name must not start with a digit; work around
this by replacing digits in the synonym's index with letters. Amazingly,
this part of the name seems to have the sole purpose of ensuring uniqueness;
none of the matching functions actually use it for anything.
Adding a single-letter prefix was considered, though it would risk breaking
extension code that may have used 29- or 30- character magic word IDs.
(PCRE limits subpattern names to 32 characters.) Likewise, moving the magic
word's ID to the front would not work if it were to start with a digit.
Bug: 58640
Change-Id: Ic69f9000addbf18c4747105187e6f13191828fbb
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This avoids giving the own page name to {{PAGESIZE:}} and allows
PAGESIZE on subst: to give the size before save.
Viewing a oldid page will give the corresponding size to that revision.
(Like REVISIONUSER or REVISIONTIMESTAMP)
This partially reverts Idfac13de37d05317f65e4131534543e66cf74873
because there is no need to let PAGESIZE handle extra, when the given
title is the own page.
Change-Id: If9e608d54904c21ac6b095e91ff6e0a15da0fb4c
|
|
|
|
| |
Change-Id: I62014cd09b4033be0c958da2527911368fff141a
|
|
|
|
|
|
|
|
| |
Added spaces after/before parenthesis
Removed unneeded parenthesis around some statements
Broke a long line
Change-Id: I7fbe129f7bbf524dd0598ece2a9708643f08453b
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Introduced a new variable ROOTPAGENAME which has similar
content like BASEPAGENAME.
ROOTPAGENAME only contains the name of the topmost page without namespace, e.g.
for "User:Name/Article/Subarticle" it should be "Name".
BASEPAGENAME would be "Name/Article" here.
Update : fixed indentation in maintenance/fuzz-tester.php
Added to RELEASE-NOTES-1.2.2
Bug: 6747
Change-Id: I71ef0a15c95c9145462f3aa7fdb3ed11dac79265
|