lhc/web/wiklou.git
2 years agoAdd rate limiter to Special:ConfirmEmail
sbassett [Thu, 27 Jun 2019 20:18:54 +0000 (15:18 -0500)]
Add rate limiter to Special:ConfirmEmail

General hardening measure for Special:ConfirmEmail, similar to what's
already in place for Special:ChangeEmail.

Bug: T226733
Change-Id: I465e4748840e214531e930608386455084563bc6

2 years agoMerge "Add some tests for DerivedPageDataUpdater::isCountable."
jenkins-bot [Thu, 15 Aug 2019 10:02:24 +0000 (10:02 +0000)]
Merge "Add some tests for DerivedPageDataUpdater::isCountable."

2 years agoMerge "Localisation updates from https://translatewiki.net."
jenkins-bot [Thu, 15 Aug 2019 08:09:04 +0000 (08:09 +0000)]
Merge "Localisation updates from https://translatewiki.net."

2 years agoMerge "Use ExtensionRegistry instead of class name"
jenkins-bot [Thu, 15 Aug 2019 08:02:53 +0000 (08:02 +0000)]
Merge "Use ExtensionRegistry instead of class name"

2 years agoMerge "Drop last bits of oracle"
jenkins-bot [Thu, 15 Aug 2019 07:56:48 +0000 (07:56 +0000)]
Merge "Drop last bits of oracle"

2 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Thu, 15 Aug 2019 06:27:59 +0000 (08:27 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Ia9d0fee0c299f4f610acbc7cf151f3010f6b8e17

2 years agoAdd some tests for DerivedPageDataUpdater::isCountable.
Petr Pchelko [Thu, 15 Aug 2019 02:12:44 +0000 (19:12 -0700)]
Add some tests for DerivedPageDataUpdater::isCountable.

Change-Id: I82ed6fd604406d02faf4e966ec4845c8bc779a8b

2 years agoMerge "Add help links to special pages"
jenkins-bot [Wed, 14 Aug 2019 23:57:36 +0000 (23:57 +0000)]
Merge "Add help links to special pages"

2 years agoMerge "Rename variables for Title objects in PermissionManager"
jenkins-bot [Wed, 14 Aug 2019 23:31:21 +0000 (23:31 +0000)]
Merge "Rename variables for Title objects in PermissionManager"

2 years agoDrop last bits of oracle
Amir Sarabadani [Wed, 14 Aug 2019 21:25:00 +0000 (23:25 +0200)]
Drop last bits of oracle

Undefined constant

Change-Id: I66f17a7647bdcf254695dd0d3a0d49d41a35fff3

2 years agoMerge "Add drop of mssql/oracle to RELEASE-NOTES"
jenkins-bot [Wed, 14 Aug 2019 20:36:19 +0000 (20:36 +0000)]
Merge "Add drop of mssql/oracle to RELEASE-NOTES"

2 years agoAdd drop of mssql/oracle to RELEASE-NOTES
Amir Sarabadani [Wed, 14 Aug 2019 19:47:06 +0000 (21:47 +0200)]
Add drop of mssql/oracle to RELEASE-NOTES

Bug: T230418
Change-Id: Ie7771853048a27a8d8ee75764229e6e34477cd04

2 years agoMerge "Allow basic grant holders to autocreate accounts"
jenkins-bot [Wed, 14 Aug 2019 19:52:10 +0000 (19:52 +0000)]
Merge "Allow basic grant holders to autocreate accounts"

2 years agoMerge "maintenance/populateChangeTagDef.php: Handle missing valid_tags table"
jenkins-bot [Wed, 14 Aug 2019 19:25:54 +0000 (19:25 +0000)]
Merge "maintenance/populateChangeTagDef.php: Handle missing valid_tags table"

2 years agoMerge "More clean up of oracle/mssql"
jenkins-bot [Wed, 14 Aug 2019 19:25:12 +0000 (19:25 +0000)]
Merge "More clean up of oracle/mssql"

2 years agoMerge "Clear test user registry between tests"
jenkins-bot [Wed, 14 Aug 2019 18:59:31 +0000 (18:59 +0000)]
Merge "Clear test user registry between tests"

2 years agoUse ExtensionRegistry instead of class name
WMDE-Fisch [Wed, 14 Aug 2019 17:07:39 +0000 (19:07 +0200)]
Use ExtensionRegistry instead of class name

Use the ExtensionRegistry instead of checking for the main class
name of the Cite extension. - I'm not entirely sure if this is much
better. A hook would still be the better option. But at least Cite
could be refactored and the class name changed.

Bug: T89151
Change-Id: I35e5aa9955141b575de68a5be2c0d5b87585eb77

2 years agoMerge "Set @return-taint of Sanitizer::stripAllTags to tainted"
jenkins-bot [Wed, 14 Aug 2019 16:03:02 +0000 (16:03 +0000)]
Merge "Set @return-taint of Sanitizer::stripAllTags to tainted"

2 years agomaintenance/populateChangeTagDef.php: Handle missing valid_tags table
Brad Jorsch [Wed, 14 Aug 2019 15:57:12 +0000 (11:57 -0400)]
maintenance/populateChangeTagDef.php: Handle missing valid_tags table

The valid_tags table was added in MW 1.15 and removed in 1.33. If
someone is trying to upgrade from a really old version of MediaWiki,
valid_tags may not exist even though change_tags.ct_tag does.

Bug: T230317
Change-Id: Ib94542878b8d301c1d7f806405ee39838ebc6d4a

2 years agoMore clean up of oracle/mssql
Amir Sarabadani [Wed, 14 Aug 2019 15:04:50 +0000 (17:04 +0200)]
More clean up of oracle/mssql

Bug: T230418
Change-Id: I1ff01548e55f01f9419668e31d5aa7dd03d23258

2 years agoMerge "Tests: Allow vendor/bin/phpunit from within extension directory"
jenkins-bot [Wed, 14 Aug 2019 14:09:41 +0000 (14:09 +0000)]
Merge "Tests: Allow vendor/bin/phpunit from within extension directory"

2 years agoMerge "DefaultSettings: Document wgTmpDirectory guarantees and expectations"
jenkins-bot [Wed, 14 Aug 2019 12:31:40 +0000 (12:31 +0000)]
Merge "DefaultSettings: Document wgTmpDirectory guarantees and expectations"

2 years agoDrop Oracle and Mssql
Amir Sarabadani [Tue, 13 Aug 2019 17:06:26 +0000 (19:06 +0200)]
Drop Oracle and Mssql

After approval of RFC T191231, we are going to drop oracle and mssql
and it will be possible to bring back the support using the abstract schema

Adding to release notes will be done in a follow-up

Bug: T230418
Change-Id: I90bd5cfcc3e18011b193c965fdb1fa54675040b5

2 years agoTests: Allow vendor/bin/phpunit from within extension directory
Kosta Harlan [Wed, 14 Aug 2019 08:25:01 +0000 (10:25 +0200)]
Tests: Allow vendor/bin/phpunit from within extension directory

Prior to this patch, one could not run this command from within an extension
directory: `../../vendor/bin/phpunit -c ../../phpunit.xml.dist tests/phpunit`,
because our code in bootstrap.php loaded "LocalSettings.php" instead of
$IP/LocalSettings.php.

Note that making this change does not result in loading LocalSettings.php when
running unit tests.

Bug: T87781
Change-Id: Iee8440f11a2bb255567646289a1986d636c12765

2 years agoClear test user registry between tests
Aryeh Gregor [Mon, 12 Aug 2019 17:43:21 +0000 (20:43 +0300)]
Clear test user registry between tests

Otherwise User members will wind up retaining stale references to
services. The more things move to services, the more state we need to
reset between tests to avoid subtle and confusing test failures!

TestUsers can't be created if the DB prefix is not either unittest_ or
ut_, which caused failures in RCFeedIntegrationTest.php with this change
now that it was trying to create a new TestUser. Fix is to set the
prefix to one of those two instead of empty.

Change-Id: I41f87e1acffe94361748ef4ab69c290de587e6be

2 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Wed, 14 Aug 2019 06:23:43 +0000 (08:23 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I6bf6f5827c4cb7527902f380e342bfb1263e83c3

2 years agoSet @return-taint of Sanitizer::stripAllTags to tainted
sbassett [Tue, 13 Aug 2019 22:06:53 +0000 (17:06 -0500)]
Set @return-taint of Sanitizer::stripAllTags to tainted

phan-taint-check (aka SecurityCheckPlugin) doesn't recognize
Sanitizer::stripAllTags' output as tainted in certain situations.
Adding a @return-taint of tainted to ensure that it does, which
may result in the reporting of more issues.

Bug: T230234
Change-Id: I357c168417a26882c7c460df20f36ec2be401096

2 years agoMerge "ApiFeedContributions: Throw if the username is invalid"
jenkins-bot [Tue, 13 Aug 2019 19:53:54 +0000 (19:53 +0000)]
Merge "ApiFeedContributions: Throw if the username is invalid"

2 years agoApiFeedContributions: Throw if the username is invalid
Petr Pchelko [Fri, 9 Aug 2019 20:53:45 +0000 (13:53 -0700)]
ApiFeedContributions: Throw if the username is invalid

Bug: T230239
Change-Id: I4141047c8f1ff73665b79a27a7c5eb995c52ea88

2 years agoMerge "Don't use new MCR schema without using DB"
jenkins-bot [Tue, 13 Aug 2019 15:09:58 +0000 (15:09 +0000)]
Merge "Don't use new MCR schema without using DB"

2 years agoMerge "Allow spaces in TitleValue constructor"
jenkins-bot [Tue, 13 Aug 2019 14:06:47 +0000 (14:06 +0000)]
Merge "Allow spaces in TitleValue constructor"

2 years agoDon't use new MCR schema without using DB
Aryeh Gregor [Tue, 13 Aug 2019 07:55:48 +0000 (10:55 +0300)]
Don't use new MCR schema without using DB

If $wgContentHandlerUseDB is false and
$wgMultiContentRevisionSchemaMigrationStage is not SCHEMA_COMPAT_OLD,
RevisionStoreFactory::getRevisionStore() throws. This is coming up in
some seemingly unrelated code changes, perhaps due to access of stale
service objects, but I'm not sure because I can't reproduce locally. So
this is a shot in the dark to fix it.

Change-Id: Id29a62e1f537fa1b2016aac396773b728e238cda

2 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Tue, 13 Aug 2019 06:26:32 +0000 (08:26 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I71d2db842bf204a483e3c9b4695cbf744bca2cf2

2 years agoMerge "objectcache: clean up MemcachedBagOStuff expiry handling"
jenkins-bot [Mon, 12 Aug 2019 20:27:40 +0000 (20:27 +0000)]
Merge "objectcache: clean up MemcachedBagOStuff expiry handling"

2 years agoMerge "Add german alias for displaytitle_noerror/_noreplace"
jenkins-bot [Mon, 12 Aug 2019 17:10:37 +0000 (17:10 +0000)]
Merge "Add german alias for displaytitle_noerror/_noreplace"

2 years agoRedirectSpecialArticle: Avoid double redirect for action=edit&redlink=1
Bartosz Dziewoński [Thu, 8 Aug 2019 19:45:04 +0000 (21:45 +0200)]
RedirectSpecialArticle: Avoid double redirect for action=edit&redlink=1

If you visit `Special:MyPage?action=edit&redlink=1` and your user page
exists, this would redirect to `User:Yourname?action=edit&redlink=1`,
which then would redirect further to `User:Yourname`. Just redirect
there directly.

Additionally, the double-redirect seems to somehow conflict with the
fake-redirect code for $wgHideIdentifiableRedirects. I couldn't figure
out why this happens, but you end up on a blank page and no redirect
of either kind occurs.

Bug: T229794
Change-Id: I952fc9df91b1243db22f956ec09bee457c8a21bf

2 years agoAllow spaces in TitleValue constructor
Aryeh Gregor [Tue, 16 Apr 2019 14:33:34 +0000 (17:33 +0300)]
Allow spaces in TitleValue constructor

Change-Id: I809731508036409fda72b271aac8a37f3ac1ef2d

2 years agoAdd german alias for displaytitle_noerror/_noreplace
Umherirrender [Mon, 12 Aug 2019 11:13:57 +0000 (13:13 +0200)]
Add german alias for displaytitle_noerror/_noreplace

Reuse the values from defaultsort_noerror/_noreplace

Change-Id: I8bef5920040d10128d94e5131bd7480e762ca928

2 years agoMerge "Add german alias for special page NewSection"
jenkins-bot [Mon, 12 Aug 2019 09:57:42 +0000 (09:57 +0000)]
Merge "Add german alias for special page NewSection"

2 years agoFix Special:NewSection showNoRedirectPage form handling (3)
DannyS712 [Sat, 10 Aug 2019 23:55:45 +0000 (23:55 +0000)]
Fix Special:NewSection showNoRedirectPage form handling (3)

Handle invalid titles by using `newFromTextThrow` and
returning a fatal status if the title is invalid.

Bug: T207577
Change-Id: I2bdfcdbcb7ee41f96122e7f8aa561f6eee34be7b

2 years agoAdd german alias for special page NewSection
Umherirrender [Mon, 12 Aug 2019 09:21:11 +0000 (11:21 +0200)]
Add german alias for special page NewSection

Change-Id: Ibdd838d53f4b323dce9c1438b7d13e7289ce570f

2 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 12 Aug 2019 06:20:18 +0000 (08:20 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I60e49dd26845b81e64b20bb386ee23bea73713c1

2 years agoMerge "Inject LoadBalancer into GenderCache"
jenkins-bot [Sat, 10 Aug 2019 23:43:06 +0000 (23:43 +0000)]
Merge "Inject LoadBalancer into GenderCache"

2 years agoobjectcache: clean up MemcachedBagOStuff expiry handling
Aaron Schulz [Thu, 8 Aug 2019 16:38:55 +0000 (09:38 -0700)]
objectcache: clean up MemcachedBagOStuff expiry handling

Partly a follow-up to 88640fd902900.

Use real time in changeTTL() tests to fix all remaining
failures for BagOStuff sub-classes.

Change-Id: I537d665d6c8770a68a5a79233a913f1714881dfb

2 years agoMerge "rdbms: remove DatabaseSqlite::checkForEnabledSearch() in favor of explicit...
jenkins-bot [Sat, 10 Aug 2019 00:54:10 +0000 (00:54 +0000)]
Merge "rdbms: remove DatabaseSqlite::checkForEnabledSearch() in favor of explicit queries"

2 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Fri, 9 Aug 2019 06:23:06 +0000 (08:23 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I34b028ec7073f2b146654992d0eff6a221bd1247

2 years agoMerge "resourceloader: Rewrite the minify.php maintenance script"
jenkins-bot [Fri, 9 Aug 2019 03:25:36 +0000 (03:25 +0000)]
Merge "resourceloader: Rewrite the minify.php maintenance script"

2 years agoMerge "Fix grammatical error in several comments"
jenkins-bot [Thu, 8 Aug 2019 18:19:58 +0000 (18:19 +0000)]
Merge "Fix grammatical error in several comments"

2 years agoMerge "rdbms: set MYSQLI_CLIENT_FOUND_ROWS in DatabaseMysqli"
jenkins-bot [Thu, 8 Aug 2019 15:16:42 +0000 (15:16 +0000)]
Merge "rdbms: set MYSQLI_CLIENT_FOUND_ROWS in DatabaseMysqli"

2 years agoRename variables for Title objects in PermissionManager
Thalia [Thu, 8 Aug 2019 14:01:01 +0000 (15:01 +0100)]
Rename variables for Title objects in PermissionManager

Change-Id: I0322ec6cebb0aa958de77ca41c4fa2beb72879cd

2 years agoMerge "Cleanup JobQueueDB::recycleAndDeleteStaleJobs() use of IDatabase::affectedRows()"
jenkins-bot [Thu, 8 Aug 2019 14:06:57 +0000 (14:06 +0000)]
Merge "Cleanup JobQueueDB::recycleAndDeleteStaleJobs() use of IDatabase::affectedRows()"

2 years agoFix grammatical error in several comments
Thalia [Thu, 8 Aug 2019 13:01:15 +0000 (14:01 +0100)]
Fix grammatical error in several comments

Change-Id: Ibd8ad594950d53f5feb337c30f184ecaf218bc81

2 years agoMerge "Remove commented lines"
jenkins-bot [Thu, 8 Aug 2019 12:19:38 +0000 (12:19 +0000)]
Merge "Remove commented lines"

2 years agordbms: set MYSQLI_CLIENT_FOUND_ROWS in DatabaseMysqli
Aaron Schulz [Thu, 18 Jul 2019 06:45:41 +0000 (23:45 -0700)]
rdbms: set MYSQLI_CLIENT_FOUND_ROWS in DatabaseMysqli

This fixing failing SQLiteBagOStuff::changeTTL() tests when the old
and new expiry column has the same value.

Bug: T229456
Change-Id: Ib7d30115e2084f43b1c195e7bfa1ad5fed9a71d4

2 years agoCleanup JobQueueDB::recycleAndDeleteStaleJobs() use of IDatabase::affectedRows()
Aaron Schulz [Wed, 31 Jul 2019 02:22:43 +0000 (22:22 -0400)]
Cleanup JobQueueDB::recycleAndDeleteStaleJobs() use of IDatabase::affectedRows()

Bug: T229456
Change-Id: Ie22085ddba66f122e59e93baaf9b53c76b5ce448

2 years agoMove list of core namespaces to NamespaceInfo
David Barratt [Tue, 30 Jul 2019 02:26:17 +0000 (22:26 -0400)]
Move list of core namespaces to NamespaceInfo

It is sometimes necessary to get an unmodified list of namespaces that are in
core.

Bug: T226657
Change-Id: I8e4ed19db915a1673c27ca5b212d712d079b4bba

2 years agoFix Special:NewSection showNoRedirectPage form handling (2)
DannyS712 [Thu, 8 Aug 2019 08:50:05 +0000 (08:50 +0000)]
Fix Special:NewSection showNoRedirectPage form handling (2)

Bug: T207577
Change-Id: I869501fde15d0c306cefb96de6678cd580074d20

2 years agoMerge "Fix Special:NewSection showNoRedirectPage form handling"
jenkins-bot [Thu, 8 Aug 2019 07:57:25 +0000 (07:57 +0000)]
Merge "Fix Special:NewSection showNoRedirectPage form handling"

2 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Thu, 8 Aug 2019 06:46:19 +0000 (08:46 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I5cdc61c18f2a7ee059bca0178107adbd018a335c

2 years agordbms: remove DatabaseSqlite::checkForEnabledSearch() in favor of explicit queries
Aaron Schulz [Thu, 8 Aug 2019 01:45:47 +0000 (18:45 -0700)]
rdbms: remove DatabaseSqlite::checkForEnabledSearch() in favor of explicit queries

Change-Id: I0f13b9f054d7732f0e9694ec75c415f91a36ede9

2 years agoMerge "Remove single-item HTML list for re-upload link"
jenkins-bot [Thu, 8 Aug 2019 01:14:53 +0000 (01:14 +0000)]
Merge "Remove single-item HTML list for re-upload link"

2 years agordbms: remove references to SQL_CACHE/SQL_NOCACHE
Aaron Schulz [Wed, 7 Aug 2019 22:06:43 +0000 (15:06 -0700)]
rdbms: remove references to SQL_CACHE/SQL_NOCACHE

Change-Id: I4bace17f7f5171eea9bbf13e7f40fd7027a1ce35

2 years agordbms: update LOCK IN SHARE MODE in IDatabase to reflect the level of support
Aaron Schulz [Wed, 7 Aug 2019 20:47:23 +0000 (13:47 -0700)]
rdbms: update LOCK IN SHARE MODE in IDatabase to reflect the level of support

Change-Id: I45eb27ffd105e9ca2c1bd9967c6db2719c835b27

2 years agordbms: remove HIGH_PRIORITY/LOW_PRIORITY SQL references from IDatabase
Aaron Schulz [Wed, 7 Aug 2019 20:44:06 +0000 (13:44 -0700)]
rdbms: remove HIGH_PRIORITY/LOW_PRIORITY SQL references from IDatabase

These should not be used even with MySQL as they do not help concurrency

Change-Id: I5385fcbe65e676b184268286bedd5c2299b447d4

2 years agoMerge "DevelopmentSettings: Clarify grouping of settings and purpose"
jenkins-bot [Wed, 7 Aug 2019 21:54:25 +0000 (21:54 +0000)]
Merge "DevelopmentSettings: Clarify grouping of settings and purpose"

2 years agoRemove commented lines
Dayllan Maza [Wed, 7 Aug 2019 21:24:09 +0000 (17:24 -0400)]
Remove commented lines

Change-Id: I99ae7daaea1397195f14bc7035fd9d886f0e35ff

2 years agoFix Special:NewSection showNoRedirectPage form handling
DannyS712 [Wed, 7 Aug 2019 21:18:04 +0000 (21:18 +0000)]
Fix Special:NewSection showNoRedirectPage form handling

Bug: T207577
Change-Id: I3e476dffb4cb32b47f0f2f55e0f77ed74e85f302

2 years agoRemove single-item HTML list for re-upload link
Sam Wilson [Wed, 7 Aug 2019 21:09:57 +0000 (05:09 +0800)]
Remove single-item HTML list for re-upload link

The 'upload links box' only contains a single link (or message),
so there's no need for it to be a list. This also adds a top-level
class to this box, for easier CSS/JS selecting.

Change-Id: I3967eea82dcd63a3e161daa13e49204e4d6dde97

2 years agoMerge "Create Special:NewSection special page"
jenkins-bot [Wed, 7 Aug 2019 20:24:41 +0000 (20:24 +0000)]
Merge "Create Special:NewSection special page"

2 years agoDefaultSettings: Document wgTmpDirectory guarantees and expectations
Timo Tijhof [Wed, 7 Aug 2019 18:29:30 +0000 (19:29 +0100)]
DefaultSettings: Document wgTmpDirectory guarantees and expectations

Bug: T218207
Change-Id: I40c22e4e8d9fe2f1865503c849f278a799b4a363

2 years agoMerge "ChangesListSpecialPage: skip associated for namespaces that don't have one."
jenkins-bot [Wed, 7 Aug 2019 19:14:10 +0000 (19:14 +0000)]
Merge "ChangesListSpecialPage: skip associated for namespaces that don't have one."

2 years agoMerge "resourceloader: Consider 'packagesFiles' in FileModule's canBeStylesOnly"
jenkins-bot [Wed, 7 Aug 2019 18:36:23 +0000 (18:36 +0000)]
Merge "resourceloader: Consider 'packagesFiles' in FileModule's canBeStylesOnly"

2 years agoMerge "filebackend: deprecate FileBackend::getWikiId()"
jenkins-bot [Wed, 7 Aug 2019 17:50:22 +0000 (17:50 +0000)]
Merge "filebackend: deprecate FileBackend::getWikiId()"

2 years agoMerge "objectcache: fix failing tests for non-HashBagOStuff backends"
jenkins-bot [Wed, 7 Aug 2019 17:22:57 +0000 (17:22 +0000)]
Merge "objectcache: fix failing tests for non-HashBagOStuff backends"

2 years agoMerge "Clean up use of IDatabase::affectedRows() in WikiPage::updateRedirectOn()"
jenkins-bot [Wed, 7 Aug 2019 17:22:50 +0000 (17:22 +0000)]
Merge "Clean up use of IDatabase::affectedRows() in WikiPage::updateRedirectOn()"

2 years agoMerge "ChangeTags: turn private getPrevTags() into public getTags()"
jenkins-bot [Wed, 7 Aug 2019 17:22:44 +0000 (17:22 +0000)]
Merge "ChangeTags: turn private getPrevTags() into public getTags()"

2 years agoChangesListSpecialPage: skip associated for namespaces that don't have one.
Petr Pchelko [Tue, 6 Aug 2019 19:23:21 +0000 (12:23 -0700)]
ChangesListSpecialPage: skip associated for namespaces that don't have one.

Bug: T229954
Change-Id: Ic69989c3ac60a86d58842ec34dc9e883988d785f

2 years agoMerge "rdbms: allow automatic PDO creation of SQLite database files"
jenkins-bot [Wed, 7 Aug 2019 15:47:50 +0000 (15:47 +0000)]
Merge "rdbms: allow automatic PDO creation of SQLite database files"

2 years agoMerge "objectcache: avoid using deprecated phpredis::delete() alias"
jenkins-bot [Wed, 7 Aug 2019 15:14:08 +0000 (15:14 +0000)]
Merge "objectcache: avoid using deprecated phpredis::delete() alias"

2 years agoresourceloader: Consider 'packagesFiles' in FileModule's canBeStylesOnly
Roan Kattouw [Wed, 7 Aug 2019 10:04:24 +0000 (03:04 -0700)]
resourceloader: Consider 'packagesFiles' in FileModule's canBeStylesOnly

A module with packageFiles should never be considered a styles-only
module.

Change-Id: I92f0d2f31656858d8dd00c73c4d9d7da329582a4

2 years agoMerge "Add talk namespace option to Special:NewPages"
jenkins-bot [Wed, 7 Aug 2019 14:43:01 +0000 (14:43 +0000)]
Merge "Add talk namespace option to Special:NewPages"

2 years agoDevelopmentSettings: Clarify grouping of settings and purpose
Timo Tijhof [Wed, 7 Aug 2019 14:22:03 +0000 (15:22 +0100)]
DevelopmentSettings: Clarify grouping of settings and purpose

Change-Id: Ia0fc063eb2679b466e19e6dabaf1f4bea7d6bb20

2 years agoMerge "Revert "Add small HtmlCacheUpdater service class to normalize purging code""
Krinkle [Wed, 7 Aug 2019 14:21:58 +0000 (14:21 +0000)]
Merge "Revert "Add small HtmlCacheUpdater service class to normalize purging code""

2 years agofilebackend: deprecate FileBackend::getWikiId()
Aaron Schulz [Fri, 5 Jul 2019 01:20:35 +0000 (18:20 -0700)]
filebackend: deprecate FileBackend::getWikiId()

Change-Id: Ib593178e95c572c28c873645128ef85513ef2de7

2 years agoobjectcache: fix failing tests for non-HashBagOStuff backends
Aaron Schulz [Fri, 26 Jul 2019 19:33:40 +0000 (15:33 -0400)]
objectcache: fix failing tests for non-HashBagOStuff backends

Use real time for testing absolute expirations with changeTTL().
Otherwise, backends like memcached or redis will fail since
they do not use the mock time.

Also:
* Make SqlBagOStuff actually override changeTTLMulti() by
  using the right method name
* Check TTL_INDEFINITE more explicitly for clarity
* Rename TTL conversion methods for clarity
* Use isRelativeExpiration() in MemcachedBagOStuff

Change-Id: I9365ceb31d4e7bef65906363d42b8c3020a66346

2 years agoClean up use of IDatabase::affectedRows() in WikiPage::updateRedirectOn()
Aaron Schulz [Wed, 31 Jul 2019 02:18:11 +0000 (22:18 -0400)]
Clean up use of IDatabase::affectedRows() in WikiPage::updateRedirectOn()

Bug: T229456
Change-Id: Ibce207904375a762943dff3352db7affd13c1aaa

2 years agoRevert "Add small HtmlCacheUpdater service class to normalize purging code"
Daniel Kinzler [Wed, 7 Aug 2019 13:56:30 +0000 (13:56 +0000)]
Revert "Add small HtmlCacheUpdater service class to normalize purging code"

This reverts commit 35da1bbd7cb8b4414c4fbcf331473f1024bc638d.

Reason for revert: wrong tab, wrong patch. Ooops.

Change-Id: I5828fff6308d43460a3b2b10f60996409181f8b3

2 years agoMerge "Add small HtmlCacheUpdater service class to normalize purging code"
Daniel Kinzler [Wed, 7 Aug 2019 13:53:17 +0000 (13:53 +0000)]
Merge "Add small HtmlCacheUpdater service class to normalize purging code"

2 years agoChangeTags: turn private getPrevTags() into public getTags()
Lucas Werkmeister [Wed, 7 Aug 2019 13:12:47 +0000 (15:12 +0200)]
ChangeTags: turn private getPrevTags() into public getTags()

This makes the most convenient way to get all the change tags for a
given recent change, revision, and/or log entry public. The database is
injected as an additional parameter so that callers can choose to read
from a replica, and the revision and log ID parameters are swapped for
consistency with other methods in the same class. Also, while we’re
already touching the method, let’s extract the change_tag_def store.

Change-Id: Id8f14044ba5d926447aedd60e8cc8eb7dc864899

2 years agoInject LoadBalancer into GenderCache
Umherirrender [Wed, 5 Jun 2019 21:16:45 +0000 (23:16 +0200)]
Inject LoadBalancer into GenderCache

This avoids global function wfGetDB
Let the GenderCache work without a database connection as it is used
by the installer

Change-Id: I8a203c50de5841bc33693dadb8439a23a8c60910

2 years agoobjectcache: avoid using deprecated phpredis::delete() alias
Aaron Schulz [Thu, 1 Aug 2019 20:16:39 +0000 (16:16 -0400)]
objectcache: avoid using deprecated phpredis::delete() alias

Change-Id: I3ca8bd9160eefff6590228082f030a32d0edb511

2 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Wed, 7 Aug 2019 06:38:35 +0000 (08:38 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I75e924d7b9d088cd8f705b56c90e038e6407cadd

2 years agordbms: allow automatic PDO creation of SQLite database files
Aaron Schulz [Sat, 20 Jul 2019 19:42:14 +0000 (12:42 -0700)]
rdbms: allow automatic PDO creation of SQLite database files

Define missing DatabaseSqlite::doSelectDomain() method to handle attempts
to change the database, prefix, and/or schema.

Also add sanity check to serverIsReadOnly() to make sure open() was called

Change-Id: I72c25bf4dab5e01def3fb9472217e7637aede1d4

2 years agoMerge "Fix param doc of ChangeTagsList::updateChangeTagsOnAll"
jenkins-bot [Tue, 6 Aug 2019 23:15:54 +0000 (23:15 +0000)]
Merge "Fix param doc of ChangeTagsList::updateChangeTagsOnAll"

2 years agoMerge "Pass message arguments as array to ErrorPageError"
jenkins-bot [Tue, 6 Aug 2019 23:14:53 +0000 (23:14 +0000)]
Merge "Pass message arguments as array to ErrorPageError"

2 years agoMerge "mediawiki.page.gallery.slideshow: Avoid manual Deferred wrapping"
jenkins-bot [Tue, 6 Aug 2019 22:52:34 +0000 (22:52 +0000)]
Merge "mediawiki.page.gallery.slideshow: Avoid manual Deferred wrapping"

2 years agoMerge "Add type hints for class properties in SpecialVersion"
jenkins-bot [Tue, 6 Aug 2019 22:18:01 +0000 (22:18 +0000)]
Merge "Add type hints for class properties in SpecialVersion"

2 years agoAdd small HtmlCacheUpdater service class to normalize purging code
Aaron Schulz [Fri, 15 Mar 2019 00:23:26 +0000 (17:23 -0700)]
Add small HtmlCacheUpdater service class to normalize purging code

The purge() method handles purging of both file cache and CDN, using
a PRESEND deferred update. This avoids code duplication and missing
file cache purge calls.

Also:
* Migrate HTMLCacheUpdate callers to just directly using HTMLCacheUpdateJob
* Add HtmlFileCacheUpdate class and defer such updates just like with CDN
* Simplify HTMLCacheUpdate constructor parameters
* Remove BacklinkCache::clear() calls which do nothing since the backlink
  query does not actually happen until the job runs

Change-Id: Ic453b189a40109a73a9426538608eea87a76befa

2 years agoFix description for $wgGalleryOptions in DefaultSettings.php
Umherirrender [Tue, 6 Aug 2019 19:07:04 +0000 (21:07 +0200)]
Fix description for $wgGalleryOptions in DefaultSettings.php

Falsy change from Ib0d92e128e7b882bb5b838bd00c74fc16ef14303

Change-Id: Ia66be38c26f1bfa3da5c8100e59f986fe1f87c36

2 years agoresourceloader: Rewrite the minify.php maintenance script
Timo Tijhof [Tue, 6 Aug 2019 16:27:17 +0000 (17:27 +0100)]
resourceloader: Rewrite the minify.php maintenance script

* Remove the options of writing to a directory or a ".min.EXT" file,
  this made sense long ago when the script was used for producing
  final artefacts to check into SVN. But not today when it is mainly
  for testing out minifier behaviour.

* Add support for reading from standard input.
* Add support for setting --type (especialy for standard input).
* Add support for writing to standard output.

* Make --outfile optional. Write to standard output by default.

* Register <file> via Maintenance::addArg(), so that it shows
  up in --help. And so that we don't need our own validation for
  this as a required argument.

Test Plan:

  Run `echo 'x = true;' | php maintenance/minify.php --type js -`
  Output should be "x=!0;"

Change-Id: I0fdbedc713f66b9bd25eb8cb7334252cef7e20a8