lhc/web/wiklou.git
8 years agoFollow up I63cdc0
Florian [Fri, 1 Apr 2016 21:06:35 +0000 (23:06 +0200)]
Follow up I63cdc0

Don't unset the default configuration in Setup.php.

Change-Id: I8d8c54a6188b541dbdb7b2b84c0061fe4ac7cc49
Follow-up: I63cdc0a7fd51ca3a45dc2fd83b22eb58a8de520c

8 years agoRemove MediaWikiSite::newFromGlobalId (deprecated since 1.21)
Florian [Fri, 1 Apr 2016 19:31:37 +0000 (21:31 +0200)]
Remove MediaWikiSite::newFromGlobalId (deprecated since 1.21)

Isn't used anymore anywhere.

Bug: T122754
Change-Id: I95b20c005721837dcbf9ab979674ac09c460cdd0

8 years agoMerge "Localisation updates from https://translatewiki.net."
Translation updater bot [Fri, 1 Apr 2016 20:09:37 +0000 (20:09 +0000)]
Merge "Localisation updates from https://translatewiki.net."

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Fri, 1 Apr 2016 19:58:59 +0000 (21:58 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Ie0a08fde2970106bae564551bb6ed6bd76f8a9da

8 years agoApiPageSet::finishPageSetGeneration() was removed
Reedy [Fri, 1 Apr 2016 19:41:59 +0000 (20:41 +0100)]
ApiPageSet::finishPageSetGeneration() was removed

Bug:T122754
Change-Id: I106f37f5f83e30222a602d88704069ceccc91a29

8 years agoRemoved ApiMain::(getFormats|addFormat|addModule|getShowVersions).
Reedy [Fri, 1 Apr 2016 19:38:11 +0000 (20:38 +0100)]
Removed ApiMain::(getFormats|addFormat|addModule|getShowVersions).

Deprecated since 1.21

Bug: T122754
Change-Id: Id5cbc50e45cdfdfeb2e92faffc7ded868a350f4b

8 years agoRemove $wgCopyrightIcon
Florian [Sat, 2 Jan 2016 21:49:29 +0000 (22:49 +0100)]
Remove $wgCopyrightIcon

Bug: T122754
Depends-On: I3181d4830153d052bff87de5d2347a51fbd5f520
Change-Id: I63cdc0a7fd51ca3a45dc2fd83b22eb58a8de520c

8 years agoRemove Revision::getRawText()
Florian [Wed, 13 Jan 2016 19:38:12 +0000 (20:38 +0100)]
Remove Revision::getRawText()

Bug: T122754
Depends-On: I742f02021959587edd83a4cfb25e0338d05a8e81
Depends-On: I10283802c26b99d7e345c5c06d59c4ea24002e52
Depends-On: I6da4fab1e0e8f698b824e977dd2336e4415ae1ba
Change-Id: Id1cfda59e381673be99d9561c9997c0baf26d425

8 years agoMerge "Track the use of the WatchedItemStore Cache"
jenkins-bot [Fri, 1 Apr 2016 14:59:43 +0000 (14:59 +0000)]
Merge "Track the use of the WatchedItemStore Cache"

8 years agoMerge "Allow SpecialPage::beforeExecute to prevent execution"
jenkins-bot [Fri, 1 Apr 2016 14:58:49 +0000 (14:58 +0000)]
Merge "Allow SpecialPage::beforeExecute to prevent execution"

8 years agoMerge "Add WatchedItemStoreUnitTest::newWatchedItemStore"
jenkins-bot [Fri, 1 Apr 2016 14:54:13 +0000 (14:54 +0000)]
Merge "Add WatchedItemStoreUnitTest::newWatchedItemStore"

8 years agoMerge "Allow HTMLFormField placeholder to be a message"
jenkins-bot [Fri, 1 Apr 2016 14:48:23 +0000 (14:48 +0000)]
Merge "Allow HTMLFormField placeholder to be a message"

8 years agoMerge "Unify handling of *-message(s) settings in HTMLForm"
jenkins-bot [Fri, 1 Apr 2016 14:48:19 +0000 (14:48 +0000)]
Merge "Unify handling of *-message(s) settings in HTMLForm"

8 years agoAllow HTMLFormField placeholder to be a message
Gergő Tisza [Fri, 1 Apr 2016 12:06:49 +0000 (15:06 +0300)]
Allow HTMLFormField placeholder to be a message

Change-Id: Ib135a8792dcf03fd2246c208ab4c8185caef2ac6

8 years agoMerge "Fix Session::getToken phpdoc"
jenkins-bot [Fri, 1 Apr 2016 14:17:03 +0000 (14:17 +0000)]
Merge "Fix Session::getToken phpdoc"

8 years agoMerge "Fix StatusValue phpdoc"
jenkins-bot [Fri, 1 Apr 2016 14:16:24 +0000 (14:16 +0000)]
Merge "Fix StatusValue phpdoc"

8 years agoMerge "Allow setting HTMLForm name"
jenkins-bot [Fri, 1 Apr 2016 14:16:20 +0000 (14:16 +0000)]
Merge "Allow setting HTMLForm name"

8 years agoMerge "Add flag to HTMLTextField to not persist submitted data"
jenkins-bot [Fri, 1 Apr 2016 14:16:16 +0000 (14:16 +0000)]
Merge "Add flag to HTMLTextField to not persist submitted data"

8 years agoMerge "Use default value instead of submitted value in HTMLForm buttons"
jenkins-bot [Fri, 1 Apr 2016 14:16:12 +0000 (14:16 +0000)]
Merge "Use default value instead of submitted value in HTMLForm buttons"

8 years agoUnify handling of *-message(s) settings in HTMLForm
Gergő Tisza [Fri, 1 Apr 2016 12:00:44 +0000 (15:00 +0300)]
Unify handling of *-message(s) settings in HTMLForm

*-message(s) settings were documented as message key strings or arrays
of message key strings, but some actually accepted [key, params...]
arrays as well. They did not accept Message objects, which would be
the cleanest and most flexible method of message passing.

The patch adds a new method to process these settings (which accepts
a messages key, a [key, params...] array or a Message object), and
makes all *-message(s) usage call that.

Change-Id: Ida647973a58bea83fdbd53335e63b5a8615c16e4

8 years agoMerge "Fix missing variable in HTMLFormField exceptions"
jenkins-bot [Fri, 1 Apr 2016 13:49:40 +0000 (13:49 +0000)]
Merge "Fix missing variable in HTMLFormField exceptions"

8 years agoAllow SpecialPage::beforeExecute to prevent execution
Gergő Tisza [Fri, 1 Apr 2016 12:51:04 +0000 (15:51 +0300)]
Allow SpecialPage::beforeExecute to prevent execution

Allos SpecialPage::beforeExecute() (and the equivalent
SpecialPageBeforeExecute hook) to prevent execution of the page
by returning false.

Needed by I8b52ec8ddf494f23941807638f149f15b5e46b0c.

Change-Id: I71423b920d596ee9ae6da60d95b14255eddfbcd6

8 years agoFix Session::getToken phpdoc
Gergő Tisza [Fri, 1 Apr 2016 12:46:11 +0000 (15:46 +0300)]
Fix Session::getToken phpdoc

Change-Id: I332c623b08bbc980494c9ba01da77bad5c205038

8 years agoFix StatusValue phpdoc
Gergő Tisza [Fri, 1 Apr 2016 12:44:10 +0000 (15:44 +0300)]
Fix StatusValue phpdoc

Change-Id: Ie30ebf9bd89c4e2594e806a1b52f5716a32e11ec

8 years agoAllow setting HTMLForm name
Gergő Tisza [Fri, 1 Apr 2016 12:08:18 +0000 (15:08 +0300)]
Allow setting HTMLForm name

Change-Id: I85f5492e0b99a5661dbed9814a0e3f3b9bc63d32

8 years agoFix missing variable in HTMLFormField exceptions
Gergő Tisza [Fri, 1 Apr 2016 12:05:12 +0000 (15:05 +0300)]
Fix missing variable in HTMLFormField exceptions

Change-Id: Ie61f170e9117dde7ece05b04573a3c4902b19e56

8 years agoAdd flag to HTMLTextField to not persist submitted data
Gergő Tisza [Fri, 1 Apr 2016 11:54:15 +0000 (14:54 +0300)]
Add flag to HTMLTextField to not persist submitted data

Sometimes the submitted text is not expected to show up as default
when the form is redisplayed after an error; password fields are
the obvious example for this, but in some cases (e.g. two-factor
token) it is useful for a normal text field to act like that as well.

The patch adds a new 'persistent' flag to HTMLTextField, which
defaults to false for passwords and true otherwise.

Change-Id: If0a52f61aa061bbb55bfdc76321ace7d3eaed934

8 years agoUse default value instead of submitted value in HTMLForm buttons
Gergő Tisza [Fri, 1 Apr 2016 11:49:49 +0000 (14:49 +0300)]
Use default value instead of submitted value in HTMLForm buttons

In some exotic use cases where the form is rendered straight from
a successful submit this prevents unexpected button text changes.

Change-Id: I61619b6222d9fb29c63ce7c1f3ceff512143c4f7

8 years agoTrack the use of the WatchedItemStore Cache
addshore [Fri, 1 Apr 2016 12:03:52 +0000 (15:03 +0300)]
Track the use of the WatchedItemStore Cache

Change-Id: Idc33dd6a52471e895b312fa2c6562a90bf3d7861

8 years agoMerge "Add phpdoc and @since to SpecialUserrights::makeGroupNameList"
jenkins-bot [Fri, 1 Apr 2016 11:59:30 +0000 (11:59 +0000)]
Merge "Add phpdoc and @since to SpecialUserrights::makeGroupNameList"

8 years agoAdd WatchedItemStoreUnitTest::newWatchedItemStore
addshore [Fri, 1 Apr 2016 11:46:15 +0000 (14:46 +0300)]
Add WatchedItemStoreUnitTest::newWatchedItemStore

Change-Id: Ic3e1d23b8f707ae5e3221d1c2fd08878ae8bfff9

8 years agoMerge "UserrightsPage::makeGroupNameListForLog() was removed"
jenkins-bot [Fri, 1 Apr 2016 11:47:19 +0000 (11:47 +0000)]
Merge "UserrightsPage::makeGroupNameListForLog() was removed"

8 years agoAdd phpdoc and @since to SpecialUserrights::makeGroupNameList
addshore [Fri, 1 Apr 2016 11:28:42 +0000 (14:28 +0300)]
Add phpdoc and @since to SpecialUserrights::makeGroupNameList

Change-Id: I015a851d9fa9649ec79386071fcab2c4589f88ad

8 years agoUserrightsPage::makeGroupNameListForLog() was removed
Siebrand Mazeland [Tue, 8 Mar 2016 23:53:03 +0000 (00:53 +0100)]
UserrightsPage::makeGroupNameListForLog() was removed

Deprecated since 1.21. Use in Gerrit extensions was replaced.

Bug: T122754
Depends-on: If9a2764c5c15be9c07d066a52543c4c9d97e0f35
Change-Id: If45eafca7ea332475eb864f04665d0a0bf1603d1

8 years agoMerge "UploadBase: Remove debug logging for T64241"
jenkins-bot [Fri, 1 Apr 2016 09:39:34 +0000 (09:39 +0000)]
Merge "UploadBase: Remove debug logging for T64241"

8 years agoMerge "UploadBase: Replace 'emptyfile' warning code by 'empty-file'"
jenkins-bot [Fri, 1 Apr 2016 08:59:25 +0000 (08:59 +0000)]
Merge "UploadBase: Replace 'emptyfile' warning code by 'empty-file'"

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Thu, 31 Mar 2016 19:54:54 +0000 (21:54 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I5b6a5a944e62e3bb64fd1fdbb3fb654bd0726285

8 years agoMerge "Don't emit 404 status code on Special:Redirect"
jenkins-bot [Thu, 31 Mar 2016 16:26:10 +0000 (16:26 +0000)]
Merge "Don't emit 404 status code on Special:Redirect"

8 years agoUploadBase: Replace 'emptyfile' warning code by 'empty-file'
Bartosz Dziewoński [Thu, 24 Mar 2016 08:42:10 +0000 (09:42 +0100)]
UploadBase: Replace 'emptyfile' warning code by 'empty-file'

'empty-file' is already used elsewhere.

Bug: T130484
Change-Id: I593a9efeb20e301b289b47ff5cb831f334250a2d

8 years agoMerge "Add 'Greek extended' group to special characters"
jenkins-bot [Thu, 31 Mar 2016 13:29:46 +0000 (13:29 +0000)]
Merge "Add 'Greek extended' group to special characters"

8 years agoMerge "Preferences: Add autocomplete="off" to preferences form"
jenkins-bot [Thu, 31 Mar 2016 11:03:27 +0000 (11:03 +0000)]
Merge "Preferences: Add autocomplete="off" to preferences form"

8 years agoDon't emit 404 status code on Special:Redirect
Florian [Thu, 31 Mar 2016 10:57:50 +0000 (12:57 +0200)]
Don't emit 404 status code on Special:Redirect

If the special page is opened without any value or redirect type,
it shouldn't emit a 404 status code, as the page exists and it should
be indexable.

With this change, Special:Redirect only emits a 404 status code, when
the value was not find for the redirect type.

Bug: T131328
Change-Id: I578b15058aed77b5f4fb296db862a6e534c0888e

8 years agoTime POST requests to API write modules
Aaron Schulz [Fri, 25 Mar 2016 19:13:34 +0000 (12:13 -0700)]
Time POST requests to API write modules

This lets us capture some basic endpoint timing data that is
lacking now, such as upload API call time.

Change-Id: If0627e2d78d82b22ed6bdaaa0fa7fe5f20ef50b1

8 years agoMerge "refreshImageMetadata: Allow filtering by 'img_media_type' too"
jenkins-bot [Thu, 31 Mar 2016 09:57:44 +0000 (09:57 +0000)]
Merge "refreshImageMetadata: Allow filtering by 'img_media_type' too"

8 years agoMerge "Update grunt-banana-checker to 0.5.0"
jenkins-bot [Thu, 31 Mar 2016 06:05:28 +0000 (06:05 +0000)]
Merge "Update grunt-banana-checker to 0.5.0"

8 years agoMerge "filerepo: Mark some internal LocalFile methods private"
jenkins-bot [Thu, 31 Mar 2016 01:00:24 +0000 (01:00 +0000)]
Merge "filerepo: Mark some internal LocalFile methods private"

8 years agoMerge "Whitespace cleanups"
jenkins-bot [Thu, 31 Mar 2016 00:52:39 +0000 (00:52 +0000)]
Merge "Whitespace cleanups"

8 years agofilerepo: Mark some internal LocalFile methods private
Aaron Schulz [Thu, 24 Mar 2016 19:09:24 +0000 (12:09 -0700)]
filerepo: Mark some internal LocalFile methods private

Change-Id: I1c9ab1e1460b5c66e8a1dbdb387f80004eaba994

8 years agoMerge "Allow templates in ResourceModules to be array in extension registration"
jenkins-bot [Wed, 30 Mar 2016 22:21:27 +0000 (22:21 +0000)]
Merge "Allow templates in ResourceModules to be array in extension registration"

8 years agoSwap the rest of array() -> []
Reedy [Sat, 19 Mar 2016 01:05:19 +0000 (01:05 +0000)]
Swap the rest of array() -> []

Change-Id: I76a7259ed952a0673a1941f08b39b545211fba07

8 years agoUpdate grunt-banana-checker to 0.5.0
Paladox [Wed, 30 Mar 2016 21:32:16 +0000 (22:32 +0100)]
Update grunt-banana-checker to 0.5.0

This fixes a json crash according to release notes at
https://github.com/wikimedia/grunt-banana-checker/releases/tag/v0.5.0

Change-Id: I7cb37b3f1289b8b91bd98d770ebe58e4c3c6aae5

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Wed, 30 Mar 2016 20:01:05 +0000 (22:01 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I4768f539d408562cd0b37e083a0500a99c7c66a2

8 years agoMerge "mediawiki.requestIdleCallback: Remove unused jQuery parameter"
jenkins-bot [Wed, 30 Mar 2016 14:48:03 +0000 (14:48 +0000)]
Merge "mediawiki.requestIdleCallback: Remove unused jQuery parameter"

8 years agoMerge "Fix accidential variable overriding in manualWordsTable"
jenkins-bot [Wed, 30 Mar 2016 07:55:18 +0000 (07:55 +0000)]
Merge "Fix accidential variable overriding in manualWordsTable"

8 years agoMerge "ApiSandbox: Work around mw.Api treating an empty response as failure"
jenkins-bot [Tue, 29 Mar 2016 22:40:20 +0000 (22:40 +0000)]
Merge "ApiSandbox: Work around mw.Api treating an empty response as failure"

8 years agoMerge "Avoid double-rendering on late exceptions"
jenkins-bot [Tue, 29 Mar 2016 22:31:00 +0000 (22:31 +0000)]
Merge "Avoid double-rendering on late exceptions"

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Tue, 29 Mar 2016 20:08:24 +0000 (22:08 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I807d9f22094274e39b0d9e524bd58bc9f46e5234

8 years agorefreshImageMetadata: Allow filtering by 'img_media_type' too
Bartosz Dziewoński [Tue, 29 Mar 2016 16:09:05 +0000 (18:09 +0200)]
refreshImageMetadata: Allow filtering by 'img_media_type' too

Unlike 'img_major_mime' and 'img_minor_mime', this shouldn't be
"inefficient", since there's an index on it.

Bug: T131157
Change-Id: I4985cade41c23ef68f5caf276d4934cf24de2bb6

8 years agoApiSandbox: Work around mw.Api treating an empty response as failure
Brad Jorsch [Tue, 29 Mar 2016 14:09:14 +0000 (10:09 -0400)]
ApiSandbox: Work around mw.Api treating an empty response as failure

We use a 'then' function to turn the pseudo-failure back into a success.

This also adjusts mw.Api to pass the actual result and jqXHR to the
failure function for non-HTTP errors. Sadly the existing parameters
passed on failure are something of a big mess, so this isn't as nice as
it might otherwise be to preserve compatibility.

Bug: T131129
Change-Id: Ic5da24edeac6285fbce0785f0789dddcd2dc15a9

8 years agoFix @param and @return types on all PPFrame::getArgument methods
Thiemo Mättig [Mon, 7 Mar 2016 11:02:43 +0000 (12:02 +0100)]
Fix @param and @return types on all PPFrame::getArgument methods

This is about template parameters. They can be indexed by position (int) or
name (string). The returned value is always a string, or false (bool) on
failure.

Change-Id: I565210ad485505281246ef2bb3086a675b905976

8 years agoPreferences: Add autocomplete="off" to preferences form
Fomafix [Tue, 29 Mar 2016 04:49:20 +0000 (04:49 +0000)]
Preferences: Add autocomplete="off" to preferences form

This change adds a new method setAutocomplete to the class HTMLForm.
This method allows to set the HTML attribute autocomplete for the form.
This change uses this method to set autocomplete="off" for the preferences form.

Without autocomplete="off" the selections in the preferences get cached in
the browser. This can lead to wrong selected options when the settings get
changed on an other way, for example via API.

Bug: T131047
Change-Id: I2920383b5b8cfca3f1d546315f202985edf417d8

8 years agoUploadBase: Remove debug logging for T64241
Bartosz Dziewoński [Mon, 28 Mar 2016 21:19:12 +0000 (23:19 +0200)]
UploadBase: Remove debug logging for T64241

Added in 0fb104497c79b58d48a9414096f4acd654df550c, no longer needed
after the bug was resolved.

Change-Id: I2771a4057f8109701f2da830d8a17c23d03f2fa2

8 years agoMerge "Localisation updates from https://translatewiki.net."
Translation updater bot [Mon, 28 Mar 2016 19:54:20 +0000 (19:54 +0000)]
Merge "Localisation updates from https://translatewiki.net."

8 years agoMerge "Use ::class in place of string constants"
jenkins-bot [Mon, 28 Mar 2016 19:52:56 +0000 (19:52 +0000)]
Merge "Use ::class in place of string constants"

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 28 Mar 2016 19:51:27 +0000 (21:51 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I2b5d9392619b4eec5a266f9828ee4a1f09579488

8 years agoUse ::class in place of string constants
Brad Jorsch [Mon, 28 Mar 2016 18:53:04 +0000 (14:53 -0400)]
Use ::class in place of string constants

This takes advantage of namespacing, and avoids having
double-backslashes all over the place.

Change-Id: I450fe4e9b1c4cf4e24fced3932fe796cbbadf3a3

8 years agoApiMain: Correct typo in variable name
Bartosz Dziewoński [Sat, 26 Mar 2016 14:34:13 +0000 (15:34 +0100)]
ApiMain: Correct typo in variable name

https://en.wikipedia.org/wiki/Asterisk

Change-Id: I6f2d968c92f4e472fe574ebc8a2a5f9932e0d6f2

8 years agoAllow templates in ResourceModules to be array in extension registration
Paladox [Mon, 28 Mar 2016 09:57:31 +0000 (10:57 +0100)]
Allow templates in ResourceModules to be array in extension registration

Flow doesent do this for example

"example.template": "example.handlebars"

it does

"example.handlebars" so lets make it allow arrays.

Caught from
https://integration.wikimedia.org/ci/job/mwext-Flow-testextension-php55/267/console

Change-Id: Ie8a45a00168349a9ee303e272ba82cb2fd225744

8 years agoMerge "Explicitly mark SkinTemplate properties as public"
jenkins-bot [Mon, 28 Mar 2016 02:36:42 +0000 (02:36 +0000)]
Merge "Explicitly mark SkinTemplate properties as public"

8 years agoMerge "API: Normalize input URL in ApiQueryExtLinksUsage"
jenkins-bot [Mon, 28 Mar 2016 02:27:29 +0000 (02:27 +0000)]
Merge "API: Normalize input URL in ApiQueryExtLinksUsage"

8 years agoMerge "Split Pager classes out of SpecialPage files"
jenkins-bot [Mon, 28 Mar 2016 02:27:13 +0000 (02:27 +0000)]
Merge "Split Pager classes out of SpecialPage files"

8 years agoMerge "Split LocalisationCache.php classes into own files"
jenkins-bot [Mon, 28 Mar 2016 02:27:09 +0000 (02:27 +0000)]
Merge "Split LocalisationCache.php classes into own files"

8 years agoMerge "wgUseMediaWikiUIEverywhere false in Html/XmlTest"
jenkins-bot [Mon, 28 Mar 2016 02:23:01 +0000 (02:23 +0000)]
Merge "wgUseMediaWikiUIEverywhere false in Html/XmlTest"

8 years agoMerge "Factor SpecilaPageExecutor out of SpecialPageTestBase"
jenkins-bot [Mon, 28 Mar 2016 02:22:44 +0000 (02:22 +0000)]
Merge "Factor SpecilaPageExecutor out of SpecialPageTestBase"

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sun, 27 Mar 2016 18:29:34 +0000 (20:29 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I977112d0c7c10d043c8f71ace015cf0d97e373f3

8 years agoMerge "Unblock form handling: Check for 'Tags' index in $data from UI before trying...
jenkins-bot [Sun, 27 Mar 2016 16:07:22 +0000 (16:07 +0000)]
Merge "Unblock form handling: Check for 'Tags' index in $data from UI before trying to access it"

8 years agomediawiki.requestIdleCallback: Remove unused jQuery parameter
Timo Tijhof [Sat, 26 Mar 2016 23:04:13 +0000 (23:04 +0000)]
mediawiki.requestIdleCallback: Remove unused jQuery parameter

Follows-up 55fc2a9.

Change-Id: Ie4cd56a23373145b45699fb58bb90251ed3ef36c

8 years agoMerge "jquery.ui.datepicker: Support sr-ec as user interface language"
jenkins-bot [Sat, 26 Mar 2016 22:20:53 +0000 (22:20 +0000)]
Merge "jquery.ui.datepicker: Support sr-ec as user interface language"

8 years agoAPI: Normalize input URL in ApiQueryExtLinksUsage
Brad Jorsch [Sat, 26 Mar 2016 22:14:43 +0000 (18:14 -0400)]
API: Normalize input URL in ApiQueryExtLinksUsage

This matches the behavior of Special:LinkSearch, and makes it more
likely to give sensible results for non-normalized input.

Bug: T130912
Change-Id: I2f60dd48fdfc24108110a24ad41b297ece7f33df

8 years agoLower pcTTL in checkRedirect() to 30
Aaron Schulz [Fri, 25 Mar 2016 19:35:42 +0000 (12:35 -0700)]
Lower pcTTL in checkRedirect() to 30

The process cache does not see other purges, so lower this
for sanity in case of long-running scripts.

Change-Id: I545ce6b160bb10ffe1877284a397a247c960d885

8 years agoClear process cache in parser tests
Ori Livneh [Fri, 25 Mar 2016 20:57:28 +0000 (13:57 -0700)]
Clear process cache in parser tests

Have the parser test set-up code call WANObjectCache::clearProcessCache().
d1c4eafef5 added this to the PHPUnit test set-up code, but not the parser
tests'.

Change-Id: I870c8bae0336afc499224e4c937c6b8d6ab4d457

8 years agoMerge "Use distinct log actions for patrol"
jenkins-bot [Fri, 25 Mar 2016 22:15:34 +0000 (22:15 +0000)]
Merge "Use distinct log actions for patrol"

8 years agoMerge "Enable filtering by action on Special:Log"
jenkins-bot [Fri, 25 Mar 2016 22:08:42 +0000 (22:08 +0000)]
Merge "Enable filtering by action on Special:Log"

8 years agoUse distinct log actions for patrol
cenarium [Sat, 14 Nov 2015 05:32:33 +0000 (06:32 +0100)]
Use distinct log actions for patrol

A distinct log action is provided for automatic patrols.
The old 'auto' param is preserved so that old log entries can still
be correctly identified in logs and API queries.
With I6a61175f9a111c03d15b4d41751c818e3a411ff6, this enables us to
filter new manual patrol entries in logs.
Old automatic entries will be in the wrong list, but still marked
as automatic.

Bug: T27799
Change-Id: I05d962fa3ec45039122bb7e370b7e3fb8bbaa3c8

8 years agomoment: Correct support language codes sr-el and sr
Fomafix [Fri, 25 Mar 2016 21:45:42 +0000 (21:45 +0000)]
moment: Correct support language codes sr-el and sr

MediaWiki currently uses the language code sr-el for Serbian written
using the Latin script. The language code sr has as fallback sr-ec and
used for Serbian written using the Cyrillic script.

Change-Id: I450ac589cfbe9e1e37c67c4f7f2472c7563c0fc1

8 years agoMerge "Request-local caching of image_redirect"
jenkins-bot [Fri, 25 Mar 2016 19:33:24 +0000 (19:33 +0000)]
Merge "Request-local caching of image_redirect"

8 years agoMerge "Use Diffusion for default Git Viewer"
jenkins-bot [Fri, 25 Mar 2016 19:20:13 +0000 (19:20 +0000)]
Merge "Use Diffusion for default Git Viewer"

8 years agoRequest-local caching of image_redirect
Ori Livneh [Thu, 24 Mar 2016 22:50:44 +0000 (15:50 -0700)]
Request-local caching of image_redirect

LocalRepo::checkRedirect() cache image redirect checks in memory to avoid
unnecessary trips to memcached. Same idea as Idbd11637.

Change-Id: Idaa12376382aaa0bd8cb988240ec1da0b688359d

8 years agojquery.ui.datepicker: Support sr-ec as user interface language
Fomafix [Fri, 25 Mar 2016 17:56:26 +0000 (17:56 +0000)]
jquery.ui.datepicker: Support sr-ec as user interface language

MediaWiki currently uses the language code sr-ec for Serbian written using the Cyrillic script.
The language code sr has as fallback sr-ec.
This change allows to use both sr and sr-ec as user interface language.

Change-Id: Iaf6d4db1e986baedb38f53d86a5990dca0cacfb7

8 years agoWhitespace cleanups
Aaron Schulz [Fri, 25 Mar 2016 17:37:57 +0000 (10:37 -0700)]
Whitespace cleanups

Change-Id: I43646a60b8a5b6d5b7813b013fd0f1719d00484c

8 years agoUnblock form handling: Check for 'Tags' index in $data from UI before trying to access it
Alex Monk [Fri, 25 Mar 2016 04:05:39 +0000 (04:05 +0000)]
Unblock form handling: Check for 'Tags' index in $data from UI before trying to access it

Was showing this notice:
Undefined index: Tags in /path/to/mw/includes/specials/SpecialUnblock.php on line 241

The API sets this but the UI does not

Change-Id: Ibf31c2b9be4d4b621d1745fd87550a383c389f12

8 years agoMerge "mw.widgets.TitleWidget: Use the Promise for the data as well"
jenkins-bot [Fri, 25 Mar 2016 16:50:12 +0000 (16:50 +0000)]
Merge "mw.widgets.TitleWidget: Use the Promise for the data as well"

8 years agoMerge "Fix-up for Iaf90c20c33: add missing slash"
Ori Livneh [Fri, 25 Mar 2016 16:41:00 +0000 (16:41 +0000)]
Merge "Fix-up for Iaf90c20c33: add missing slash"

8 years agoFix-up for Iaf90c20c33: add missing slash
Ori Livneh [Fri, 25 Mar 2016 16:38:16 +0000 (09:38 -0700)]
Fix-up for Iaf90c20c33: add missing slash

Change-Id: I92169a3b74123db8ceaca222db760095a7c06d4f

8 years agoMerge "Datepicker: Use language code sr-el for Serbian with Latin script"
jenkins-bot [Fri, 25 Mar 2016 16:29:33 +0000 (16:29 +0000)]
Merge "Datepicker: Use language code sr-el for Serbian with Latin script"

8 years agoMerge "Provide a unique request identifier"
jenkins-bot [Fri, 25 Mar 2016 16:24:04 +0000 (16:24 +0000)]
Merge "Provide a unique request identifier"

8 years agoMerge "Add missing 'public' keywords to some Language methods"
jenkins-bot [Fri, 25 Mar 2016 16:14:35 +0000 (16:14 +0000)]
Merge "Add missing 'public' keywords to some Language methods"

8 years agoProvide a unique request identifier
Ori Livneh [Fri, 25 Mar 2016 01:43:23 +0000 (18:43 -0700)]
Provide a unique request identifier

When MediaWiki encounters an unhandled exception, the error message it produces
includes a randomly-generated token, which allows the exception details to be
looked up in the error logs. This is useful but narrow: would it not be useful
to have the ability to retrieve all log records associated with a particular
request, rather than just exception details? (Hint: yes.)

So: introduce the notion of a request-global unique ID, retrievable via
WebRequest::getRequestId(). When MediaWiki is behind Apache + mod_unique_id
(which provides the same facility) or some other software which sets a
UNIQUE_ID envvar, the value of that envvar is used as the request ID.
Otherwise, it is a randomly-generated 24-character string.

The request ID supplants exception-specific IDs; MWExceptionHandler::getLogId()
is deprecated, accordingly. The request ID is also added as an annotation to
all Monolog-processed log records, and is exposed client-side as 'wgRequestId'.
This allows developers to associate a page view with log records even when the
page view does not result in an unhandled exception. (For the WMF, I also
intend to add it as an annotation to profiling data).

The request ID is not a tracking token; it does not persist, and it is
associated with a backend request, not with a particular user or a particular
session. Like the data in the NewPP report, the request ID is designed to be
cacheable, so that if, for example, a developer notices something weird in the
HTML, s/he can associate the output with a backend request regardless of
whether the response was served from the cache or directly from the backend.

Some prior art:
* https://httpd.apache.org/docs/2.4/mod/mod_unique_id.html
* http://api.rubyonrails.org/classes/ActionDispatch/RequestId.html
* https://github.com/dabapps/django-log-request-id
* https://packagist.org/packages/php-middleware/request-id
* https://github.com/rhyselsmore/flask-request-id

Change-Id: Iaf90c20c330e0470b9b98627a0228cadefd301d1

8 years agoMerge "Http::getProxy() method to get proxy configuration"
jenkins-bot [Fri, 25 Mar 2016 15:38:18 +0000 (15:38 +0000)]
Merge "Http::getProxy() method to get proxy configuration"

8 years agoHttp::getProxy() method to get proxy configuration
Sébastien Santoro [Fri, 25 Mar 2016 15:10:19 +0000 (15:10 +0000)]
Http::getProxy() method to get proxy configuration

MediaWiki currently uses two sources for proxy configuration:
* the $wgHTTPProxy global configuration variable
* the http_proxy environment variable

The HTTP proxy adress to use is a valuable information for
extensions handling directly HTTP requests instead of use
helper classes provided by the core to construct them.

This change offers an Http::getProxy() utility method to get
the configuration, regardless of the source.

Bug: T117954
Change-Id: I5df31845df71f05ac581f532cc9bd7a1fea25583