lhc/web/wiklou.git
8 years agoMerge "Use CSS columns instead of tables in Special:SpecialPages (2)"
jenkins-bot [Tue, 22 Sep 2015 09:10:00 +0000 (09:10 +0000)]
Merge "Use CSS columns instead of tables in Special:SpecialPages (2)"

8 years agoFix typo in AvroFormatterTest
Adrian Heine [Tue, 22 Sep 2015 08:07:09 +0000 (10:07 +0200)]
Fix typo in AvroFormatterTest

Also removes trailing whitespace in that file.

Change-Id: Icf30a68ea7356735f416baae8a435e0f10d5caaa

8 years agoMerge "jquery.byteLimit: Trigger 'change' event after limitting"
jenkins-bot [Tue, 22 Sep 2015 07:42:04 +0000 (07:42 +0000)]
Merge "jquery.byteLimit: Trigger 'change' event after limitting"

8 years agoMerge "Add new authentication-related hooks (and remove one) replacing some AuthPlugi...
jenkins-bot [Tue, 22 Sep 2015 07:32:03 +0000 (07:32 +0000)]
Merge "Add new authentication-related hooks (and remove one) replacing some AuthPlugin methods"

8 years agoMerge "Set getFeatures() for MemoryFileBackend"
jenkins-bot [Tue, 22 Sep 2015 07:20:22 +0000 (07:20 +0000)]
Merge "Set getFeatures() for MemoryFileBackend"

8 years agoMerge "Update UploadWizard-specific messages"
jenkins-bot [Tue, 22 Sep 2015 07:16:16 +0000 (07:16 +0000)]
Merge "Update UploadWizard-specific messages"

8 years agoMerge "By default have Main page text on Main page tab"
jenkins-bot [Tue, 22 Sep 2015 07:03:59 +0000 (07:03 +0000)]
Merge "By default have Main page text on Main page tab"

8 years agoBy default have Main page text on Main page tab
paladox [Sun, 20 Sep 2015 18:20:31 +0000 (19:20 +0100)]
By default have Main page text on Main page tab

Bug: T111645
Change-Id: I8e3ca7e6b636466c145d90bd22a2d9098708af73

8 years agoMerge "registration: Allow extensions to specify which MW core versions they require"
jenkins-bot [Tue, 22 Sep 2015 04:57:47 +0000 (04:57 +0000)]
Merge "registration: Allow extensions to specify which MW core versions they require"

8 years agojobqueue: A few small code cleanups to RefreshLinksJob
Aaron Schulz [Tue, 22 Sep 2015 01:17:36 +0000 (18:17 -0700)]
jobqueue: A few small code cleanups to RefreshLinksJob

Change-Id: Ia331e9dbf9d2be137c34a8c93ef2d6da8aad6c56

8 years agoMerge "Removed DeferredUpdates::addHTMLCacheUpdate()"
jenkins-bot [Tue, 22 Sep 2015 01:21:37 +0000 (01:21 +0000)]
Merge "Removed DeferredUpdates::addHTMLCacheUpdate()"

8 years agoRemoved DeferredUpdates::addHTMLCacheUpdate()
Aaron Schulz [Mon, 21 Sep 2015 23:22:37 +0000 (16:22 -0700)]
Removed DeferredUpdates::addHTMLCacheUpdate()

* That method does not belong in DeferredUpdates
  as this class should agnostic to the work done

Change-Id: I8098ffb82bf9c33ccb48a31aa9dbad514e8724a8

8 years agoMerge "Reduced the DOS potential of 404 page floods"
jenkins-bot [Tue, 22 Sep 2015 00:58:54 +0000 (00:58 +0000)]
Merge "Reduced the DOS potential of 404 page floods"

8 years agoMerge "Removed deprecated $wgDeferredUpdateList"
jenkins-bot [Tue, 22 Sep 2015 00:50:22 +0000 (00:50 +0000)]
Merge "Removed deprecated $wgDeferredUpdateList"

8 years agoReduced the DOS potential of 404 page floods
Aaron Schulz [Fri, 18 Sep 2015 05:37:16 +0000 (22:37 -0700)]
Reduced the DOS potential of 404 page floods

* showMissingArticle() will now only show the log excerpt
  if the page was deleted very recently or if the viewing
  user is logged in. Crawlers and poorly written bots tend
  to be logged out, and logged in users are better tracked.
  If many hits to the same recently deleted page are made,
  then the innoDB buffer pool should actually have the
  relevant index pages in cache (especially with query grouping).
* There have been several outages or DB performance problems
  caused by crawlers or sloppy mirrors hitting many bogus pages
  (due to bad URL generation, ect...). Previously a redis bloom
  filter was used to handle this, but was removed due to high
  complexity (especially if it was to be supported in multi-DC
  setup). This is a simpler solution to keep 404 pages cheap,
  as they cannot really be cached (there are innumerable possible
  titles that never existed).

Change-Id: If948602a32deb16dba21d232d0c6128568a980d6

8 years agoRemoved deprecated $wgDeferredUpdateList
Aaron Schulz [Mon, 21 Sep 2015 23:25:47 +0000 (16:25 -0700)]
Removed deprecated $wgDeferredUpdateList

Change-Id: I7072ad3b34dd9a0726df6d1c044616c3b4bcd79f

8 years agoMerge "Produce monolog messages through kafka+avro"
jenkins-bot [Mon, 21 Sep 2015 23:26:05 +0000 (23:26 +0000)]
Merge "Produce monolog messages through kafka+avro"

8 years agoSet getFeatures() for MemoryFileBackend
Aaron Schulz [Mon, 21 Sep 2015 22:04:12 +0000 (15:04 -0700)]
Set getFeatures() for MemoryFileBackend

Change-Id: I565e2e2c8a4a89c6706349a4ef9826f87445d1d2

8 years agoMerge "Added read affinity tests for FileBackendMultiWrite"
jenkins-bot [Mon, 21 Sep 2015 21:30:45 +0000 (21:30 +0000)]
Merge "Added read affinity tests for FileBackendMultiWrite"

8 years agoProduce monolog messages through kafka+avro
Erik Bernhardson [Tue, 4 Aug 2015 18:02:47 +0000 (11:02 -0700)]
Produce monolog messages through kafka+avro

This allows a logging channel to be configured to write
directly to kafka. Logs can be serialized either to json
blobs or the more compact apache avro format.

The Kafka handler for monolog needs a list of one of more
kafka servers to query cluster metadata from. This should be
able to use any monolog formatter, although some like
JsonFormatter require you to disable formatBatch as Kafka
protocol would prefer to encode each record independently in
the protocol.  This requires the nmred/kafka-php library,
version >= 1.3.0.

Adds a new formatter which serializes to the apache avro
format. This is a compact binary format which uses pre-
defined schemas. This initial implementation is very simple
and takes the plain schemas as a constructor argument.

Adds a new option to MonologSpi to wrap handlers in a
BufferHandler. This doesn't flush until the request shuts
down and prevents any network requests in the logger from
adding latency to web requests.

Related mediawiki/vendor update: Ibfe4bd2036ae8e998e2973f07bd9a6f057691578

The necessary config is something like:

array(
    'loggers' => array(
        'CirrusSearchRequests' => array(
            'handlers' => array( 'kafka' ),
        ),
    ),
    'handlers' => array(
        'kafka' => array(
            'factory' => '\\MediaWiki\\Logger\\Monolog\\KafkaHandler::factory',
            'args' => array( 'localhost:9092' ),
            'formatter' => 'avro',
            'buffer' => true,
        ),
    ),
    'formatters' => array(
        'avro' => array(
            'class' => '\\MediaWiki\\Logger\\Monolog\\AvroFormatter',
            'args' => array(
                array(
                    'CirrusSearchRequests' => array(
                        'type' => 'record',
                        'name' => 'CirrusSearchRequests'
                        'fields' => array( ... )
                    ),
                ),
            ),
        ),
    ),
)

Bug: T106256
Change-Id: I6ee744b3e5306af0bed70811b558a543eed22840

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 21 Sep 2015 19:42:14 +0000 (21:42 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I63f5687fe78418403fdb3de398ece449efd3c72a

8 years agoMerge "Refactor changeTypes in RecentChange"
jenkins-bot [Mon, 21 Sep 2015 19:16:19 +0000 (19:16 +0000)]
Merge "Refactor changeTypes in RecentChange"

8 years agoMerge "Add tests for RecentChange::parse(To|From)RCType"
jenkins-bot [Mon, 21 Sep 2015 19:16:15 +0000 (19:16 +0000)]
Merge "Add tests for RecentChange::parse(To|From)RCType"

8 years agoMerge "Cleaned up $asyncWrites member variable in MultiWriteBagOStuff"
Aaron Schulz [Mon, 21 Sep 2015 18:55:15 +0000 (18:55 +0000)]
Merge "Cleaned up $asyncWrites member variable in MultiWriteBagOStuff"

8 years agoCleaned up $asyncWrites member variable in MultiWriteBagOStuff
Aaron Schulz [Mon, 21 Sep 2015 18:41:44 +0000 (11:41 -0700)]
Cleaned up $asyncWrites member variable in MultiWriteBagOStuff

Change-Id: I27e48aef77ac0f6453b7837f2b2686b7b5b726d4

8 years agoMultiWriteBagOStuff: require nonempty 'caches' param
Ori Livneh [Mon, 21 Sep 2015 18:29:50 +0000 (11:29 -0700)]
MultiWriteBagOStuff: require nonempty 'caches' param

MultiWriteBagOStuff::__construct() barfs if the 'caches' parameter is unset,
but it permits it to be an empty array. This means that subsequent operations
that need to reference the first (primary) cache backend need to check that
it is there at all.

Since there is not much sense in having a MultiWriteBagOStuff object with zero
cache backends, make the constructor require a nonempty array for 'caches', and
remove the subsequent checks that are made redundant by this new restriction.

Change-Id: I30f3e0dcbfe67570a368e64b8233cc0ba7f90b2f

8 years agoAdded read affinity tests for FileBackendMultiWrite
Aaron Schulz [Mon, 21 Sep 2015 18:21:00 +0000 (11:21 -0700)]
Added read affinity tests for FileBackendMultiWrite

Change-Id: I1407273175396d4d3631531ff0ca0afa3009913e

8 years agoMerge "Add i18n messages for ApiStashEdit"
jenkins-bot [Mon, 21 Sep 2015 17:47:27 +0000 (17:47 +0000)]
Merge "Add i18n messages for ApiStashEdit"

8 years agoregistration: Allow extensions to specify which MW core versions they require
Kunal Mehta [Thu, 14 May 2015 05:51:55 +0000 (22:51 -0700)]
registration: Allow extensions to specify which MW core versions they require

This adds a "requires" property to extension.json, which extensions and
skins can use to indicate which versions of MediaWiki core they support.
The hacky wfUseMW() is now deprecated in favor of this.

Rather than writing our own version constraint and parser library, we
can re-use composer's, which was recently split out into a separate
library named "composer/semver" for this patch.

Any syntax accepted by composer[1] is available for usage here. Test
cases have been provided to demonstrate how versions are parsed. For now
it is recommended that people stick to expressing compatability with
stable versions (e.g. ">= 1.26").

This patch does not support requiring specific MediaWiki core WMF
branches, since those do not follow the standard semver format that
composer parses. If we are unable to parse $wgVersion, all checking will
be skipped and reported as compatible.

[1] https://getcomposer.org/doc/01-basic-usage.md#package-versions

Bug: T99084
Change-Id: I7785827216e16c596356d0ae42d6b30f3f179f10

8 years agoRefactor changeTypes in RecentChange
addshore [Thu, 17 Sep 2015 09:56:22 +0000 (10:56 +0100)]
Refactor changeTypes in RecentChange

This is split from:
I03516bb34144d95e5f25c46ae98ab70ce699b31b

Change-Id: I285cdbe3d1a62aa1071a5c174928136c3f59d557

8 years agoAdd i18n messages for ApiStashEdit
Brad Jorsch [Mon, 21 Sep 2015 14:31:01 +0000 (10:31 -0400)]
Add i18n messages for ApiStashEdit

Bug: T113189
Change-Id: Iee7b2fbb7b9cd4e7255c87d78be9396073f41236

8 years agoAdd tests for RecentChange::parse(To|From)RCType
addshore [Mon, 21 Sep 2015 13:58:56 +0000 (14:58 +0100)]
Add tests for RecentChange::parse(To|From)RCType

Change-Id: I60278aaeef475ed3ec1515b1f5f28d6afcc700c5

8 years agoAdd test for RecentChange::newFromRow
addshore [Mon, 21 Sep 2015 13:51:44 +0000 (14:51 +0100)]
Add test for RecentChange::newFromRow

Change-Id: I1e21d296e15c1b6d18f19ae9cc7038387c8f4e2b

8 years agoAdd test for RecentChange::isInRCLifespan
addshore [Mon, 21 Sep 2015 09:34:13 +0000 (10:34 +0100)]
Add test for RecentChange::isInRCLifespan

Change-Id: I0eac57d0cfabba3ed9b5b430e9972e7c5c0b9f8b

8 years agoMerge "Use setUp instead of __construct in RecentChangeTest"
jenkins-bot [Mon, 21 Sep 2015 14:15:30 +0000 (14:15 +0000)]
Merge "Use setUp instead of __construct in RecentChangeTest"

8 years agoMerge "Cleanup RecentChangeTest, move things out that don't belong"
jenkins-bot [Mon, 21 Sep 2015 14:15:26 +0000 (14:15 +0000)]
Merge "Cleanup RecentChangeTest, move things out that don't belong"

8 years agoUse setUp instead of __construct in RecentChangeTest
addshore [Mon, 21 Sep 2015 09:25:24 +0000 (10:25 +0100)]
Use setUp instead of __construct in RecentChangeTest

Change-Id: Ia0d704a2832c54995fba0014ae6422765a743be0

8 years agoCleanup RecentChangeTest, move things out that don't belong
addshore [Mon, 21 Sep 2015 08:50:04 +0000 (09:50 +0100)]
Cleanup RecentChangeTest, move things out that don't belong

This moves out a bunch of stuff that doesnt
seem to test anything in RecentChange....

This also shows us how few tests RecentChange
actually has!

Change-Id: Ia5016c82c00dd7c35a6f1253d6e385b587ec485e

8 years agoMerge "ResourceLoaderModule: cache file content hash"
jenkins-bot [Mon, 21 Sep 2015 12:55:32 +0000 (12:55 +0000)]
Merge "ResourceLoaderModule: cache file content hash"

8 years agoMerge "resourceloader: Log load.php exceptions to JavaScript console"
jenkins-bot [Mon, 21 Sep 2015 12:53:05 +0000 (12:53 +0000)]
Merge "resourceloader: Log load.php exceptions to JavaScript console"

8 years agoMerge "Move prefsection style to mediawiki.special.preferences.css"
jenkins-bot [Mon, 21 Sep 2015 12:43:57 +0000 (12:43 +0000)]
Merge "Move prefsection style to mediawiki.special.preferences.css"

8 years agoMerge "Added readAffinity flag to FileBackendMultiWrite"
jenkins-bot [Mon, 21 Sep 2015 12:20:45 +0000 (12:20 +0000)]
Merge "Added readAffinity flag to FileBackendMultiWrite"

8 years agoMerge "Fixed "last modified" date fudging on null edit"
jenkins-bot [Mon, 21 Sep 2015 12:11:46 +0000 (12:11 +0000)]
Merge "Fixed "last modified" date fudging on null edit"

8 years agoMerge "resourceloader: Run ResourceLoaderRegisterModules after wgResourceModules"
jenkins-bot [Mon, 21 Sep 2015 12:10:15 +0000 (12:10 +0000)]
Merge "resourceloader: Run ResourceLoaderRegisterModules after wgResourceModules"

8 years agoMerge "Explicitly float local search results left so they come first"
jenkins-bot [Mon, 21 Sep 2015 11:47:12 +0000 (11:47 +0000)]
Merge "Explicitly float local search results left so they come first"

8 years agoMerge "Update documentation for EmailUser hooks"
jenkins-bot [Mon, 21 Sep 2015 11:31:59 +0000 (11:31 +0000)]
Merge "Update documentation for EmailUser hooks"

8 years agoUpdate UploadWizard-specific messages
Bartosz Dziewoński [Tue, 15 Sep 2015 22:36:02 +0000 (00:36 +0200)]
Update UploadWizard-specific messages

Merge after I706d76ab4720a94e772d03196c91697d9047f5b9 in UploadWizard.

Two messages lost a silly link and $2 parameter:
* api-error-duplicate
* api-error-duplicate-archive

They were both confusingly phrased, as if the link led directly to the
file; instead, at least in UploadWizard, clicking on it opened a popup
dialog with a list. I don't expect the change to be problematic, the
few translations that I understand work equally well with the link
removed, and UploadWizard code can now handle both versions. I'm not
aware of any uses elsewhere, hopefully this makes the messages less
UploadWizard-specific and more reusable.

Two messages were removed because they are no longer used in Gerrit extensions::
* api-error-duplicate-archive-popup-title
* api-error-duplicate-popup-title

Bug: T34606
Change-Id: I9661f24323371f186976df1f5569aba002d4f34e

8 years agoMerge "Removed old "noPush" config hacks from FileBackendMultiWrite"
jenkins-bot [Mon, 21 Sep 2015 09:40:43 +0000 (09:40 +0000)]
Merge "Removed old "noPush" config hacks from FileBackendMultiWrite"

8 years agoMerge "Avoid master queries on image history view"
jenkins-bot [Mon, 21 Sep 2015 09:40:39 +0000 (09:40 +0000)]
Merge "Avoid master queries on image history view"

8 years agoMerge "Prevent IDEA error in doOperationsInternal()"
jenkins-bot [Mon, 21 Sep 2015 09:31:01 +0000 (09:31 +0000)]
Merge "Prevent IDEA error in doOperationsInternal()"

8 years agoMerge "Removed unused LockManager var"
jenkins-bot [Mon, 21 Sep 2015 09:29:47 +0000 (09:29 +0000)]
Merge "Removed unused LockManager var"

8 years agoMerge "Made some FileBackendMultiWrite docs more accurate"
jenkins-bot [Mon, 21 Sep 2015 09:29:24 +0000 (09:29 +0000)]
Merge "Made some FileBackendMultiWrite docs more accurate"

8 years agoPrevent IDEA error in doOperationsInternal()
Aaron Schulz [Mon, 21 Sep 2015 06:04:29 +0000 (23:04 -0700)]
Prevent IDEA error in doOperationsInternal()

Change-Id: I2f0a1885803fff9dc0eb8ca4a595a83736ce421b

8 years agoRemoved unused LockManager var
Aaron Schulz [Sun, 20 Sep 2015 20:57:46 +0000 (13:57 -0700)]
Removed unused LockManager var

Change-Id: I02c1fef624e6f2fe04e3c6d525aaed881eacabd7

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sun, 20 Sep 2015 19:38:30 +0000 (21:38 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Icdbc2c339c73d7535bff79444065260c8a9a8065

8 years agoMerge "Fix hook documentation for ArticleRevisionVisibilitySet"
jenkins-bot [Sun, 20 Sep 2015 19:26:50 +0000 (19:26 +0000)]
Merge "Fix hook documentation for ArticleRevisionVisibilitySet"

8 years agoAdded readAffinity flag to FileBackendMultiWrite
Aaron Schulz [Sat, 19 Sep 2015 23:05:37 +0000 (16:05 -0700)]
Added readAffinity flag to FileBackendMultiWrite

* A backend with this set (normally 1) will be used for
  non-latest reads. This can be used to prefer a local,
  replicated, backend instead of one farther away (for
  multi-DC setups)
* Note that listings still come from the master always.

Bug: T112708
Change-Id: Ic4bf4ba5a2c9ef78abd11dbd0d4b48c73cad6923

8 years agoMerge "Cleaned up getScopedFileLocks() return value"
Aaron Schulz [Sun, 20 Sep 2015 19:24:48 +0000 (19:24 +0000)]
Merge "Cleaned up getScopedFileLocks() return value"

8 years agoUpdate documentation for EmailUser hooks
umherirrender [Sat, 19 Sep 2015 18:50:37 +0000 (20:50 +0200)]
Update documentation for EmailUser hooks

Document the missing $error parameter of the EmailUser hook.
Clarify the type of the address parameter
Also add an comment, why a variable is used twice

Follows 38c7c8f895f75ac04dbb6e0349779171f8a8e8a1 (r64903)

Change-Id: I1c5636dc378667ef2798c69659b43f70734f4144

8 years agoFix hook documentation for ArticleRevisionVisibilitySet
umherirrender [Sun, 20 Sep 2015 08:47:29 +0000 (10:47 +0200)]
Fix hook documentation for ArticleRevisionVisibilitySet

The last parameter was not in documentation.

Follows I6a14c7b95041fdd44d7962af6dc139bcc29f7223

Change-Id: I5e5d8948d6a1f4dc2db09028c77cfb79fb4ed5d0

8 years agoMerge "Strip comments before gathering url(...) refs in CSS"
jenkins-bot [Sun, 20 Sep 2015 15:10:08 +0000 (15:10 +0000)]
Merge "Strip comments before gathering url(...) refs in CSS"

8 years agoMade some FileBackendMultiWrite docs more accurate
Aaron Schulz [Sun, 20 Sep 2015 04:11:53 +0000 (21:11 -0700)]
Made some FileBackendMultiWrite docs more accurate

Change-Id: I14c152601fef3d3c75e7ea7aac72ff87c9f5fd52

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sat, 19 Sep 2015 20:54:08 +0000 (22:54 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I211d55ab5194485af47b42a5e428c7475d9a7c44

8 years agoStrip comments before gathering url(...) refs in CSS
Elliott Eggleston [Sat, 19 Sep 2015 19:32:09 +0000 (15:32 -0400)]
Strip comments before gathering url(...) refs in CSS

Change I5a3cdeb7d53485f161ccf8133e76850cdf5b4579 introduced tests
for existence of all local files referenced in CSS.  It's currently
failing changes even when the referenced files have been commented
out.  This change ensures that commented-out files are not included
in the testing list.

Change-Id: I2ad74c13a9cf36e96a7d7451bf229856bcd18422

8 years agoMerge "Support async writes to secondary MultiWriteBagOStuff stores"
jenkins-bot [Sat, 19 Sep 2015 18:23:06 +0000 (18:23 +0000)]
Merge "Support async writes to secondary MultiWriteBagOStuff stores"

8 years agoFixed small IDE error in \96syncFileBackend.php
Aaron Schulz [Fri, 18 Sep 2015 22:19:54 +0000 (15:19 -0700)]
Fixed small IDE error in \96syncFileBackend.php

Change-Id: I86c6cf73470109af2eb88d1c0d053292391630e7

8 years agoMerge "Update at-ease to v1.1.0, and OOjs UI to v0.12.8-atease"
jenkins-bot [Sat, 19 Sep 2015 17:00:36 +0000 (17:00 +0000)]
Merge "Update at-ease to v1.1.0, and OOjs UI to v0.12.8-atease"

8 years agoAdd localized "Project" namespace alias for Northern Luri
mjbmr [Mon, 17 Aug 2015 11:56:04 +0000 (11:56 +0000)]
Add localized "Project" namespace alias for Northern Luri

Change-Id: I6a33acac4ccb440a1784826e8090c7746fb2af7c

8 years agoDatabaseBase::deadlockLoop(): Remove unused variables
Kevin Israel [Sat, 19 Sep 2015 06:07:13 +0000 (02:07 -0400)]
DatabaseBase::deadlockLoop(): Remove unused variables

Follows-up 419221e4a71b.

Change-Id: Ia0d50e40600ca2cd7b90441b66340d3c290be85f

8 years agoSupport async writes to secondary MultiWriteBagOStuff stores
Aaron Schulz [Fri, 21 Aug 2015 06:53:52 +0000 (23:53 -0700)]
Support async writes to secondary MultiWriteBagOStuff stores

* This is useful for ParserCache, as it tries to focus on memcached
  and use other caches (e.g. mariadb) for the long-tail of less used
  content, as setup on WMF. The class uses BagOStuff in a way that is
  compatible with this approach.

Bug: T109751
Change-Id: Ia64eb44a9b52a988fde27b468d604d9163bed4b4

8 years agoRemoved old "noPush" config hacks from FileBackendMultiWrite
Aaron Schulz [Sat, 19 Sep 2015 00:36:09 +0000 (17:36 -0700)]
Removed old "noPush" config hacks from FileBackendMultiWrite

Change-Id: I80e688cc61c0a656524a0db6aeabb3d3f6e667bd

8 years agoResourceLoaderModule: cache file content hash
Ori Livneh [Thu, 17 Sep 2015 22:30:41 +0000 (15:30 -0700)]
ResourceLoaderModule: cache file content hash

Cache the content hash of module files in APC, if available. Include the
modification time in the cached value, so that touching the file invalidates
the cache.

Does this take us back to a world in which updates to a file's mtime cause a
module's version to change? No. The content hash cache will be invalidated,
and the content hash will be computed, but the actual value should remain
the same.

Change-Id: I5ceb8537c3cdb120beae19740635f085ee128272

8 years agoresourceloader: Use MD4 to compute file hash rather than SHA1
Ori Livneh [Wed, 16 Sep 2015 23:51:53 +0000 (16:51 -0700)]
resourceloader: Use MD4 to compute file hash rather than SHA1

The hash value generated by ResourceLoaderModule::safeFileHash() is used for
versioning and cache invalidation, so a cryptographic hash function is not
necessary. We can get better performance by using MD4.

Wikimedia on-CPU time over 24 hours of safeFileHash() in load.php:
* 6.68% with safeFileHash using SHA1 (day 1)
* 7.07% with safeFileHash using SHA1 (day 2)
* 2.84% with safeFileHash using MD4 (day 3)

Change-Id: I6ff728f1240268517c0f03e0823129316bc901cb

8 years agoDo not double load gallery styles now cache has expired
jdlrobson [Sat, 22 Aug 2015 00:15:48 +0000 (17:15 -0700)]
Do not double load gallery styles now cache has expired

Was separated in 1.26wmf21 (Ib1aef04dc4fece78e6615386ecaef6a9f368f49e)
We should aim to get this in 1.26wmf24 (there will still
be a small amount of pages with outdated HTML but the benefit
to all users not double loading is arguably larger at this point)

Bug: T110709
Change-Id: I96acc21f57ecc8c5e55df9528a4412d0ea641fa8

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Fri, 18 Sep 2015 21:08:20 +0000 (23:08 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: If90fadcca386970dc6fe43f225d873fa538f9ef7

8 years agoresourceloader: Run ResourceLoaderRegisterModules after wgResourceModules
Timo Tijhof [Tue, 16 Jun 2015 21:14:10 +0000 (22:14 +0100)]
resourceloader: Run ResourceLoaderRegisterModules after wgResourceModules

We don't allow modifying existing modules or registering the same module twice.

We do have an established convention of registering plugins for optional
dependencies conditionally.

E.g.
- VisualEditor should only register 'uls.data' if ULS extension isn't installed.
- The Math extension should only register its VE plugin if VE is installed.

Typically the dependency being checked is registered unconditionally. The
conditional one is the supplemental one in case the canonical source within
the MediaWiki landscape is absent.

Currently this means code will check both isModuleRegistered() and the global
$wgResourceModules. This doesn't make sense. Reverse this so that the
unconditional registry is processed first, and the programmatic one after.

This also helps exceptions come from a more sensible place in case of a duplicate
registration.

Change-Id: Ib2d01c88511ade75a97b2509bccfabb1a4cc5c15

8 years agoUpdate at-ease to v1.1.0, and OOjs UI to v0.12.8-atease
James D. Forrester [Fri, 18 Sep 2015 18:52:43 +0000 (11:52 -0700)]
Update at-ease to v1.1.0, and OOjs UI to v0.12.8-atease

Change-Id: I2e2224f802378f583702fe54e4acfc2937612396

8 years agoCleaned up getScopedFileLocks() return value
Aaron Schulz [Fri, 18 Sep 2015 17:45:15 +0000 (10:45 -0700)]
Cleaned up getScopedFileLocks() return value

* Just return the ScopedLock itself without wrappig it in an array.
  This also makes getScopedLocksForOps() actually return the correct
  type according to the docs

Change-Id: Ic2d01d56c3fcb22af3adb5e5d4d1586d62316552

8 years agoFix another test broken by I826adf9
Ori Livneh [Fri, 18 Sep 2015 17:44:50 +0000 (10:44 -0700)]
Fix another test broken by I826adf9

Change-Id: I15367691af8d2290d54cdb3bb134dfa71a15f9f7

8 years agoFix test broken by I826adf9
Ori Livneh [Fri, 18 Sep 2015 17:26:00 +0000 (10:26 -0700)]
Fix test broken by I826adf9

Change-Id: I4313188767d47cf9efcfd24ed2716475a289bb77

8 years agoReplace leafo/lessphp with oyejorge/less.php
Ori Livneh [Thu, 10 Sep 2015 22:22:13 +0000 (15:22 -0700)]
Replace leafo/lessphp with oyejorge/less.php

Bug: T112035
Change-Id: I826adf981ac28c44f0915ceb059d699d6b23a254

8 years agoAdd missing semicolon to mediawiki.filewarning.less
Ori Livneh [Fri, 18 Sep 2015 16:40:55 +0000 (09:40 -0700)]
Add missing semicolon to mediawiki.filewarning.less

Change-Id: Ifc6adeff9d77a0766098c7861ce11164e8218357

8 years agoSpecialChangeEmail: error if old email was entered in new email field
Glaisher [Sat, 22 Aug 2015 12:27:56 +0000 (17:27 +0500)]
SpecialChangeEmail: error if old email was entered in new email field

Current behavior is to redirect to Special:Preferences without showing
any message.  Instead of that, showing an error message is user-friendlier.

Bug: T38561
Change-Id: I6173cd653f682d5a1be61104db213b577c4adfcf

8 years agoAdd new authentication-related hooks (and remove one) replacing some AuthPlugin methods
Brad Jorsch [Fri, 4 Sep 2015 16:55:34 +0000 (12:55 -0400)]
Add new authentication-related hooks (and remove one) replacing some AuthPlugin methods

* LocalUserCreated: Replaces AuthPlugin::initUser()
* UserGroupsChanged: Replaces AuthPlugin::updateExternalDBGroups()
** The similar UserRights hook is deprecated, mainly to get rid of the
   passing of $user by reference.
* UserIsHidden: Replaces AuthPluginUser::isHidden()
* UserIsLocked: Replaces AuthPluginUser::isLocked()
* UserLoggedIn: Replaces AuthPlugin::updateUser()

Also, AuthPlugin::updateExternalDB() is deprecated in favor of the
existing UserSaveSettings hook.

Also, 'ResetSessionID' has been removed. Nothing uses it, I don't know
why I even added it in the first place.

Also, replacing the User object passed to AuthPlugin::initUser() and
AuthPlugin::updateUser() will now raise a warning.

Change-Id: If7474cfb26a29b11c2e78147069419ca3b1cba95

8 years agoMerge "Don't check namespace in SpecialWantedtemplates"
jenkins-bot [Fri, 18 Sep 2015 09:16:13 +0000 (09:16 +0000)]
Merge "Don't check namespace in SpecialWantedtemplates"

8 years agoMerge "Database: Remove unused errorCount() method"
jenkins-bot [Fri, 18 Sep 2015 09:10:27 +0000 (09:10 +0000)]
Merge "Database: Remove unused errorCount() method"

8 years agoMerge "Use User::equals() where applicable in the class"
jenkins-bot [Fri, 18 Sep 2015 09:08:27 +0000 (09:08 +0000)]
Merge "Use User::equals() where applicable in the class"

8 years agoMerge "Update test documentation, fix broken links"
jenkins-bot [Fri, 18 Sep 2015 09:04:57 +0000 (09:04 +0000)]
Merge "Update test documentation, fix broken links"

8 years agoMerge "Fix use of preg_match_all in MagicWord.php"
jenkins-bot [Fri, 18 Sep 2015 08:55:54 +0000 (08:55 +0000)]
Merge "Fix use of preg_match_all in MagicWord.php"

8 years agoUse User::equals() where applicable in the class
Michał Roszka [Thu, 20 Aug 2015 06:20:30 +0000 (08:20 +0200)]
Use User::equals() where applicable in the class

It is a minor cleanup operation. I replaced a comparison of user 'mId'
with a corresponding 'User::equals()' call.

Change-Id: I89dea55789f343e794429c38934c263168ef608d

8 years agoMerge "Remove dead local var in MssqlInstaller"
jenkins-bot [Fri, 18 Sep 2015 08:46:56 +0000 (08:46 +0000)]
Merge "Remove dead local var in MssqlInstaller"

8 years agoDatabase: Remove unused errorCount() method
Kevin Israel [Fri, 18 Sep 2015 06:40:44 +0000 (02:40 -0400)]
Database: Remove unused errorCount() method

Also removed the protected $mErrorCount property used by this method.

Also removed DatabaseOracle::reportQueryError(). After removing its use
of $mErrorCount and applying relevant changes from 419221e4a71b ("Fixed
bug where catching DB errors left ignoreErrors() on"), the only effect
would be that, like for the other DB types, query errors would be
logged using wfLogDBError().

Change-Id: Ie26a5f5ef7dc5619d9db38d3eb6b7af3e6592aff

8 years agoMerge "HttpError: Convert line breaks in text message to <br>"
jenkins-bot [Fri, 18 Sep 2015 07:14:43 +0000 (07:14 +0000)]
Merge "HttpError: Convert line breaks in text message to <br>"

8 years agoMerge "API: Finish killing "raw mode""
jenkins-bot [Fri, 18 Sep 2015 06:31:33 +0000 (06:31 +0000)]
Merge "API: Finish killing "raw mode""

8 years agoMerge "Small cleanups to WANObjectCache"
jenkins-bot [Fri, 18 Sep 2015 06:30:08 +0000 (06:30 +0000)]
Merge "Small cleanups to WANObjectCache"

8 years agoMerge "Extend Title check in Skin for titles without associated titles"
jenkins-bot [Fri, 18 Sep 2015 01:39:13 +0000 (01:39 +0000)]
Merge "Extend Title check in Skin for titles without associated titles"

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Thu, 17 Sep 2015 20:16:37 +0000 (22:16 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I7269d03a73a9afa677d08dc517da608328932c18

8 years agoLoad the module mediawiki.page.watch.ajax only when needed
Fomafix [Thu, 17 Sep 2015 05:35:29 +0000 (05:35 +0000)]
Load the module mediawiki.page.watch.ajax only when needed

Load the module mediawiki.page.watch.ajax only when there is
a watch button on the page.

This change uses the same checks as buildContentNavigationUrls() in SkinTemplate.php.

Also combine two if checks.

Bug: T112523
Change-Id: I78895ffea1290f8c1d90630851d0d3d443800d66

8 years agoMerge "ResourcesTest: Detect missing files in url(...) expressions"
jenkins-bot [Thu, 17 Sep 2015 19:46:11 +0000 (19:46 +0000)]
Merge "ResourcesTest: Detect missing files in url(...) expressions"

8 years agoAvoid unneeded memcached queries in showPatrolFooter()
Aaron Schulz [Thu, 17 Sep 2015 18:28:53 +0000 (11:28 -0700)]
Avoid unneeded memcached queries in showPatrolFooter()

Change-Id: I395019e85cbc80df7d77183ccb75b3691949efc6