Follows-up 6c7480e5f0, d2a6a73d2.
The should stop the § character from being indexed by Google et al.
Bug: T18691
Bug: T93000
Change-Id: Ie9e334e973e3ded270f1897a2c3816d9df739fc0
Changed the Linker::makeHeadline function to additionally generate an
anchor that uses a section symbol. Created mediawiki.sectionAnchor
module to style the anchors and included it in SkinTemplate so that
other skins automatically get those styles.
Bug: T18691
Change-Id: I562e437ec0bd337c9db0406f5dcab504dfa37034
The word-separator is already part of the return value of
Linker::userToolLinks which results in a double space when add an own
word-separator
Change-Id: Id9d3125b9cae4a92f489215dda0b32c487f3fb11
Revision->getRawUser()
=> Revision->getUser( Revision::RAW )
Revision->getRawUserText()
=> Revision->getUserText( Revision::RAW )
Revision->getRawComment()
=> Revision->getComment( Revision::RAW )
The body of Revision->getRawUserText() has been moved
into Revision->getUserText().
Every usage has been replaced.
Change-Id: Ic6fbfbc0507dcf88072fcb2a2e2364ae1436dce7
Affected both the linked text and the actual URL.
For an example please see the ukwiki link on:
https://www.mediawiki.org/wiki/Special:CentralAuth/Admin
Follow-Up: Ibdedf087f85046646450367cbf1811db578d8f4b
Change-Id: Ie73796dcde4e0a096a6baa86a53245e6fe2b48b5
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
Before r39373, all autocomments in an edit summary were formatted. In
fixing a bug with page titles containing "/*" this was accidentally
broken.
To use a single preg_replace_callback call to replace multiple
autocomments, we need to make sure that the match of one autocomment
doesn't overlap the match of another, which means we can't have "(.*)"
before and after. But we do still need to detect whether there is
anything before or after. "(?=(.?))" and "(?<=(.?))" would do nicely,
except the latter isn't actually supported. "(?=(.))?" and "(?<=(.))?"
work too, but older versions of PCRE don't support that. They do,
however, support "(?:(?=(.)))?" and "(?:(?<=(.)))?", so that's what
we'll go with.
This change does change the values for $pre and $post passed to the
FormatAutocomments hook; extensions need to be updated to accept (and
not prepend/append) booleans for these parameters.
Bug: T18530
Bug: T70361
Change-Id: I36c3a9e548a4ef72f93974bb35f9add8c29e9287
The link text for [[/Foo/]] is `Foo` and the link text for
[[../Foo/]] is `Foo`. So far so good.
But the link text for [[/Foo//]] is `Foo` while the link text
for [[../Foo//]] is `Foo/`. We are stripping all trailing slashes
in the first case, but not the second.
Fix the code so that we strip all trailing slashes in both cases.
Update some of the comments in the code while we are at it.
Change-Id: Id61eacafea9820c404699a7902c8eb8102779516
Linker::getInterwikiLinkAttributes and Linker::getInternalLinkAttributesObj
are not not used any code in gerrit.
Linker::getInternalLinkAttributes is used once, in the Video extension.
Change-Id: I76d9b549e0fdccb9c1b4d9c12ba40a67c2733637
Changed all remaining uses of 'and' (T_LOGICAL_AND) and 'or'
(T_LOGICAL_OR) except those in includes/libs/lessc.inc.php.
In maintenance/generateSitemap.php, also slightly cleaned up
touched code:
* Inlined GenerateSitemap::init_path().
* Removed the redundant `$fspath && !is_dir( $fspath )` check.
* Return a nonzero exit code if wfMkdirParents() fails.
There are still uses of 'xor' (T_LOGICAL_XOR) in the following
files, which I left as-is:
* includes/Export.php
* includes/htmlform/HTMLCheckField.php
* includes/Autopromote.php
* maintenance/importDump.php
* maintenance/backup.inc
Change-Id: I73cb20da989e90b52782e7499f633debd5ad265d
If the thumbnail is an error (or worse yet, if the MediaHandler
returns false, like TMH does in certain circumstances), we
should not add responsive thumbnail links.
Change-Id: I2aafbd07e8435ce2d1b4cb32e49e98cb5f6c00ab
Change Ia9baaf0b changed the visibility of member variables (many of which are not
otherwise exposed, e.g. by a method) and by that introduced a major API change
breaking extensions.
This patch explicitly marks affected variables as public again, keeping the intent
of the original patch of making phpcs-strict pass on includes/ directory.
Bug: 67522
Bug: 67984
Change-Id: I498512b2a1e615365bb477c1fd210aaa3241ca03
There is an ungodly number of requests for magnify-clip.png, embedding
it in CSS is probably good for performance.
It also makes it a lot easier to change the icon, or provide a vector
version (SVG or icon font).
We need to be careful to keep new CSS compatible with old HTML (HTML
is cached for up to 30 days in WMF environment), but luckily in this
case this requires just one CSS rule. Follow-up to remove it: I7a920105.
Bug: 69673
Change-Id: I849a2222fdf708573e54fa0658dbef4d9f2f665f
- 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
- Removed spaces after not operator (!)
- Removed spaces inside array index
- use tab as indent instead of spaces
- Add newline at end of file
- Removed spaces after casts
Change-Id: I9ba17c4385fcb43d38998d45f89cf42952bc791b
- use tab as indent instead of spaces
- Added space after closures "function"
- Added spaces around string_concat
- Added newline inside empty blocks
- Removed four spaces after comma
Change-Id: I4425b0c6a69b36f40acfea6511b8950cf09ce2b2
If $thumb returns a MediaTransformError object, then $thumb->getUrl()
will return false, which will result in srcset="1.5x, 2x".
Bug: 67081
Change-Id: Idb6bbff6995536d20dac67ce12592f68f6d1235a
A anonym function has no own scope, so it is not possible to call the
private callback, so moved the code of the callback into the function.
This avoids passing parameters with static variables to the callback.
Change-Id: I41ad85545301f6699817135b7e8ceba0f8b26851
Called before a link to the current article is displayed to allow the display
of the link to be customized.
Bug: 63592
Change-Id: I343e1b1b08ec841d22a1b22bcb8af43bb65a5a50
Thumbnails for portrait-orientation images have always been "too big",
especially when displayed in a gallery. The 'upright' option did not
completely fix the issue. Using a square bounding box for thumbnails
(and 'framed' images) without an explicit size specifiction provides
a better default appearance.
This also provides a clean syntax for content authored using
Parsoid/Visual Editor, which prefers square bounding boxes.
See:
https://www.mediawiki.org/wiki/Requests_for_comment/Square_bounding_boxes
Bug: 63903
Change-Id: I665d8945843d3b5437a74e376b63c44965590116
Since If914e26f2af23f04c46f011ad8a276a9d3190583 the brackets of the
accesskey are localized, so do it also on the client side.
Also added a comment to match php and js.
Adjust tests to work on wikis with changed messages.
Bug: 65010
Change-Id: Id9908b9efcb923f0b740e2c8fd77d1ef676b489f