lhc/web/wiklou.git
7 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Fri, 16 Dec 2016 20:59:51 +0000 (21:59 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I586676d3574c23e6746b7673664734ae66eb7984

7 years agoRemove deprecated function User::isPasswordReminderThrottled()
Max Semenik [Fri, 16 Dec 2016 00:23:10 +0000 (16:23 -0800)]
Remove deprecated function User::isPasswordReminderThrottled()

Deprecated and stubbed in 1.27, only throws exceptions these days.
The only user in core or extensions is AjaxLogin which is completely
broken anyway (T153385).

Change-Id: I298fbc3e65d98b3af2f3cfef3d9884e277e6717c

7 years agoRemove 2 deprecated functions from class User
Max Semenik [Fri, 16 Dec 2016 00:10:03 +0000 (16:10 -0800)]
Remove 2 deprecated functions from class User

They've been deprecated in 1.27 and only throw exceptions
no callers in core or extensions.

Change-Id: I1ccfa39c287b640b435a075449e4674daf8d24e7

7 years agoMerge "WatchedItemStore::setNotificationTimestampsForUser(): Allow clearing timestamp"
jenkins-bot [Fri, 16 Dec 2016 20:41:34 +0000 (20:41 +0000)]
Merge "WatchedItemStore::setNotificationTimestampsForUser(): Allow clearing timestamp"

7 years agoMerge "Minor adjustments to align with WikimediaUI color palette"
jenkins-bot [Fri, 16 Dec 2016 20:11:17 +0000 (20:11 +0000)]
Merge "Minor adjustments to align with WikimediaUI color palette"

7 years agoChange linking Special:PageLanguage on action=info
Umherirrender [Fri, 16 Dec 2016 19:57:06 +0000 (20:57 +0100)]
Change linking Special:PageLanguage on action=info

Change from linking of description to extra link behind the data. Also
reorder the code and language name to match the order on
Special:PageLanguage

Change-Id: I859df5d04c5d937fba55c309034a0350574b5af7

7 years agoregistration: Always specify version number in extension.schema.json file
Kunal Mehta [Fri, 16 Dec 2016 19:32:26 +0000 (11:32 -0800)]
registration: Always specify version number in extension.schema.json file

Instead of having the current version of the schema live at
extension.schema.json, always include a version number in it. This
simplifies both the code, and makes merging, cherry-picks, rebasing,
etc. easier when the current schema version changes.

Change-Id: I1b5ef4ced1eb34b8bdda7ba9b3f086b1997b704c

7 years agoWatchedItemStore::setNotificationTimestampsForUser(): Allow clearing timestamp
Brad Jorsch [Fri, 16 Dec 2016 19:31:24 +0000 (14:31 -0500)]
WatchedItemStore::setNotificationTimestampsForUser(): Allow clearing timestamp

ApiSetNotificationTimestamp expects to be able to clear the timestamp by
passing null. Allow that to work as expected.

Bug: T153482
Change-Id: Ibf4ba56f0abd3b72283f7a33e4665d5999a70b82

7 years agoFixing mediawiki's য় problem
Aftab [Wed, 14 Dec 2016 14:20:53 +0000 (14:20 +0000)]
Fixing mediawiki's য় problem

Bengali $magicWords translations with য় (U+09DF) does not working because the character য় (U+09DF) was interpreted by MediaWiki as য (U+09AF) and nukta (U+09BC).

See also: https://gerrit.wikimedia.org/r/#/c/326433/

Bug: T153132
Change-Id: I6ef18acd7c1eb0ce87e81163ef0130620d48d200

7 years agoMerge "TitleWidget: Cache siteinfo API response"
jenkins-bot [Fri, 16 Dec 2016 18:51:54 +0000 (18:51 +0000)]
Merge "TitleWidget: Cache siteinfo API response"

7 years agoTitleWidget: Cache siteinfo API response
Kunal Mehta [Fri, 16 Dec 2016 17:46:38 +0000 (09:46 -0800)]
TitleWidget: Cache siteinfo API response

This information rarely changes, so cache it for a day client-side.

Bug: T153388
Change-Id: I375a17737855eaa661c85e0dde2b7e58b67bc710

7 years agoAdd the concept of "system blocks"
Brad Jorsch [Thu, 1 Dec 2016 16:51:03 +0000 (11:51 -0500)]
Add the concept of "system blocks"

Blocks made for configured proxies, dnsbls, or the configured range
soft-blocks being added in I6c11a6b9 aren't real blocks stored in the
database. Let's actually flag these blocks as such and use a more
appropriate message when displaying them to the user.

Change-Id: I697e3eec2520792e98c193200c2b1c28c35bf382

7 years agoMerge "Decrease the number of 'function says it should return something' errors"
jenkins-bot [Fri, 16 Dec 2016 17:20:16 +0000 (17:20 +0000)]
Merge "Decrease the number of 'function says it should return something' errors"

7 years agoMerge "Fix type annotations"
jenkins-bot [Fri, 16 Dec 2016 17:18:00 +0000 (17:18 +0000)]
Merge "Fix type annotations"

7 years agoMerge "More properly fix error message"
jenkins-bot [Fri, 16 Dec 2016 17:15:12 +0000 (17:15 +0000)]
Merge "More properly fix error message"

7 years agoMore properly fix error message
Brad Jorsch [Fri, 16 Dec 2016 14:34:43 +0000 (09:34 -0500)]
More properly fix error message

I2b686228 was a quick bandaid, but resulted in the error message not
actually reporting the incorrect list type.

Change-Id: I2b2bd6ee66a78fadb31b3524dfe04bf9e1f45535

7 years agoMake the code for grammar data processing common
Amir E. Aharoni [Mon, 28 Sep 2015 10:26:08 +0000 (13:26 +0300)]
Make the code for grammar data processing common

This makes the code for processing JSON files with
grammar transformations reusable by different languages
and applies the same logic to Russian and Hebrew.
It will be done to other languages in further patches.

This patch is not supposed to change any functionality,
and the tests are intact (except a comment in the test
for Hebrew - the class doesn't exist any longer).

PHP:
* Move the JSON grammar transformation data processing logic
  from LanguageRu.php to convertGrammar() in Language.php.
  By default all these data files are supposed to be
  processed identically, so the code should be common.
  If there is no JSON data file, nothing new happens.
* LanguageRu's own convertGrammar() method is removed.
* The LanguageHe class is removed, now that all its functionality
  is handled by generic JSON data processing in the Language class.
  LanguageHe.php file is removed from the repo and from autoloading.

JavaScript:
* Move the JSON grammar transformation data processing logic
  from ru.js to mediawiki.language.js.
* JavaScript grammar code files he.js and ru.js are removed
  from the repo and from Resources.php, because all the data
  is in JSON, and the default logic in mediawiki.language.js
  works for both languages.

Bug: T115217
Change-Id: I5e75467121c3d791bb84f9e6fdfcf07c1840f81a

7 years agoDon't show dialog to confirm whether to reset watchlist
Geoffrey Mon [Fri, 16 Dec 2016 01:35:12 +0000 (20:35 -0500)]
Don't show dialog to confirm whether to reset watchlist

People don't seem to like having a dialog to ask for confirmation to set all
pages to visited in the watchlist, and the PHP server-side reset
functionality doesn't ask for a confirmation anyways.

Bug: T153438
Change-Id: I92aa3c0670925efc691d8bdba2c1c503e17ddb8c

7 years agoMerge "Cleanup some incorrect return annotations"
jenkins-bot [Fri, 16 Dec 2016 07:22:24 +0000 (07:22 +0000)]
Merge "Cleanup some incorrect return annotations"

7 years agoMerge "Add <!DOCTYPE html> to HTML responses"
jenkins-bot [Fri, 16 Dec 2016 07:16:45 +0000 (07:16 +0000)]
Merge "Add <!DOCTYPE html> to HTML responses"

7 years agoMerge "mediawiki.special.watchlist: Optimize JavaScript code"
jenkins-bot [Fri, 16 Dec 2016 07:16:38 +0000 (07:16 +0000)]
Merge "mediawiki.special.watchlist: Optimize JavaScript code"

7 years agoMerge "Add ILocalizedException interface"
jenkins-bot [Fri, 16 Dec 2016 07:15:18 +0000 (07:15 +0000)]
Merge "Add ILocalizedException interface"

7 years agoMerge "IcuCollation: Add the current class name to 'first-letters' cache key"
jenkins-bot [Fri, 16 Dec 2016 07:15:15 +0000 (07:15 +0000)]
Merge "IcuCollation: Add the current class name to 'first-letters' cache key"

7 years agoMerge "Remove un-necessary stdClass use"
jenkins-bot [Fri, 16 Dec 2016 04:14:43 +0000 (04:14 +0000)]
Merge "Remove un-necessary stdClass use"

7 years agoRemove un-necessary stdClass use
Mark A. Hershberger [Fri, 16 Dec 2016 03:36:39 +0000 (22:36 -0500)]
Remove un-necessary stdClass use

And it causes the following warning when you visit the list of special pages:

 The use statement with non-compound name 'stdClass' has no effect

Change-Id: I3698dab32a572e8c39788ddfc0ae2b3312a2e94e

7 years agoFix various minor IDEA warnings in LoadBalancer
Aaron Schulz [Fri, 16 Dec 2016 03:32:26 +0000 (19:32 -0800)]
Fix various minor IDEA warnings in LoadBalancer

Change-Id: Ic65a04ca1b988fe36e088709d7dc4e981670cb62

7 years agoMerge "Add LoadBalancer::getMaintenanceConnectionRef() method"
jenkins-bot [Fri, 16 Dec 2016 03:22:45 +0000 (03:22 +0000)]
Merge "Add LoadBalancer::getMaintenanceConnectionRef() method"

7 years agoAdd NS_TEMPLATE to wgNamespacesWithSubpages in DefaultSettings.php
tjlsangria [Sun, 2 Oct 2016 19:26:42 +0000 (15:26 -0400)]
Add NS_TEMPLATE to wgNamespacesWithSubpages in DefaultSettings.php

Bug: T147160
Change-Id: I504de3332bbc4b39d8d69fa324949988d56d0b67

7 years agoMerge "resourceloader: Include backtrace in formatted errors (if enabled)"
jenkins-bot [Fri, 16 Dec 2016 02:57:57 +0000 (02:57 +0000)]
Merge "resourceloader: Include backtrace in formatted errors (if enabled)"

7 years agoMerge "resourceloader: Don't let module exception break startup"
jenkins-bot [Fri, 16 Dec 2016 02:57:08 +0000 (02:57 +0000)]
Merge "resourceloader: Don't let module exception break startup"

7 years agoresourceloader: Include backtrace in formatted errors (if enabled)
Timo Tijhof [Sat, 3 Dec 2016 03:57:42 +0000 (19:57 -0800)]
resourceloader: Include backtrace in formatted errors (if enabled)

Make ResourceLoader error formatting the same as everywhere else.
Which means if wgShowExceptionDetails is enabled locally, the
trace will be included as well.

This matches logic in MWExceptionRenderer.

Also move the typical error handling used by respond() to a
utility method to reduce duplication of code and avoid mistakes.

Change-Id: If04ae99618e4a758ed0f9dd2b555496b76da29de

7 years agoMerge "registration: Improve dependency checking"
jenkins-bot [Fri, 16 Dec 2016 01:01:39 +0000 (01:01 +0000)]
Merge "registration: Improve dependency checking"

7 years agoMerge "registration: Allow specifying extension dependencies"
jenkins-bot [Fri, 16 Dec 2016 01:00:04 +0000 (01:00 +0000)]
Merge "registration: Allow specifying extension dependencies"

7 years agoMerge "registration: Generalize CoreVersionChecker to VersionChecker"
jenkins-bot [Fri, 16 Dec 2016 00:58:37 +0000 (00:58 +0000)]
Merge "registration: Generalize CoreVersionChecker to VersionChecker"

7 years agoMerge "Fix PhanTypeInvalidLeftOperand in Language.php"
jenkins-bot [Fri, 16 Dec 2016 00:41:58 +0000 (00:41 +0000)]
Merge "Fix PhanTypeInvalidLeftOperand in Language.php"

7 years agoMerge "Fix undefined $param"
jenkins-bot [Fri, 16 Dec 2016 00:20:45 +0000 (00:20 +0000)]
Merge "Fix undefined $param"

7 years agoDecrease the number of 'function says it should return something' errors
Max Semenik [Thu, 15 Dec 2016 23:19:57 +0000 (15:19 -0800)]
Decrease the number of 'function says it should return something' errors

Change-Id: Ib5115fe5bbaa67d8a6e54cc3ba1ba7020e239e11

7 years agoProtect language converter markup in the preprocessor.
C. Scott Ananian [Tue, 20 Sep 2016 22:26:32 +0000 (18:26 -0400)]
Protect language converter markup in the preprocessor.

This ensures that `{{echo|-{R|foo}-}}` is parsed correctly as
a template invocation with a single argument, not as two separate
arguments split by the `|`.

Bug: T146304
Change-Id: I709d007c70a3fd19264790055042c615999b2f67

7 years agoresourceloader: Don't let module exception break startup
Timo Tijhof [Sat, 3 Dec 2016 00:48:14 +0000 (16:48 -0800)]
resourceloader: Don't let module exception break startup

When getScript (or some other method used in a module response)
throws an error, only that module fails (by outputting mw.loader.state
instead of mw.loader.implement). Other modules will work.

This has always been the case and is working fine. For example,
"load.php?modules=foo|bar", where 'foo' throws, will return:

```js
/* exception message: .. */
mw.loader.implement('bar', ..)
mw.loader.state('foo', 'error')
```

The problem, however, is that during the generation of the startup
module, we iterate over all other modules. In 2011, the
getVersionHash method (then: getModifiedTime) was fairly simple
and unlikely to throw errors.

Nowadays, some modules use enableModuleContentVersion which will
involve the same code path as for regular module responses.

The try/catch in ResourceLoader::makeModuleResponse() suffices
for the case of loading modules other than startup. But when
loading the startup module, and an exception happens in getVersionHash,
then the entire startup response is replaced with an exception comment.

Example case:
* A file not existing for a FileModule subclass that uses
  enableModuleContentVersion.
* A database error from a data module, like CiteDataModule or
  CNChoiceData.

Changes:
* Ensure E-Tag is still useful while an error happens in production
  because we respond with 200 OK and one error isn't the same as
  another.
  Fixed by try/catch in getCombinedVersion.
* Ensure start manifest isn't disrupted by one broken module.
  Fixed by try/catch in StartupModule::getModuleRegistrations().

Tests:
* testMakeModuleResponseError: The case that already worked fined.
* testMakeModuleResponseStartupError: The case fixed in this commit.
* testGetCombinedVersion: The case fixed in this commit for E-Tag.

Bug: T152266
Change-Id: Ice4ede5ea594bf3fa591134bc9382bd9c24e2f39

7 years agoregistration: Improve dependency checking
Kunal Mehta [Thu, 15 Dec 2016 23:09:26 +0000 (15:09 -0800)]
registration: Improve dependency checking

* Pass $coreVersion to VersionChecker's constructor, don't require a
setter.
* Bump ExtensionRegistry::CACHE_VERSION
* Return single strings from handle* functions, avoid array_merge calls
* Improve invalid version error message
* Fix naming of VersionCheckerTest class

Change-Id: Id4f66b815aa41dbbc4b966095d6b99e542e548b4

7 years agoFix undefined $param
Reedy [Thu, 15 Dec 2016 22:43:07 +0000 (22:43 +0000)]
Fix undefined $param

Change-Id: I2b6862284b80c27f1f6189a261428324295699ae

7 years agoMerge "MessageCache invalidation improvements"
jenkins-bot [Thu, 15 Dec 2016 22:18:30 +0000 (22:18 +0000)]
Merge "MessageCache invalidation improvements"

7 years agoFix type annotations
Max Semenik [Thu, 15 Dec 2016 21:59:32 +0000 (13:59 -0800)]
Fix type annotations

Change-Id: Ib72c98358b2f0b3b73b6f105adea47346373d46d

7 years agoMinor adjustments to align with WikimediaUI color palette
Amir Sarabadani [Sat, 10 Dec 2016 10:31:25 +0000 (14:01 +0330)]
Minor adjustments to align with WikimediaUI color palette

All but one of them affecting border-colors and in one case a :hover
background-color.

 - <hr>
 - catlinks
 - datatable
 - mw-plusminus-null
 - headings h1, h2 and so on

Bug: T152025
Change-Id: I233e42ac399202791dd44e48dc58487be0f9d8ac

7 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Thu, 15 Dec 2016 21:50:06 +0000 (22:50 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: Ia6cd0fab7698eda791b80f21ee7b15a259738bd7

7 years agoFix two instances of calling function with too few args
Erik Bernhardson [Thu, 15 Dec 2016 19:33:43 +0000 (11:33 -0800)]
Fix two instances of calling function with too few args

At one point SearchIndexFieldDefinition was updated to require the
engine to be passed in, but it seems that update was missed here.

BackupDumper::loadPlugin() requires the second argument, set it to
the empty string to keep current behaviour.

Change-Id: Ifbd8fc4870ff63b2d338f8bb4d251d7a3477b989

7 years agomediawiki.special.watchlist: Optimize JavaScript code
Fomafix [Thu, 15 Dec 2016 14:01:49 +0000 (15:01 +0100)]
mediawiki.special.watchlist: Optimize JavaScript code

* Create progress bar not before submit.
* Reenable the disabled reset button after response.
  Currently a reload of the watch list after reset may lead to a disabled
  reset button.
* Reduce indenting by make an early return.
* Add some line breaks for better readability.
* Add some comments.

Follows-up to 9ea1142fad935999ac64e2920321520c1bbbfb61

Change-Id: Ibfafa140172bae55be01383ef7a9899104d46938

7 years agoMerge "Correct DatabaseSqlite::unionQueries annotation"
jenkins-bot [Thu, 15 Dec 2016 19:46:34 +0000 (19:46 +0000)]
Merge "Correct DatabaseSqlite::unionQueries annotation"

7 years agoMerge "Enable supplying inline interwiki results"
jenkins-bot [Thu, 15 Dec 2016 19:22:39 +0000 (19:22 +0000)]
Merge "Enable supplying inline interwiki results"

7 years agoCorrect DatabaseSqlite::unionQueries annotation
Erik Bernhardson [Thu, 15 Dec 2016 19:22:03 +0000 (11:22 -0800)]
Correct DatabaseSqlite::unionQueries annotation

The annotation was claiming string, but it's very obvious from
the usage the it should be string[].

Change-Id: I99849a338971590ca68dfb175b2458ad5ebc0df2

7 years agoIcuCollation: Add the current class name to 'first-letters' cache key
Bartosz Dziewoński [Thu, 15 Dec 2016 14:17:56 +0000 (15:17 +0100)]
IcuCollation: Add the current class name to 'first-letters' cache key

Instances of subclasses of IcuCollation with customizations for
specific languages probably shouldn't share this cache with instances
of IcuCollation with the same language.

Change-Id: I06d66d199c99448a3375381baef0366c4d99c8c4

7 years agoMerge "Set $linktrail for MessagesKu_latn.php"
jenkins-bot [Thu, 15 Dec 2016 13:58:50 +0000 (13:58 +0000)]
Merge "Set $linktrail for MessagesKu_latn.php"

7 years agoMerge "Add CollationFa"
jenkins-bot [Thu, 15 Dec 2016 13:37:56 +0000 (13:37 +0000)]
Merge "Add CollationFa"

7 years agoAdd CollationFa
Amir Sarabadani [Sun, 31 Jul 2016 14:36:49 +0000 (19:06 +0430)]
Add CollationFa

Bug: T139110
Change-Id: Ie15a2ee1c22ff4a1d2b721ed137227fe83dd12ea

7 years agoSet $linktrail for MessagesKu_latn.php
Ghybu [Thu, 15 Dec 2016 01:19:31 +0000 (01:19 +0000)]
Set $linktrail for MessagesKu_latn.php

Bug: T153233
Change-Id: I488129a002a92481412667706dbd2c534aa8d45b

7 years agoMerge "SpecialUserrights: Use session data instead of URL parameter for success"
jenkins-bot [Thu, 15 Dec 2016 10:16:01 +0000 (10:16 +0000)]
Merge "SpecialUserrights: Use session data instead of URL parameter for success"

7 years agoMerge "Fix linking Special:ChangeContentModel from action=info"
jenkins-bot [Thu, 15 Dec 2016 07:46:34 +0000 (07:46 +0000)]
Merge "Fix linking Special:ChangeContentModel from action=info"

7 years agoMerge "SpecialRunJobs: Use wfHttpError to generate error messages"
jenkins-bot [Thu, 15 Dec 2016 06:58:28 +0000 (06:58 +0000)]
Merge "SpecialRunJobs: Use wfHttpError to generate error messages"

7 years agoMerge "Add maintenance/view.php for viewing page contents"
jenkins-bot [Thu, 15 Dec 2016 06:54:13 +0000 (06:54 +0000)]
Merge "Add maintenance/view.php for viewing page contents"

7 years agoSpecialRunJobs: Use wfHttpError to generate error messages
Fomafix [Sat, 24 Sep 2016 18:51:32 +0000 (20:51 +0200)]
SpecialRunJobs: Use wfHttpError to generate error messages

wfHttpError generates HTML so the content fits to the Content-Type.

Bug: T146546
Change-Id: Ia90f22564ecb3807aff3b787242bc74fe1678def

7 years agoRELEASE-NOTES: Fixup for dfb50ab9f3
Timo Tijhof [Thu, 15 Dec 2016 06:16:31 +0000 (22:16 -0800)]
RELEASE-NOTES: Fixup for dfb50ab9f3

Change-Id: Ibe2efcd11c3f97ca343f43168bde278e44537be9

7 years agoMerge "Back off from job types longer for DB read-only errors"
jenkins-bot [Thu, 15 Dec 2016 06:11:22 +0000 (06:11 +0000)]
Merge "Back off from job types longer for DB read-only errors"

7 years agoMerge "Escape return path extra params to php mail()"
jenkins-bot [Thu, 15 Dec 2016 06:05:55 +0000 (06:05 +0000)]
Merge "Escape return path extra params to php mail()"

7 years agoMerge "A full word instead of an acronym for the revid message"
jenkins-bot [Thu, 15 Dec 2016 06:04:50 +0000 (06:04 +0000)]
Merge "A full word instead of an acronym for the revid message"

7 years agoMerge "Always show exceptions of type 'error' in LTR"
jenkins-bot [Thu, 15 Dec 2016 06:02:19 +0000 (06:02 +0000)]
Merge "Always show exceptions of type 'error' in LTR"

7 years agoMake DifferenceEngine's markPatrolledLink and getRevisionHeader public so that hooked...
Jack Phoenix [Fri, 9 Dec 2016 06:59:52 +0000 (08:59 +0200)]
Make DifferenceEngine's markPatrolledLink and getRevisionHeader public so that hooked functions can use them where needed

The said hooks were added to core in
https://gerrit.wikimedia.org/r/#/c/298026/ . One of the many intended use
cases is https://gerrit.wikimedia.org/r/#/c/326074/ which currently fatals
due to these two being protected, and obviously we don't want to lose
functionality when hooking into one (or more) of the aforementioned hooks.

Change-Id: I260c8b57c0bb2af3a6982bd7142b112a4a023391
Depends-On: I02de9069854532faec4c0c1798a10f862e6dfd7c

7 years agoA few more hooks in DifferenceEngine
Jack Phoenix [Thu, 17 Nov 2016 02:14:26 +0000 (04:14 +0200)]
A few more hooks in DifferenceEngine

For mucking with the class member variable mNewContent and optionally
allowing the suppression of the "missing revision" message when revision
data is not found for a requested revision.

Originally implemented as the "GetUserMessagesDiffCurrent" hook (yes,
these three separate hooks in three separate places were essentially the
same) by Wikia for their SiteWideMessages extension.

Change-Id: Ie0c175af2af418d4ed3de28c94df918115312da3

7 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Wed, 14 Dec 2016 20:56:06 +0000 (21:56 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I1b8437a0df98dccdd524ef3a0ff8493a98bf59f1

7 years agoSync up with Parsoid parserTests.
C. Scott Ananian [Wed, 14 Dec 2016 19:55:46 +0000 (14:55 -0500)]
Sync up with Parsoid parserTests.

This now aligns with Parsoid commit 73798df0632e10313b82987d0b99e93c73407ca7

Change-Id: Ia0e511311eb05276617cc7bdff72b07347591ca3

7 years agoMerge "Fix parameter type docs"
jenkins-bot [Wed, 14 Dec 2016 19:41:20 +0000 (19:41 +0000)]
Merge "Fix parameter type docs"

7 years agoMerge "Document type of LogEntry::isPatrollable property"
jenkins-bot [Wed, 14 Dec 2016 19:30:11 +0000 (19:30 +0000)]
Merge "Document type of LogEntry::isPatrollable property"

7 years agoMerge "mediawiki.special.apisandbox: Avoid bitwise tricks when checking for integers"
jenkins-bot [Wed, 14 Dec 2016 18:56:19 +0000 (18:56 +0000)]
Merge "mediawiki.special.apisandbox: Avoid bitwise tricks when checking for integers"

7 years agoregistration: Allow specifying extension dependencies
Florian Schmidt [Sat, 3 Dec 2016 18:19:25 +0000 (19:19 +0100)]
registration: Allow specifying extension dependencies

There are some extensoins that depend upon another extension or skin,
usually in different ways:
* A constant that is added in the dependency extension, and the
existence of is checked for. This is problematic because it requires a
specific load order.
* Checking whether a specific class exists. This is problematic because
it is extremely fragile, and breaks whenever the class is renamed.
* Checking ExtensionRegistry::isLoaded(). This is mostly there, but it
only checks at runtime, and doesn't provide any machine readable data.

Furthermore, developers implement each one differently, with very little
standardization.

With this, extensions may now specify what other extensions they depend
on. This is for explicit *hard* dependencies that must be installed.

For example:
"requires": {
"MediaWiki": ">= 1.25.0",
"extensions": {
"FakeExtension": "*"
},
"skins": {
"FakeSkin": "*"
}
}

This would add a minimum requirement on MediaWiki 1.25.0+ (already
implemented), as well as the requirement that the FakeExtension extension
needs to be installed, as well as the FakeSkin skin. A wildcard (*) is
used instead of an explicit version requirement as many extensions do
not actually version themselves, and there is no consistent versioning
scheme yet.

Bug: T117277
Change-Id: If1cccee1a16a867a71bb0285691c400443d8a30a

7 years agoregistration: Generalize CoreVersionChecker to VersionChecker
Florian Schmidt [Sat, 3 Dec 2016 18:06:46 +0000 (19:06 +0100)]
registration: Generalize CoreVersionChecker to VersionChecker

This allows us to put other requirements more easily into extension
registration, such as skins and/or extensions.

Bug: T117277
Change-Id: I3ec1b28b6af380621585cd61b38e5ebb8be9f9c7

7 years agoMerge "Fix small typos in includes/lib/lockManager/LockManager.php"
jenkins-bot [Wed, 14 Dec 2016 17:41:55 +0000 (17:41 +0000)]
Merge "Fix small typos in includes/lib/lockManager/LockManager.php"

7 years agoMerge "Fix assigning void return value to a variable"
jenkins-bot [Wed, 14 Dec 2016 17:09:25 +0000 (17:09 +0000)]
Merge "Fix assigning void return value to a variable"

7 years agoMerge "API: Expose wfIsBadImage() in prop=imageinfo"
jenkins-bot [Wed, 14 Dec 2016 16:07:53 +0000 (16:07 +0000)]
Merge "API: Expose wfIsBadImage() in prop=imageinfo"

7 years agoFix parameter type docs
Leszek Manicki [Wed, 14 Dec 2016 16:01:47 +0000 (17:01 +0100)]
Fix parameter type docs

Changes:
 - uses int instead of number as param and return value type,
 - uses stdClass instead of stdObject
 - fixes ResourceLoaderClientHtml constructor's $target param type:
   it is string|null, not an array (previously misspelled as "aray")
 - changes the type of references to XML parser in XMP lib to resource
   instead of not existing XMLParser

Change-Id: I98c363ebc6658d1f4dcabad97a9a92f3fcd7ea8c

7 years agoDocument type of LogEntry::isPatrollable property
Leszek Manicki [Wed, 14 Dec 2016 15:09:34 +0000 (16:09 +0100)]
Document type of LogEntry::isPatrollable property

Change-Id: I557b92f25f15f57123af329c79ef1752025aedf3

7 years agomediawiki.special.apisandbox: Avoid bitwise tricks when checking for integers
Bartosz Dziewoński [Wed, 14 Dec 2016 13:33:13 +0000 (14:33 +0100)]
mediawiki.special.apisandbox: Avoid bitwise tricks when checking for integers

In addition to being more obvious than `n | 0`, `Math.floor( n )` also
works correctly for numbers outside of 32-bit int range.

Change-Id: I254457500e141c0dd4e28c707fb4a00c1b04c272

7 years agoMerge "mediawiki.page.watch: Avoid dynamic message keys"
jenkins-bot [Wed, 14 Dec 2016 13:33:05 +0000 (13:33 +0000)]
Merge "mediawiki.page.watch: Avoid dynamic message keys"

7 years agomediawiki.page.watch: Avoid dynamic message keys
Bartosz Dziewoński [Wed, 14 Dec 2016 13:17:58 +0000 (14:17 +0100)]
mediawiki.page.watch: Avoid dynamic message keys

Restructure the code to avoid constructing message names by adding
strings together. Makes it easier to find the usages.

Also, simplify a check for odd/even namespace numbers.

Change-Id: I0b6794cc07ed2a600499632d240b71898715c5b0

7 years agoFix assigning void return value to a variable
Leszek Manicki [Wed, 14 Dec 2016 10:07:42 +0000 (11:07 +0100)]
Fix assigning void return value to a variable

Change-Id: I1e675d121938c5b6b7f8165681c645154e3a70d0

7 years agoMerge "Add externallinks.el_index_60 column and indexes"
jenkins-bot [Wed, 14 Dec 2016 09:47:09 +0000 (09:47 +0000)]
Merge "Add externallinks.el_index_60 column and indexes"

7 years agoMerge "Export: Use BCP 47 language code for attribute xml:lang"
jenkins-bot [Wed, 14 Dec 2016 09:21:34 +0000 (09:21 +0000)]
Merge "Export: Use BCP 47 language code for attribute xml:lang"

7 years agoMerge "Message: Fix buggy parameter handling in Message::params()"
jenkins-bot [Wed, 14 Dec 2016 09:03:22 +0000 (09:03 +0000)]
Merge "Message: Fix buggy parameter handling in Message::params()"

7 years agoMerge "The automatic test in MediaWikiTestCase was marked as risky"
jenkins-bot [Wed, 14 Dec 2016 09:03:19 +0000 (09:03 +0000)]
Merge "The automatic test in MediaWikiTestCase was marked as risky"

7 years agoMerge ""Image size limit" text should always read left-to-right"
jenkins-bot [Wed, 14 Dec 2016 09:03:15 +0000 (09:03 +0000)]
Merge ""Image size limit" text should always read left-to-right"

7 years agoFix small typos in includes/lib/lockManager/LockManager.php
Amir Sarabadani [Wed, 14 Dec 2016 09:03:12 +0000 (12:33 +0330)]
Fix small typos in includes/lib/lockManager/LockManager.php

Change-Id: Ib3e3c6e01dc1ad4604b1cf6c95467f25444f38a2

7 years agoMerge "Convert legacy bugs ID to Phabricator tasks ID for Parser class"
jenkins-bot [Wed, 14 Dec 2016 08:52:20 +0000 (08:52 +0000)]
Merge "Convert legacy bugs ID to Phabricator tasks ID for Parser class"

7 years agoMerge "Add script to support per-line @suppress annotations in Phan"
jenkins-bot [Wed, 14 Dec 2016 08:51:26 +0000 (08:51 +0000)]
Merge "Add script to support per-line @suppress annotations in Phan"

7 years agoAPI: Expose wfIsBadImage() in prop=imageinfo
Kunal Mehta [Sun, 16 Oct 2016 20:18:05 +0000 (13:18 -0700)]
API: Expose wfIsBadImage() in prop=imageinfo

If iiprop=badfile is set, expose the wfIsBadImage() status as a boolean.
This is mainly intended for use by Parsoid, but could be useful for
other API users too. The context title can be set by using the
badfilecontextitle parameter.

Also be a little more paranoid and make sure wfIsBadImage() always
returns a boolean.

Bug: T148343
Change-Id: I3432ead92b8d2a17de5243285f2760fc39b501ae

7 years agoApply color palette change also to wikitable cell border
Fomafix [Wed, 14 Dec 2016 06:20:57 +0000 (07:20 +0100)]
Apply color palette change also to wikitable cell border

In e7a4daf the color of the wikitable border was changed but not the color of
the cells. This leads to a different border color for empty cells and for
non-empty cells.

Change-Id: Ifb691b7f7c388b068e26ccecb94f822432552466

7 years agoMerge "Add googleweblight to JS blacklist"
jenkins-bot [Wed, 14 Dec 2016 02:17:26 +0000 (02:17 +0000)]
Merge "Add googleweblight to JS blacklist"

7 years agoAdd googleweblight to JS blacklist
Elliott Eggleston [Tue, 13 Dec 2016 20:48:18 +0000 (14:48 -0600)]
Add googleweblight to JS blacklist

Google runs JS on their proxy servers and outputs a page which may
be broken in creative ways (e.g. clicking anywhere triggers the
fundraising banner). Treat them as a non-JS browser to minimize
bugginess.

Currently broken with CentralNotice banner:
https://googleweblight.com/?lite_url=https://en.wikipedia.org

Images below the fold never load:
https://googleweblight.com/?lite_url=https://en.wikipedia.org/wiki/Barack_Obama

Bug: T152602
Change-Id: Ia277ab51634b770a950616a842bedb29fcbf1f12

7 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Tue, 13 Dec 2016 21:03:43 +0000 (22:03 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I37f811dd07e6704c47cc159715f2e24ddaf50ab0

7 years agoFix PhanTypeInvalidLeftOperand in Language.php
Erik Bernhardson [Tue, 13 Dec 2016 19:51:07 +0000 (11:51 -0800)]
Fix PhanTypeInvalidLeftOperand in Language.php

Not entirely sure what's going on here. Best guess is phan isn't able
to figure out that array + mixed will result in an array, and then
adding validNamespaces (another array) is ok. Could make things a little
more explicit with array_merge, but this seems to work to remove the
issue without changing the meaning of the code.

Change-Id: I7031ae4e68878ec3198e47c55ab5de4d52a6d922

7 years agoAdd script to support per-line @suppress annotations in Phan
Erik Bernhardson [Tue, 13 Dec 2016 18:25:48 +0000 (10:25 -0800)]
Add script to support per-line @suppress annotations in Phan

Adds the functionality of per-line @suppress annotations. Phan already
supports per-class or per-method annotations, but does not have any
per-line support due to the PHP AST only returning comments that are
class/property/method level docblocks.

This is a bit of a hack, but get's the job done. Removes the
PhanTypeInvalidLeftOperand issue from blacklist and suppresses it
to demonstrate the supression works as expected.

Change-Id: I5066b3b431fb69175a711ee366e95f31c7c47639

7 years agoExport: Use BCP 47 language code for attribute xml:lang
Fomafix [Fri, 1 Jan 2016 20:31:59 +0000 (20:31 +0000)]
Export: Use BCP 47 language code for attribute xml:lang

The patch changes for example
 https://crh.wikipedia.org/wiki/Mahsus:Export/Ba%C5%9F_Saife
from
 xml:lang="crh-latn"
to
 xml:lang="crh-Latn"

Change-Id: I2fb218fe026c5ffee081fb8aaee7b154a8732bdc

7 years agoAdjust phan to allow for making progress strengthening analysis
Erik Bernhardson [Tue, 13 Dec 2016 17:47:25 +0000 (09:47 -0800)]
Adjust phan to allow for making progress strengthening analysis

With phan set to only report critical errors it will be quite hard
to cleanup the code base to the point where we are running stronger
analysis. Instead of setting minimimum severity to critical, set
minimum severity to low and suppress all existing issues.

This will allow developers to choose an issue type from the list, fix
it, and update the config.php to report on the issue in the future.

Change-Id: I2771a4ff37f43cca215b939ed7d82f137d72cea6