Commit graph

2547 commits

Author SHA1 Message Date
jenkins-bot
a576e4066a Merge "Added $wgTrxProfilerLimits and slow query limits" 2015-04-28 08:26:06 +00:00
Aaron Schulz
7ea13643f5 Added $wgTrxProfilerLimits and slow query limits
* Limits are now configurable instead of being hard-coded

Change-Id: I99133586eb82e8e9e84061548c8d1a99695fde5c
2015-04-28 10:18:11 +02:00
Aaron Schulz
9d9096c7c9 Fixed default $wgMainWANCache to trigger Setup.php logic
Change-Id: I8a5b2f5bd41bfc58568f1a2d96d74ddd5d8d86ed
2015-04-27 15:01:26 -07:00
jenkins-bot
661f171575 Merge "Added $wgJobSerialCommitThreshold setting" 2015-04-27 08:29:46 +00:00
Aaron Schulz
7c821caef5 Added $wgJobSerialCommitThreshold setting
* This is used to avoid lag by certain jobs

Bug: T95501
Change-Id: Id707c9a840fa23d56407e03aaae4e25149a1f906
2015-04-24 11:38:16 -07:00
Aaron Schulz
d61244e4f9 Automatically set $wgMainWANCache by default using $wgMainCacheType
Change-Id: If1ad62e4d1f84e01cd4fea04c6dd568c9d290178
2015-04-24 01:37:04 -07:00
Aaron Schulz
3a1f8b1111 Added WANObjectCache class
This class handles caching across distance sites where purges
must reach both. It also aims to make purging more reliable in
the face of network glitches and node consistent hash ejection.

bug: T88492
Change-Id: I686811b3075bf22e2f4de45127e8461e54648ead
2015-04-23 21:36:42 +00:00
Aaron Schulz
d834197821 Moved ActiveUsers updates to recent changes jobs
* This avoids writes on view and is more reliable
* Also made the wfWaitForSlaves() there actually work

Bug: T95501
Bug: T92357
Bug: T89027
Change-Id: I0a006fc92a9268feb185c9d88aa04002ea51ecd3
2015-04-22 19:13:37 +00:00
Brad Jorsch
61233fc847 API: Move parameter formatting into LogFormatter
This allows for extensions to format their log entry parameters, and
keeps the code for formatting API log entry parameters in the same place
as for other formatting.

This also takes the opportunity to rearrange the output format slightly
to avoid conflicts like what's happening in T73020.

Bug: T35235
Bug: T73020
Bug: T91466
Change-Id: I6846ce09322eb404c506b5a51780a44ce9279fe2
2015-04-17 04:59:41 +00:00
Kunal Mehta
8f06063cc2 The 'spambot_username' message is a reserved username
It is used by cleanupSpam.php

Change-Id: I34d9bba7bf33d363bdce410c24a21dacd84771b5
2015-04-15 19:56:36 -07:00
This, that and the other
5c4681012e UI for adding and removing change tags on revisions and log entries
There is a new special page, Special:EditTags, which is very similar to
Special:RevisionDelete in a lot of ways. In fact, the SpecialEditTags class
started off as a copy-paste of SpecialRevisiondelete.

You invoke this special page by going to an article history page, checking
some revisions, and clicking "Edit tags of selected revisions". Then you
pick the modifications you want to make and click "Apply". Very much like
the revision deletion workflow.

I had to restructure some of the Action routing code, which was only
designed to handle revision deletion. Also removing some code from
SpecialRevisiondelete which didn't work as advertised in the first place,
and definitely doesn't work now.

Change-Id: I7d3ef927b5686f6211bc5817776286ead19d916b
2015-04-15 18:31:12 +00:00
This, that and the other
ae3ab9eef0 Allow users to add, remove and apply change tags using the API
You can add tags at the same time as performing action=edit, as long as you
have the "applychangetags" right. Also, you can add or remove tags after
the fact from revisions and log entries using the API action=tags.

No UI is provided for either of these changes. The target audience is user
scripts, gadgets and similar tools.

Includes a new log parameter format type: "list", for a comma-separated
list of values.

Logging of change tag events is limited to those that do not accompany an
edit (i.e. those done after the fact), and is hidden from Special:Log by
default, similar to the patrol log.

Bug: T20670
Change-Id: I37275e0f73fa3127f55da0c320b892551b61ee80
2015-04-15 18:30:45 +00:00
Aaron Schulz
53acdd6ba0 Removed unused wgDBAvgStatusPoll var
Change-Id: Ib1abf72add4d62bb41f1e2061caf9de0abd84e43
2015-04-07 15:25:03 -07:00
Chad Horohoe
4665ea4665 Begin 1.26 development cycle
Change-Id: I9e63789e7bbec95e72fca6dfc1a79f0ae1fba9b0
2015-04-07 13:55:45 -07:00
Kunal Mehta
0aab120e96 resourceloader: Require $wgResourceModuleSkinStyles paths to be in the base definition
No skin in gerrit uses the feature of per-module local or remote paths,
and not supporting it will make implementing extension/skin.json support
easier.

Change-Id: I22863ef29426dbacd65439a12aeae56d4d757951
2015-04-06 15:59:21 -07:00
jenkins-bot
a373befd6c Merge "DefaultSettings: Remove "~~~~" from comment to fix Doxygen parse error" 2015-04-05 13:07:06 +00:00
Bryan Davis
1195e11a8a Move MWLogger classes to MediaWiki\Logger namespace
Move the MWLogger PSR-3 logging related classes into the
MediaWiki\Logger namespace. Create shim classes to ease migration of
existing MWLoggerFactory usage to the namespaced classes.

Bug: T93406
Change-Id: I359cc81fbd2dcf8937742311dcc7d3dee08747b0
2015-04-03 11:32:24 -07:00
Aaron Schulz
4bdbfe6c1b Removed BloomFilter classes
* This ends up being more complex than its worth
  and even more so for multi-DC support

Bug: T93006
Change-Id: Iaa774fe69061e42955b11dc82d30dba93208e606
2015-04-03 09:10:04 +00:00
jenkins-bot
75afa93c3c Merge "DefaultSettings: Fix doxygen warning for missing @endcond" 2015-04-02 22:29:02 +00:00
Timo Tijhof
efc24d92e9 DefaultSettings: Remove "~~~~" from comment to fix Doxygen parse error
> /includes/DefaultSettings.php:7478:
>  warning: reached end of file while inside a ~~~ block!
>  The command that should end the block seems to be missing!

Three or more tildes in plain text results in the beginning of
a fenced code block.
http://doxygen.org/manual/markdown.html
https://michelf.ca/projects/php-markdown/extra/#fenced-code-blocks

It stopped parsing after $wgUrlProtocols and ignored the rest.
I tried to escape it in different ways but couldn't find any method
that keeps the string readable and inline. If it's important we can
put it back in an indented code block.

Change-Id: If350a917c6afaebcd45f246404b6b6195453e51e
2015-04-02 19:58:09 +00:00
Ori Livneh
1b6f70089d Introduce ProfilerOutputStats
* Associate Profiler objects with a request context by adding a $context
  property with a getter and a setter.
* Introduce ProfilerOutputStats, which writes profiling data to the stats
  buffer associated with the current request context.
* Make it the Profiler class's responsibility to enforce $wgProfilerLimit.
* Deprecate $wgProfilerLimit in favor of the (more aptly named, IMO)
  $wgProfiler['threshold'] config setting.
* Tidy up Profiler instance creation code in Profiler::instance().
* Add Profiler::getOutputs, which returns an array of ProfilerOutput instances
  which are configured for the current profiler and whose canUse() method
  returns true.
* Make ProfilerStub not log by creating a stub ProfilerStub::logData() method
  which does not call the parent. Previously the parent class checked if $this
  was an instance of ProfilerStub and returned early if so.

Task: T90623
Task: T85641
Change-Id: Icf644ad3435c1f30d0a49957a97b481808a3153d
2015-04-02 01:32:46 +00:00
Tyler Romeo
63cf33d825 SECURITY: Set maximal password length for DoS
Prevent DoS attacks caused by the amount of time
it takes to hash long passwords by setting a limit
on password length.

Slightly restructures the behavior of User::checkPasswordValidity
in order to accommodate for the difference between
passwords the user should be able to log in with and
passwords they should not.

Bug: T64685
Change-Id: I24f33474c6f934fb8d94bb054dc23093abfebd5e
2015-04-01 09:55:42 -07:00
Timo Tijhof
c196132769 DefaultSettings: Fix doxygen warning for missing @endcond
Follows-up r67733 which fixed this, but it got lost in the meantime.

> /includes/DefaultSettings.php:46:
>  warning: Conditional section with label file_level_code does not have
>  a corresponding @endcond command within this file.

Change-Id: If7cfe278c50e1639ef2662ba87c85426a964c22f
2015-04-01 00:40:55 +01:00
Aaron Schulz
4582b738ee Removed view event from $wgAutopromoteOnce
* This avoids master queries on view. It could use local jobs, but nothing
  was using this by default anyway.

Bug: T92357
Change-Id: Id6353942215a3c704848d3bcc31c2b76225c78be
2015-03-26 15:47:33 -07:00
Ori Livneh
7a9bee390a Add example code showing to completely disable logging
Change-Id: I965e1ff51fe31579cf24502b148d9fad971cd298
2015-03-19 22:10:37 +00:00
jenkins-bot
65294205a1 Merge "Split SiteLookup interface from SiteStore" 2015-03-19 11:32:27 +00:00
aude
aded554d70 Split SiteLookup interface from SiteStore
* SiteLookup interface is added, and SiteStore extends
  it. (any SiteStore type hints can be changed to use
  SiteLookup if all they need is lookup functionality)
* Memcached based SiteStore code is split from the
  database SiteStore, and SiteSQLStore is deprecated.
  If no caching is desired when using a SiteStore, then
  use a SiteDBStore instance, instead of passing $source
  parameter in SiteStore::getSite and SiteStore::getSites.
* SiteListFileCache renamed to FileBasedSiteLookup and
  implements SiteLookup.

Bug: T77990
Change-Id: I36b599884c211580ea6806a8a190c65c4f9087cf
2015-03-18 21:31:48 +01:00
umherirrender
4f60a37d4e Migrate import log to new log system
There is no need for an extra formatter class, because at the moment
there is nothing extra to format.

This allows use of gender on Special:Log. Old messages are kept for use
in IRC. A test was added to ensure an unchanged IRC message.

The new log message for import-interwiki is used from
I3ca8b21bce49b41cac7109efb8056ca4469b88d7 to avoid "transwiki jargon".

Bug: T57404
Change-Id: I590075b203548c071a98c1eaa4b1bc9250f60e22
2015-03-18 13:21:52 +00:00
jenkins-bot
b8ee4ba7ae Merge "Add support for HD versions of the wiki logo in MonoBook-like skins." 2015-03-13 06:30:05 +00:00
isarra
b5f2cf2db1 Add support for HD versions of the wiki logo in MonoBook-like skins.
Done using an array $wgLogoHD, which expects something like the following:

$wgLogoHD = array(
	"1.5x" => "path/to/1.5x_version.png",
	"2x" => "path/to/2x_version.png"
);

This is still horrible, but I dunno how to make it less horrible. Help.

Bug: T37337
Change-Id: Iee3e73c1f96b81c2094418986cf1c267d93d1bdd
2015-03-13 06:20:00 +00:00
Marko Obrovac
b13bd0996c Introduce the Restbase Virtual REST Service class
Restbase, the REST content API service, is to be queried instead of
Parsoid by current Parsoid users (most importantly VE). This patch
introduces the Restbase virtual REST service class and transparently
maps Parsoid calls into Restbase ones if parsoidCompat is set when
creating the service object.

Additionally, $wgVirtualRestConfig is introduced in DefaultSettings.php. This
is a first step towards global service configuration and management.

Bug: T89066
Change-Id: I4d4043e5052327bbd789331f1c05b607c45fe7cb
2015-03-09 22:05:58 +01:00
Aaron Schulz
fa212ed345 Push enqueue-on-view jobs to the faster "local" queue
* This only matters for multi-DC setups, otherwise everything is local anyway

Bug: T91819
Change-Id: I0756b59ae1ba27a5d24cf7baef6d068b748e6e30
2015-03-06 13:50:17 -08:00
Aaron Schulz
8e3721a2b9 Added EnqueueJob class that handles routing jobs to queues
Bug: T89308
Change-Id: Iadb34f24d8bbe94c0f9f119e530c0bbe1060df0a
2015-03-04 13:55:54 -08:00
jenkins-bot
770cd02b9e Merge "Shorten long lines and use consistent tabs in DefaultSettings.php" 2015-03-03 22:16:39 +00:00
Amir E. Aharoni
2b74646a57 Shorten long lines and use consistent tabs in DefaultSettings.php
To make phpcs pass.

Change-Id: Iff20470d1db409ed91577058204d0254c461ba76
2015-03-03 23:34:11 +02:00
jenkins-bot
5a00a50635 Merge "Removed pointless memcached JobQueueAggregator class" 2015-03-03 20:56:02 +00:00
Aaron Schulz
b15ac8eb48 Removed pointless memcached JobQueueAggregator class
* On a basic/default install there is only a single wiki 
  and nothing uses this. Larger wikis would want to use redis.

Change-Id: Ie5bf1a644ae60b2c6ca72b165fa5510113717611
2015-03-03 20:46:52 +00:00
jenkins-bot
cb4f6e9341 Merge "Removed doCascadeProtectionUpdates method to avoid DB writes on page views" 2015-02-23 01:18:05 +00:00
Aaron Schulz
df5ef8b5d7 Removed doCascadeProtectionUpdates method to avoid DB writes on page views
* Use special prioritized refreshLinksJobs instead, which triggers when
  transcluded pages are changed
* Also added a triggerOpportunisticLinksUpdate() method to handle
  dynamic transcludes

bug: T89389
Change-Id: Iea952d4d2e660b7957eafb5f73fc87fab347dbe7
2015-02-22 13:36:13 -08:00
jenkins-bot
8888bac668 Merge "Migrate block log to new log system" 2015-02-22 00:46:35 +00:00
Aude
2664ccdc43 Revert "Removed doCascadeProtectionUpdates method to avoid DB writes on page views"
due to breakage at least in phpunit tests for mysql:

https://travis-ci.org/wikimedia/mediawiki-extensions-Wikibase/jobs/51490784

This reverts commit 132f7bb89f.

Change-Id: I85d19ab5ad30e8d13a956d7b7467a94c9e73219d
2015-02-20 13:17:41 +00:00
Aaron Schulz
132f7bb89f Removed doCascadeProtectionUpdates method to avoid DB writes on page views
* Use special prioritized refreshLinksJobs instead, which triggers when
  transcluded pages are changed
* Also added a triggerOpportunisticLinksUpdate() method to handle
  dynamic transcludes

bug: T89389
Change-Id: I8e5a6ddb643c12e0fb5c1c68bc83f912944e6e8d
2015-02-20 03:16:18 +00:00
Aaron Schulz
e3da87e3f2 Removed deprecated RefreshLinksJob2 class
Change-Id: Id5659c7fe0c6ebcbee0ef435ee4a95c1033cda47
2015-02-12 14:19:06 -08:00
Brion Vibber
1347d5cd07 Fix doc comment on $wgResponsiveImages
Doc comment referred to older implementation's data attributes.
Updated to refer to the correct srcset attribute as settled on
by browser makers, which was switched to long ago here.

Change-Id: If2bc83dd41dd88d6480957ff4968111396c9fe98
2015-02-11 18:08:50 +00:00
jenkins-bot
554967bf4a Merge "Allow adding of context-based LESS Variables" 2015-02-10 21:34:03 +00:00
jenkins-bot
23650785ef Merge "Moved RecentChange::purgeExpiredChanges to a job" 2015-02-10 21:32:55 +00:00
Florianschmidtwelzow
6d9bb5d0d5 Allow adding of context-based LESS Variables
Add new hook (ResourceLoaderGetLessVars) called in ResourceLoader::getLessVars to
allow context-based less variables. Cache the resulting array to avoid multiple runs
of this hook.

Change-Id: I5a73bbd0ab58f8fe34519931c4f26c90998e3451
2015-02-10 16:25:37 -05:00
umherirrender
c891ff00ed Migrate block log to new log system
This allows use of gender on Special:Log.
Old messages are kept for use in IRC.
A test was added to ensure an unchanged IRC message.

Bug: T57402
Change-Id: Ibc7fcaa5a952ff90d42a6477da4baa429f3de64b
2015-02-07 21:02:10 +01:00
Bartosz Dziewoński
de168bab7e Use transparent rather than white background for ImageMagick SVG thumbnails
Default value of $wgSVGConverters['ImageMagick'] now uses transparent
background with white fallback color, rather than just white background.
This is done by using #ffffff00 ("transparent white") as background
color (the PNG file format supports saving color for transparent
pixels).

I could find no historical records for why it was done this way;
possibly the intent was to display white rather than black background
in IE 6 (which doesn't support PNG transparency) or in other contexts
where transparent background is impossible.

Bug: T76475
Change-Id: Ief0c7d71c8cc157e256fc84b1b7be3c23cc5fd9b
2015-02-05 19:23:34 +00:00
Bartosz Dziewoński
844618a231 Use 'rsvg-convert' binary rather than 'rsvg' everywhere
Update $wgSVGConverters['rsvg'] to something closer to WMF production
configuration (there is a more complicated setup involving two
variants of rsvg for some reason).

Documentation is scarce, but 'rsvg-convert' appears to be the "modern"
way to call rsvg, with 'rsvg' being deprecated or not recommended.

Bug: T76476
Change-Id: I5ed877f3a5a1f1e97ae881c1d03fc977276182b6
2015-02-05 18:17:32 +00:00