lhc/web/wiklou.git
4 years agoMerge "Move ApiQueryUserInfo::getBlockInfo() to ApiBase"
jenkins-bot [Mon, 6 May 2019 12:29:40 +0000 (12:29 +0000)]
Merge "Move ApiQueryUserInfo::getBlockInfo() to ApiBase"

4 years agoMerge "rcfeed: Replace usage of deprecated class RCFeedEngine (in comments)"
jenkins-bot [Mon, 6 May 2019 11:43:00 +0000 (11:43 +0000)]
Merge "rcfeed: Replace usage of deprecated class RCFeedEngine (in comments)"

4 years agoMerge "NS_MEDIA also always has page_id 0"
jenkins-bot [Mon, 6 May 2019 11:39:14 +0000 (11:39 +0000)]
Merge "NS_MEDIA also always has page_id 0"

4 years agoMerge "MovePage methods need to run safety checks"
jenkins-bot [Mon, 6 May 2019 10:51:40 +0000 (10:51 +0000)]
Merge "MovePage methods need to run safety checks"

4 years agoMerge "Don't pass Config to NamespaceInfo"
jenkins-bot [Mon, 6 May 2019 10:51:34 +0000 (10:51 +0000)]
Merge "Don't pass Config to NamespaceInfo"

4 years agoMerge "Update GenderCache to use NamespaceInfo"
jenkins-bot [Mon, 6 May 2019 10:45:15 +0000 (10:45 +0000)]
Merge "Update GenderCache to use NamespaceInfo"

4 years agoMerge "Deprecate the Http class"
jenkins-bot [Mon, 6 May 2019 10:15:10 +0000 (10:15 +0000)]
Merge "Deprecate the Http class"

4 years agoMerge "Update DefaultPreferencesFactory to use NamespaceInfo"
jenkins-bot [Mon, 6 May 2019 09:53:57 +0000 (09:53 +0000)]
Merge "Update DefaultPreferencesFactory to use NamespaceInfo"

4 years agoUpdate DefaultPreferencesFactory to use NamespaceInfo
Aryeh Gregor [Sun, 5 Aug 2018 12:56:23 +0000 (15:56 +0300)]
Update DefaultPreferencesFactory to use NamespaceInfo

Depends-On: I552264714de7227965f978f20f932f41cf96042e
Change-Id: I0568e7f4c7223208001f378a03fef395df8bff69

4 years agoMerge "Improve rollback tests setup by extracting repeating logic to HistoryPage...
jenkins-bot [Mon, 6 May 2019 09:09:08 +0000 (09:09 +0000)]
Merge "Improve rollback tests setup by extracting repeating logic to HistoryPage object"

4 years agoUpdate GenderCache to use NamespaceInfo
Aryeh Gregor [Sun, 5 Aug 2018 10:05:44 +0000 (13:05 +0300)]
Update GenderCache to use NamespaceInfo

Change-Id: I0c2997bf8764249c26251d0f63f3ea0a0b272a7e

4 years agoDeprecate the Http class
Aryeh Gregor [Mon, 15 Apr 2019 13:23:02 +0000 (16:23 +0300)]
Deprecate the Http class

All methods got moved to HttpRequestFactory or MWHttpRequest or dropped.

I made the return value of the new HttpRequestFactory::request/get/post
methods null on error instead of false, so that when we drop PHP 7
support, we can use a "?string" return value. This could theoretically
change behavior of code that was switched from the old Http methods, but
probably won't. I kept the old behavior for the deprecated methods.

I changed the default value of $wgHTTPProxy from false to ''. This way
it should be usable directly without a trivial wrapper method. For the
benefit of anyone who might have set it to false in LocalSettings.php, I
also recommend casting to string just in case.

Http::$httpEngine is deprecated. Eventually it will be removed along
with the curl and PHP engines, leaving only the Guzlle engine.

I also added deprecation of MWHttpRequest::factory, which occurred in
1.31, to the release notes for 1.34. Now hopefully we can hard-deprecate
it in another couple of versions.

Bug: T214390
Change-Id: I2a316a758d793857f248bd251b90f5e9a6440e3a

4 years agoDon't pass Config to NamespaceInfo
Aryeh Gregor [Fri, 12 Apr 2019 09:49:59 +0000 (12:49 +0300)]
Don't pass Config to NamespaceInfo

Change-Id: Ie43e6108c6b9bcb666b1dece055e0df689e2ec42

4 years agoMovePage methods need to run safety checks
Aryeh Gregor [Tue, 16 Apr 2019 12:37:41 +0000 (15:37 +0300)]
MovePage methods need to run safety checks

A move method that doesn't check for things like moving a page on top of
itself or moving to a namespace with a different content model does not
seem like it's what callers would expect, and not what Title::moveTo
ever did. If there's a caller that really wants this behavior, we can
make moveUnsafe public.

I also made the $reason and $createRedirect parameters to move()
optional to match Title::moveTo() behavior. However, I made $reason
default to null instead of '', to distinguish between an empty edit
reason provided by the user and no edit reason provided at all (e.g., a
move done internally without specific user request).

Depends-On: I971e619eb76c4474fe037fad258f9c496717bf41
Change-Id: I6ddcc9f34a48f997ae39b79cd2df40dd2cc10197

4 years agoMove ApiQueryUserInfo::getBlockInfo() to ApiBase
Amir Sarabadani [Mon, 29 Apr 2019 07:47:31 +0000 (09:47 +0200)]
Move ApiQueryUserInfo::getBlockInfo() to ApiBase

ApiBase directly uses this method causing a cyclic dependency between
ApiBase and ApiQueryUserInfo

Change-Id: I84ed21641c44b2f65ebe1980b0893d1846db3b34

4 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sun, 5 May 2019 19:54:56 +0000 (21:54 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I7fb884c03375b5c918f8e4b7f5309bbbe70c89ad

4 years agoMerge "Permissions: Declare the $nsInfo property and document it in constructor"
jenkins-bot [Sun, 5 May 2019 19:35:38 +0000 (19:35 +0000)]
Merge "Permissions: Declare the $nsInfo property and document it in constructor"

4 years agoMove getPrevious/NextRevision logic out of Title
Aryeh Gregor [Mon, 29 Apr 2019 14:24:58 +0000 (17:24 +0300)]
Move getPrevious/NextRevision logic out of Title

They belong in RevisionStore. This change removes the dependency on
Title for these methods and will assist in porting more code to
LinkTarget.

At the same time, deprecate the Title parameter to
RevisionLookup/RevisionStore getPreviousRevision/getNextRevision, and
add a $flags parameter to match the functionality of the Title versions.
Since code search turned up no callers that passed a Title outside core,
this variant is immediately hard-deprecated. The Title methods
themselves are only soft-deprecated.

Change-Id: I76bc6fd6ee1a9f35b5f29fa640824fb5da3bb78e

4 years agoPermissions: Declare the $nsInfo property and document it in constructor
Derick Alangi [Sun, 5 May 2019 15:43:42 +0000 (16:43 +0100)]
Permissions: Declare the $nsInfo property and document it in constructor

Was added in commit 1f7ab9c but was never documented nor declared before its
usage.

Change-Id: Iea833f9ffb6ac210251912d35cdebf9bb064d610

4 years agoDon't require Title for getTimestampFromId
Aryeh Gregor [Mon, 29 Apr 2019 14:32:22 +0000 (17:32 +0300)]
Don't require Title for getTimestampFromId

3e36ba655e3a added an option for passing a page ID to this method of
Revision, and e03787afd91c switched it to a Title and made it mandatory.
This behavior propagated to the method in RevisionStore.  As far as I
can tell, the parameter does not help anything, but it can add a
database query to get the page ID if it's not cached, and impedes
conversion to LinkTarget. I can't figure out any reason to not
completely drop it. I've noted it as deprecated but still supported it
for now for compatibility -- I found one extension that does pass it.
(It's ignored, though, which theoretically would be a behavior change if
someone was passing a Title that didn't match the revision ID.)

While I was at it, I added the method to RevisionLookup, although it's
only used in later patches. Properly I should move that piece to a later
patch, but it didn't seem worth the effort.

I didn't change the Revision method, because the whole Revision class is
deprecated anyway.

Change-Id: I26ef5f2bf828f0f450633b7237d26d888e2c8773

4 years agoConvert WatchedItem and friends to UserIdentity
Aryeh Gregor [Sun, 28 Apr 2019 11:07:18 +0000 (14:07 +0300)]
Convert WatchedItem and friends to UserIdentity

I wasn't able to port some places that rely on isAllowed, getOption, or
related methods.

This adds isRegistered() to UserIdentity, which works like
User::isLoggedIn() but with a better name.

I also cleaned up User mocks in WatchedItemQueryServiceUnitTest in the
course of debugging test failures when switching them to
UserIdentityValue instead of mock Users where possible. They now specify
explicitly which methods are allowed to be called on their User objects,
which I believe is good practice for mocks (and unfortunately PHPUnit
makes it awkward).

Bug: T207972
Depends-On: I883d506197a011fe4c102b72df4d9deb58ab5ca2
Change-Id: Iadbf7bc31a496899dbef44e49065ff89f37aea89

4 years agoNS_MEDIA also always has page_id 0
Aryeh Gregor [Sun, 5 May 2019 08:37:01 +0000 (11:37 +0300)]
NS_MEDIA also always has page_id 0

Change-Id: I0047e5f8e367fe3e8433e715ea56616a6f8dab85

4 years agoMerge "Add UserOptionsUpdateJob class"
jenkins-bot [Sat, 4 May 2019 17:42:48 +0000 (17:42 +0000)]
Merge "Add UserOptionsUpdateJob class"

4 years agoMerge "Mock IDatabase::class instead of DatabaseMysqli::class"
jenkins-bot [Fri, 3 May 2019 23:36:11 +0000 (23:36 +0000)]
Merge "Mock IDatabase::class instead of DatabaseMysqli::class"

4 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Fri, 3 May 2019 20:00:03 +0000 (22:00 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Iaffb949f59706ee6ca0d61ca8a3c9487be0d5a31

4 years agoMerge "Avoid/Replace usage of deprecated `wfMemcKey()` function"
jenkins-bot [Fri, 3 May 2019 19:27:23 +0000 (19:27 +0000)]
Merge "Avoid/Replace usage of deprecated `wfMemcKey()` function"

4 years agoAdd UserOptionsUpdateJob class
Aaron Schulz [Fri, 29 Mar 2019 07:17:09 +0000 (00:17 -0700)]
Add UserOptionsUpdateJob class

This can help avoid DB master queries on HTTP GET requests

Change-Id: I6fa2d53d96509d88f5d3e1ff18f3ca1de8fa4bb1

4 years agoMerge "generatePhpCharToUpperMappings.php: Write output directly to json file"
jenkins-bot [Fri, 3 May 2019 18:23:06 +0000 (18:23 +0000)]
Merge "generatePhpCharToUpperMappings.php: Write output directly to json file"

4 years agoMerge "HTMLForm: Improve method interface for collapsible forms"
jenkins-bot [Fri, 3 May 2019 17:22:43 +0000 (17:22 +0000)]
Merge "HTMLForm: Improve method interface for collapsible forms"

4 years agoMerge "Make JSON styling available on mobile"
jenkins-bot [Fri, 3 May 2019 17:00:10 +0000 (17:00 +0000)]
Merge "Make JSON styling available on mobile"

4 years agoMake JSON styling available on mobile
Ed Sanders [Fri, 12 Apr 2019 14:23:59 +0000 (15:23 +0100)]
Make JSON styling available on mobile

Styling works fine on mobile and is only loaded
on JSON pages. Without the styling the page is
much harder to read.

Change-Id: I68a7a02f42ec4352969d6e24ba7b0b1f85374523

4 years agogeneratePhpCharToUpperMappings.php: Write output directly to json file
Ed Sanders [Wed, 10 Apr 2019 14:35:18 +0000 (15:35 +0100)]
generatePhpCharToUpperMappings.php: Write output directly to json file

Change-Id: Ic19e5c9899f19d9b6ebf4a65a81100670514aa14

4 years agoMerge "docs/kss/package.json: Update Gerrit /r/p/ link to /r/"
jenkins-bot [Thu, 2 May 2019 23:25:10 +0000 (23:25 +0000)]
Merge "docs/kss/package.json: Update Gerrit /r/p/ link to /r/"

4 years agoHTMLForm: Improve method interface for collapsible forms
Bartosz Dziewoński [Mon, 15 Apr 2019 23:53:55 +0000 (01:53 +0200)]
HTMLForm: Improve method interface for collapsible forms

Also minor tweaks:
* Fix @since tags, this did not make it into 1.33
* Fix usage of FieldsetLayout 'group' in OOUIHTMLForm
* Documentation changes

Follow-up to 2896e87a1007202f5416fe506c691652b27c4ac9,
per my post-merge review on that commit.

Change-Id: Ib93375cde19730a46e4929878d6e472d3ac8f631

4 years agoMerge "Make generatePhpCharToUpperMappings.php a proper maintenance script"
jenkins-bot [Thu, 2 May 2019 19:34:21 +0000 (19:34 +0000)]
Merge "Make generatePhpCharToUpperMappings.php a proper maintenance script"

4 years agoMerge "SearchInputWidget: Replace pushPending hack"
jenkins-bot [Thu, 2 May 2019 19:08:50 +0000 (19:08 +0000)]
Merge "SearchInputWidget: Replace pushPending hack"

4 years agoSECURITY: LogPager: Don't STRAIGHT_JOIN when using log_search
Brad Jorsch [Thu, 2 May 2019 17:54:42 +0000 (10:54 -0700)]
SECURITY: LogPager: Don't STRAIGHT_JOIN when using log_search

We'll hope MariaDB doesn't trigger T221458 in that situation.

Bug: T222324
Signed-off-by: Scott Bassett <sbassett@deploy1001.eqiad.wmnet>
Signed-off-by: James D. Forrester <jforrester@wikimedia.org>
Change-Id: I06364e9d0bce45bd97b2ec837d1f479feff76699

4 years agoMake generatePhpCharToUpperMappings.php a proper maintenance script
Ed Sanders [Wed, 10 Apr 2019 13:46:32 +0000 (14:46 +0100)]
Make generatePhpCharToUpperMappings.php a proper maintenance script

This allows us to use Title for converting to upper case which
will respect any compatibility fixes added later.

Bug: T219279
Change-Id: I746487df12e4628f1e37b33b7cc3cce597853596

4 years agoSearchInputWidget: Replace pushPending hack
Ed Sanders [Thu, 2 May 2019 16:15:20 +0000 (17:15 +0100)]
SearchInputWidget: Replace pushPending hack

Use the showPendingRequest config option instead of setting
a prototype method to false.

Bug: T222329
Change-Id: I0e3176141c63ed9a849326c2f9a5a26ffc2b273f

4 years agoMerge "Mock IDatabase::class instead of Database::class"
jenkins-bot [Thu, 2 May 2019 15:53:58 +0000 (15:53 +0000)]
Merge "Mock IDatabase::class instead of Database::class"

4 years agoMock IDatabase::class instead of Database::class
Umherirrender [Wed, 1 May 2019 15:31:13 +0000 (17:31 +0200)]
Mock IDatabase::class instead of Database::class

Change-Id: I960bfdd5c9738c201a1be3ccaae05efc3d176ea8

4 years agoAvoid/Replace usage of deprecated `wfMemcKey()` function
Derick Alangi [Thu, 2 May 2019 13:50:34 +0000 (14:50 +0100)]
Avoid/Replace usage of deprecated `wfMemcKey()` function

This global function was deprecated in 1.30 and is replaced with
the use of `ObjectCache::getLocalClusterInstance()->makeKey()`.

Change-Id: Ic08b53111be4374a973e08c2ed68224bfa922fa8

4 years agoDon't pass Config to service constructors
Aryeh Gregor [Wed, 10 Apr 2019 15:03:54 +0000 (18:03 +0300)]
Don't pass Config to service constructors

We don't want to depend on the entire site configuration when we only
need a few specific settings.

This change additionally means that these services no longer see a live
version of the settings, but rather a copy. This means in tests you
really do have to call overrideMwServices() if you want services to pick
up your config changes.

ResourceLoader and SearchEngineConfig will need more work to port,
because they expose their member Config in a getter, and the getter is
actually used.

Parser and NamespaceInfo are also relatively complicated, so I split
them into separate patches.

Tested with 100% code coverage. \o/

Depends-On: If6534b18f6657ec1aba7327463f2661037f995b3
Change-Id: I1a3f358e8659b49de4502dc8216ecb6f35f4e02a

4 years agoMerge "build: Upgrade grunt-banana-checker from 0.6.0 to 0.7.0 and make pass"
jenkins-bot [Thu, 2 May 2019 00:22:16 +0000 (00:22 +0000)]
Merge "build: Upgrade grunt-banana-checker from 0.6.0 to 0.7.0 and make pass"

4 years agoMerge "build: Upgrade grunt from 1.0.3 to 1.0.4"
jenkins-bot [Thu, 2 May 2019 00:22:10 +0000 (00:22 +0000)]
Merge "build: Upgrade grunt from 1.0.3 to 1.0.4"

4 years agoMerge "Hide uploads link on IP contributions page"
jenkins-bot [Wed, 1 May 2019 20:04:06 +0000 (20:04 +0000)]
Merge "Hide uploads link on IP contributions page"

4 years agoMerge "Remove `-moz` vendor prefixes"
jenkins-bot [Wed, 1 May 2019 20:03:59 +0000 (20:03 +0000)]
Merge "Remove `-moz` vendor prefixes"

4 years agoMerge "Localisation updates from https://translatewiki.net."
jenkins-bot [Wed, 1 May 2019 19:56:25 +0000 (19:56 +0000)]
Merge "Localisation updates from https://translatewiki.net."

4 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Wed, 1 May 2019 19:55:49 +0000 (21:55 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I31fb1c0676b6f32bbdde280afb98d3ce6c85854a

4 years agoMerge "Fix class name handling in DeprecationHelper"
jenkins-bot [Wed, 1 May 2019 19:51:36 +0000 (19:51 +0000)]
Merge "Fix class name handling in DeprecationHelper"

4 years agoRemove `-moz` vendor prefixes
Volker E [Wed, 1 May 2019 19:28:36 +0000 (12:28 -0700)]
Remove `-moz` vendor prefixes

These are applying only on Firefox < 33, which is mostly limited
to Firefox 3(.6?) on Windows XP and are currently used by 0.1% of our
users, which translates to little or no impact on users of affected
scripts.
Let's remove those for better code maintainability.

Bug: T222222
Change-Id: I9bcebb31036cc93759ff9167b8774d58cf768f8e

4 years agoMerge "shell: annotate return types"
jenkins-bot [Wed, 1 May 2019 19:16:37 +0000 (19:16 +0000)]
Merge "shell: annotate return types"

4 years agoMerge "Introduce a BlockManager service"
jenkins-bot [Wed, 1 May 2019 18:26:59 +0000 (18:26 +0000)]
Merge "Introduce a BlockManager service"

4 years agoMerge "Update an old comment that predated IPv6"
jenkins-bot [Wed, 1 May 2019 18:25:10 +0000 (18:25 +0000)]
Merge "Update an old comment that predated IPv6"

4 years agoMerge "Fix WikiPage::commitRollback error message"
jenkins-bot [Wed, 1 May 2019 17:31:45 +0000 (17:31 +0000)]
Merge "Fix WikiPage::commitRollback error message"

4 years agoUpdate an old comment that predated IPv6
Thalia [Wed, 1 May 2019 17:28:55 +0000 (18:28 +0100)]
Update an old comment that predated IPv6

Change-Id: Ia9968eab3793f275cd7ca6a35cfd5b0bcc9604c5

4 years agoMock IDatabase::class instead of DatabaseMysqli::class
Umherirrender [Wed, 1 May 2019 15:38:04 +0000 (17:38 +0200)]
Mock IDatabase::class instead of DatabaseMysqli::class

Change-Id: I4c15c32b17e1e5a70ad59b25f976a2fc0e7907fe

4 years agoHide uploads link on IP contributions page
Matěj Suchánek [Fri, 12 Apr 2019 09:20:33 +0000 (11:20 +0200)]
Hide uploads link on IP contributions page

If IPs cannot upload files, hide link to list of files
which they uploaded.

Also simplify the code: User::getID() should always return int,
so $id !== null was always true. And add references to some tasks.

Bug: T220674
Change-Id: Ia9e1516393d6e85858cceb02bb09405148adaf51

4 years agoMerge "Default $wgActorTableSchemaMigrationStage to SCHEMA_COMPAT_NEW"
jenkins-bot [Wed, 1 May 2019 05:42:06 +0000 (05:42 +0000)]
Merge "Default $wgActorTableSchemaMigrationStage to SCHEMA_COMPAT_NEW"

4 years agoMerge "ContribsPager: Fix slow queries"
jenkins-bot [Wed, 1 May 2019 04:38:54 +0000 (04:38 +0000)]
Merge "ContribsPager: Fix slow queries"

4 years agoFix WikiPage::commitRollback error message
Gergő Tisza [Wed, 1 May 2019 04:34:41 +0000 (21:34 -0700)]
Fix WikiPage::commitRollback error message

The user got accidentally mixed up in Ifd23bc1cd6.

Bug: T222179
Change-Id: I4d45f68caf160f001420cf46ffcd2b46cc2ddac1

4 years agoContribsPager: Fix slow queries
Brad Jorsch [Tue, 23 Apr 2019 16:13:08 +0000 (12:13 -0400)]
ContribsPager: Fix slow queries

When ContribsPager is using an auxiliary table like ip_changes or
revision_actor_temp for the main action of the query, we already had
code in place to let it use the auxiliary table's denormalized timestamp
field for the ordering. What we didn't have was code to let it also use
the auxiliary table's denormalized timestamp field for *continuation*.

With the schema defined in tables.sql, the simplest thing to do would be
to be to add a redundant JOIN condition between rev_timestamp and the
denormalized timestamp field which would be enough to allow
MySQL/MariaDB to propagate the continuation conditional on rev_timestamp
to the denormalized timestamp field.

Unfortunately many Wikimedia wikis have rev_timestamp defined
differently from table.sql (P8433), and that difference is enough to
break that propagation. So we need to take a more difficult route,
restructuring the code tell IndexPager to explicitly use the
denormalized fields for ordering and continuation.

On the plus side, since we're doing that anyway we can get rid of the
code mentioned in the first paragraph.

Bug: T221380
Change-Id: Iad6c0c2f1ac5e1c610de15fe6e85a637c287bcd8

4 years agoDefault $wgActorTableSchemaMigrationStage to SCHEMA_COMPAT_NEW
Brad Jorsch [Thu, 4 Apr 2019 19:23:41 +0000 (15:23 -0400)]
Default $wgActorTableSchemaMigrationStage to SCHEMA_COMPAT_NEW

Probably good to start testing this in CI sometime soon.

This also updates a bunch of tests that were forcing an older stage to
force SCHEMA_COMPAT_NEW instead, or to test both ways (until a future
patch removes the _OLD version).

Bug: T188327
Change-Id: Icb9b55cb9d754f2d30d6883005658b9670834756

4 years agobuild: Upgrade grunt-banana-checker from 0.6.0 to 0.7.0 and make pass
James D. Forrester [Tue, 30 Apr 2019 20:26:02 +0000 (13:26 -0700)]
build: Upgrade grunt-banana-checker from 0.6.0 to 0.7.0 and make pass

Change-Id: I4c604ab50caeffc5738c719c17f19e769082376f

4 years agobuild: Upgrade grunt from 1.0.3 to 1.0.4
James D. Forrester [Tue, 30 Apr 2019 20:25:38 +0000 (13:25 -0700)]
build: Upgrade grunt from 1.0.3 to 1.0.4

Change-Id: I9bfada10337dbab4cb5c77348f5f0df6cfab40a7

4 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Tue, 30 Apr 2019 19:55:00 +0000 (21:55 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I550dfb385ac3897d4d4cbcfc412f78a9579d1707

4 years agoMerge "Fix @return documentation for MediaWikiTestCase::editPage()"
jenkins-bot [Tue, 30 Apr 2019 19:21:31 +0000 (19:21 +0000)]
Merge "Fix @return documentation for MediaWikiTestCase::editPage()"

4 years agoMerge "Block: Type hint Block constructor, follow-up on I37ab858494a173c6982bb"
jenkins-bot [Tue, 30 Apr 2019 19:04:37 +0000 (19:04 +0000)]
Merge "Block: Type hint Block constructor, follow-up on I37ab858494a173c6982bb"

4 years agoMerge "Add missing IDatabase type hints to all doAtomicSection() calls"
jenkins-bot [Tue, 30 Apr 2019 17:52:54 +0000 (17:52 +0000)]
Merge "Add missing IDatabase type hints to all doAtomicSection() calls"

4 years agoBlock: Type hint Block constructor, follow-up on I37ab858494a173c6982bb
Derick Alangi [Mon, 29 Apr 2019 22:26:03 +0000 (23:26 +0100)]
Block: Type hint Block constructor, follow-up on I37ab858494a173c6982bb

Since 1.26, both options array and individual arguments were accepted but
was later removed in I37ab858494a173c6982bb (support for multiple args was
dropped) and **only** array of options is accepted from 1.33 since the use
of individual arguments all disappeared, see usage below;

Usage
=====

https://codesearch.wmflabs.org/search/?q=new%20Block%5C(&i=nope&files=&repos=

Bug: T220656
Change-Id: Id5266400def9fafbc89d5bdcdb63aed2a63da34d

4 years agoImprove rollback tests setup by extracting repeating logic to HistoryPage object
tzhelyazkova [Fri, 26 Apr 2019 10:04:33 +0000 (12:04 +0200)]
Improve rollback tests setup by extracting repeating logic to HistoryPage object

This also removes the helper method waitForScriptsToBeReady() and uses the more
general waitForModuleState() method directly.

Bug: T220479
Change-Id: I6be81ad68720449ef03b6a60b4b329040f236c72

4 years agoAdd missing IDatabase type hints to all doAtomicSection() calls
Thiemo Kreuz [Tue, 30 Apr 2019 15:08:48 +0000 (17:08 +0200)]
Add missing IDatabase type hints to all doAtomicSection() calls

Change-Id: I11061c358013fc67ec7a8ded54aeddcb7ff4910b

4 years agoFix @return documentation for MediaWikiTestCase::editPage()
Thiemo Kreuz [Tue, 30 Apr 2019 15:06:46 +0000 (17:06 +0200)]
Fix @return documentation for MediaWikiTestCase::editPage()

Change-Id: Iec6ec28256b014a2c745413786d0ba5e8d5839d7

4 years agoMerge "Replace pauses in rollback tests w/ dynamic waits"
jenkins-bot [Tue, 30 Apr 2019 14:03:50 +0000 (14:03 +0000)]
Merge "Replace pauses in rollback tests w/ dynamic waits"

4 years agoMerge "Use POST to submit wikitext to mw.api.parse"
jenkins-bot [Tue, 30 Apr 2019 12:38:45 +0000 (12:38 +0000)]
Merge "Use POST to submit wikitext to mw.api.parse"

4 years agorcfeed: Replace usage of deprecated class RCFeedEngine (in comments)
Derick Alangi [Sat, 20 Apr 2019 15:15:15 +0000 (16:15 +0100)]
rcfeed: Replace usage of deprecated class RCFeedEngine (in comments)

Doing the replacement for code logic for where it's used is breaking
compatibility, the first change set did this but as adviced, let's wait
for a while until the class is removed.

Change-Id: I3cc0593080f0d51b380c9cdbabc646459e6798e1

4 years agoReplace pauses in rollback tests w/ dynamic waits
Tim Eulitz [Mon, 15 Apr 2019 10:21:22 +0000 (12:21 +0200)]
Replace pauses in rollback tests w/ dynamic waits

Bug: T220479
Change-Id: I95cf06a4d6a677ca14b56f11f5c6bd98aa0abd05

4 years agoMerge "HTMLFormFieldWithButton: Don't pass empty string as 'id'"
jenkins-bot [Tue, 30 Apr 2019 01:32:27 +0000 (01:32 +0000)]
Merge "HTMLFormFieldWithButton: Don't pass empty string as 'id'"

4 years agoHTMLFormFieldWithButton: Don't pass empty string as 'id'
Bartosz Dziewoński [Tue, 30 Apr 2019 00:10:16 +0000 (02:10 +0200)]
HTMLFormFieldWithButton: Don't pass empty string as 'id'

The button must have an ID to be able to be infused. If the given ID
is null, that's fine, OOUI will generate one. But passing an empty
string apparently disables that.

Bug: T222013
Change-Id: I96e1f838385c5539ed246d2ee7107cd037a5f338

4 years agodocs/kss/package.json: Update Gerrit /r/p/ link to /r/
zoranzoki21 [Mon, 29 Apr 2019 23:29:39 +0000 (01:29 +0200)]
docs/kss/package.json: Update Gerrit /r/p/ link to /r/

Bug: T218844
Change-Id: Ie503c5f7dc3bd89d983c1b368e25a4d185ae617e

4 years agoMerge "User: Remove/Kill usage of deprecated User::makeGroupLinkWiki()"
jenkins-bot [Mon, 29 Apr 2019 21:02:39 +0000 (21:02 +0000)]
Merge "User: Remove/Kill usage of deprecated User::makeGroupLinkWiki()"

4 years agoUser: Remove/Kill usage of deprecated User::makeGroupLinkWiki()
Derick Alangi [Mon, 29 Apr 2019 20:13:53 +0000 (21:13 +0100)]
User: Remove/Kill usage of deprecated User::makeGroupLinkWiki()

This method was deprecated in 1.29 and usage of this method can no
longer be found.

Usage
=====

https://codesearch.wmflabs.org/search/?q=makeGroupLinkWiki&i=nope&files=&repos=

Bug: T220656
Change-Id: Iff5ef6666e8ec3e7060ddef8f60362206f4306d0

4 years agoMerge "jobqueue: make JobQueueDB stricter about broken job_params fields"
jenkins-bot [Mon, 29 Apr 2019 20:11:05 +0000 (20:11 +0000)]
Merge "jobqueue: make JobQueueDB stricter about broken job_params fields"

4 years agoMerge "objectcache: replace debugLog() calls with faster debug() calls in MemcachedPe...
jenkins-bot [Mon, 29 Apr 2019 20:02:56 +0000 (20:02 +0000)]
Merge "objectcache: replace debugLog() calls with faster debug() calls in MemcachedPeclBagOStuff"

4 years agoMerge "objectcache: micro-optimize determineKeyClassForStats() by using the limit...
jenkins-bot [Mon, 29 Apr 2019 20:01:21 +0000 (20:01 +0000)]
Merge "objectcache: micro-optimize determineKeyClassForStats() by using the limit option to explode()"

4 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 29 Apr 2019 19:56:09 +0000 (21:56 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I29daa267c536e8dc57b524e4a9232c606364b9cb

4 years agoMerge "User: Remove deprecated methods ::getGroupPage() & ::makeGroupLinkHTML()"
jenkins-bot [Mon, 29 Apr 2019 19:35:18 +0000 (19:35 +0000)]
Merge "User: Remove deprecated methods ::getGroupPage() & ::makeGroupLinkHTML()"

4 years agoUser: Remove deprecated methods ::getGroupPage() & ::makeGroupLinkHTML()
Derick Alangi [Mon, 29 Apr 2019 10:58:21 +0000 (11:58 +0100)]
User: Remove deprecated methods ::getGroupPage() & ::makeGroupLinkHTML()

These methods were deprecated in 1.29 and usage can no longer be found so,
removing ahead of 1.34 cut.

Usage
=====

* User::getGroupPage() -
  https://codesearch.wmflabs.org/search/?q=%5B%5E%3E%5D(User)%3A%3AgetGroupPage%5C(&i=nope&files=&repos=

* User::makeGroupLinkHTML() -
  https://codesearch.wmflabs.org/search/?q=%5B%5E%3E%5D(User)%3A%3AmakeGroupLinkHTML%5C(&i=nope&files=&repos=

Bug: T220656
Change-Id: I4e48eb351883b044269d77a8baaf7b5030138c34

4 years agoMerge "mw.widgets.TitleWidget: Update icons, use OOUI where possible"
jenkins-bot [Mon, 29 Apr 2019 17:06:58 +0000 (17:06 +0000)]
Merge "mw.widgets.TitleWidget: Update icons, use OOUI where possible"

4 years agoIntroduce a BlockManager service
Thalia [Fri, 5 Apr 2019 19:13:17 +0000 (20:13 +0100)]
Introduce a BlockManager service

This introduces a minimal BlockManager service, for getting blocks
that apply to a User.

Move the part of User::getBlockedStatus that checks for the blocks
into BlockManager::getUserBlock, and move the related helper
methods from User to BlockManager.

Hard deprecate or remove these helper methods, and move to private
methods in the BlockManager:
* User::getBlockFromCookieValue
* User::isLocallyBlockedProxy
* User::inDnsBlacklist

Soft deprecate these helper methods, and move to public methods in
the BlockManager:
* User::isDnsBlacklisted

Add tests to cover the methods moved to BlockManager.

Bug: T219441
Change-Id: I0af658d71288376735cebe541215383b56bb72e5

4 years agoMerge "Clarify documentation of minor and notminor API parameters"
jenkins-bot [Mon, 29 Apr 2019 16:13:34 +0000 (16:13 +0000)]
Merge "Clarify documentation of minor and notminor API parameters"

4 years agomw.widgets.TitleWidget: Update icons, use OOUI where possible
Ed Sanders [Mon, 29 Apr 2019 16:09:43 +0000 (17:09 +0100)]
mw.widgets.TitleWidget: Update icons, use OOUI where possible

Bug: T222079
Change-Id: I7ff1ca9410236b7404556cb0b90cab3340ee7b0b

4 years agoMerge "Deprecate User::isBlocked()"
jenkins-bot [Mon, 29 Apr 2019 11:44:50 +0000 (11:44 +0000)]
Merge "Deprecate User::isBlocked()"

4 years agoMerge "editpage: Make TextConflictHelper::toEditContent private"
jenkins-bot [Mon, 29 Apr 2019 09:08:44 +0000 (09:08 +0000)]
Merge "editpage: Make TextConflictHelper::toEditContent private"

4 years agoMerge "Avoid usage of deprecated wfGetMainCache() function"
jenkins-bot [Mon, 29 Apr 2019 02:29:28 +0000 (02:29 +0000)]
Merge "Avoid usage of deprecated wfGetMainCache() function"

4 years agoSpecialUserrights: Improve ::userCanChangeRights() method logic
Derick Alangi [Sat, 23 Mar 2019 13:02:00 +0000 (14:02 +0100)]
SpecialUserrights: Improve ::userCanChangeRights() method logic

Bug: T37674
Change-Id: I22aa9ff72aec175b0f86ebcf48cd7716f3328b01

4 years agoClarify documentation of minor and notminor API parameters
Lucas Werkmeister [Sun, 28 Apr 2019 20:15:15 +0000 (22:15 +0200)]
Clarify documentation of minor and notminor API parameters

Change-Id: I9f55dd179ea7efcc618120da4e18b7708903a5ff

4 years agoAvoid usage of deprecated wfGetMainCache() function
Derick Alangi [Sun, 28 Apr 2019 19:41:17 +0000 (20:41 +0100)]
Avoid usage of deprecated wfGetMainCache() function

This function was deprecated in 1.32 and replaced with the use of
ObjectCache::getLocalClusterInstance().

Change-Id: Id50700a6a7110888b12c4ee1a2100134173760a0

5 years agoGlobalFunctions: Remove deprecated `wfMakeUrlIndexes()` function
Derick Alangi [Sat, 27 Apr 2019 07:00:19 +0000 (08:00 +0100)]
GlobalFunctions: Remove deprecated `wfMakeUrlIndexes()` function

This function was hard deprecated in 1.33 and per code search, usage
is no longer there, probably completely replaced?

Usage
=====

https://codesearch.wmflabs.org/search/?q=%5CbwfMakeUrlIndexes%5Cb&i=nope&files=&repos=

Bug: T42485
Change-Id: I01642a8207f582762428f5a7ac33830066268b2e

5 years agoMerge "jobqueue: Follow-up for fc5d51f12936ed (added GenericParameterJob)"
jenkins-bot [Sun, 28 Apr 2019 07:59:13 +0000 (07:59 +0000)]
Merge "jobqueue: Follow-up for fc5d51f12936ed (added GenericParameterJob)"