lhc/web/wiklou.git
6 years agordbms: make LoadBalancer::getConnection() ignore CONN_TRX_AUTO when unusable
Aaron Schulz [Wed, 28 Feb 2018 00:00:05 +0000 (16:00 -0800)]
rdbms: make LoadBalancer::getConnection() ignore CONN_TRX_AUTO when unusable

Change-Id: I1fd13171c3cfbe071e8e398d561281188d998767

6 years agoMerge "rdbms: refactored code into separate Database::getClass method"
jenkins-bot [Thu, 1 Mar 2018 21:49:46 +0000 (21:49 +0000)]
Merge "rdbms: refactored code into separate Database::getClass method"

6 years agordbms: refactored code into separate Database::getClass method
Aaron Schulz [Tue, 27 Feb 2018 21:44:14 +0000 (13:44 -0800)]
rdbms: refactored code into separate Database::getClass method

Change-Id: Ic09ce2ea541d04f3cb3bc80a4a59c8b525ed8c53

6 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Thu, 1 Mar 2018 20:57:02 +0000 (21:57 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: Ibd74ef97fc27e4cd42491a049f9bd08a06859487

6 years agoMerge "multiselect: Use MenuTagMultiselectWidget"
jenkins-bot [Thu, 1 Mar 2018 20:04:28 +0000 (20:04 +0000)]
Merge "multiselect: Use MenuTagMultiselectWidget"

6 years agomultiselect: Use MenuTagMultiselectWidget
Prateek Saxena [Thu, 1 Mar 2018 07:00:53 +0000 (12:30 +0530)]
multiselect: Use MenuTagMultiselectWidget

…instead of CapsuleMultiselectWidget

Bug: T183299
Change-Id: I58385968c03e9b53ea8fc4d64de5d6540d12acc1

6 years agomw.widgets: Add SizeFilterWidget and its PHP implementation
Prateek Saxena [Fri, 29 Dec 2017 05:27:44 +0000 (10:57 +0530)]
mw.widgets: Add SizeFilterWidget and its PHP implementation

Bug: T183765
Change-Id: Ieb551e901405749489059366de9af6316f369cc0

6 years agoNewPagesPages: Use array_merge rather than + for RC query info fields
Brad Jorsch [Thu, 1 Mar 2018 13:24:48 +0000 (08:24 -0500)]
NewPagesPages: Use array_merge rather than + for RC query info fields

Unlike CommentStore::getJoin() and ActorMigration::getJoin(), the tables
and fields of various ::getQueryInfo() methods aren't guaranteed to be
safe to use with array '+'.

Bug: T188555
Change-Id: Ibe99edcb93d1729935fed6232ba4fe2e7d39cea6

6 years agoMerge "Only add header when description not already has it"
jenkins-bot [Thu, 1 Mar 2018 09:56:20 +0000 (09:56 +0000)]
Merge "Only add header when description not already has it"

6 years agoMerge "Fix bogus DatabaseOracle::__construct() calls in OracleInstaller"
jenkins-bot [Thu, 1 Mar 2018 01:22:13 +0000 (01:22 +0000)]
Merge "Fix bogus DatabaseOracle::__construct() calls in OracleInstaller"

6 years agoMerge "Use findSelectedItems instead of getSelectedItems"
jenkins-bot [Thu, 1 Mar 2018 00:02:05 +0000 (00:02 +0000)]
Merge "Use findSelectedItems instead of getSelectedItems"

6 years agoUse findSelectedItems instead of getSelectedItems
Prateek Saxena [Wed, 28 Feb 2018 05:44:46 +0000 (11:14 +0530)]
Use findSelectedItems instead of getSelectedItems

Bug: T76630
Depends-on: Ic1be36b62f6c48c9f40feace009fe4ca3e7a8e3f
Change-Id: I0f0e0f3494e2993e604dd7d0e6d15c2d1f34e772

6 years agoFix bogus DatabaseOracle::__construct() calls in OracleInstaller
Aaron Schulz [Wed, 28 Feb 2018 19:25:15 +0000 (11:25 -0800)]
Fix bogus DatabaseOracle::__construct() calls in OracleInstaller

Change-Id: I12a35ac0eeb68e5da9ba07ba44d3522213e9de8e

6 years agoMerge "rdbms: allow callers to hint that native insertSelect() is safe"
jenkins-bot [Wed, 28 Feb 2018 22:37:30 +0000 (22:37 +0000)]
Merge "rdbms: allow callers to hint that native insertSelect() is safe"

6 years agoMerge "Database: Add batching to non-native insertSelect()"
jenkins-bot [Wed, 28 Feb 2018 22:04:13 +0000 (22:04 +0000)]
Merge "Database: Add batching to non-native insertSelect()"

6 years agoMerge "Fix table loading bug for CRH transliteration"
jenkins-bot [Wed, 28 Feb 2018 21:09:01 +0000 (21:09 +0000)]
Merge "Fix table loading bug for CRH transliteration"

6 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Wed, 28 Feb 2018 20:57:46 +0000 (21:57 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I59d4acb939e5ac374a3166c5edf61f72bde87e37

6 years agoMerge "Parser: Don't wrap <style> or <link> tags in paragraphs"
jenkins-bot [Wed, 28 Feb 2018 19:29:34 +0000 (19:29 +0000)]
Merge "Parser: Don't wrap <style> or <link> tags in paragraphs"

6 years agoParser: Don't wrap <style> or <link> tags in paragraphs
Brad Jorsch [Mon, 26 Feb 2018 21:49:08 +0000 (16:49 -0500)]
Parser: Don't wrap <style> or <link> tags in paragraphs

If <style> or <link> tags are by themselves on a line, don't wrap them
in <p> tags. But, at the same time, don't end an existing paragraph if
we find <style> or <link> in the middle (like we would if we just
treated them as block tags).

If <style> or <link> is on a line with other text, though, let it be
wrapped in a paragraph along with that other text.

Bug: T186965
Change-Id: Ide4005842cdab537226aa538cb5f7d8e363ba95d

6 years agordbms: allow callers to hint that native insertSelect() is safe
Brad Jorsch [Thu, 8 Feb 2018 19:18:24 +0000 (14:18 -0500)]
rdbms: allow callers to hint that native insertSelect() is safe

An INSERT SELECT in MySQL/MariaDB is unsafe for replication if a column
is getting values from auto-increment, statement-based replication is in
use, and the default innodb_autoinc_lock_mode is set.

I9173f655 added checks to force non-native insertSelect for the
statement-based replication and innodb_autoinc_lock_mode != 2 case, but
determining whether a column is getting values from auto-increment is
too hard to do automatically there.

Instead, let's add a flag to let the caller hint that the query isn't
getting any auto-increment values. And use it in MysqlUpdater when
appropriate.

Bug: T160993
Change-Id: If70450a64aa3bcbf763c62838bb21306d124ae3d

6 years agoDatabase: Add batching to non-native insertSelect()
Brad Jorsch [Thu, 8 Feb 2018 19:16:29 +0000 (14:16 -0500)]
Database: Add batching to non-native insertSelect()

It would be easy for a call to nonNativeInsertSelect() to generate an
INSERT that's too big for the database to actually process. Add batching
to try to avoid that.

Bug: T160993
Change-Id: I1de994208d95926f0d75c0d7cab7b5fe1dd565c3

6 years agoMerge "Separate additional swift users for public and private"
jenkins-bot [Wed, 28 Feb 2018 18:19:25 +0000 (18:19 +0000)]
Merge "Separate additional swift users for public and private"

6 years agoMerge "API: Update main description to reflect reality"
jenkins-bot [Wed, 28 Feb 2018 17:12:57 +0000 (17:12 +0000)]
Merge "API: Update main description to reflect reality"

6 years agoMerge "WikiPage: Avoid $user variable reuse in doDeleteArticleReal()"
jenkins-bot [Wed, 28 Feb 2018 14:16:29 +0000 (14:16 +0000)]
Merge "WikiPage: Avoid $user variable reuse in doDeleteArticleReal()"

6 years agoMerge "Update namespaces for Sindhi"
Nikerabbit [Wed, 28 Feb 2018 11:58:55 +0000 (11:58 +0000)]
Merge "Update namespaces for Sindhi"

6 years agoWikiPage: Avoid $user variable reuse in doDeleteArticleReal()
Kunal Mehta [Wed, 28 Feb 2018 05:47:29 +0000 (21:47 -0800)]
WikiPage: Avoid $user variable reuse in doDeleteArticleReal()

$user was being used to represent the person who was deleting the page as
well as a variable when dermining the person who made an edit in each
row as it was moved to the archive table.

Make it unambigious which variable is used to represent the person deleting
the article by renaming it to $deleter.

Bug: T188479
Change-Id: Ia06e7fb840ebc68446127352e336a7e33c813042

6 years agoMerge "In StripState use closures instead of temporary member variables"
jenkins-bot [Wed, 28 Feb 2018 05:05:56 +0000 (05:05 +0000)]
Merge "In StripState use closures instead of temporary member variables"

6 years agoMerge "Avoid use of deprecated SiteStatsUpdate::__construct()"
jenkins-bot [Wed, 28 Feb 2018 05:04:52 +0000 (05:04 +0000)]
Merge "Avoid use of deprecated SiteStatsUpdate::__construct()"

6 years agoAPI: Update main description to reflect reality
Kunal Mehta [Wed, 28 Feb 2018 04:36:34 +0000 (20:36 -0800)]
API: Update main description to reflect reality

For quite a while now, the API no longer "may change at any time". Any
potential breaking change goes through code review, usage analysis, and
usually, a deprecation process.

This process was implemented as part of the "API roadmap"[1] RfC in
2014.

Today, the API is mature and stable, but still actively developed and
maintained. Breaking changes can still happen, and we want people to
subscribe to the -announce mailing list, but it's not as scary as the
old text implied.

[1]
<https://www.mediawiki.org/wiki/Requests_for_comment/API_roadmap#Deprecation_process>

Change-Id: If13172a35a3d041bce745aa72a835bfddcfe62c0

6 years agoMerge "Do not run ipblocks cleanup randomly, just do it all the time"
jenkins-bot [Wed, 28 Feb 2018 03:53:47 +0000 (03:53 +0000)]
Merge "Do not run ipblocks cleanup randomly, just do it all the time"

6 years agoDo not run ipblocks cleanup randomly, just do it all the time
Amir Sarabadani [Fri, 23 Feb 2018 16:58:58 +0000 (17:58 +0100)]
Do not run ipblocks cleanup randomly, just do it all the time

It's a deferred update and the number of blocks are small

Change-Id: I75e0b7dc38b22f8aa7453582d535a8ab8121fd1a

6 years agoAvoid use of deprecated SiteStatsUpdate::__construct()
Aaron Schulz [Wed, 28 Feb 2018 03:15:43 +0000 (19:15 -0800)]
Avoid use of deprecated SiteStatsUpdate::__construct()

Change-Id: I9bf70fefe3ca146525e9b7cb436c9a577fb8eaee

6 years agoMerge "RCFilters: Actually apply the $autoCloseIgnore to the overlay"
jenkins-bot [Wed, 28 Feb 2018 01:46:51 +0000 (01:46 +0000)]
Merge "RCFilters: Actually apply the $autoCloseIgnore to the overlay"

6 years agoRCFilters: Actually apply the $autoCloseIgnore to the overlay
Moriel Schottlender [Wed, 28 Feb 2018 01:12:01 +0000 (17:12 -0800)]
RCFilters: Actually apply the $autoCloseIgnore to the overlay

The way we extended the configuration meant we overrided the
overlay $autoCloseIgnore with default rather than override the
default with the overlay.

Bug: T188459
Change-Id: If20bd400a8a206aa77c25c390d9e9ce5111b68cb

6 years agoIn StripState use closures instead of temporary member variables
Tim Starling [Wed, 28 Feb 2018 00:22:43 +0000 (11:22 +1100)]
In StripState use closures instead of temporary member variables

The former convention was an awkward workaround for the lack of
closures.

Change-Id: I8722e168fb9b5e76cf6a937139be728bb3fc3e92

6 years agoMerge "shell: Don't use --seccomp=@default for firejail < 0.9.50 support"
jenkins-bot [Tue, 27 Feb 2018 23:00:15 +0000 (23:00 +0000)]
Merge "shell: Don't use --seccomp=@default for firejail < 0.9.50 support"

6 years agoMerge "Update more forms to limit comments by codepoints rather than bytes"
jenkins-bot [Tue, 27 Feb 2018 22:27:58 +0000 (22:27 +0000)]
Merge "Update more forms to limit comments by codepoints rather than bytes"

6 years agoAdd a missing check of $wgActorTableSchemaMigrationStage
Brad Jorsch [Tue, 27 Feb 2018 21:08:02 +0000 (16:08 -0500)]
Add a missing check of $wgActorTableSchemaMigrationStage

We shouldn't be trying to update the table when it's MIGRATION_OLD.

Bug: T188437
Change-Id: Id5aae5eaafc36bf7e65009e67fe91619fb1df295

6 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Tue, 27 Feb 2018 20:55:42 +0000 (21:55 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I9451759812c8112ae1be6583659a78a6f53ef935

6 years agoMerge "Use findSelectedItem instead of getSelectedItem"
jenkins-bot [Tue, 27 Feb 2018 19:04:29 +0000 (19:04 +0000)]
Merge "Use findSelectedItem instead of getSelectedItem"

6 years agoMerge "Remove wfWaitForSlaves when using Maintenance::commitTransaction"
jenkins-bot [Tue, 27 Feb 2018 17:43:57 +0000 (17:43 +0000)]
Merge "Remove wfWaitForSlaves when using Maintenance::commitTransaction"

6 years agoUse findSelectedItem instead of getSelectedItem
Prateek Saxena [Tue, 27 Feb 2018 06:06:07 +0000 (11:36 +0530)]
Use findSelectedItem instead of getSelectedItem

Depends-on: I0f1d9c1f31efcc10d3647103548770d2101050d9
Bug: T76630
Change-Id: I6782909cfff3b10c0f651a26081cb73f37e82b83

6 years agoMerge "Remove wfProfileIn/wfProfileOut"
jenkins-bot [Tue, 27 Feb 2018 01:54:39 +0000 (01:54 +0000)]
Merge "Remove wfProfileIn/wfProfileOut"

6 years agoMerge "Accept non-fully qualified TestCase in StructureTest"
jenkins-bot [Tue, 27 Feb 2018 01:32:32 +0000 (01:32 +0000)]
Merge "Accept non-fully qualified TestCase in StructureTest"

6 years agoMerge "Create a custom log formatter that allows log entries to contain wikitext"
jenkins-bot [Tue, 27 Feb 2018 01:12:56 +0000 (01:12 +0000)]
Merge "Create a custom log formatter that allows log entries to contain wikitext"

6 years agoCreate a custom log formatter that allows log entries to contain wikitext
SamanthaNguyen [Sun, 25 Feb 2018 00:19:31 +0000 (18:19 -0600)]
Create a custom log formatter that allows log entries to contain wikitext

This creates a new log formatter called WikitextLogFormatter, which
is a simple class that allows log entries to contain properly
formatted wikitext. This makes it easier for extensions so they don't
have to create their own subclass of LogFormatter.

Change-Id: I2b7fddf5c6ef017a0925b4bf75cfd47cb55aa5de

6 years agoshell: Don't use --seccomp=@default for firejail < 0.9.50 support
Kunal Mehta [Mon, 26 Feb 2018 21:40:27 +0000 (13:40 -0800)]
shell: Don't use --seccomp=@default for firejail < 0.9.50 support

Just using a plain `--seccomp` automatically enables the default list.

Bug: T183680
Change-Id: I623db943eeb5c3e9d4f7a553fb6a17a60d659dce

6 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 26 Feb 2018 20:55:45 +0000 (21:55 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I11123ffd371ab1883530b4342f1d4af38485464f

6 years agoRemove wfWaitForSlaves when using Maintenance::commitTransaction
Umherirrender [Mon, 26 Feb 2018 20:05:33 +0000 (21:05 +0100)]
Remove wfWaitForSlaves when using Maintenance::commitTransaction

Maintenance::commitTransaction is calling waitForReplication already.
No need to wait a second time, hopefully the lags are 0 already.

Change-Id: Id457ed2cdd6bfd9663665ba0cd5c4e3dd640b738

6 years agoMerge "updateCollation.php: Improve --dry-run mode"
jenkins-bot [Mon, 26 Feb 2018 19:15:56 +0000 (19:15 +0000)]
Merge "updateCollation.php: Improve --dry-run mode"

6 years agoExit populateIpChanges maintenance script if there are no revisions
MusikAnimal [Mon, 26 Feb 2018 17:38:46 +0000 (12:38 -0500)]
Exit populateIpChanges maintenance script if there are no revisions

Bug: T188225
Change-Id: Ice1bdae3d16cf365da14c6df0e8d91d2b914f064

6 years agoFix table loading bug for CRH transliteration
tjones [Mon, 26 Feb 2018 18:03:19 +0000 (13:03 -0500)]
Fix table loading bug for CRH transliteration

In production, the regex and exception tables were not being loaded,
resulting in very poor transliteration. The loading has been moved to
the contructor, similar to the implementation of the Kazakh
transliteration.

Also, a bug in the mappings for Ö/ö -> Ё/ё and Ü/ü -> Ю/ю has been
fixed.

Test cases for specific additional examples have been added. (Though
it is worth noting that the regex and exception tables did load
properly during unit testing, so the problem wasn't caught there.)

Bug: T186727
Change-Id: I6bacee7d9de6f4a870a8a9ef1f04b819ad489c02

6 years agoUpdate more forms to limit comments by codepoints rather than bytes
Brad Jorsch [Mon, 26 Feb 2018 18:07:11 +0000 (13:07 -0500)]
Update more forms to limit comments by codepoints rather than bytes

This updates the deletion forms, Special:Block, Special:EditTags,
Special:MovePage, Special:RevisionDelete, Special:Undelete, and
Special:UserRights to limit by code point count rather than by byte (or,
in some cases, by UTF-16 code unit).

Bug: T185948
Change-Id: I20d11d7cc4f58902cbcb6dda70af533bce6dd170

6 years agoAccept non-fully qualified TestCase in StructureTest
Lucas Werkmeister [Mon, 26 Feb 2018 17:04:33 +0000 (18:04 +0100)]
Accept non-fully qualified TestCase in StructureTest

This makes StructureTest also recognize test classes which look like

    use PHPUnit\Framework\TestCase;

    class FooTest extends TestCase {

instead of

    class FooTest extends \PHPUnit\Framework\TestCase {

This form is preferred, for instance, in Wikibase code.

Bug: T188276
Change-Id: I5bef035df33d317893ad3ba195ecb75f3b09a62f

6 years agoSeparate additional swift users for public and private
Gilles Dubuc [Mon, 26 Feb 2018 09:25:38 +0000 (10:25 +0100)]
Separate additional swift users for public and private

For better security seggregation it can be desirable
to set different additional swift users when dealing
with private containers.

Bug: T187822
Change-Id: I66d26ec81b3a3577d274c0d28cf86db7b505e082

6 years agoMerge "Chinese Conversion Table Update 2018-1"
jenkins-bot [Mon, 26 Feb 2018 09:19:17 +0000 (09:19 +0000)]
Merge "Chinese Conversion Table Update 2018-1"

6 years agoMerge "SpecialPageAliasTest: Fix arguments of Language::fetchLanguageNames"
jenkins-bot [Mon, 26 Feb 2018 08:54:36 +0000 (08:54 +0000)]
Merge "SpecialPageAliasTest: Fix arguments of Language::fetchLanguageNames"

6 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sun, 25 Feb 2018 20:56:56 +0000 (21:56 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I1eed5fd6944bbd829ed1fbb5950e89c8b85c87f6

6 years agoChinese Conversion Table Update 2018-1
Chiefwei [Sun, 25 Feb 2018 13:43:18 +0000 (21:43 +0800)]
Chinese Conversion Table Update 2018-1

1. Update the Chinese conversion table routinely to fix bugs reported from https://zh.wikipedia.org/wiki/Wikipedia:%E5%AD%97%E8%AF%8D%E8%BD%AC%E6%8D%A2/%E4%BF%AE%E5%A4%8D%E8%AF%B7%E6%B1%82 .

2. Fully support the conversion of Chinese characters included in "Table of General Standard Chinese Characters" (通用规范汉字表).

It is only data changes and only works for Chinese WikiProjects.

Change-Id: I7f94eb01b3b50427cbb96084152e574b066d5fbf

6 years agoSpecialPageAliasTest: Fix arguments of Language::fetchLanguageNames
Fomafix [Sun, 25 Feb 2018 12:19:15 +0000 (13:19 +0100)]
SpecialPageAliasTest: Fix arguments of Language::fetchLanguageNames

Language::fetchLanguageNames( 'mwfile' ) means all languages with the
default filter 'mw' and names in the language 'mwfile'.

Language::fetchLanguageNames( null, 'mwfile' ) means language all
languages with the filter 'mwfile' and names in the default language.

This change removes the test for the language codes:
* aa
* als
* bat-smg
* be-x-old
* cho
* fiu-vro
* ho
* hz
* kj
* kr
* mh
* mus
* ng
* no
* rn
* roa-rup
* shi-latn
* shi-tfng
* simple
* tum
* uz-cyrl
* uz-latn
* zh-classical
* zh-min-nan
* zh-yue

Change-Id: I7266a67e37862daf863d1565d84cfeebaf5cb680

6 years agocontent: Fix @return doc for AbstractContent::getDeletionUpdates()
Kunal Mehta [Sun, 25 Feb 2018 02:49:08 +0000 (18:49 -0800)]
content: Fix @return doc for AbstractContent::getDeletionUpdates()

If a subclass re-implements this function, then there's no guarantee
that it will be returning instances of LinksDelet

Change-Id: I09a0c0a786b687997e61344847f8af08b20cebf2

6 years agoFix phpdoc for Maintenance::getDB
Umherirrender [Sat, 24 Feb 2018 21:31:10 +0000 (22:31 +0100)]
Fix phpdoc for Maintenance::getDB

It has the same parameter as wfGetDB including $groups as string

Change-Id: Id531488e1c2bddce71946423010620323e08bc0a

6 years agoRemove wfProfileIn/wfProfileOut
Umherirrender [Sat, 24 Feb 2018 09:45:31 +0000 (10:45 +0100)]
Remove wfProfileIn/wfProfileOut

@deprecated since 1.25

Change-Id: Ie13c31816280fa577ef6bfb5fef172163f83c408

6 years agoDon't suggest using extract()
Max Semenik [Sat, 24 Feb 2018 01:41:20 +0000 (17:41 -0800)]
Don't suggest using extract()

Especially for things as trivial as this.

Bug: T28496
Change-Id: Id4bc7f0e6411e943dff45e45964c08d44e6ccb96

6 years agoRemove redundant item loading code in User::createNew
Aaron Schulz [Sat, 24 Feb 2018 00:25:01 +0000 (16:25 -0800)]
Remove redundant item loading code in User::createNew

These lines were removed in 27c61fb1 but left in when I rebased
61b0c193 due to the conflict. The load() call handles all these
fields, so there is no need to set mName and the load state flag.

Change-Id: Id751241abf8d5592309744e96493122c6bc65f2b

6 years agoForce READ_LATEST for User::newFromId() if writes had been done
Brad Jorsch [Fri, 23 Feb 2018 18:25:10 +0000 (13:25 -0500)]
Force READ_LATEST for User::newFromId() if writes had been done

The User::newFromName() case already does this, there seems to be no
reason not to do it for User::newFromId() too.

Bug: T188014
Change-Id: Ic7fdef0cc1f5750cb5e6b2a7f48f1549862b41cb

6 years agoHave User::createNew() load the object from master
Brad Jorsch [Fri, 23 Feb 2018 18:24:47 +0000 (13:24 -0500)]
Have User::createNew() load the object from master

When the new User is created, it's leaving it to be lazy-loaded from a
replica. That seems to be causing attempts to add groups immediately
after creation to fail because the load-from-replica doesn't find the
just-created master row.

Bug: T188014
Change-Id: I841c434086bfaaca1cf1ce23673f32dc5a77915d

6 years agoMerge "wgGroupPermissions: Don't grant editmyusercss/editmyuserjs to anons"
jenkins-bot [Fri, 23 Feb 2018 22:59:29 +0000 (22:59 +0000)]
Merge "wgGroupPermissions: Don't grant editmyusercss/editmyuserjs to anons"

6 years agoMerge "Add `actor` table and code to start using it"
jenkins-bot [Fri, 23 Feb 2018 22:24:24 +0000 (22:24 +0000)]
Merge "Add `actor` table and code to start using it"

6 years agoAllow limiting comment length by characters rather than bytes in JS
Bartosz Dziewoński [Thu, 8 Feb 2018 21:22:34 +0000 (22:22 +0100)]
Allow limiting comment length by characters rather than bytes in JS

For unfortunate historical reasons, browsers' native maxlength counts
the number of UTF-16 code units rather than Unicode codepoints [1],
which means that codepoints outside the Basic Multilingual Plane
(e.g. many emojis) count as 2 characters each. That could be good
enough, but we want our software to be excellent rather than merely
good enough.

1. Introduce a few new functions, added to the existing modules:
   * mediawiki.String:
     * codePointLength() counts the length of a string in Unicode
       codepoints (characters).
     * trimCodePointLength() trims a string to the desired length in
       Unicode codepoints (characters).
   * jquery.lengthLimit:
     * $.fn.codePointLimit() enforces the specified maximum length in
       codepoints of an input field.
   * mediawiki.widgets.visibleLengthLimit:
     * mw.widgets.visibleCodePointLimit() enforces the maximum length
       in codepoints of an OOUI widget and displays the remaining
       length in an inline label.

2. Add client-side mw.config variables:
   * wgCommentByteLimit for the old byte limit, equal to 255.
   * wgCommentCodePointLimit for the new codepoint limit, equal to 1000.

   Only one of them may be set, depending on which limit should be applied.

3. Make use of both of these new features. For the sake of an example,
   I updated the forms shown on action=edit (using visibleCodePointLimit)
   and on action=protect (using codePointLimit). Many remain to be updated.

[1] https://www.w3.org/TR/html5/sec-forms.html#limiting-user-input-length-the-maxlength-attribute

Bug: T185948
Change-Id: Ia1269fd898dabbcf1582618eab46cef97e10a3b1

6 years agoMerge "mediawiki.mixins: Extend `hyphens()` mixin for `none` case"
jenkins-bot [Fri, 23 Feb 2018 21:50:50 +0000 (21:50 +0000)]
Merge "mediawiki.mixins: Extend `hyphens()` mixin for `none` case"

6 years agoMerge "Localisation updates from https://translatewiki.net."
L10n-bot [Fri, 23 Feb 2018 21:09:54 +0000 (21:09 +0000)]
Merge "Localisation updates from https://translatewiki.net."

6 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Fri, 23 Feb 2018 21:09:44 +0000 (22:09 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I1eaeb45405e151b5c25afe598a70d041453fc9d0

6 years agoMerge "Adjust tests for JPEG segmentation fix"
jenkins-bot [Fri, 23 Feb 2018 21:06:30 +0000 (21:06 +0000)]
Merge "Adjust tests for JPEG segmentation fix"

6 years agoMerge "rdbms: make DBMasterPos implement Serializable"
jenkins-bot [Fri, 23 Feb 2018 20:57:34 +0000 (20:57 +0000)]
Merge "rdbms: make DBMasterPos implement Serializable"

6 years agordbms: make DBMasterPos implement Serializable
Aaron Schulz [Fri, 23 Feb 2018 03:23:19 +0000 (19:23 -0800)]
rdbms: make DBMasterPos implement Serializable

ChronologyProtector uses these classes to briefly store positions
and everytime the fields change then errors can happen when old
values are unserialized and used. Use a simple two-element map
format for serialized positions. The fields are recomputed back
from the data map.

Values from before this change will issue the warning
"Erroneous data format for unserializing". To avoid that, bump
the ChronologyProtector key version. Future field changes will
not require this.

This change should be deployed on all wikis at once.

Bug: T187942
Change-Id: I71bbbc9b9d4c7e02ac02f1d8750b70bda08d4db1

6 years agomediawiki.mixins: Extend `hyphens()` mixin for `none` case
Volker E [Fri, 23 Feb 2018 20:29:31 +0000 (12:29 -0800)]
mediawiki.mixins: Extend `hyphens()` mixin for `none` case

Slightly extending `hyphens()` mixin with Less mixin guard for
`none` value “reset” case.

Change-Id: Iebb3f5190d31173ea6d843e0434f794f3b3c8e8a

6 years agoRename jquery.byteLimit→lengthLimit, mediawiki.widgets.visibleByteLimit→visibleLength...
Bartosz Dziewoński [Thu, 8 Feb 2018 21:22:34 +0000 (22:22 +0100)]
Rename jquery.byteLimit→lengthLimit, mediawiki.widgets.visibleByteLimit→visibleLengthLimit

In change Ia1269fd898dabbcf1582618eab46cef97e10a3b1 I want to add
functions that deal with codepoints instead of bytes to these modules,
after which the names wouldn't make sense. Doing this in a separate
commit to make the diffs clearer.

Change-Id: Ia554eb2265248e72b04fce69a662a9db1a5f1275

6 years agoAdd `actor` table and code to start using it
Brad Jorsch [Tue, 12 Sep 2017 17:12:29 +0000 (13:12 -0400)]
Add `actor` table and code to start using it

Storing the user name or IP in every row in large tables like revision
and logging takes up space and makes operations on these tables slower.
This patch begins the process of moving those into one "actor" table
which other tables can reference with a single integer field.

A subsequent patch will remove the old columns.

Bug: T167246
Depends-On: I9293fd6e0f958d87e52965de925046f1bb8f8a50
Change-Id: I8d825eb02c69cc66d90bd41325133fd3f99f0226

6 years agoAdjust tests for JPEG segmentation fix
Brion Vibber [Fri, 23 Feb 2018 09:42:10 +0000 (09:42 +0000)]
Adjust tests for JPEG segmentation fix

Added a second test case truncated in a different place, and
added some clarifying comments.

Change-Id: I7b8e5296a203264b7e7e428f82c8c948242a1272

6 years agoMerge "Revert "JobQueueGroup: Improve failed-to-insert error""
Chad [Fri, 23 Feb 2018 08:05:41 +0000 (08:05 +0000)]
Merge "Revert "JobQueueGroup: Improve failed-to-insert error""

6 years agoRevert "JobQueueGroup: Improve failed-to-insert error"
Chad [Fri, 23 Feb 2018 08:05:13 +0000 (08:05 +0000)]
Revert "JobQueueGroup: Improve failed-to-insert error"

I made a useless commit.

This reverts commit a82cb5aa18e2d5dc886d51f71b224dbd9de83cae.

Change-Id: I70328bcbcf9af5480c7a0b8e297ed41a463fd457

6 years agoMerge "JobQueueGroup: Improve failed-to-insert error"
jenkins-bot [Fri, 23 Feb 2018 08:01:59 +0000 (08:01 +0000)]
Merge "JobQueueGroup: Improve failed-to-insert error"

6 years agoRCLFilters specific message for invalid target page
Stephane Bisson [Mon, 22 Jan 2018 22:46:31 +0000 (14:46 -0800)]
RCLFilters specific message for invalid target page

* always hide the big red .errorbox when rcfilters
  is enabled

* always identify the changes-list section with
  .mw-changeslist or .mw-changeslist-empty

* conditionally add .mw-changeslist-empty-<reason>
  to the changeslist section when the reason for it
  being empty is known

* handle RCL being empty because the specified title
  is invalid or inter-wiki

Bug: T184952
Change-Id: I5dd974f5f769503e89301dd22bdfd3d49b0dd11f

6 years agoJobQueueGroup: Improve failed-to-insert error
Chad Horohoe [Wed, 21 Feb 2018 01:13:12 +0000 (17:13 -0800)]
JobQueueGroup: Improve failed-to-insert error

This could possibly use LoggerFactory & friends to use them as
parameters, but either way let's sort the entries so they're
at least remotely capable of self-grouping.

Change-Id: Iaf435093d70add02e2f82e3037c64fec11870979

6 years agoCSSMin: Trim whitespace from attribute selectors and url tokens
Fomafix [Wed, 6 Dec 2017 16:16:41 +0000 (17:16 +0100)]
CSSMin: Trim whitespace from attribute selectors and url tokens

* Trim whitespaces after opening and before closing parentheses and
  brackets.
* Ensure by test case that the invalid "url (" will not become the
  valid "url(" by minification.

This change also prevents the parsing problem in Firefox 57.0
https://bugzilla.mozilla.org/1418152 which is fixed in Firefox 57.0.1.

Change-Id: I804477ba7c6363f0e964fc8c7c0bc74d2d4c1a0d

6 years agoMerge "Shell: Don't hang on empty stdin"
jenkins-bot [Thu, 22 Feb 2018 23:31:26 +0000 (23:31 +0000)]
Merge "Shell: Don't hang on empty stdin"

6 years agoMerge "Drop pointer-events fallback code now IE10 is Grade C"
jenkins-bot [Thu, 22 Feb 2018 22:57:33 +0000 (22:57 +0000)]
Merge "Drop pointer-events fallback code now IE10 is Grade C"

6 years agoShell: Don't hang on empty stdin
Brad Jorsch [Thu, 22 Feb 2018 22:13:28 +0000 (17:13 -0500)]
Shell: Don't hang on empty stdin

If the write buffer for a file descriptor is empty, don't try to write
to it. Just close it and continue on.

Bug: T188019
Change-Id: Ie5b5ac1ef1aec4ae763cf4d0d58d3a28e42b7d2a

6 years agoMake LocalFile check early if the revision store is available
Aaron Schulz [Thu, 22 Feb 2018 08:48:42 +0000 (00:48 -0800)]
Make LocalFile check early if the revision store is available

This reduces the odds of having files without corresponding
wiki pages, given that the later is done in a deferred update.

Also made some documentation cleanups.

Bug: T187942
Change-Id: Iff516669f535713d37e0011e2d7ed285c667f1c5

6 years agoMerge "Add ExternalStoreMedium::isReadOnly() method"
jenkins-bot [Thu, 22 Feb 2018 21:41:00 +0000 (21:41 +0000)]
Merge "Add ExternalStoreMedium::isReadOnly() method"

6 years agoDrop pointer-events fallback code now IE10 is Grade C
Ed Sanders [Thu, 22 Feb 2018 21:40:53 +0000 (21:40 +0000)]
Drop pointer-events fallback code now IE10 is Grade C

IE10 was the last supported browser without pointer-events.

Change-Id: I8e1637f527dd058fe2a5491896b0cdd7ac65b0ba

6 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Thu, 22 Feb 2018 21:36:55 +0000 (22:36 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I143b63f429ecea18b60f7b30aeb7c42b65d45bd6

6 years agoMerge "EditPage: Remove unused $is*Subpage variables, deprecated in 1.30"
jenkins-bot [Thu, 22 Feb 2018 20:54:44 +0000 (20:54 +0000)]
Merge "EditPage: Remove unused $is*Subpage variables, deprecated in 1.30"

6 years agowgGroupPermissions: Don't grant editmyusercss/editmyuserjs to anons
James D. Forrester [Thu, 22 Feb 2018 20:48:42 +0000 (12:48 -0800)]
wgGroupPermissions: Don't grant editmyusercss/editmyuserjs to anons

Change-Id: I4b3216a06c3b214e9f0be52cfbefa9f489c910b4

6 years agoMerge "mediawiki.mixins: Add `hyphens` mixin"
jenkins-bot [Thu, 22 Feb 2018 20:27:25 +0000 (20:27 +0000)]
Merge "mediawiki.mixins: Add `hyphens` mixin"

6 years agoMerge "objectcache: improve TTL reduction warning log entries"
jenkins-bot [Thu, 22 Feb 2018 20:22:32 +0000 (20:22 +0000)]
Merge "objectcache: improve TTL reduction warning log entries"

6 years agoEditPage: Remove unused $is*Subpage variables, deprecated in 1.30
James D. Forrester [Sat, 10 Feb 2018 01:19:18 +0000 (17:19 -0800)]
EditPage: Remove unused $is*Subpage variables, deprecated in 1.30

Change-Id: I9a9a9b2652f63d18634a60205a6e8a4d76380e71

6 years agomediawiki.mixins: Add `hyphens` mixin
Volker E [Thu, 22 Feb 2018 20:05:58 +0000 (12:05 -0800)]
mediawiki.mixins: Add `hyphens` mixin

As `hyphens` values are used in various places now, with most
recent addition I1637ce3f5bddb we should add it in a central place.

Change-Id: I660f3ecd2a4669e8d5c8415990fa2e8a25aea32a

6 years agoMerge "Use PHP's implode() with the suggested order of arguments"
jenkins-bot [Thu, 22 Feb 2018 20:04:00 +0000 (20:04 +0000)]
Merge "Use PHP's implode() with the suggested order of arguments"