lhc/web/wiklou.git
5 years agoBlob can't be false
daniel [Fri, 12 Jan 2018 15:03:47 +0000 (16:03 +0100)]
Blob can't be false

Change-Id: Ic06fcfaac71128c0ff7e9079685eac18206f2004

5 years agoMerge "resourceloader: Un-deprecate ClientHtml::setModuleStyles()"
jenkins-bot [Fri, 15 Jun 2018 08:01:27 +0000 (08:01 +0000)]
Merge "resourceloader: Un-deprecate ClientHtml::setModuleStyles()"

5 years agoMerge "services: Add linebreak between regular and spread parameter"
jenkins-bot [Fri, 15 Jun 2018 02:55:43 +0000 (02:55 +0000)]
Merge "services: Add linebreak between regular and spread parameter"

5 years agoMerge "Fix flaky MessageBlobStoreTest assertion failures"
jenkins-bot [Fri, 15 Jun 2018 00:11:14 +0000 (00:11 +0000)]
Merge "Fix flaky MessageBlobStoreTest assertion failures"

5 years agoMerge "Avoid deprecated LinkCache::singleton()"
jenkins-bot [Thu, 14 Jun 2018 23:48:54 +0000 (23:48 +0000)]
Merge "Avoid deprecated LinkCache::singleton()"

5 years agoMerge "DefaultSettings: fix "advanced example" for $wgPasswordConfig"
jenkins-bot [Thu, 14 Jun 2018 23:26:02 +0000 (23:26 +0000)]
Merge "DefaultSettings: fix "advanced example" for $wgPasswordConfig"

5 years agoservices: Add linebreak between regular and spread parameter
Timo Tijhof [Thu, 14 Jun 2018 23:22:52 +0000 (00:22 +0100)]
services: Add linebreak between regular and spread parameter

Follows-up 1e680456b4, which removed some array_merge/call_user_func
abstraction, but improved readability a lot, but the absence of a
line break makes it slightly less obvious how and what parameters
are being passed. It's usually either comma-separated segments on
the same line that as the open parenthesis, or one expression per
line.

Change-Id: Ic388cf41ed3ed60d9b47c04392242e40cdcb69b0

5 years agoDefaultSettings: fix "advanced example" for $wgPasswordConfig
Kevin Israel [Mon, 11 Jun 2018 01:45:29 +0000 (21:45 -0400)]
DefaultSettings: fix "advanced example" for $wgPasswordConfig

Follows-up 95a8974c6.

The version of EncryptedPassword that was merged doesn't use mcrypt, but
rather OpenSSL. Also, show one way of specifying the key, and remove the
"cost" option, which would instead need to be specified for the underlying
type ("bcrypt").

Change-Id: Idaaca765835656113c8f0f1e83cc7e5a2a922fa2

5 years agoUpdate OOjs to v2.2.2
James D. Forrester [Thu, 14 Jun 2018 22:55:50 +0000 (15:55 -0700)]
Update OOjs to v2.2.2

Release notes:
 https://gerrit.wikimedia.org/r/plugins/gitiles/oojs/core/+/v2.2.2/History.md

Change-Id: I9d442180d54b8778119d79fa07118f65e62adf78

5 years agohooks.txt: Use "array" in a sentence instead of `[]`
Timo Tijhof [Thu, 14 Jun 2018 22:33:27 +0000 (23:33 +0100)]
hooks.txt: Use "array" in a sentence instead of `[]`

Follows-up 49806d37, which accidentally replaced this "array()"
with "[]".

Change-Id: Ib61e377cc66523aae2df2d42f7b3af2e5bf6c841

5 years agoresourceloader: Un-deprecate ClientHtml::setModuleStyles()
Timo Tijhof [Thu, 14 Jun 2018 22:09:52 +0000 (23:09 +0100)]
resourceloader: Un-deprecate ClientHtml::setModuleStyles()

This follows 80e5b160e0985, which introduced ClientHtml::setModuleScripts()
and setModuleStyles() with @deprecated marks. There was a vague intention
to remove both at some point.

The commit did not deprecate the related methods in OutputPage and ParserOutput.

The plan that eventually formed at T188689 was to keep methods relating to
"setModuleStyles" for the time being, and focus first on the removal of the
methods relating to "setModuleScripts". The latter since been properly
marked as deprecated and removal is scheduled for 1.33.

There is no current plan to deprecate/remove addModuleStyles
from OutputPage and ParserOutput. As such, the internal helper method
that makes those possible, probably shouldn't me marked as deprecated.

Bug: T188689
Change-Id: Ia36c057b73fe834bcbb2e3e8993d1a793a12ab72

5 years agoMerge "resourceloader: move track() from mediawiki.js to the base module"
jenkins-bot [Thu, 14 Jun 2018 20:23:36 +0000 (20:23 +0000)]
Merge "resourceloader: move track() from mediawiki.js to the base module"

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Thu, 14 Jun 2018 20:14:20 +0000 (22:14 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I693bcc8f16293b435b4b334d0c48e09671f73d36

5 years agoresourceloader: move track() from mediawiki.js to the base module
Aaron Schulz [Thu, 7 Jun 2018 06:23:07 +0000 (23:23 -0700)]
resourceloader: move track() from mediawiki.js to the base module

Handlers will not run until the base module is loaded. The track()
method in the loader is upgraded to fire the handlers once the base
module loads.

Refactor the exception logging bits to call logError more directly
instead of subscribing a logging handler to the event queue.

Bug: T192623
Change-Id: I2372bbf70a8775c7ce4c2c78c5edccf1195a9875

5 years agoMerge "maintenance: Update update-oojs.sh to use misc files from package"
jenkins-bot [Thu, 14 Jun 2018 19:36:02 +0000 (19:36 +0000)]
Merge "maintenance: Update update-oojs.sh to use misc files from package"

5 years agomaintenance: Update update-oojs.sh to use misc files from package
Timo Tijhof [Thu, 14 Jun 2018 17:23:33 +0000 (19:23 +0200)]
maintenance: Update update-oojs.sh to use misc files from package

These are already included in the package. Using them from the dist/
directory is somewhat against the way things are normally done in NPM,
given the repository itself already becomes the package.

If we were building a separate directory for a tarball, that
would make more sense, but that isn't the case.

Note: In verions prior to OOjs v2.2.1, all files were included in the package,
version v2.2.1 added the 'files' whitelist which included only dist/, LICENSE*,
README*, History* and package.json, which in particular means AUTHORS.txt
is missing. This was fixed in v2.2.2 on the same day. MediaWiki will upgrade
from v2.2.0 to v2.2.2 directly.

Change-Id: I4bd91811c754addac6c9826e91580eff47c7c5d6

5 years agojqueryMsg: Add missing '$' prefix to jQuery collection variables
Ed Sanders [Thu, 14 Jun 2018 18:41:29 +0000 (19:41 +0100)]
jqueryMsg: Add missing '$' prefix to jQuery collection variables

Change-Id: Ic39ca379c373e43d885f6ac9df746e25f744f9d9

5 years agoMerge "Introduce argument for insert callback in NameTableStore"
jenkins-bot [Thu, 14 Jun 2018 16:06:00 +0000 (16:06 +0000)]
Merge "Introduce argument for insert callback in NameTableStore"

5 years agoIntroduce argument for insert callback in NameTableStore
Amir Sarabadani [Mon, 11 Jun 2018 10:52:31 +0000 (12:52 +0200)]
Introduce argument for insert callback in NameTableStore

This will be useful in cases we need to define more data
when inserting a new row

Bug: T193868
Change-Id: Ib5c2da2ef951e0bc782847ff8bd4606681ee2196

5 years agoMerge "MCR RevisionStore, multi content mode.."
jenkins-bot [Thu, 14 Jun 2018 15:50:26 +0000 (15:50 +0000)]
Merge "MCR RevisionStore, multi content mode.."

5 years agoMerge "Make LocalFile file locking calls use Status::wrap"
jenkins-bot [Thu, 14 Jun 2018 15:44:18 +0000 (15:44 +0000)]
Merge "Make LocalFile file locking calls use Status::wrap"

5 years agoMerge "EditPage::getContextTitle(): Deprecate falling back to $wgTitle"
jenkins-bot [Thu, 14 Jun 2018 15:39:38 +0000 (15:39 +0000)]
Merge "EditPage::getContextTitle(): Deprecate falling back to $wgTitle"

5 years agoMCR RevisionStore, multi content mode..
addshore [Tue, 17 Apr 2018 07:49:20 +0000 (08:49 +0100)]
MCR RevisionStore, multi content mode..

Bug: T174024
Change-Id: Ifabf39e12ba843eb754ad0c029b7d16a311047a5

5 years agoEditPage::getContextTitle(): Deprecate falling back to $wgTitle
James D. Forrester [Tue, 12 Jun 2018 17:44:44 +0000 (10:44 -0700)]
EditPage::getContextTitle(): Deprecate falling back to $wgTitle

Bug: T176526
Change-Id: I7b692def1695119291b26b2f2d25064af9e621f7

5 years agoMerge "Prepare newNullRevision for MCR."
jenkins-bot [Thu, 14 Jun 2018 15:23:11 +0000 (15:23 +0000)]
Merge "Prepare newNullRevision for MCR."

5 years agoMerge "Tests for preserving content ID and origin during undeletion"
jenkins-bot [Thu, 14 Jun 2018 15:23:09 +0000 (15:23 +0000)]
Merge "Tests for preserving content ID and origin during undeletion"

5 years agoPrepare newNullRevision for MCR.
daniel [Wed, 9 May 2018 10:06:51 +0000 (12:06 +0200)]
Prepare newNullRevision for MCR.

Bug: T174024
Change-Id: I8c607ed666295a5072c4fbfad1cf91d74d743abb

5 years agoMerge "rdbms: avoid redundant SPI logging fields in ChronologyProtector log entries"
jenkins-bot [Thu, 14 Jun 2018 14:54:53 +0000 (14:54 +0000)]
Merge "rdbms: avoid redundant SPI logging fields in ChronologyProtector log entries"

5 years agoMerge "[MCR] RevisionStore, enable insertions for new schema"
jenkins-bot [Thu, 14 Jun 2018 14:11:27 +0000 (14:11 +0000)]
Merge "[MCR] RevisionStore, enable insertions for new schema"

5 years agoMerge "Preferences: Allow only languages with translations in user options"
jenkins-bot [Thu, 14 Jun 2018 13:56:39 +0000 (13:56 +0000)]
Merge "Preferences: Allow only languages with translations in user options"

5 years agoMerge "Replace deprecated language codes in user options"
jenkins-bot [Thu, 14 Jun 2018 13:56:36 +0000 (13:56 +0000)]
Merge "Replace deprecated language codes in user options"

5 years agoTests for preserving content ID and origin during undeletion
daniel [Tue, 10 Apr 2018 15:31:33 +0000 (17:31 +0200)]
Tests for preserving content ID and origin during undeletion

Bug: T194015
Change-Id: I6d9a1390c7080d910d43097afb703d13cd500c1b

5 years ago[MCR] RevisionStore, enable insertions for new schema
addshore [Mon, 29 Jan 2018 15:54:02 +0000 (15:54 +0000)]
[MCR] RevisionStore, enable insertions for new schema

Enable inserts to the new MCR db schema in single slot mode only.

TODO:
 - RELEASE NOTES

Notes:
 - When in MIGRATION_WRITE_NEW or greater, deleting and then
 restoring a page will result in different data in the revision table.
 For example, if you delete a page that has text_ids present in the
 revision table and restore it, the text_ids will be blank after.
 - When in MIGRATION_WRITE_BOTH or greater the archive table will
 start to ar_content_model entries where previously it would have been
 given NULL. This is due to the old content schema having NULL in the db
 when the default content model is used, but the new schema will always
 have a value, taken from the content_models table

Note: If259b1e1c49ce was squashed into this change.

Bug: T183488
Bug: T174024
Change-Id: Ic2221da30c8f6ac2ba42720fcd568f2d0ed70534

5 years agoPreferences: Allow only languages with translations in user options
Fomafix [Sat, 24 Feb 2018 14:49:46 +0000 (15:49 +0100)]
Preferences: Allow only languages with translations in user options

This change allows only language codes with translations for the user
option 'language'. This restrict the selectable values in the
preferences and also prevents setting the user option via API.

With the URL parameter 'uselang' the user interface language can
still set to a language code without translation.

In the current situation this change will remove the following language
codes from the allowed values:
> print '* ' . implode( "\n* ", array_diff(
array_keys( Language::fetchLanguageNames( null, 'mw' ) ),
array_keys( Language::fetchLanguageNames( null, 'mwfile' ) )
) );
* 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

The change I1dd6fb1f240ce3319b132d0f29f0622fba33e655 ensures that the
deprecated language codes get replaced by the new language codes. The
other untranslated language codes get replaced by the content language
codes when the user loads the preferences.

Bug: T118199
Change-Id: I1382996b031af3fe9f6e1568beeb6376dcbcd217

5 years agoReplace deprecated language codes in user options
Fomafix [Mon, 28 Mar 2016 08:22:43 +0000 (08:22 +0000)]
Replace deprecated language codes in user options

This change replaces deprecated language codes in the user options by
the new language codes when loading the user setting from database.

The database entry for the user gets updated with the new language code
when the user saves the preferences.

Bug: T131042
Change-Id: I1dd6fb1f240ce3319b132d0f29f0622fba33e655

5 years ago[MCR] Factor PageUpdater out of WikiPage
daniel [Sat, 27 Jan 2018 01:48:19 +0000 (17:48 -0800)]
[MCR] Factor PageUpdater out of WikiPage

This introduces PageUpdater to replace WikiPage::doEditContent,
and DerivedPageDataUpdater, to replace WikiPage::doEditUpdates
and WikiPage::prepareContentForEdit.

See docs/pageupdater.txt for a description of their
functionality.

MCR migration notes:

* The interface of PageUpdater is expected to
remain mostly stable after this patch. Code that has been using
WikiPage::doEditContent can be confidently migrated to using the
new mechanism for revision creation.

* This patch keeps the code inside PageUpdater largely aligned
with the old code in WikiPage, to make review easier to to avoid
mistakes. It is intended to be refactored further, moving
application logic into stateless services.

* DerivedPageDataUpdate is intended as a stepping stone for further
refactoring. Its behavior is designed to be compatible with
callback code that currently relies on
WikiPage::prepareContentForEdit. Much of the code that currently
lives in DerivedPageDataUpdate should be factored out into
services, all behavior relevant to calling code should be exposed
via narrow interfaces.

Bug: T174038
Bug: T196653
Change-Id: If610c68f4912e89af616cdcac1d35a1be3946afa

5 years agoMerge "Fix typo in method documentation"
jenkins-bot [Thu, 14 Jun 2018 11:44:06 +0000 (11:44 +0000)]
Merge "Fix typo in method documentation"

5 years agoMerge "Add @since tags to come MediaWikiTestCase methods"
jenkins-bot [Thu, 14 Jun 2018 09:03:07 +0000 (09:03 +0000)]
Merge "Add @since tags to come MediaWikiTestCase methods"

5 years agoFix typo in method documentation
Niklas Laxström [Thu, 14 Jun 2018 08:47:08 +0000 (10:47 +0200)]
Fix typo in method documentation

Change-Id: I891f9725acfac993966238abff255e59e9aee07a

5 years agoMerge "Suppress addCoreDBData() in tests overriding the revision schema."
jenkins-bot [Thu, 14 Jun 2018 07:56:10 +0000 (07:56 +0000)]
Merge "Suppress addCoreDBData() in tests overriding the revision schema."

5 years agoMerge "PHPSessionHandler: Suppress warnings in initialize()"
jenkins-bot [Thu, 14 Jun 2018 07:52:44 +0000 (07:52 +0000)]
Merge "PHPSessionHandler: Suppress warnings in initialize()"

5 years agoAdd @since tags to come MediaWikiTestCase methods
addshore [Thu, 14 Jun 2018 07:46:18 +0000 (08:46 +0100)]
Add @since tags to come MediaWikiTestCase methods

Follow up to:
 - I86e140ec981dfa4e904822b1600399c533f9e3d6 /
 e4b775acf113d021ce35f69a177d7444b8ed8412

Change-Id: Ib45f8ba30dfd382318dd87bc232a529c47c9a307

5 years agoMerge "selenium: add RecentChanges test to page spec"
jenkins-bot [Thu, 14 Jun 2018 07:43:59 +0000 (07:43 +0000)]
Merge "selenium: add RecentChanges test to page spec"

5 years agoMerge "Improve help text of forced password change"
jenkins-bot [Thu, 14 Jun 2018 07:42:13 +0000 (07:42 +0000)]
Merge "Improve help text of forced password change"

5 years agoSuppress addCoreDBData() in tests overriding the revision schema.
daniel [Tue, 12 Jun 2018 16:36:34 +0000 (18:36 +0200)]
Suppress addCoreDBData() in tests overriding the revision schema.

Some unit tests for the MCR schema migration change the DB schema
in the test setup. However, addCoreDBData() will not work with the
modified schema. Since these tests don't actually need addCoreDBData()
to do anything, they can simply override it to do nothing.

Without this change, tests for Ic2221da30c and Ifabf39e12ba843
fail with $wgMultiContentRevisionSchemaMigrationStage = MIGRATION_WRITE_BOTH.

Change-Id: I86e140ec981dfa4e904822b1600399c533f9e3d6

5 years agoMake LocalFile file locking calls use Status::wrap
Aaron Schulz [Wed, 13 Jun 2018 23:52:31 +0000 (16:52 -0700)]
Make LocalFile file locking calls use Status::wrap

This avoids the assumption that a wrapper was set in the FileBackend.

Change-Id: I4d41d63b00e41476d885f714d17d1ba62b63b6ec

5 years agordbms: disable ChronologyProtector if EmptyBagOStuff is used
Aaron Schulz [Thu, 14 Jun 2018 00:14:23 +0000 (17:14 -0700)]
rdbms: disable ChronologyProtector if EmptyBagOStuff is used

Bug: T197206
Change-Id: Ic07634224fac1ae72d1ba20176c028fdda5ba415

5 years agoImprove help text of forced password change
Gergő Tisza [Thu, 14 Jun 2018 06:36:14 +0000 (06:36 +0000)]
Improve help text of forced password change

"reset" sounds confusing; password reset normally means you get a new
random password via email. (This is mainly a problem in
resetpass-validity-soft, where the current wording might make one think
that the password will automatically reset if they skip the form now;
the patch changes the other resetpass-* messages as well for
consistency.)

Change-Id: I3a7129c941ff597741ebdaf0aea15ffdc91e0779

5 years agoMerge "Hard deprecate a trio of functions from Language.php"
jenkins-bot [Wed, 13 Jun 2018 23:36:51 +0000 (23:36 +0000)]
Merge "Hard deprecate a trio of functions from Language.php"

5 years agoMerge "Do not require titles on Special:ComparePages"
jenkins-bot [Wed, 13 Jun 2018 22:58:28 +0000 (22:58 +0000)]
Merge "Do not require titles on Special:ComparePages"

5 years agoMerge "Provide backwards compatibility for RevisionInsertComplete hook."
jenkins-bot [Wed, 13 Jun 2018 20:07:02 +0000 (20:07 +0000)]
Merge "Provide backwards compatibility for RevisionInsertComplete hook."

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Wed, 13 Jun 2018 20:02:55 +0000 (22:02 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I0c3b7f72cd71155ca6c5cd5fa1571fcb702508df

5 years agoProvide backwards compatibility for RevisionInsertComplete hook.
daniel [Wed, 13 Jun 2018 18:18:47 +0000 (20:18 +0200)]
Provide backwards compatibility for RevisionInsertComplete hook.

Call the RevisionInsertComplete from RevisionStore for now, so extensions
that still rely on this hook don't break when more code uses RevisionStore
instead of Revision.

This specifically avoid breaking EventBus and Translate when If610c68f491
is merged.

Change-Id: I3356c8250d7934e0089d4627fdebddf7983f194f

5 years agoHard deprecate a trio of functions from Language.php
C. Scott Ananian [Wed, 13 Jun 2018 17:48:02 +0000 (13:48 -0400)]
Hard deprecate a trio of functions from Language.php

These have been soft deprecated since 1.28; let's start the process of
actually removing them.

Change-Id: I33bb6f501e5df419683d06fb9e4516fddc03741b

5 years agoDeprecate Language::markNoConversion, which confuses readers
C. Scott Ananian [Fri, 8 Jun 2018 16:18:05 +0000 (12:18 -0400)]
Deprecate Language::markNoConversion, which confuses readers

Language::markNoConversion is used only within Parser.php and differs
from LanguageConverter::markNoConversion in that, contrary to its name
and its namesake, it only protects *things which look like URLs* from
language conversion.

This wasted several days of my time before I realized what was going on.
It's needless; just hoist the "looks like a URL" special casing inline
to the single place where that functionality is used.  (And I wonder
if the "looks like a URL" case is actually needed at all any more,
since most of those cases are probably free external links, which
go through a different code path, not bracketed external links.)

This is a clean-up to the clean-up that liangent performed in 2012
with e01adbfc0bd9f39adffc1f955ccc711e73818194.

Change-Id: I80479600f34170651732b032e8881855aa1204d8

5 years agoMerge "Move RELEASE-NOTES-1.31 into HISTORY"
jenkins-bot [Wed, 13 Jun 2018 16:36:58 +0000 (16:36 +0000)]
Merge "Move RELEASE-NOTES-1.31 into HISTORY"

5 years agoMerge "Update feedbacklink text"
jenkins-bot [Wed, 13 Jun 2018 16:34:04 +0000 (16:34 +0000)]
Merge "Update feedbacklink text"

5 years agoMerge "Expose sort orders from search engine in ApiQuerySearch"
jenkins-bot [Wed, 13 Jun 2018 16:29:36 +0000 (16:29 +0000)]
Merge "Expose sort orders from search engine in ApiQuerySearch"

5 years agoMove RELEASE-NOTES-1.31 into HISTORY
James D. Forrester [Wed, 13 Jun 2018 16:14:34 +0000 (09:14 -0700)]
Move RELEASE-NOTES-1.31 into HISTORY

Change-Id: I82f6707af79846688cc8ccbbe30909198c647f1a

5 years agoUpdate feedbacklink text
Hagar Shilo [Mon, 11 Jun 2018 17:26:24 +0000 (20:26 +0300)]
Update feedbacklink text

Bug: T195902
Change-Id: I69a9c42ed44eb45513084c01882d8ea8f376c6de

5 years agoMerge "mediawiki.ui: Don't style non-MWUI `<input type="number">` elements"
jenkins-bot [Wed, 13 Jun 2018 16:11:37 +0000 (16:11 +0000)]
Merge "mediawiki.ui: Don't style non-MWUI `<input type="number">` elements"

5 years agoMerge "Silently drop unknown titles in completion search"
jenkins-bot [Wed, 13 Jun 2018 16:04:40 +0000 (16:04 +0000)]
Merge "Silently drop unknown titles in completion search"

5 years agoExpose sort orders from search engine in ApiQuerySearch
Erik Bernhardson [Sat, 19 May 2018 13:42:54 +0000 (06:42 -0700)]
Expose sort orders from search engine in ApiQuerySearch

Selectable sort orders were added to search some time ago, but never
appear to have been used.  Expose them in ApiQuerySearch.

There is one large problem here, but it's not easily solvable.
Specifically supported sort orders vary per search engine, but the
available api parameters are calculated with the default search
engine. This is already a problem with search profiles so it's
nothing new, just continuing the existing problem. Much like
search profiles we hide the functionality when multiple engines
are available.

Bug: T195071
Change-Id: I187a530bc973c08386d2c2126e02a85b952d9022

5 years agoMerge "Push pagination decision for search into SearchEngine"
jenkins-bot [Wed, 13 Jun 2018 15:55:31 +0000 (15:55 +0000)]
Merge "Push pagination decision for search into SearchEngine"

5 years agoMerge "Pass $parser, &$query and &$widthOption to the 'ImageBeforeProduceHTML' hook"
jenkins-bot [Wed, 13 Jun 2018 15:31:01 +0000 (15:31 +0000)]
Merge "Pass $parser, &$query and &$widthOption to the 'ImageBeforeProduceHTML' hook"

5 years agoMerge "Use 'trash' icon in the saved filters menu & change 'remove' to 'delete'"
jenkins-bot [Wed, 13 Jun 2018 14:37:19 +0000 (14:37 +0000)]
Merge "Use 'trash' icon in the saved filters menu & change 'remove' to 'delete'"

5 years agoUse 'trash' icon in the saved filters menu & change 'remove' to 'delete'
Hagar Shilo [Mon, 11 Jun 2018 17:12:07 +0000 (20:12 +0300)]
Use 'trash' icon in the saved filters menu & change 'remove' to 'delete'

Using 'trash' icon instead of misleading 'clear' and changing 'remove'
to 'delete' accordingly.

Bug: T191530
Change-Id: I8369977df5cdf0dca63683bc682e470223cf6fed

5 years agoselenium: add RecentChanges test to page spec
Pablo Grass [Tue, 12 Jun 2018 11:01:25 +0000 (13:01 +0200)]
selenium: add RecentChanges test to page spec

Add Special:RecentChanges page object with method to retrieve
displayed titles, test page last edited is shown there.
Will be used to test more advanced title/link formatters downstream.

Bug: T191600
Change-Id: I916516d5055c3ce9be071a75e5c3af2b3547d4ba

5 years agoPHPSessionHandler: Suppress warnings in initialize()
Brad Jorsch [Wed, 13 Jun 2018 13:51:57 +0000 (09:51 -0400)]
PHPSessionHandler: Suppress warnings in initialize()

PHP 7.2 has gotten strict about calling various session-related methods
after headers were sent. Even in CLI mode where there are no headers to
send in the first place. Silence these warnings.

Bug: T197030
Change-Id: Idaabf1320c56e0d6c26387f03af05f32e1496a1c

5 years agoMerge "Use more diverse unicode chars in basic browser tests"
jenkins-bot [Wed, 13 Jun 2018 13:27:54 +0000 (13:27 +0000)]
Merge "Use more diverse unicode chars in basic browser tests"

5 years agoMerge "Disable WebResponse setters for post-send processing"
jenkins-bot [Wed, 13 Jun 2018 13:21:51 +0000 (13:21 +0000)]
Merge "Disable WebResponse setters for post-send processing"

5 years agoshell.php: update PsySH from 0.8.11 to 0.9.6
Gergő Tisza [Tue, 12 Jun 2018 15:56:57 +0000 (17:56 +0200)]
shell.php: update PsySH from 0.8.11 to 0.9.6

Major changes: fix for T186936, external editor support,
timeit command, emulate HISTCONTROL=ignorespace,
fixed tab completion

mediawiki/vendor patch: I5f604250fb213618f734e6ac9c48969ceeb3e7fb

Change-Id: I994689638632f39d86ce88027445d8fe4ea4f649

5 years agoUse more diverse unicode chars in basic browser tests
WMDE-Fisch [Thu, 1 Feb 2018 08:52:10 +0000 (09:52 +0100)]
Use more diverse unicode chars in basic browser tests

See comment in I3423011c467b0a6426cfa0dad522435618f24bd0
and https://mathiasbynens.be/notes/javascript-unicode#poo-test

Decided on using something more positive than a pile of poo though.

Change-Id: Ic34d0d78044cede71fd1cd8742214c117ed2e99f

5 years agoselenium, page spec, make "should be editable" actually edit
addshore [Fri, 8 Jun 2018 12:11:38 +0000 (13:11 +0100)]
selenium, page spec, make "should be editable" actually edit

This was using the same content for the edit before this
patch, so no edit was actually made, (just a null edit).

Change-Id: I945090647226e82f22b5b10a414a2a0bf9f2bc19

5 years agoselenium: page spec, make it easier to see where strings come from
addshore [Fri, 8 Jun 2018 12:08:49 +0000 (13:08 +0100)]
selenium: page spec, make it easier to see where strings come from

Having randomly generated strings is great, but sometimes
it can help to allow a human to easily see where the string
is actually being generated in code, so add an optional suffix
to the string being generated.

Change-Id: Ibfe45f74b4880a70a76c01223a787dabcd43607e

5 years agoUse wd/hub not /wd/hub in selenium.sh
addshore [Thu, 7 Jun 2018 16:27:06 +0000 (17:27 +0100)]
Use wd/hub not /wd/hub in selenium.sh

I have run into this before and we fixed it in the README
but not in this script (I wasn't using this script at the time)

This was changed in the README in change:
I85a9e7dbd9a66418c85585969adb5ac1548f5ef6

Bug: T182421
Change-Id: I6ab92c6a61a57dc313b05321d0789dcbeb776c94

5 years agoDon't use killall in selenium.sh
addshore [Thu, 7 Jun 2018 16:20:59 +0000 (17:20 +0100)]
Don't use killall in selenium.sh

git bash for windows apparently doesn't have killall
by default, so instead get the PID of the chrome driver
we start and kill that specifically.

Change-Id: I8a9a773a7d3dc23807dc3ec12f5b3ef03661c9e3

5 years agoMerge "RCFilters: Reduce min-height for Watchlist"
jenkins-bot [Wed, 13 Jun 2018 11:02:58 +0000 (11:02 +0000)]
Merge "RCFilters: Reduce min-height for Watchlist"

5 years agoImprove LinkRenderer::getLinkText() coverage
Kunal Mehta [Sun, 10 Jun 2018 19:12:52 +0000 (12:12 -0700)]
Improve LinkRenderer::getLinkText() coverage

Change-Id: I067522025c247346888c9f5a3d905bf03a93b7bc

5 years agoRemove deprecated Linker::getLinkColour()
Kunal Mehta [Sun, 10 Jun 2018 19:05:31 +0000 (12:05 -0700)]
Remove deprecated Linker::getLinkColour()

Change-Id: I1818d9eb369c620cc436c13446a5362816e8362d

5 years agoMerge "linker: Hard-deprecate LinkBegin and LinkEnd hooks"
jenkins-bot [Wed, 13 Jun 2018 06:02:23 +0000 (06:02 +0000)]
Merge "linker: Hard-deprecate LinkBegin and LinkEnd hooks"

5 years agomediawiki.ui: Don't style non-MWUI `<input type="number">` elements
Bartosz Dziewoński [Wed, 13 Jun 2018 02:15:27 +0000 (04:15 +0200)]
mediawiki.ui: Don't style non-MWUI `<input type="number">` elements

These styles mess with the styles for OOUI NumberInputWidget.

Change-Id: I9b7c8a010bc704c922cb6200a0316ed8e48851c5

5 years agoMerge "rdbms: make getCPInfoFromCookieValue() stricter about allowed values"
jenkins-bot [Tue, 12 Jun 2018 23:51:49 +0000 (23:51 +0000)]
Merge "rdbms: make getCPInfoFromCookieValue() stricter about allowed values"

5 years agoRemove unnecessary Parser::getConverterLanguage() indirection
C. Scott Ananian [Fri, 8 Jun 2018 15:45:07 +0000 (11:45 -0400)]
Remove unnecessary Parser::getConverterLanguage() indirection

The getConverterLanguage() method was added in March 2012 in commit
561424c266128a8c2c213cd803d4786313fc20cc as a workaround for a regression
in mediawiki 1.19.  It was an indirection which checked the global variable
$wgBug34832TransitionalRollback to return a different converter language
for Chinese wikis.

When this temporary bugfix was reverted in January 2013 in commit
a3fbdaaa2c4eb5ddc6bfbd62ae57a7804a307f12, the temporary global variable
was removed, but not the getConverterLanguage() indirection.  Since then,
new code in the parser seems to have faithfully used getConverterLanguage()
instead of getTargetLanguage(), even though they are identical and the
need for getConverterLanguage() has long since passed.

Strike a small blow for elegant minimalism by removing the completely
unnecessary Parser::getConverterLanguage() indirection.  Well, sort
of: since this blight has been slowly growing inside Parser.php for
so long, we need to deprecate getConverterLanguage() first just in
case any external dependency has been infected.  Next release we
can finally excise the unnecessary method.

Change-Id: I567c29c9c7699020955699b76cbe8578d02e2fe6

5 years agoMerge "Add @coversNothing to tests that don't cover specific PHP classes"
jenkins-bot [Tue, 12 Jun 2018 23:17:06 +0000 (23:17 +0000)]
Merge "Add @coversNothing to tests that don't cover specific PHP classes"

5 years agoMerge "hooks.txt: Clean-up whitespace and wrapping for consistency"
jenkins-bot [Tue, 12 Jun 2018 22:34:54 +0000 (22:34 +0000)]
Merge "hooks.txt: Clean-up whitespace and wrapping for consistency"

5 years agoRCFilters: Reduce min-height for Watchlist
Roan Kattouw [Tue, 12 Jun 2018 22:31:53 +0000 (15:31 -0700)]
RCFilters: Reduce min-height for Watchlist

Bug: T195903
Change-Id: I8d4622951026cb5058efd63aa1adcb3607dd79bc

5 years agoUse PHP 7 '??' operator instead of if-then-else
Fomafix [Tue, 12 Jun 2018 20:44:33 +0000 (22:44 +0200)]
Use PHP 7 '??' operator instead of if-then-else

Change-Id: I790b86e2e9e3e41386144637659516a4bfca1cfe

5 years agoAdd @coversNothing to tests that don't cover specific PHP classes
Kunal Mehta [Tue, 12 Jun 2018 20:27:09 +0000 (13:27 -0700)]
Add @coversNothing to tests that don't cover specific PHP classes

Change-Id: Idbd364561bc28547e9fac20d7a80b9a44edf14a9

5 years agohooks.txt: Clean-up whitespace and wrapping for consistency
James D. Forrester [Tue, 12 Jun 2018 15:42:29 +0000 (08:42 -0700)]
hooks.txt: Clean-up whitespace and wrapping for consistency

This file is a disaster, but now at least we actually wrap at 80 chars
for all the hooks, not just the ones where the developer felt like it.

Change-Id: I10d3d51412af29b135fd7e9a0393ff0b57eb25aa

5 years agohooks.txt: Label which hooks are deprecated when
James D. Forrester [Tue, 12 Jun 2018 15:41:34 +0000 (08:41 -0700)]
hooks.txt: Label which hooks are deprecated when

Many of these are still soft-deprecated, so tracking down their age
and kicking off the full deprecation process is hard, let alone
actually removing them. Doing this makes that future work easier.

Change-Id: Ib096190accceabf9082f621ba96243f7dedb025d

5 years agoMerge "Follow-up 23cfebd3d25: Hard-deprecate LanguageGetMagic hook"
jenkins-bot [Tue, 12 Jun 2018 19:52:24 +0000 (19:52 +0000)]
Merge "Follow-up 23cfebd3d25: Hard-deprecate LanguageGetMagic hook"

5 years agoMerge "Follow-up 23cfebd3d25: Hard-deprecate LanguageGetSpecialPageAliases hook"
jenkins-bot [Tue, 12 Jun 2018 19:52:22 +0000 (19:52 +0000)]
Merge "Follow-up 23cfebd3d25: Hard-deprecate LanguageGetSpecialPageAliases hook"

5 years agoMerge "Fix typehint-typo in MediaWikiTestCase"
jenkins-bot [Tue, 12 Jun 2018 19:19:23 +0000 (19:19 +0000)]
Merge "Fix typehint-typo in MediaWikiTestCase"

5 years agoMerge "Convert SearchResultSet to typical iteration"
jenkins-bot [Tue, 12 Jun 2018 19:04:43 +0000 (19:04 +0000)]
Merge "Convert SearchResultSet to typical iteration"

5 years agoFix typehint-typo in MediaWikiTestCase
Marius Hoch [Tue, 12 Jun 2018 18:20:49 +0000 (20:20 +0200)]
Fix typehint-typo in MediaWikiTestCase

Change-Id: I3817d586cfaaaf38439820741e68eff044e9bf76

5 years agordbms: make getCPInfoFromCookieValue() stricter about allowed values
Aaron Schulz [Mon, 11 Jun 2018 21:52:37 +0000 (14:52 -0700)]
rdbms: make getCPInfoFromCookieValue() stricter about allowed values

All components, not just the write index, must now be present.

Bug: T194403
Change-Id: I279ba3e16d470aca09fdb74cec91d28efb5e2f95

5 years agoDisable WebResponse setters for post-send processing
Brad Jorsch [Fri, 8 Jun 2018 18:51:25 +0000 (14:51 -0400)]
Disable WebResponse setters for post-send processing

When jobs are being run synchronously post-send, we don't want to allow
bugs to result in a job somehow setting cookies or headers that
interfere with those that were intended to be set in the request.

Bug: T191537
Change-Id: Ib5714a17af417797140f99e41eaacbba1bfd20f4

5 years agoFollow-up 23cfebd3d25: Hard-deprecate LanguageGetMagic hook
James D. Forrester [Tue, 12 Jun 2018 15:44:31 +0000 (08:44 -0700)]
Follow-up 23cfebd3d25: Hard-deprecate LanguageGetMagic hook

Change-Id: I7e442e20744a196644d6be186158fd901f9db1ce

5 years agoCategory: Lock the category row before the categorylinks rows
Brad Jorsch [Tue, 12 Jun 2018 15:28:25 +0000 (11:28 -0400)]
Category: Lock the category row before the categorylinks rows

We've noticed a large increase in deadlocks between
LinksDeletionUpdate deleting categorylinks rows and
Category::refreshCounts() trying to update the category table.

My best guess as to what's going on there is that LinksDeletionUpdate
locks the category row via the call to WikiPage::updateCategoryCounts()
then the categorylinks rows via its own deletions, while Category first
locks the categorylinks rows (in share mode) and then the category row
when it tries to update or delete it.

To break the deadlock, let's have Category do a SELECT FOR UPDATE on the
category row first before it locks the categorylinks rows.

Bug: T195397
Change-Id: Ie11baadf2ff0ba2afbc86b10bc523525c570a490