Commit graph

77987 commits

Author SHA1 Message Date
Aaron Schulz
a619be8163 database: make close() sanity check mTrxPreCommitCallbacks
The other callback types are already checked too.

Change-Id: Ibdc82110c0a0e74bb07ed92ee667bdf0d9f69f90
2017-08-16 21:25:29 -07:00
jenkins-bot
a70c4a4c46 Merge "RCFilters: preserve invert parameter in saved queries" 2017-08-15 06:14:35 +00:00
Translation updater bot
425c51e9b2 Localisation updates from https://translatewiki.net.
Change-Id: I95727cea51152a116d75a2843d837cedbff53566
2017-08-15 08:04:52 +02:00
jenkins-bot
238f1d0274 Merge "Move RawMessage out of Message.php to its own file" 2017-08-15 04:48:46 +00:00
jenkins-bot
20b0288ac3 Merge "Make Special:NewPages show "originally created as" correctly" 2017-08-14 17:40:09 +00:00
Florian Schmidt
499f643bef Move RawMessage out of Message.php to its own file
Change-Id: Idae9617dafa3c314085eb097f78f1c8d38672f31
2017-08-14 17:33:52 +00:00
jenkins-bot
6c9a2923fe Merge "Perform a permission check on the title when changing the page language" 2017-08-14 16:48:17 +00:00
jenkins-bot
89539f2aa1 Merge "Special:Newpages feed now shows first revision instead of latest revision" 2017-08-14 16:33:19 +00:00
Matthew Bowker
af1434ff2f Change WikiImporter to now requires the second parameter to be an instance of the Config class.
Prior to this change, the second parameter to WikiImporter was optional.  If the parameter didn't exist, it would get filled in with a MediaWikiServices::getInstance()->getMainConfig().  It would also emit a hard deprecation warning. This behavior has existed since 1.25.

Bug: T61113
Change-Id: Ic15cc103c7d2b7fb499f1632c0001b8a3dbdf778
2017-08-14 18:18:53 +02:00
jenkins-bot
d627652545 Merge "Ignore errors in RedisConnectionPool destructor" 2017-08-14 15:01:28 +00:00
Gergő Tisza
a778ea1316 Ignore errors in RedisConnectionPool destructor
The destructor can be called on shutdown so any operation which
relies on another object or resource can fail. E.g. running
anything involving Redis (such as >>new Message('').''<<)
from shell.php and then exiting will result in a RedisException
since the PHP engine closes the Redis connection before destroying
the connection pool. Such errors can be safely ignored.

Change-Id: I38474a9dda89c82edbcb878facb4a97740e9189a
2017-08-14 14:28:41 +00:00
Translation updater bot
79519fbf84 Localisation updates from https://translatewiki.net.
Change-Id: If08fcdfd7268397691d725d198d222f9fce9cfbb
2017-08-14 08:20:23 +02:00
Max Semenik
34eec68649 Remove deprecated MagicWord::replaceMultiple()
wfDeprecated since 1.25, not used anywhere.

Change-Id: I09fd362a3d795328ffc12572025702ef9b951378
2017-08-14 02:39:58 +00:00
jenkins-bot
a8a5f03b3b Merge "BaseTemplate: Handle $this->data['language_urls'] === false specially" 2017-08-13 20:19:19 +00:00
Translation updater bot
19d97cd420 Localisation updates from https://translatewiki.net.
Change-Id: I324f599c4c46011cf7348ca75fc1d08e1beafe3f
2017-08-13 22:09:09 +02:00
jenkins-bot
4be41fe615 Merge "jquery.tablesorter: Improve detection and handling of isoDate" 2017-08-13 18:02:50 +00:00
madd
3fc8c9a8d5 jquery.tablesorter: Improve detection and handling of isoDate
* Detect years 0...99 correct.
* Short forms possible: JJJJ, JJJJ-MM, JJJJMM, JJJJMMTT
  QUnit Test sorts now with parser 'isoDate' (because of 2009 former test sorts with parser 'text')
* Prefix and postfix allowed.
* Between date and time a 'T' or 'any white space' is allowed (Bug: T126886)

Bug: T126886
Change-Id: I664b4cc9d5fb472ea0bc0e36a3c209f04048e769
2017-08-13 13:40:41 -04:00
Matthias Mullie
d6bc1b2589 Remove test code that depends on extension
And allow extensions to add their own media handlers.

I'm not too happy with the introduction of another global,
but didn't like the alternatives either:
* Add some hook to MockMediaHandlerFactory that would allow
  extensions to add their own stuff in.
* Use another hook (like ParserTestTables or ParserTestGlobals)
  and then override the service with a new instance - seemed
  too hacky
The good thing about this is that it lets us kill off a class.
I'm other to other suggestions in case I missed something.

Bug: T169258
Depends-On: I5875621c58597426ad5242bf3d07714555c439b5
Change-Id: I1c2e903fb235395a8de8e0f7bf65ce07739d2930
2017-08-13 12:04:37 -04:00
Geoffrey Mon
700e49dddd Unwatch link for pages in Special:Watchlist
When the 'watchlistunwatchlinks' preference option is enabled, this
adds a '×' link to each entry of the watchlist that unwatches the page
of that entry. When clicked, it changes into a '+' which can be used to
re-watch the page (effectively undoing the earlier unwatch).
When a page is unwatched, its entries and the entries of its associated
talk page (or vice versa) become translucent and are struck through.

Without JS, '×'/'+' link to action=(un)watch for the relevant page.

In addition, ChangesList classes have been modified to allow a prefixer
that adds a prefix to each line (used in this case to put the unwatch
link) and to add HTML data attributes to reliably determine the target
page of each entry. Unit tests have been updated accordingly.

Bug: T2424
Change-Id: I450b2901413d7e75c11de2a446829fdbb22d31e1
2017-08-12 19:36:29 -04:00
jenkins-bot
01299000d0 Merge "Warn users when installing on a 32-bit system" 2017-08-12 21:08:05 +00:00
Chad Horohoe
8b1c53a769 Warn users when installing on a 32-bit system
Don't fail to install, because we don't explicitly need to break
32-bit support. But in this day and age it's becoming increasingly
likely to break things on a 32-bit system. So let's at least let
a system admin know that YMMV.

Change-Id: Ifb3bfa049532d82f67fe4375944af1516400513c
2017-08-12 20:59:45 +00:00
Translation updater bot
8cff129de1 Localisation updates from https://translatewiki.net.
Change-Id: Ic427ce81276365b5e4ce288bd1b330850592ac81
2017-08-12 21:57:43 +02:00
jenkins-bot
21a34a42f4 Merge "Disallow job pushes from JobQueueGroup to bogus wikis" 2017-08-12 18:48:27 +00:00
jenkins-bot
15b3664ee1 Merge "Fix 'logName' parameter (5th) in many uses of mw.log.deprecate" 2017-08-12 17:21:53 +00:00
jenkins-bot
c05926bc7c Merge "mw.util: Add a deprecation message to escapeId()" 2017-08-12 17:19:46 +00:00
Umherirrender
cdd1fa84d0 Do not use broken bootstrap in phpcs.xml
The bootstrap in mediawiki-codesniffer is broken, because it was not
adjust when PHP CodeSniffer Version 3.0.0 was used. Remove the broken
bootstap.

Bug: T172933
Change-Id: I29e776662055077f6de3a9bc6d0869120b387ea7
2017-08-12 11:07:07 +02:00
Aaron Schulz
df7ec19a12 Disallow job pushes from JobQueueGroup to bogus wikis
Bug: T171371
Change-Id: I03a5dbd18cf6b5bcacb3ec07cef9e0b051bc147c
2017-08-11 14:56:47 -07:00
jenkins-bot
cc4115e87f Merge "Add missing @param and @return documentation" 2017-08-11 21:32:58 +00:00
jenkins-bot
84b6d5c2e5 Merge "Add missing type to @param documentation" 2017-08-11 21:31:51 +00:00
jenkins-bot
69fabec0f1 Merge "update mediawiki-codesniffer to 0.11.0 and fix issues" 2017-08-11 20:43:52 +00:00
WMDE-Fisch
6df9ed1ad6 update mediawiki-codesniffer to 0.11.0 and fix issues
- mostly auto fixes
- some too long lines fixed
- ignore amp space in one case  passing by reference

Change-Id: I6472f83bc3cbf4bd629d83050cc3319b19ec465c
2017-08-11 22:27:51 +02:00
Umherirrender
718e63694d Add missing @param and @return documentation
Change-Id: I1d1098eec3933df6561cceef646576013ddc08c8
2017-08-11 22:17:01 +02:00
Translation updater bot
507a26fd0a Localisation updates from https://translatewiki.net.
Change-Id: I4e8ad1e97a08441dad773c8435309df93ab347d9
2017-08-11 22:03:27 +02:00
Umherirrender
5544cef16b Add missing type to @param documentation
Change-Id: I6b2c9c7af9a281fe457099cc3a336a60a25e74aa
2017-08-11 20:37:35 +02:00
jenkins-bot
749d64bbe7 Merge "Use correct variable name in @param documentation" 2017-08-11 18:31:38 +00:00
jenkins-bot
f4dfa10458 Merge "Add missing & to @param documentation to match functon call" 2017-08-11 18:29:05 +00:00
jenkins-bot
ae50607da5 Merge "Fixing styling of interwiki results header" 2017-08-11 18:22:15 +00:00
Umherirrender
ace44e2064 Use correct variable name in @param documentation
For some varargs a variable name is added with suffix ,... as seen for
many other varargs

Some @param are swapped, because there are in the wrong order

Enable Sniff MediaWiki.Commenting.FunctionComment.ParamNameNoMatch

Change-Id: I60fec6025bce824d5c67563ab7b65ad6cd628ad8
2017-08-11 19:27:19 +02:00
Umherirrender
a9007e8baf Add missing & to @param documentation to match functon call
Change-Id: I81e68310abcbc59964b22e0e74842d509f6b1fb9
2017-08-11 18:47:46 +02:00
jenkins-bot
b5ddc3a4b4 Merge "Make phpcs pass" 2017-08-11 15:18:48 +00:00
Umherirrender
bf61a77431 Change @inheritdoc to @inheritDoc
Only @inheritDoc works for the Sniff
MediaWiki.Commenting.FunctionComment

Change-Id: I91fc02cda6701d790e4334fc2bc47f230955545c
2017-08-11 16:49:52 +02:00
Umherirrender
43e8cd0579 Make phpcs pass
Reenable MediaWiki.WhiteSpace.SpaceBeforeClassBrace.NoSpaceBeforeBrace,
because the mentioned bug is fixed

Bug: T172933
Change-Id: I1593bdba2295ebed401b921f2beabed69dba7638
2017-08-11 16:22:42 +02:00
jenkins-bot
4112201ef5 Merge "SpecialDoubleRedirects: Fix undefined '$result->namespace' notice" 2017-08-10 22:45:40 +00:00
jenkins-bot
6a077079d6 Merge "Create new table to be used for querying IP ranges." 2017-08-10 21:45:54 +00:00
MusikAnimal
d779a09035 Create new table to be used for querying IP ranges.
When revisions by logged out users are created, they will get copied
to this table. We can then JOIN it with revision when querying for
ranges at Special:Contributions.

DBA approval for this table can be found at T156318

Bug: T163562

Change-Id: I6593eb13701128faa782691a6b25ec01869c827d
2017-08-10 21:28:16 +00:00
Translation updater bot
f23bed6315 Localisation updates from https://translatewiki.net.
Change-Id: Ib722424a58bbb3d15c56c70ba29732f2be2d6669
2017-08-10 22:26:18 +02:00
Timo Tijhof
8acb5869d5 SpecialDoubleRedirects: Fix undefined '$result->namespace' notice
Follows-up 7be1a8c0bc.

$result is used for both the original and the on-demand deep
query (in case of cache). However this re-query can fail if the
page no longer exists.

This used to be accounted for by creating the Title object before
(possibly) trying to re-query, and also checked for with "if !$result",
which is only intended to happen if the re-query failed (the initial
value of $result comes from the main (cacheable) query, and always
exists.

Could be moved by moving the $titleA assignment back up, but that
doesn't address the confusion problem that led to this.

Fix it by using a separate variable names.

Bug: T173045
Change-Id: I0e9ae89a3772b33b916b506033bd334ade5f03fa
2017-08-10 16:26:08 -04:00
jenkins-bot
802e79a13f Merge "Add new static function LanguageCode::replaceDeprecatedCodes" 2017-08-10 20:04:34 +00:00
jenkins-bot
d8d4ca82e9 Merge "Make it possible for subclasses to provide a different form" 2017-08-10 19:49:42 +00:00
Fomafix
55ecf3e215 Add new static function LanguageCode::replaceDeprecatedCodes
Refactor the deprecatedLanguageCodeMapping to a private variable.

Change-Id: I5f8e601e53de183e6268c9ef601eef8390b725cd
2017-08-10 15:21:59 -04:00