| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
This will make jumping from file to file much easier in text
editors when file name lookups will autocomplete naturally when
looking for a class by name.
Change-Id: I4b2e55a2e72674b619d5a592866c8a019a2b0224
|
|
|
|
|
| |
Bug: T182273
Change-Id: I9e1b628fe5949ca54258424c2e45b2fb6d491d0f
|
|
|
|
|
|
|
|
| |
I spotted one of these in my debug log. Without context it is not
useful nor informative. Given it can actually come from three places,
it is useless.
Change-Id: Ic293d8944e9a1a8152c5a5e0b695c5ddc07ee6aa
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
See https://tools.ietf.org/html/bcp47#section-2.1.1
Also implement matching of systemLanguage attribs as
specified in the SVG spec
Note that librsvg that we use for rendering pngs of svg
files has a bug, and matches languages in the following
way instead of what is implemented in SVG::getMatchedLanguage()
public function getMatchedLanguage( $userPreferredLanguage, array $svgLanguages ) {
foreach ( $svgLanguages as $svgLang ) {
if ($svgLang == $userPreferredLanguage) {
return $svgLang;
}
$dashPosition = strpos( $userPreferredLanguage, '-' );
if ( $dashPosition !== false ) {
if (
strtolower( substr( $svgLang, 0, $dashPosition ) ) ==
strtolower( substr( $userPreferredLanguage, 0, $dashPosition ) )
) {
return $svgLang;
}
}
return null;
}
Bug: T154132
Change-Id: Ibff66a0844f0cecfae0260c6a7d20aeedc2849a2
|
|
|
|
| |
Change-Id: I81e68310abcbc59964b22e0e74842d509f6b1fb9
|
|\ |
|
| |
| |
| |
| |
| | |
Bug: T125595
Change-Id: Id2daaad45c594d6f6265120039ca30742472987e
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Give access to the raw Message instead of only to the HTML or text in
the RequestContext language.
Pass Message objects instead of strings from calling ->text() as the
parameters of Messages so if the outer Message's language is changed
things get parsed sensibly.
Change-Id: Ibd6c1217b6fed839c888b66e02900f8e21ed3e6b
|
| |
| |
| |
| |
| |
| | |
The un-namespaced \ScopedCallback is deprecated.
Change-Id: Ie014d5a775ead66335a24acac9d339915884d1a4
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* FSFile should not be responsible for handling this much logic.
* Make more MediaHandler classes aware of the fact that an object
other than File might be passed in. Use the FSFile instead of a
useless empty stdClass object.
* Also added more fields to FSFile::placeholderProps to make it
more complete.
Change-Id: I9fe764b2a7261af507c6555e6a57273cf7d00d36
|
| |
| |
| |
| | |
Change-Id: I5d3a5eb8adea1ecbf136415bb9fd7a162633ccca
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* getParamMap
* validateParam
* makeParamString
* parseParamString
* canRender
* mustRender
* isMultiPage
Change-Id: I0c00a61abf9be400dca5407370ca2c232d57ae17
|
|/
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Change-Id: Iefe24ee5dae90d70c2acaaae9dc5d44c1758d53a
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
wfSuppressWarnings() and wfRestoreWarnings() were split out into a
separate library. All usages in core were replaced with the new
functions, and the wf* global functions are marked as deprecated.
Additionally, some uses of @ were replaced due to composer's autoloader
being loaded even earlier.
Ie1234f8c12693408de9b94bf6f84480a90bd4f8e adds the library to
mediawiki/vendor.
Bug: T100923
Change-Id: I5c35079a0a656180852be0ae6b1262d40f6534c4
|
|
|
|
|
|
|
|
|
|
|
| |
Found by running a script that uses PHP's tokenizer extension to
extract class declarations and uses, then compare them:
* AllMessagesTablePager
* SVGReader
* XML
Change-Id: I960aa05b2127722ecc5ae8b165549f9e1077d3c1
|
|
|
|
|
| |
Bug: T95873
Change-Id: I71dffaaed24c983ce07bc02f806294337ca086e2
|
|
|
|
|
|
|
|
|
| |
Function mb_strtolower is not guaranteed to be present. In this case
we are dealing with language codes, which are ASCII, for which there
is no need to use multibyte version in the first place.
Bug: T55912
Change-Id: I009bab2ff03b22142d35c8be60711266ca3683c1
|
|
|
|
|
|
|
|
| |
This avoids on image page:
ContextSource::getContext (FormatMetadata): called and $context is null.
Using RequestContext::getMain() for sanity
Change-Id: I92774e1a88f03d44967d1797c6c2b8a31c1b10fc
|
|
|
|
| |
Change-Id: I76601a86e30f4984e3b1a8c8ec5ef5a0f652433a
|
|
|
|
| |
Change-Id: I31c81c78715048004fc8fca0f27d09c1fa71c118
|
|
|
|
| |
Change-Id: Ib7ac94d05a04490f25dfd40b46b27973cbab582c
|
|
|
|
|
|
|
|
|
| |
- Removed spaces around array index
- Changed else if to elseif
- Added space after foreach/if/function
- include_once is not a function
Change-Id: I7745ae791d1b7e60cfebec6d268513a9cc071bdd
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
* This avoids needing to patch rsvg on 14.04
bug: 67402
Change-Id: I81ac0c6c62003ed5a8e33694751484498e6e7277
|
|/
|
|
|
|
|
|
|
|
| |
- 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: I8ebfbcea0e2ae2670553822acedde49c1aa7e98d
|
|
|
|
|
|
|
|
|
|
|
|
| |
Caused the animation warning to not be present on
image description pages
Also add unit tests. Since I'm adding an animated svg file for
this unit test, also add a metadata extraction test for animated
svgs, since we're missing one.
Change-Id: Id03e1a0e1c151d3c575a695a42c54b709187d10a
follow-up: 876128f8c9f0ce6a8424336f
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
Also have ImagePage check that the given language is actually
valid, before trying to transform with that language.
Change-Id: I62b8035b70f5cb3388f4c2a844f3bc1c7c92d01e
|
|
|
|
|
|
| |
Related patch sets:
* https://gerrit.wikimedia.org/r/#/c/99429/ Extension PagedTiffHandler
Change-Id: I0441fdf1ce1e06688f16c62e1993bb05911b45bc
|
|
|
|
|
|
|
| |
- Added space after foreach
- Added/Removed spaces inside arrays
Change-Id: Ia8775824fa33976b1a4dab43e07f1bff0c57479c
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Currently we support rendering SVGs in multiple languages,
but there is no mechanism for users to discover what languages
a file is available in. Show this information on the image page.
At the moment, if unspecified we always default the language to
english (I believe to avoid mass cache splitting, especially
if most languages wouldn't have a translation of the file in
their language). This code was written in such a way so that
this assumption should be changable in the future if we so
desire.
Long term, Jarry has a super cool svg translation extension
which would take over some of this. However I still believe
we should have an interface for this in core, since we do
support the different language renderings in core.
Change-Id: I84506436514e09d71200aa2db3932aa001b55c71
|
|/
|
|
| |
Change-Id: I664e4667bdcff89c1c5ee01a11b723a36212a57f
|
|
|
|
| |
Change-Id: I7a9c8d59f88c68dc3835cb8a18f22a77cd7890fc
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BitmapHandler::logErrorForExternalProcess is a wrapper around
wfDebugLog( 'thumbnail' ). It got copy pasted from some other class at
one point.
This patch move the method up to general class MediaHandler and makes
other child class uses it. The method will thus be available to
extensions such as TimedMediaHandler.
The reason I am doing that is that trim($err) generates a copy of $err
which causes a memory allocation fatal error whenever $err is larger
than the remaining memory allocatable. The patch will let us fix the
bug by only altering one part of the code.
bug: 57985
Change-Id: I5657f07d6e2cca05d53f2a5c30ec23622c171343
|
|
|
|
| |
Change-Id: Iaa81af5b65a650222fa65bf8c368e4f1ec3ce9c0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently file metadata is handler dependant. However they usually
end up extracting the same type of data (author, date, etc) plus
one or two handler specific things. This adds a handler independent
interface for getting metadata that is likely to be common for all
types of file (At the moment, this is the exif/iptc/xmp information)
This commit used to also contain stuff adding parser functions,
which is now split to its own commit. This commit is needed
by a bunch of other commits, in particular I0d957891e0.
Change-Id: I43d9252f69dc5b8ba0b848cf40aa1b97329c85ae
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds an option to wfShellExec (and convenience function
wfShellExecWithStderr), to make sure all stderr is duplicated
to stdout. The previous method of doing this was to include
2>&1 on the command line. However this did not redirect errors
from limit.sh (For example cgroups not set up, or if a command
reached the file size limit set by ulimit).
Not sure if this is the best approach, but it seems to work well,
and compared to most other approaches I considered, actually gets
the ulimit errors redirected too.
Currently some files fail to render with no error whatsoever,
hopefully this patch will make what went wrong more obvious.
Also fix a comment in wfShellExec that was incorrect (trailing \n),
and make the initial value of the return value variable be 200, so
if there's ever a bug in php where its not being set properly, it
would be immediately obvious what is happening.
Bug: 53824
Change-Id: I833aeb3ab9da726ecb97331369ea187daad7e795
|
|
|
|
|
|
|
|
| |
The SvgHandler does not output all metadata, that means the returned
array can be empty. In this case return false to indicate that the
metadata section should not be added on the image description page.
Change-Id: I989154dbaaaafb2e924838c990e30a9ffe6842a9
|
|
|
|
| |
Change-Id: Ia57685d8858e02e399ad5c75ce64d12609d340ac
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
See bug for context.
The implementation is slightly untidy because I've written it so
as to avoid invalidating the existing SVG thumbs -- there will be
no immediate difference (visual/performance/other) as a result of
this.
Tested by me in both...
* [[File:Example.svg|thumb|lang=fr]] AND
* http://example.org/w/index.php?title=File:Example.svg&lang=fr
...modes. Example file on
https://commons.wikimedia.org/wiki/File:Gerrit_patchset_25838_test.svg
Added parser tests.
Bug: 32987
Change-Id: I4cadf96ecd5e169a88ad468a0478d355db980103
|
|
|
|
|
|
|
|
|
|
| |
Most were this way already:
https://doc.wikimedia.org/mediawiki-core/master/php/html/todo.html
Ran a find/replace on the odd ones. Also made them all
lower case.
Change-Id: I70c6a69344ddebc603e9a1c1d87e3cc4f4f4c560
|
|
|
|
| |
Change-Id: Ie8adc00f4ee8ecec4554e584c18d5d2073415397
|
|
|
|
|
|
|
| |
Added spaces before if, foreach
Added some braces for one line statements
Change-Id: I9761be9fa47adc3554852a97b19792b4648466ad
|
|
|
|
| |
Change-Id: I88e73d47a552918880514d88a876296a6cb80d88
|
|
|
|
|
|
|
|
| |
* This prevents excessive download (getLocalReference()) and metadata
extraction operations to keep reloading metadata again and again.
* This also avoids DB load and lock timeouts due to constants UPDATEs.
Change-Id: I9d35467d3a5e23a07e880dbdf59fccda4b598faf
|
|
|
|
| |
Change-Id: Ie268bee2098c589c050e1b5b0e93fe1b3feca86f
|
|
|
|
|
|
|
| |
* Removed some inline tabs in the process.
* IDE fixed some incorrect leading spaces, too.
Change-Id: Ic9303eff6db4424ac3f1fa2816839692b43e6190
|
|
|
|
|
|
|
| |
See change #21321 for the introduction of that new constructor
and the reasoning behind it.
Change-Id: I15843fab4217333077e16ae187e7c09f76d47e58
|