lhc/web/wiklou.git
7 years agoMerge "Use adaptive CDN TTLs for page views"
jenkins-bot [Fri, 21 Oct 2016 21:55:52 +0000 (21:55 +0000)]
Merge "Use adaptive CDN TTLs for page views"

7 years agoRemove unreachable code after an exception
Amire80 [Fri, 21 Oct 2016 20:39:07 +0000 (13:39 -0700)]
Remove unreachable code after an exception

Follow up to
I6b9b29b7017f958d62611671be017f97cee73415

Change-Id: Ib3ccbb103097a50f04b798a4ff33eedc64e62aef

7 years agoMerge "Make grammar data loadable as an RL module and usable in JS"
jenkins-bot [Fri, 21 Oct 2016 20:30:23 +0000 (20:30 +0000)]
Merge "Make grammar data loadable as an RL module and usable in JS"

7 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Fri, 21 Oct 2016 19:59:54 +0000 (21:59 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Iefabb99a1acb00c45a585eabf082c1c2b7a83df3

7 years agoMake grammar data loadable as an RL module and usable in JS
Amir E. Aharoni [Sat, 26 Sep 2015 20:28:03 +0000 (23:28 +0300)]
Make grammar data loadable as an RL module and usable in JS

* Load the data of this variable from a JSON file to the same
  data structure that ResourceLoader uses for digitTransformTable,
  pluralRules, etc.
* Change the JSON structure to ensure the order of the rules.
  Otherwise JavaScript processes the keys in a random order.
* Delete the grammar code from JS and replace it with
  the same logic that is used in PHP for processing the data.

For now this is done only for Russian.

The next step will be to make the PHP and JS
data processing logic reusable.

Bug: T115217
Change-Id: I6b9b29b7017f958d62611671be017f97cee73415

7 years agoMerge "objectcache: avoid using process cache in nested callbacks"
jenkins-bot [Fri, 21 Oct 2016 01:23:30 +0000 (01:23 +0000)]
Merge "objectcache: avoid using process cache in nested callbacks"

7 years agoMerge "Show user ID on action=info"
jenkins-bot [Fri, 21 Oct 2016 00:36:21 +0000 (00:36 +0000)]
Merge "Show user ID on action=info"

7 years agoUse adaptive CDN TTLs for page views
Aaron Schulz [Tue, 23 Aug 2016 04:10:13 +0000 (21:10 -0700)]
Use adaptive CDN TTLs for page views

This makes frequently changed pages be less likely to be
seen in stale forms if purges are delayed or lost. Pages
that have not been edited for somewhat longer than the
nominal CDN cache TTL will retain the nominal TTL.

Category pages will adapt based on page_touched rather
than the last revision, given the possibility of constaintly
changing membership. With their lesser overall usage,
this is less risky than for Article, and also more useful.

Change-Id: If621aca2fb68e9f87a50c891dac8dc6ec7641f5c

7 years agoShow user ID on action=info
Kunal Mehta [Thu, 20 Oct 2016 22:23:13 +0000 (15:23 -0700)]
Show user ID on action=info

Change-Id: I43293e319e02dd388c4ee3e952962ad725ab2bab

7 years agoMerge "OutputPage: Reduce getTitleInfo() calls (improve preloading)"
jenkins-bot [Thu, 20 Oct 2016 22:18:38 +0000 (22:18 +0000)]
Merge "OutputPage: Reduce getTitleInfo() calls (improve preloading)"

7 years agoobjectcache: avoid using process cache in nested callbacks
Aaron Schulz [Thu, 20 Oct 2016 21:47:03 +0000 (14:47 -0700)]
objectcache: avoid using process cache in nested callbacks

Because the process cache can be lagged by virtue of blind TTL,
the HOLDOFF_TTL might not be enough to account for it, so avoid
using it when already inside a callback.

Also split of the tests from the MediaWiki test class, so this
does not require DB access anymore.

Change-Id: I743a1233a5efc7f036fad140a9ff8a30b32f8f27

7 years agoOutputPage: Reduce getTitleInfo() calls (improve preloading)
Timo Tijhof [Thu, 20 Oct 2016 21:43:57 +0000 (22:43 +0100)]
OutputPage: Reduce getTitleInfo() calls (improve preloading)

* Remove filter between $moduleStyles and preloadTitleInfo().
  Previously, this was filtering out wiki modules created by
  gadgets and extensions. Still causing a couple of direct queries
  from getTitleInfo().

* Store __METHOD__ in $fname outside getWithSetCallback.
  This way queries are logged as either getTitleInfo or preloadTitleInfo.
  This regressed in 0852a000a5, after which the latter was logged
  as "::{closure}".

Change-Id: I454e43f43f8ad3270b86f4cfdbd68192c305cc07

7 years agoMerge "Add caching to ResourceLoaderWikiModule::preloadTitleInfo()"
jenkins-bot [Thu, 20 Oct 2016 21:50:26 +0000 (21:50 +0000)]
Merge "Add caching to ResourceLoaderWikiModule::preloadTitleInfo()"

7 years agoClarify phpdoc of DatabaseUpdater::addExtensionUpdate
Gergő Tisza [Tue, 18 Oct 2016 01:12:08 +0000 (01:12 +0000)]
Clarify phpdoc of DatabaseUpdater::addExtensionUpdate

Change-Id: Ibc9951e70b8388f5c23c3e05e31e20bd037beacb

7 years agoMerge "Relax phpdoc of PermissionError to match actual usage"
jenkins-bot [Thu, 20 Oct 2016 21:16:31 +0000 (21:16 +0000)]
Merge "Relax phpdoc of PermissionError to match actual usage"

7 years agoMerge "FormSpecialPage: Only add redirectparams for POST forms"
jenkins-bot [Thu, 20 Oct 2016 21:07:33 +0000 (21:07 +0000)]
Merge "FormSpecialPage: Only add redirectparams for POST forms"

7 years agoAdd caching to ResourceLoaderWikiModule::preloadTitleInfo()
Aaron Schulz [Fri, 2 Sep 2016 08:28:23 +0000 (01:28 -0700)]
Add caching to ResourceLoaderWikiModule::preloadTitleInfo()

This is one of the top three DB queries showing up in xenon
reverse flamegraph profiling.

It works via a per-wiki check key that is bumped whenever
someone changes a .js or .css page on that wiki.

Change-Id: I73f419558864ba3403b4601a098f6aaf84a3e7c1

7 years agoMerge "Use a more specific rule for setting cursor:pointer on JS links"
jenkins-bot [Thu, 20 Oct 2016 20:36:42 +0000 (20:36 +0000)]
Merge "Use a more specific rule for setting cursor:pointer on JS links"

7 years agoMerge "Fixing numeric sorting for numbers with leading zeros"
jenkins-bot [Thu, 20 Oct 2016 20:11:56 +0000 (20:11 +0000)]
Merge "Fixing numeric sorting for numbers with leading zeros"

7 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Thu, 20 Oct 2016 20:01:44 +0000 (22:01 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Id5d711a76c60c866e751c009d310fc26e3b54ee3

7 years agoUse a more specific rule for setting cursor:pointer on JS links
Ed Sanders [Thu, 20 Oct 2016 19:58:39 +0000 (12:58 -0700)]
Use a more specific rule for setting cursor:pointer on JS links

This rule may not work in old versions of IE, but neither
does JS.

This avoids cusor:pointer being applied to ContentEditable links
which use cursor:text.

Change-Id: I0d87d67f7d4aa1c1118f3b3613c755535748c799

7 years agoFixing numeric sorting for numbers with leading zeros
Kaldari [Thu, 20 Oct 2016 18:56:54 +0000 (11:56 -0700)]
Fixing numeric sorting for numbers with leading zeros

Bug: T148774
Change-Id: I34aa330645d9d82b6c4e57542e891dd2b36e42ad

7 years agoadd RELEASE notes for 28417328 (CSS3 attr() is banned)
Brian Wolff [Tue, 18 Oct 2016 19:41:29 +0000 (19:41 +0000)]
add RELEASE notes for 28417328 (CSS3 attr() is banned)

Change-Id: Ie42cb63072520f347393e7dbaaec381c6e106c1e

7 years agoresourceloader: Make cache-eval in mw.loader.work asynchronous
Timo Tijhof [Mon, 17 Oct 2016 18:01:14 +0000 (19:01 +0100)]
resourceloader: Make cache-eval in mw.loader.work asynchronous

This is an amended version of reverted commit 482ad8d9fb2e.

The difference is that this change is smaller.

We keep the eval as one large chunk. Not split up in <=50ms chunks and
spread out based on how fast code executes on the device. This means we keep
the issue of an irresponsive UI thread during execution, and trade it for
finishing quicker. This doesn't feel right, but is something we should change
separately, later because it has side-effects (T146510).

Doing it in one chunk is the status quo as we've had it for the last two
years. This commit merely defers the big eval chunk to one tick later so
that higher priority work may happen first (e.g. rendering).

Bug: T142129
Change-Id: I2b31b27554cd29b48d986ed6a6f698a77e59c0e5

7 years agoMerge "Fix FileBackendStore IDEA warnings due to var reuse"
jenkins-bot [Wed, 19 Oct 2016 22:01:02 +0000 (22:01 +0000)]
Merge "Fix FileBackendStore IDEA warnings due to var reuse"

7 years agoMerge "JpegMetadataExtractor: Don't fail when garbage bytes are present between JPEG...
jenkins-bot [Wed, 19 Oct 2016 21:14:55 +0000 (21:14 +0000)]
Merge "JpegMetadataExtractor: Don't fail when garbage bytes are present between JPEG sections"

7 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Wed, 19 Oct 2016 20:53:25 +0000 (22:53 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I8c578090b46c06951b88c6893f97f16b79e85fc9

7 years agoSpecial:BlockList: Chain methods of HTMLForm
Florian Schmidt [Tue, 18 Oct 2016 17:12:00 +0000 (19:12 +0200)]
Special:BlockList: Chain methods of HTMLForm

Much easier to read. Also, changed '' as a value for displayForm
to false.

Change-Id: Iab932d34952a1f7aab9da02d5ddf137edd53ad43

7 years agoMerge "Add 'noflip' option on RL modules to disable CSSJanus"
jenkins-bot [Wed, 19 Oct 2016 06:52:02 +0000 (06:52 +0000)]
Merge "Add 'noflip' option on RL modules to disable CSSJanus"

7 years agoJpegMetadataExtractor: Don't fail when garbage bytes are present between JPEG sections
Bartosz Dziewoński [Wed, 19 Oct 2016 06:20:23 +0000 (23:20 -0700)]
JpegMetadataExtractor: Don't fail when garbage bytes are present between JPEG sections

In theory JPEG files are not allowed to contain anything between the sections,
but in practice they sometimes do. It's customary to ignore the garbage data.

Bug: T148606
Change-Id: I98f2609644bcd8bfd7c1679afc6e7af83e228685

7 years agoFix FileBackendStore IDEA warnings due to var reuse
Aaron Schulz [Wed, 19 Oct 2016 06:10:58 +0000 (23:10 -0700)]
Fix FileBackendStore IDEA warnings due to var reuse

Change-Id: I1b667fb7e891053c7898a0c247745b4376061590

7 years agoMerge "MessageCache: Use checkKeys for large messages"
jenkins-bot [Wed, 19 Oct 2016 04:37:13 +0000 (04:37 +0000)]
Merge "MessageCache: Use checkKeys for large messages"

7 years agoMerge "Remove dire config-dbsupport-postgres warning"
jenkins-bot [Wed, 19 Oct 2016 04:13:18 +0000 (04:13 +0000)]
Merge "Remove dire config-dbsupport-postgres warning"

7 years agoMerge "ApiPurge: Remove setTriggeringUser call."
jenkins-bot [Wed, 19 Oct 2016 03:46:13 +0000 (03:46 +0000)]
Merge "ApiPurge: Remove setTriggeringUser call."

7 years agoApiPurge: Remove setTriggeringUser call.
Petr Pchelko [Tue, 18 Oct 2016 23:32:07 +0000 (16:32 -0700)]
ApiPurge: Remove setTriggeringUser call.

This is a revert of 84ffa5d1242. At that point we've been implementing
page-properties-change event for the EventBus extension and thought
adding this call would be a good idea. However, it was discovered
afterwards that there's much more extensions that don't set the
triggering user. Since that call is deprecated and plans are to
remove it - revert the change.

Change-Id: I9891da628f968970247edc37cccd4a666950273b

7 years agoMerge "Make MessageCache::load() require a language code"
jenkins-bot [Wed, 19 Oct 2016 01:38:43 +0000 (01:38 +0000)]
Merge "Make MessageCache::load() require a language code"

7 years agoRemove dire config-dbsupport-postgres warning
Aaron Schulz [Wed, 19 Oct 2016 01:36:33 +0000 (18:36 -0700)]
Remove dire config-dbsupport-postgres warning

The other DBs (even oracle and mssql) do not have this. Postgres
support is far better than some of those and tends to break most
when using master (and fixes are backported if bug slip into
releases). This is one of the three decently supported DB types.

Change-Id: I5da74d5f9f0ea055529456eddb47ca0be380cbe4

7 years agoMerge "Clean up postgres connection handling"
jenkins-bot [Wed, 19 Oct 2016 01:24:07 +0000 (01:24 +0000)]
Merge "Clean up postgres connection handling"

7 years agoClean up postgres connection handling
Aaron Schulz [Tue, 18 Oct 2016 01:21:46 +0000 (18:21 -0700)]
Clean up postgres connection handling

* Remove non-connection magic case when no DB $user
  is given. This was removed from the base class.
* Use PGSQL_CONNECT_FORCE_NEW to let LoadBalancer
  handle connection reuse. This makes it work like
  the mysql classes.
* Make postgres connection error messages actually
  be useful by using the PHP error when possible.
  This makes it clear if the problem is authentication
  or something else and so on.

Change-Id: I3fd76c1e2db8d6008074f5347b201554579b549a

7 years agoMake MessageCache::load() require a language code
Aaron Schulz [Sat, 15 Oct 2016 02:11:51 +0000 (19:11 -0700)]
Make MessageCache::load() require a language code

Also make it protected; no outside callers exist.

Change-Id: I9f35d05a5e031d1c536a44b19b108803db068677

7 years agoMerge "Postgres installation fixes"
jenkins-bot [Wed, 19 Oct 2016 00:35:42 +0000 (00:35 +0000)]
Merge "Postgres installation fixes"

7 years agoMerge "Force User::__toString() return value to be string"
jenkins-bot [Wed, 19 Oct 2016 00:01:12 +0000 (00:01 +0000)]
Merge "Force User::__toString() return value to be string"

7 years agoForce User::__toString() return value to be string
Gergő Tisza [Tue, 18 Oct 2016 23:50:47 +0000 (23:50 +0000)]
Force User::__toString() return value to be string

Bug: T148486
Change-Id: I19f483b16c99d05f4d1626ee89ba1cfb7a78d52b

7 years agoMerge "Move FSFile classes to /fsfile"
jenkins-bot [Tue, 18 Oct 2016 23:39:33 +0000 (23:39 +0000)]
Merge "Move FSFile classes to /fsfile"

7 years agoMerge "Deprecate Database::getProperty()"
jenkins-bot [Tue, 18 Oct 2016 23:36:47 +0000 (23:36 +0000)]
Merge "Deprecate Database::getProperty()"

7 years agoMove FSFile classes to /fsfile
Aaron Schulz [Tue, 18 Oct 2016 22:36:24 +0000 (15:36 -0700)]
Move FSFile classes to /fsfile

Change-Id: I21f3a9ac52b1f953ca09da0705cac868785193e1

7 years agoFormSpecialPage: Only add redirectparams for POST forms
Kunal Mehta [Tue, 18 Oct 2016 21:16:04 +0000 (14:16 -0700)]
FormSpecialPage: Only add redirectparams for POST forms

If the form is submitted via GET, using redirectparams doesn't make
sense, and you end up with redirect params being included in the GET
query string. And then if the form is submitted again, the
redirectparams include the previous redirectparams, and so on.

Change-Id: I9bc930e5dca557571b4658444fea6aec59c5797a

7 years agoRelax phpdoc of PermissionError to match actual usage
Gergő Tisza [Fri, 14 Oct 2016 22:59:11 +0000 (22:59 +0000)]
Relax phpdoc of PermissionError to match actual usage

Also fix OutputPage::showPermissionsErrorPage to handle everything
it claims to handle.

Change-Id: I8ed4a6f2f038fe70084ab673300e24af97e935db

7 years agoMerge "HTMLForm: Add OOUI support for 'multiselect' with 'dropdown' => true"
jenkins-bot [Tue, 18 Oct 2016 20:39:12 +0000 (20:39 +0000)]
Merge "HTMLForm: Add OOUI support for 'multiselect' with 'dropdown' => true"

7 years agoAdd 'noflip' option on RL modules to disable CSSJanus
Brion Vibber [Tue, 18 Oct 2016 19:04:40 +0000 (12:04 -0700)]
Add 'noflip' option on RL modules to disable CSSJanus

Should be useful for cases where we pull in an external library
that already manages RTL flipping in its styles, and CSSJanus
does the wrong thing without extra markup.

Example:

  'ext.tmh.video-js' => $baseExtensionResource + [
      'scripts' => 'resources/videojs/video.js',
      'styles' => 'resources/videojs/video-js.css',
      'noflip' => true,
      ...
  ],

Bug: T148572
Bug: T148565
Change-Id: Icbad20d8a6e9a0d354ad159f5816f4fb67cc2775

7 years agoMerge "Allow BatchRowIterator to also set query options."
jenkins-bot [Tue, 18 Oct 2016 20:36:25 +0000 (20:36 +0000)]
Merge "Allow BatchRowIterator to also set query options."

7 years agoMerge "Gallery: Use intrinsic width for gallery to center caption"
jenkins-bot [Tue, 18 Oct 2016 20:11:13 +0000 (20:11 +0000)]
Merge "Gallery: Use intrinsic width for gallery to center caption"

7 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Tue, 18 Oct 2016 20:01:16 +0000 (22:01 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Ib8545d516989d75a398f098146c1a93df81360a0

7 years agoAllow BatchRowIterator to also set query options.
Stanislav Malyshev [Tue, 18 Oct 2016 19:33:41 +0000 (12:33 -0700)]
Allow BatchRowIterator to also set query options.

Change-Id: I15927c5b7f1edcfb40edd3cda9257b40d0276073

7 years agoMerge "MWServices load new ServiceWiringFiles after ExtRegistry load"
jenkins-bot [Tue, 18 Oct 2016 18:31:41 +0000 (18:31 +0000)]
Merge "MWServices load new ServiceWiringFiles after ExtRegistry load"

7 years agoDeprecate Database::getProperty()
Aaron Schulz [Tue, 18 Oct 2016 18:05:39 +0000 (11:05 -0700)]
Deprecate Database::getProperty()

Change-Id: If0399dded731b139ffbaab405eceeeafcdf9aed9

7 years agoMWServices load new ServiceWiringFiles after ExtRegistry load
addshore [Tue, 18 Oct 2016 10:41:59 +0000 (11:41 +0100)]
MWServices load new ServiceWiringFiles after ExtRegistry load

Extensions that include ServiceWiringFiles in their
extension.json file do not currently get loaded.
This is due to the resetGlobalInstance call after
the extension.json files are loaded not reloading
service wiring.

Adding the 'load' param resolves this.

The current sequence of events is as follows:
 - Setup.php
 - ExtensionRegistry::loadFromQueue
 - ExtensionRegistry::exportExtractedData
 - MediawikiServices::resetGlobalInstance

This can be tested using the Cognate extension
(linked in the ticket) which may be the first extension
to use both extension registration while including
service wiring files.

Bug: T148419
Change-Id: Ic42ac8e28c66b79193bcafe332b1ef2ebc29742d

7 years agoMerge "Fix ExtensionRegistry cache doc that is out of date"
jenkins-bot [Tue, 18 Oct 2016 17:55:57 +0000 (17:55 +0000)]
Merge "Fix ExtensionRegistry cache doc that is out of date"

7 years agoFix ExtensionRegistry cache doc that is out of date
addshore [Mon, 17 Oct 2016 21:06:45 +0000 (22:06 +0100)]
Fix ExtensionRegistry cache doc that is out of date

Change-Id: If019599baec4e8c566362744c2f565ca169b66b6

7 years agoMerge "registration: Fix ignoring 'merge_strategy' key in manifest_version 2"
jenkins-bot [Tue, 18 Oct 2016 06:56:30 +0000 (06:56 +0000)]
Merge "registration: Fix ignoring 'merge_strategy' key in manifest_version 2"

7 years agoregistration: Fix ignoring 'merge_strategy' key in manifest_version 2
Yuri Astrakhan [Tue, 18 Oct 2016 04:46:11 +0000 (00:46 -0400)]
registration: Fix ignoring 'merge_strategy' key in manifest_version 2

Bug: T148493
Change-Id: Ibd88c4dc98f36d7d8336691884bbaa9a4864da83

7 years agoMessageCache: Use checkKeys for large messages
Andrew Green [Mon, 17 Oct 2016 16:37:36 +0000 (11:37 -0500)]
MessageCache: Use checkKeys for large messages

Also make use of the cache set options and use
Revision::newKnownCurrent() to avoid excessive
revision table queries during miss periods.

Bug: T144952
Change-Id: Ic1c649478b0f87420052d8c99b2962920f8b5c96

7 years agoMerge "Use namespaced ScopedCallback"
jenkins-bot [Mon, 17 Oct 2016 23:32:37 +0000 (23:32 +0000)]
Merge "Use namespaced ScopedCallback"

7 years agoUse namespaced ScopedCallback
Kunal Mehta [Wed, 12 Oct 2016 05:36:03 +0000 (22:36 -0700)]
Use namespaced ScopedCallback

The un-namespaced \ScopedCallback is deprecated.

Change-Id: Ie014d5a775ead66335a24acac9d339915884d1a4

7 years agoMerge "Move most of MWCryptHKDF into libs"
jenkins-bot [Mon, 17 Oct 2016 22:37:40 +0000 (22:37 +0000)]
Merge "Move most of MWCryptHKDF into libs"

7 years agoMove most of MWCryptHKDF into libs
Kunal Mehta [Tue, 4 Oct 2016 17:48:02 +0000 (10:48 -0700)]
Move most of MWCryptHKDF into libs

Dependency-inject the MediaWiki-specific parts into a CryptHKDF
instance, which MWCryptHKDF wraps around.

Change-Id: Idff18635cfd8a3d93ea2ca8d56cdbd11eb4d3b2b

7 years agoPostgres installation fixes
Aaron Schulz [Mon, 17 Oct 2016 18:21:40 +0000 (11:21 -0700)]
Postgres installation fixes

* Make isTransactableQuery() exclude CREATE/ALTER.
  Starting transactions for schema changes like this can cause
  errors as it is not supported for MySQL and some Postgres
  operations. Note that temporary tables are session-level,
  so they are not effected by this change.
* Clean up the transaction logic in determineCoreSchema()
  so a transaction is not left dangling.
* Fix broken getSchemaPath() call in PostgresInstaller.
* Avoid warnings in DatabasePostgres::closeConnection() if
  mConn is already unset.
* Commit master changes in doMaintenance.php before running
  deferred updates, just as MediaWiki.php does.
* Change E_WARNING to E_USER_WARNING to avoid notices in the
  default /rdbms error handlers.
* Also avoid trying to rollback in MWExceptionHandler if the
  LBFactory service is disabled, which just results in an error.

Bug: T147599
Change-Id: I64ccab7f9b74f60309ba0c9a8ce68337c42ffb0f

7 years agoMerge "Update wikimedia/utfnormal to 1.1.0"
jenkins-bot [Mon, 17 Oct 2016 22:01:21 +0000 (22:01 +0000)]
Merge "Update wikimedia/utfnormal to 1.1.0"

7 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 17 Oct 2016 20:02:57 +0000 (22:02 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Iddeeb3476ebcf4252fc1befb85d7efede6abb8c4

7 years agoTravis-CI: stop notifying build status to #mediawiki-core
Bryan Davis [Sun, 16 Oct 2016 21:46:03 +0000 (15:46 -0600)]
Travis-CI: stop notifying build status to #mediawiki-core

Change-Id: I4897f3b54fca2a6d5c45b9fac937f59db78e864f

7 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sun, 16 Oct 2016 20:09:07 +0000 (22:09 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Ifbcf851cd580fcfec7d18833467a23a0a05060bb

7 years agocheckComposerLockUpToDate: Always check dependencies
Kunal Mehta [Sun, 16 Oct 2016 19:49:41 +0000 (12:49 -0700)]
checkComposerLockUpToDate: Always check dependencies

Upstream composer has replaced the 'hash' with a smarter 'content-hash',
but instead of re-implementing (or copy-pasting) all of that in MediaWiki
we can just compare the dependencies themselves, since that's all we
care about.

Bug: T147189
Change-Id: Ic2f22a82699e2b707b6ccb355605999a183a56a0

7 years agoMerge "Move utils/iterators/ into libs/"
jenkins-bot [Sun, 16 Oct 2016 18:28:41 +0000 (18:28 +0000)]
Merge "Move utils/iterators/ into libs/"

7 years agoRemove some MediaWiki dependencies on utils/BatchRow*
Kunal Mehta [Tue, 4 Oct 2016 17:59:08 +0000 (10:59 -0700)]
Remove some MediaWiki dependencies on utils/BatchRow*

Change-Id: I35279875891630157c651e6575770ca4607bc168

7 years agoMove utils/iterators/ into libs/
Kunal Mehta [Tue, 4 Oct 2016 17:56:35 +0000 (10:56 -0700)]
Move utils/iterators/ into libs/

They have no dependency upon MediaWiki.

Change-Id: I58d59941cc7e1ba4fd5e265c8e30f59db66ed514

7 years agoMerge "SpecialBooksources: Fix submitting the form from a subpage link"
jenkins-bot [Sun, 16 Oct 2016 14:22:26 +0000 (14:22 +0000)]
Merge "SpecialBooksources: Fix submitting the form from a subpage link"

7 years agoMerge "Improve Special:BookSources validation and error messages"
jenkins-bot [Sun, 16 Oct 2016 14:19:17 +0000 (14:19 +0000)]
Merge "Improve Special:BookSources validation and error messages"

7 years agoMerge "Re-add human readable parser limit report"
jenkins-bot [Sun, 16 Oct 2016 03:58:21 +0000 (03:58 +0000)]
Merge "Re-add human readable parser limit report"

7 years agoRe-add human readable parser limit report
Kunal Mehta [Sun, 16 Oct 2016 02:17:08 +0000 (19:17 -0700)]
Re-add human readable parser limit report

This mostly reverts commit 1255654ed5a89ed57491bda38f544ed87e3bc601.

This re-adds the human readable parser limit report, and makes a few
adjustments necessary for it to work properly.

* In EditPage::getPreviewLimitReport(), only generate the HTML report,
  the JS variable will be added by OutputPage
* If there are multiple calls to OutputPage::addParserOutputMetadata(),
  only use the limit report data from the first one.
* Only add the wgPageParseReport variable if limit report data is
  available.

Bug: T142210
Change-Id: Iad2646acde79b8a59710bb9fd5fbbfea5a39c341

7 years agoMerge "Display both subject and talk subpages for Special:MovePage"
jenkins-bot [Sun, 16 Oct 2016 02:40:49 +0000 (02:40 +0000)]
Merge "Display both subject and talk subpages for Special:MovePage"

7 years agoMerge "addRFCandPMIDInterwiki: Fix strict mode errors"
jenkins-bot [Sun, 16 Oct 2016 01:42:42 +0000 (01:42 +0000)]
Merge "addRFCandPMIDInterwiki: Fix strict mode errors"

7 years agoSpecialBooksources: Fix submitting the form from a subpage link
Kunal Mehta [Sun, 16 Oct 2016 00:01:15 +0000 (17:01 -0700)]
SpecialBooksources: Fix submitting the form from a subpage link

Visiting Special:Booksources/.... and then trying to enter a new
ISBN in the form field didn't work because the $par would take
precedence over the query parameter.

Removing the subpage from the HTMLForm context apparently fixes this.

Change-Id: Ia007648e23beadcc017e117e59ce3df1b329dcdc

7 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sat, 15 Oct 2016 20:02:55 +0000 (22:02 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Ief1bb0b506ff6e5e3a9bd40c9eb9725f5e067886

7 years agoaddRFCandPMIDInterwiki: Fix strict mode errors
Kunal Mehta [Sat, 15 Oct 2016 19:26:45 +0000 (12:26 -0700)]
addRFCandPMIDInterwiki: Fix strict mode errors

Those columns have no defaults and cause errors if MySQL strict mode is
enabled.

Also make this maintenance script runnable standalone.

Bug: T147536
Change-Id: I0f0ba6fc4375c44b71852c5c2dad8336db17c479

7 years agoMerge "MediaWiki.php: Make getUrlDomainDistance() actually static"
jenkins-bot [Sat, 15 Oct 2016 18:00:28 +0000 (18:00 +0000)]
Merge "MediaWiki.php: Make getUrlDomainDistance() actually static"

7 years agoFix LoadBalancerSingle::reallyOpenConnection() signature
Paladox [Sat, 15 Oct 2016 17:01:34 +0000 (17:01 +0000)]
Fix LoadBalancerSingle::reallyOpenConnection() signature

Declaration of LoadBalancerSingle::reallyOpenConnection() should be
compatible with
LoadBalancer::reallyOpenConnection(array $server, $dbNameOverride = false)

Caught in https://travis-ci.org/paladox/mediawiki/jobs/167910508

Change-Id: I9bc30249c3b43c3dd3b4eb6f3a70765ef428fd2c

7 years agoImprove Special:BookSources validation and error messages
Kunal Mehta [Sat, 15 Oct 2016 07:34:26 +0000 (00:34 -0700)]
Improve Special:BookSources validation and error messages

Visiting Special:BookSources/invalid would not show any error message
because "invalid" would get stripped away by cleanIsbn(), and then
appear as the empty string.

Instead, first validate the provided ISBN (if any), and display the
error message if invalid. Then show the form and book details.

Tests included.

Also remove an unused variable.

Change-Id: I40b703eace956ebbcdc0a2c2986b2c10474dd1fd

7 years agoMerge "Only set memcache hash when saving messages to memcache"
jenkins-bot [Sat, 15 Oct 2016 06:45:26 +0000 (06:45 +0000)]
Merge "Only set memcache hash when saving messages to memcache"

7 years agoMerge "Deprecate EditFilterMerged hook, final ContentHandler replaced hook"
jenkins-bot [Sat, 15 Oct 2016 06:41:34 +0000 (06:41 +0000)]
Merge "Deprecate EditFilterMerged hook, final ContentHandler replaced hook"

7 years agoMove MWGrants out of utils
Kunal Mehta [Tue, 4 Oct 2016 17:53:10 +0000 (10:53 -0700)]
Move MWGrants out of utils

Literally every function in this class depends upon MediaWiki, so it
does not make sense to be included in the utils/ directory.

Change-Id: If6c6b75dc11b49b75f649d56eaeb9c96ef54b787

7 years agoMerge "EditPage: Show EditFilterMergedContent hook errors in an errorbox"
jenkins-bot [Sat, 15 Oct 2016 06:08:13 +0000 (06:08 +0000)]
Merge "EditPage: Show EditFilterMergedContent hook errors in an errorbox"

7 years agoEditPage: Show EditFilterMergedContent hook errors in an errorbox
Kunal Mehta [Thu, 13 Oct 2016 18:39:07 +0000 (11:39 -0700)]
EditPage: Show EditFilterMergedContent hook errors in an errorbox

Errors that go through the Status object of the EditFilterMergedContent
hook have less control over how their errors are displayed, compared to
the legacy EditFilterMerged hook. Notably, Scribunto wrapped its errors
in an errorbox for increased visibility. That was a good idea in
general, so let's do that for all errors.

Change-Id: I1f0e463841298b8c59ed8bd898c8a4661c5e3aa4

7 years agoImprove deprecation comment for MW_DIFF_VERSION
Kunal Mehta [Wed, 12 Oct 2016 05:36:22 +0000 (22:36 -0700)]
Improve deprecation comment for MW_DIFF_VERSION

IDEs will now recognize it as deprecated.

Change-Id: Iac96449fb204a1e4b1e707138b3f0b5697bdfab4

7 years agoMerge "Move MimeMagic code to libs/mime/MimeAnalyzer.php"
jenkins-bot [Sat, 15 Oct 2016 01:29:51 +0000 (01:29 +0000)]
Merge "Move MimeMagic code to libs/mime/MimeAnalyzer.php"

7 years agoMerge "Add 'WikiPageFactory' hook"
jenkins-bot [Sat, 15 Oct 2016 00:12:48 +0000 (00:12 +0000)]
Merge "Add 'WikiPageFactory' hook"

7 years agoMove MimeMagic code to libs/mime/MimeAnalyzer.php
Aaron Schulz [Thu, 22 Sep 2016 04:57:13 +0000 (21:57 -0700)]
Move MimeMagic code to libs/mime/MimeAnalyzer.php

* The later resides in /libs with related files.
* Explose MimeAnalyzer as a service.
* Keep MimeMagic::singleton() as a b/c alias.
* MimeMagic::applyDefaultConfig() will bootstrap the service
  with all of the old config, extension hook handler, and
  detector command shell-out behavior.

Change-Id: Ie2695a52e7a3bcfda9f7fa83659a9ff31b372bc3

7 years agoAdd 'WikiPageFactory' hook
Kunal Mehta [Fri, 16 Sep 2016 00:40:03 +0000 (17:40 -0700)]
Add 'WikiPageFactory' hook

This allows extension to consistently use their WikiPage subclasses.
Currently the only way a subclass would be used is if Article::newPage()
was called.

Change-Id: I74cce5f9627c4bc4b92502aff74beb2daeb78d17

7 years agoobjectcache: use a default "since" timestamp in getWithSetCallback()
Aaron Schulz [Fri, 14 Oct 2016 09:17:25 +0000 (02:17 -0700)]
objectcache: use a default "since" timestamp in getWithSetCallback()

* Renamed mDoneWrites to be clearer at what type it is.
* Also cleaned up a few callers of this method

Change-Id: I45856b210c289c2e2f193cc4328a208e20b4e0a8

7 years agoMediaWiki.php: Make getUrlDomainDistance() actually static
Roan Kattouw [Fri, 14 Oct 2016 21:15:46 +0000 (14:15 -0700)]
MediaWiki.php: Make getUrlDomainDistance() actually static

It's only called once, and that call is static. It also doesn't use $this.

[error] /w/index.php?title=New_new_page&action=purge
ErrorException from line 610 of /vagrant/mediawiki/includes/MediaWiki.php: PHP Strict Standards: Non-static method MediaWiki::getUrlDomainDistance() should not be called statically

Change-Id: Ice66937a32193720c52df39bcea90659a8d9f653

7 years agoMerge "commonPrint: Remove overqualified selectors & `!important` where applicable"
jenkins-bot [Fri, 14 Oct 2016 19:46:38 +0000 (19:46 +0000)]
Merge "commonPrint: Remove overqualified selectors & `!important` where applicable"