| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With this change the on the HTTP header field
Accept-Language: no,nl;q=0.5
the language code 'no' gets selected.
On
$ curl -s -H 'Accept-Language: no,nl;q=0.5' 'http://localhost/mediawiki/mw-config/' | head -2
<!DOCTYPE html>
<html dir="ltr" lang="nb">
the language code is 'nb' because the macro language 'no' falls back to
'nb'. This fixes T187866.
Bug: T187866
Change-Id: I4b30dd4be66c0bb8d763a86c59aa270301d17b5b
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Why:
* When performing schema changes on virtual database domains, the
updatelog table may not exist on the DB connection being used
to perform the updates
* This is because the updatelog table will only exist on the
database used for the local wiki, and not a central wiki.
* As such, skip reading and writing to updatelog if the table
does not exist on the current DB.
** This will cause some updates to be repeated, but there is no
place to store that the update has completed and using a
local wikis' updatelog table would not prevent the update
from being performed again if update.php is run for a different
wiki in the same cluster when the table is shared.
What:
* Update DatabaseUpdater::updateRowExists and ::insertUpdateRow to
skip interacting with the updatelog table if it does not exist
on the DB connection being used to perform schema updates.
* Add tests for the currently completed untested DatabaseUpdater
class to verify these changes.
Bug: T377450
Change-Id: I60bf6028f17b0768588a09363ec28281954eb960
|
|
|
|
|
|
| |
This is a preparation for T189193.
Change-Id: I6b6e2c150950ac99df2d95dbb608ae82e912cd48
|
|
|
|
| |
Change-Id: Iac081a08681048c56b20c7789c5efb50a756d167
|
|
|
|
|
|
|
|
|
| |
It is not perfect, but it's a major improvement compared the existing
one. We need to clean up a lot more once it has landed but it's a good
start.
Bug: T337435
Change-Id: I1f85110e754546c797d3325b8dd6878093790266
|
|
|
|
|
|
|
|
|
|
|
| |
createMock() does the same, but is much easier to read.
A small difference is that some of the replacements made in this
patch didn't use disableOriginalConstructor() before. In case this
was relevant we should see the respective test fail. If not we can
save some CPU cycles and skip these constructors.
Change-Id: Ib98fb06e0fe753b7a53cb087a47e1159515a8ad5
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The `mediawiki.skinning.interface` module includes the `toc` feature
which is enabled by default,
which requires a working localization environment which requires
DBLoadBalancer which is disabled at this entry point.
Instead use ResourceLoaderSkinModule directly with an opt-in
policy where toc feature is not disbled.
This means the definition in Resources.php is no longer
necessary so it is marked for deprecation. The installer
now works.
A unit test is added to make sure the installer stylesheet
doesn't break again.
Bug: T270027
Change-Id: I851fcd0e50e3a70158d5bfa1fdcae3cd278694d6
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This changeset resumes work on T89432 and related tickets
by porting an initial set of tests to the new unit test suite
separated out in I69b92db3e70093570e05cc0a64c7780a278b321a.
The tests were only ported if they worked immediately without
requiring any changes other than changing the test case class
to MediaWikiUnitTestCase and moving the test to the new suite.
If a test failed for any reason (even trivial misconfiguration),
it was NOT ported.
With this change, the unit tests suite now consits of a total
of 455 tests. As before, you can run these tests via the following
command:
$ composer phpunit:unit
Bug: T84948
Bug: T89432
Bug: T87781
Change-Id: Ibb8175981092d7f41864e641cc3c118af70a5c76
|
|
|
|
|
|
|
|
| |
This reverts commit 0a2b996278e57a8b8c5377cd3a3eaa54f993d4a9.
Reason for revert: Broke postgres tests.
Change-Id: I27d8e0c807ad5f0748b9611a4f3df84cc213fbe1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This changeset implements T89432 and related tickets and is based on exploration
done at the Prague Hackathon. The goal is to identify tests in MediaWiki core
that can be run without having to install & configure MediaWiki and its dependencies,
and provide a way to execute these tests via the standard phpunit entry point,
allowing for faster development and integration with existing tooling like IDEs.
The initial set of tests that met these criteria were identified using the work Amir did in
I88822667693d9e00ac3d4639c87bc24e5083e5e8. These tests were then moved into a new subdirectory
under phpunit/ and organized into a separate test suite. The environment for this suite
is set up via a PHPUnit bootstrap file without a custom entry point.
You can execute these tests by running:
$ vendor/bin/phpunit -d memory_limit=512M -c tests/phpunit/unit-tests.xml
Bug: T89432
Bug: T87781
Bug: T84948
Change-Id: Iad01033a0548afd4d2a6f2c1ef6fcc9debf72c0d
|
|
|
|
|
|
|
|
| |
The name of the test class and method as well as the @covers tags already
explain well enough which code a test is testing. Repeating this does not
provide additional information.
Change-Id: Ieec4ec131e5925d11704a11e1df46bc00c9fad9b
|
|
|
|
|
|
|
| |
For @group and @covers tags there should be no newline between the
comment and the class
Change-Id: I7277df13a332cf4d74ffdd8748e3fbdc259610dc
|
|
|
|
|
|
|
|
| |
The format() method is a one-line wrapper around execute(), which
is the real method being tested here. Given the class doesn't
contain any other methods, increase the scope to the whole class.
Change-Id: I8b2c7736c6708c0915a9ce15fef0dc85c63621ea
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
runs
Nothing ever looks at these rows, and if you have update.php in a Cron
job or a Git hook or something, they can accumulate in huge numbers.
Also remove a test which verified that the rows get inserted.
If you reached this place while trying to find out what the weird
"updatelist-1.28.0-14628929450" rows in your database are, rest
assured they are useless. If they're causing disk space problems,
you can delete them:
DELETE FROM updatelog WHERE ul_key LIKE 'updatelist-%';
Change-Id: If94f243810e82ea3724cbd47b301bb96ba9a49d9
|
|
|
|
|
|
|
|
| |
Use HTTPS instead of HTTP where the HTTP link is a redirect to the HTTPS link.
Also update some defect links.
Change-Id: Ic3a5eac910d098ed5c2a21e9f47c9b6ee06b2643
|
|
|
|
| |
Change-Id: I3919b04eb2de4fa0bf8a02239fb5bbf17d347511
|
|
|
|
| |
Change-Id: I6b24422e830a8f82ba24383b3425808cb2a28b15
|
|
|
|
| |
Change-Id: I6531dc6cf89fbe7e5656354bcd4a27369f573752
|
|
|
|
|
|
|
|
|
|
| |
This is in intended to replace the DataUpdate transaction round logic.
It could also be useful for doing transaction rounds in maintenance
scripts.
Also renamed $db => $conn in a few LB methods for consistency.
Change-Id: If21c2ba5e8bac48c250b96137279e7edaa8289f7
|
|
|
|
| |
Change-Id: I86c73cb9447ac562a73348b4030e24ebf49a90dc
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
Also removed the callback functions for the existing regexes. Nothing
has to be or is encoded or escaped at this time, so preg_replace()
can be used instead of preg_replace_callback().
Change-Id: I8cdddd602dcf7b67b8f2b06149b6a0859c70342c
|
|
|
|
|
|
|
|
|
| |
Follows-up ccd051bc44.
To be consistent with DatabaseUpdater::setAppliedUpdates
the second arg $updates is now optional.
Change-Id: Ida2adfe30099ea4c65f0c16fafc4eae6603fc93a
|
|
|
|
|
|
|
|
|
| |
The key was constructed depending on the current time only.
This method fails, if multiple updates are performed
within one second.
Bug: 71087
Change-Id: Id7e30298729b3abb1501a34fcc1ba4e45d2172f0
|
|
|
|
| |
Change-Id: Ia0ceea60e7ef43959f868378f3fcd463a3adf782
|
|
|
|
|
|
|
|
| |
http://www.mediawiki.org --> https://www.mediawiki.org
Part 2
Change-Id: I3be61fe3dfb502cc20180486eb1a8016eac151df
|
|
|
|
| |
Change-Id: I3ce92463d485a0fb23e464e9a8059330f32d79af
|
|
|
|
| |
Change-Id: Iff3af78e9b41c445b7f066b6c0d0f4a87d2d6c4e
|
|
|
|
|
|
|
|
| |
InstallDocFormatter didn't escape the double underscores in
__TOC__. I also noticed that wfEscapeWikiText had a similar
bug, which I reported as bug 53658 (fixed separately).
Change-Id: Ib5346b9c234f1c5ef361cc4357352b09def5dc25
|
|
|
|
| |
Change-Id: Ia57685d8858e02e399ad5c75ce64d12609d340ac
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Oracle connect string was valid only if it contained alphanumerics,
underscore and dot. Some new schmemes makes uses of slashes and
EZConnect has the concept of server types (pooled, dedicated, shared)
which we now validate.
The long regex is now in OracleInstaller::checkConnectStringFormat()
(flagged with @since 1.22). The patch provides a bunch of very basic
tests to test out the regex.
Change-Id: Ie3a0af9801bfdbc9129298be07e1676145a1607a
|
|
|
|
|
|
|
| |
Follows-up I9d2b148e57 (including phpunit/languages this time).
Bug: 46434
Change-Id: I30e5efcd88c516121c454676bd7a18f9b7c8fca6
|
|
|
|
|
|
| |
5 of n.
Change-Id: I811ca957b6588085d67606ebc0cd4033a1e53839
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/91040
|
|
|
|
|
|
|
|
|
|
| |
* Actually removed $wgProto.
* Per Aryeh's suggestions on the future of $wgServer: made $wgServer detection in DefaultSettings.php more permanent by merging it with the new code from r90105. This means that bug 14977 is properly fixed now.
* Require entry points to set up the autoloader before including DefaultSettings.php. Comments on bug 14977 indicate that at some point in the past, this may have broken something. Anything that breaks now should just be fixed, we need the autoloader. Tested the most common entry points.
* Since the detection code has moved from Installer to WebRequest, I also moved the relevant test file and updated the test. The function under test is now public static, so r90154 is superseded.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/90194
|
|
|
|
|
|
|
| |
incomplete otherwise
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/90154
|
|
* (bug 14977) When detecting $wgServer, treat IPv6 addresses in $_SERVER['SERVER_NAME'] etc. in a sensible way.
* Tests for the new functions in IP.php and Installer.php
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/90105
|