lhc/web/wiklou.git
4 years agoAdd .pipeline/ with dev image variant
Brennen Bearnes [Wed, 15 May 2019 00:14:11 +0000 (18:14 -0600)]
Add .pipeline/ with dev image variant

This adds a .pipeline/, containing:

  - blubber.yaml which, for now, defines a single variant for creating
    a Docker image to be used by the local-charts[0] environment.  This
    image is built on dev-stretch-php72-fpm-apache2, which is defined in
    dev-images[1].

  - dev_prereq.sh which installs some extensions, runs composer, and
    creates a stub LocalSettings.php in the dev image as a blubber builder
    command.

  - config.yaml for building the dev image.

This depends on publication of dev/stretch-php72-fpm-apache2 to
docker-registry.wikimedia.org:

  - https://phabricator.wikimedia.org/T223327
  - https://phabricator.wikimedia.org/T223329

It can be tested locally by:

  1. Installing Docker, blubber[2], and Minikube

  2. Building the images in dev-images with `make`

  3. Saving a copy of the dev-stretch-php72-fpm-apache2 image:

     $ docker save -o dev-stretch-php72-fpm-apache2.tar
       docker-registry.wikimedia.org/dev/dev-stretch-php72-fpm-apache2

  4. Importing that image into Minikube's docker:

     $ eval $(minikube docker-env)
     $ docker load --input ./dev-stretch-php72-fpm-apache2.tar

  5. Building an image tagged "docker-registry.wikimedia.org/dev/mediawiki"
     from the root of this repository:

     $ blubber .pipeline/blubber.yaml dev | docker build --pull=false -t docker-registry.wikimedia.org/dev/mediawiki -f - .

That image should now be usable by local-charts.

[0]. https://gerrit.wikimedia.org/r/plugins/gitiles/releng/local-charts/
[1]. https://gerrit.wikimedia.org/r/plugins/gitiles/releng/dev-images/
[2]. https://wikitech.wikimedia.org/wiki/Blubber/Download

Bug: T218360
Change-Id: I1c8192e67c39e86c4903a9137dba7c02faee3145
Depends-On: I8a5a5f2c24d81fb94b104a3a98627d9fbe6059bf

4 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"

4 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"

4 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

4 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

4 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

4 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"

4 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

4 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"

4 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"

4 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

4 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

4 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"

4 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"

4 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

4 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

4 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

4 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"

4 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

4 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

4 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

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

4 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

4 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"

4 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

4 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"

4 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"

4 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"

4 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()"

4 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

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

4 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

4 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

4 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

4 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

4 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"

4 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

4 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

4 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"

4 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

4 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

4 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

4 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"

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

Change-Id: I99ae7daaea1397195f14bc7035fd9d886f0e35ff

4 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

4 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

4 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"

4 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

4 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."

4 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"

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

4 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"

4 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()"

4 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()"

4 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

4 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"

4 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"

4 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

4 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"

4 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

4 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""

4 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

4 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

4 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

4 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

4 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"

4 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

4 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

4 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

4 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

4 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

4 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"

4 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"

4 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"

4 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"

4 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

4 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

4 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

4 years agoMerge "revisionstore: clean up redundant DB connection code in RevisionStore"
jenkins-bot [Tue, 6 Aug 2019 13:52:50 +0000 (13:52 +0000)]
Merge "revisionstore: clean up redundant DB connection code in RevisionStore"

4 years agomediawiki.page.gallery.slideshow: Avoid manual Deferred wrapping
Timo Tijhof [Tue, 6 Aug 2019 13:00:17 +0000 (14:00 +0100)]
mediawiki.page.gallery.slideshow: Avoid manual Deferred wrapping

* Use then(), which automatically forwards errors, instead of manually
  forwarding fail() to d.reject(). This also ensures that any
  errors in the done() or fail() handler themselves are caught and reject
  the returned Deferred – instead of an causing the Deferred to indefinely
  be in the "pending" state.

* Use then(), which makes the code consistently asynchronous,
  instead of sometimes sync and sometimes async.

* Use then() for forward-compat with native ES6 Promise.

Change-Id: I58fb6ec23fb4056fe2bbb146ff4225dea9d9f379

4 years agoMerge "watchlist: cleanup WatchedItemStore PhpStorm warnings"
jenkins-bot [Tue, 6 Aug 2019 11:55:55 +0000 (11:55 +0000)]
Merge "watchlist: cleanup WatchedItemStore PhpStorm warnings"

4 years agowatchlist: cleanup WatchedItemStore PhpStorm warnings
Aaron Schulz [Tue, 6 Aug 2019 03:26:48 +0000 (23:26 -0400)]
watchlist: cleanup WatchedItemStore PhpStorm warnings

Change-Id: I21bcc41781744f0fd323b8c46f4a71b4fc040eff

4 years agoFollow-up I3d56d5db5: Add release notes entry
Paladox [Mon, 8 Jul 2019 22:02:15 +0000 (22:02 +0000)]
Follow-up I3d56d5db5: Add release notes entry

Change-Id: Id836481ade41fdc0ea9951574677407f73f2611a
(cherry picked from commit cf21cda12cf03f5532b103bc7678fba6299afaed)

4 years agoMerge "mediawiki.page.ready: Simplify logout code"
jenkins-bot [Mon, 5 Aug 2019 22:52:06 +0000 (22:52 +0000)]
Merge "mediawiki.page.ready: Simplify logout code"

4 years agoMerge "Clean up spacing of doc comments"
jenkins-bot [Mon, 5 Aug 2019 22:51:10 +0000 (22:51 +0000)]
Merge "Clean up spacing of doc comments"

4 years agoMerge "ResourceLoaderClientHtml: Simplify code"
jenkins-bot [Mon, 5 Aug 2019 22:44:00 +0000 (22:44 +0000)]
Merge "ResourceLoaderClientHtml: Simplify code"

4 years agoClean up spacing of doc comments
Umherirrender [Mon, 5 Aug 2019 17:00:00 +0000 (19:00 +0200)]
Clean up spacing of doc comments

Align the doc stars and normalize start and end tokens

Change-Id: Ib0d92e128e7b882bb5b838bd00c74fc16ef14303

4 years agomediawiki.page.ready: Simplify logout code
Fomafix [Sun, 4 Aug 2019 13:10:11 +0000 (15:10 +0200)]
mediawiki.page.ready: Simplify logout code

* Use location.href instead of window.location.
  (Better static analysis, and theoretically quicker lookup)
* Initialize variable on declaration.
* Use .then() instead of .done().fail().

Change-Id: If007ae9bad37461cf1a1b51bd4d21281d7778254

4 years agoMerge "resourceloader: Move mw.libs and mw.widgets from startup to mediawiki.base"
jenkins-bot [Mon, 5 Aug 2019 22:11:25 +0000 (22:11 +0000)]
Merge "resourceloader: Move mw.libs and mw.widgets from startup to mediawiki.base"

4 years agoMerge "resourceloader: Merge mediawiki.legacy.wikibits into mediawiki.base"
jenkins-bot [Mon, 5 Aug 2019 22:10:01 +0000 (22:10 +0000)]
Merge "resourceloader: Merge mediawiki.legacy.wikibits into mediawiki.base"

4 years agoMerge "resourceloader: Minor optims in startup JS"
jenkins-bot [Mon, 5 Aug 2019 22:09:55 +0000 (22:09 +0000)]
Merge "resourceloader: Minor optims in startup JS"

4 years agoMerge "Improve log entries display in change lists"
jenkins-bot [Mon, 5 Aug 2019 20:59:21 +0000 (20:59 +0000)]
Merge "Improve log entries display in change lists"

4 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 5 Aug 2019 20:13:06 +0000 (22:13 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Id08ec6c7c9efffd82de8cae27fdd9fa6e0e0f900

4 years agoMerge "Add explanatory comment to unexpected line of code"
jenkins-bot [Mon, 5 Aug 2019 19:24:54 +0000 (19:24 +0000)]
Merge "Add explanatory comment to unexpected line of code"

4 years agoImprove log entries display in change lists
jdlrobson [Mon, 5 Aug 2019 19:08:57 +0000 (12:08 -0700)]
Improve log entries display in change lists

Log entries are wrapped with parenthesis - not hardcoded into HTML
causing stray brackets in Minerva where this element is floated.
Has no impact on other skins

In addition to this the entire log entry item is wrapped in a new
span mw-changeslist-log-entry to ensure the text is recognised
as a whole entity - on Minerva floats were leading to the action
and the action object being separated (e.g. uploaded and "File:Name
were separated

Bug: T229360
Change-Id: Idae997b15f68bb0dfcaa857f7458ba3497233d41

4 years agoMerge "move rcfilters scroll logic to better support mobile mode"
jenkins-bot [Mon, 5 Aug 2019 19:21:53 +0000 (19:21 +0000)]
Merge "move rcfilters scroll logic to better support mobile mode"

4 years agoResourceLoaderClientHtml: Simplify code
Fomafix [Mon, 5 Aug 2019 18:59:08 +0000 (20:59 +0200)]
ResourceLoaderClientHtml: Simplify code

* Use nowdoc instead of heredoc syntax where variable expansion is not
  wanted.
* Combine code paths for debug mode and normal mode.

Change-Id: Ic70d82aaec6396a31783e5a60419409f08c4ef73

4 years agoAdd explanatory comment to unexpected line of code
jdlrobson [Mon, 5 Aug 2019 18:29:53 +0000 (11:29 -0700)]
Add explanatory comment to unexpected line of code

Bug: T229360
Change-Id: Ia3faab708925c4ea98ebc91cda79ba82ce8524e8

4 years agoMerge "rcfilters mobile cleanup"
jenkins-bot [Mon, 5 Aug 2019 18:38:39 +0000 (18:38 +0000)]
Merge "rcfilters mobile cleanup"

4 years agoMerge "Code style cleanups to FileBackendGroup"
jenkins-bot [Mon, 5 Aug 2019 18:27:24 +0000 (18:27 +0000)]
Merge "Code style cleanups to FileBackendGroup"